Commit 41104f1b authored by Sandro Camata Santana's avatar Sandro Camata Santana

Ajustes

parent 32ddef76
......@@ -34,6 +34,7 @@ uses
acuPersistenceLog,
acuQuerySQLODBC,
ituExplorerV2,
ituMainForm,
acuAudit,
IntegracaoDelphiSUML in 'IntegracaoDelphiSUML.pas',
Mostra_Processamento in 'Mostra_Processamento.pas' {FMostra_Processamento},
......@@ -82,12 +83,8 @@ begin
MainPool := Nil;
{$ENDIF}
Application.Initialize;
DLLMainThread := TDLLThread.Create(True);
DLLMainThread.FreeOnTerminate := False;
MainThreadID := DLLMainThread.ThreadID;
// Application.CaptureExceptions := True;
// ExtensionManager.LoadProfiles;
// StarUMLApplication.OpenProject('D:\Users\sandrosantana\Documents\git\GED\mdl\GED.uml');
// Application.CreateForm(TExplorerV2, ExplorerV2);
// Application.Run;
end.
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
......@@ -9,9 +9,9 @@
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
<MainUnitHasScaledStatement Value="False"/>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="CurioAddIn"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
......@@ -98,6 +98,10 @@
<TargetOS Value="win32"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf3"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
......@@ -199,7 +203,7 @@
<PackageName Value="LCL"/>
</Item7>
</RequiredPackages>
<Units Count="32">
<Units Count="33">
<Unit0>
<Filename Value="CurioAddIn.dpr"/>
<IsPartOfProject Value="True"/>
......@@ -389,6 +393,13 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit31>
<Unit32>
<Filename Value="itumainform.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="itMainForm"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ituMainForm"/>
</Unit32>
</Units>
</ProjectOptions>
<CompilerOptions>
......
......@@ -447,20 +447,16 @@ class procedure TDelphiAddInObj.ActionMenu_OQLV2;
var
lOQL: TExplorerV2;
begin
lOQL := TExplorerV2.Create(Application);
try
lOQL.ShowModal;
finally
lOQL.Free;
end;
Application.CreateForm(TExplorerV2, lOQL);
lOQL.Show;
end;
class procedure TDelphiAddInObj.ActionMenu_CXOQLV2;
var
lOQLExplorer: TOQLExplorerV2;
begin
lOQLExplorer := TOQLExplorerV2.Create(nil);
lOQLExplorer.ShowModal;
Application.CreateForm(TOQLExplorerV2, lOQLExplorer);
lOQLExplorer.Show;
end;
class procedure TDelphiAddInObj.ActionMenu_DynamoDefinition;
......
......@@ -178,33 +178,29 @@ var gStarUMLApp: IStarUMLApplication;
implementation
uses dialogs, uDBAttributeParameters, acuFramework, Forms, DelphiAddInObj,
Controls, strutils, utuMessage, utuXSD, acuModelMapping, acuUseCaseStateMachine;
uses dialogs, uDBAttributeParameters, acuFramework, Forms, DelphiAddInObj, Clipbrd, InterfaceBase,
Controls, strutils, utuMessage, utuXSD, acuModelMapping, acuUseCaseStateMachine, ituMainForm,
LCLIntf;
function InitializeAddIn(AApplicationHandle: THandle; AStarUMLApplication: TObject): Integer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
// Application.Handle := AApplicationHandle;
if AStarUMLApplication.GetInterface(IID_IStarUMLApplication, gStarUMLApp)
then Result := 0
else Result := -1;
DLLMainThread.StarUMLApplication := AStarUMLApplication;
DLLMainThread.Start;
Result := 0;
end;
function FinalizeAddIn: Integer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
gStarUMLApp := Nil;
PostMessage(itMainForm.Handle, WM_FINALIZE, 0, 0);
DLLMainThread.WaitFor;
DLLMainThread.Free;
Result := 0;
end;
function DoMenuAction(ActionID: Integer): Integer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
try
Result := TDelphiAddInObj.DoMenuAction(ActionID);
except
on E: Exception do
begin
Application.MessageBox(PAnsiChar(e.Message), 'Error...', MB_ICONERROR);
end;
end;
PostMessage(itMainForm.Handle, WM_DO_ACTION_MENU, ActionID, 0);
Result := 0;
end;
......@@ -1431,6 +1427,10 @@ begin
for I := 0 to (lUMLState as IUMLState).GetEntryActionCount - 1 do
lState.AddEntryAction((lUMLState as IUMLState).GetEntryActionAt(i).Name);
//Adiciona EntryActions
for I := 0 to (lUMLState as IUMLState).MOF_GetCollectionCount('EntryActions') - 1 do
lState.AddEntryAction(((lUMLState as IUMLState).MOF_GetCollectionItem('EntryActions', i) as IUMLAction).Name);
//Adiciona os DoActions
for I := 0 to (lUMLState as IUMLState).GetDoActivityCount - 1 do
lState.AddDoAction((lUMLState as IUMLState).GetDoActivityAt(I).Name);
......
......@@ -6,7 +6,8 @@ object itCadastrarFormulario: TitCadastrarFormulario
ClientHeight = 482
ClientWidth = 937
OnDestroy = FormDestroy
LCLVersion = '2.0.10.0'
ShowInTaskBar = stAlways
LCLVersion = '2.2.4.0'
object scrlbxTudo: TScrollBox
Left = 0
Height = 840
......
This diff is collapsed.
......@@ -1697,7 +1697,7 @@ begin
fhlt1.SelectEditor(SynEditOQL);
fhlt1.Rebuild;
fhlt1.CompletionOn:=true;
fhlt1.OpenOnKeyUp:=true;
fhlt1.OpenOnKeyUp:=false;
fhlt1.SelectOnEnter:= true;
fhlt1.DefTokIdentif('[$A-Za-z_]', '[A-Za-z0-9_]*');
fhlt1.KeywordAttribute.Foreground:=clBlue;
......
This diff is collapsed.
......@@ -568,7 +568,7 @@ constructor TOQLExplorerV2.Create(piOwner: TComponent);
begin
inherited Create(piOwner);
fFlagFormClosing := False;
fExplorer := TExplorerV2.Create(nil);
fExplorer := TExplorerV2.Create(self);
fExplorer.Parent := pnlOQLExplorer;
fExplorer.BorderIcons := [];
fExplorer.BorderStyle := bsNone;
......@@ -581,13 +581,13 @@ end;
procedure TOQLExplorerV2.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
// Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
end;
procedure TOQLExplorerV2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
fFlagFormClosing := True;
fExplorer.Close;
// fExplorer.Close;
Action := caFree;
end;
......
object itMainForm: TitMainForm
Left = 68
Height = 424
Top = 126
Width = 745
BorderIcons = []
BorderStyle = bsNone
Caption = 'Curio EvoUML Plugin'
Color = clGradientActiveCaption
FormStyle = fsSystemStayOnTop
Position = poScreenCenter
ShowInTaskBar = stNever
LCLVersion = '2.2.4.0'
object Timer1: TTimer
Interval = 4000
OnTimer = Timer1Timer
Left = 16
Top = 16
end
end
unit ituMainForm;
{$mode Delphi}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, LCLIntf, LMessages,
ExtCtrls;
const
WM_FINALIZE = LM_USER + 2000;
WM_DO_ACTION_MENU = LM_USER + 2001;
type
{ TitMainForm }
TitMainForm = class(TForm)
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
private
protected
procedure Finalize(var Msg: TLMessage); message WM_FINALIZE;
procedure DoMenuAction(var Msg: TLMessage); message WM_DO_ACTION_MENU;
public
end;
{ TDLLThread }
TDLLThread = class(TThread)
public
StarUMLApplication: TObject;
protected
procedure Execute; override;
end;
var
itMainForm: TitMainForm;
DLLMainThread: TDLLThread;
implementation
{$R *.lfm}
uses Win32Int, Win32Proc, LazUTF8, Windows, ituExplorerV2, ituOQLExplorerV2,
DelphiAddInObj, StarUMLintf, IntegracaoDelphiSUML, ActiveX;
procedure CreateAppHandle;
var
SysMenu: HMENU;
begin
Win32WidgetSet.AppHandle := CreateWindowW(@ClsNameW,
PWideChar(UTF8ToUTF16(Application.Title)),
WS_POPUP or WS_CLIPSIBLINGS or WS_SYSMENU or WS_MINIMIZEBOX,
0, {Windows.GetSystemMetrics(SM_CXSCREEN) div 2,}
0, {Windows.GetSystemMetrics(SM_CYSCREEN) div 2,}
0, 0, HWND(nil), HMENU(nil), HInstance, nil);
AllocWindowInfo(Win32WidgetSet.AppHandle);
// remove useless menuitems from sysmenu
SysMenu := Windows.GetSystemMenu(Win32WidgetSet.AppHandle, False);
Windows.DeleteMenu(SysMenu, SC_MAXIMIZE, MF_BYCOMMAND);
Windows.DeleteMenu(SysMenu, SC_SIZE, MF_BYCOMMAND);
Windows.DeleteMenu(SysMenu, SC_MOVE, MF_BYCOMMAND);
end;
{ TitMainForm }
procedure TitMainForm.Timer1Timer(Sender: TObject);
begin
itMainForm.Hide;
timer1.OnTimer:=nil;
end;
procedure TitMainForm.Finalize(var Msg: TLMessage);
begin
gStarUMLApp := Nil;
self.Close;
end;
procedure TitMainForm.DoMenuAction(var Msg: TLMessage);
begin
try
TDelphiAddInObj.DoMenuAction(Msg.wParam);
except
on E: Exception do
begin
Application.MessageBox(PAnsiChar(e.Message), 'Error...', MB_ICONERROR);
end;
end;
end;
{ TDLLThread }
procedure TDLLThread.Execute;
begin
CoInitializeEx(nil, COINIT_SPEED_OVER_MEMORY);
StarUMLApplication.GetInterface(IID_IStarUMLApplication, gStarUMLApp);
Application.Initialize;
CreateAppHandle;
Application.CreateForm(TitMainForm, itMainForm);
Application.Run;
CoUninitialize;
end;
end.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment