Commit 6c497d57 authored by Sandro Camata Santana's avatar Sandro Camata Santana

versao inicial plugin curio multiplataforma

parent 712d5a6c
...@@ -5,9 +5,15 @@ library CurioAddIn; ...@@ -5,9 +5,15 @@ library CurioAddIn;
{$ENDIF} {$ENDIF}
uses uses
{$IFDEF UNIX}
cwstring,
{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
SysUtils, SysUtils,
Classes, Classes,
Interfaces, Interfaces,
CocoaInt,
Forms, Forms,
acuObject, acuObject,
utuMessage, utuMessage,
...@@ -16,6 +22,8 @@ uses ...@@ -16,6 +22,8 @@ uses
acuSQLDialectSQLServer, acuSQLDialectSQLServer,
acuSQLDialectOracle, acuSQLDialectOracle,
acuSQLDialectDB2, acuSQLDialectDB2,
utuLinksManager,
utuLinkSock,
acuFramework, acuFramework,
acuQuerySQLODBC, acuQuerySQLODBC,
ituExplorerV2, ituExplorerV2,
...@@ -37,16 +45,20 @@ exports ...@@ -37,16 +45,20 @@ exports
{$R *.res} {$R *.res}
begin begin
ChangeLocaleFormatSetting; ChangeLocaleFormatSetting;
gDefaultDatabaseDriver := typeOf(acDatabaseSQLODBC); gDefaultDatabaseDriver := typeOf(acDatabaseSQLODBC);
PersistenceManager.DefaultRepositoryClass := typeOf(acRepositorySQL); PersistenceManager.DefaultRepositoryClass := typeOf(acRepositorySQL);
PersistenceManager.RegisterClass(typeOf(acPersistentObject), acPersistentObjectClassFactory.Create); PersistenceManager.RegisterClass(typeOf(acPersistentObject), acPersistentObjectClassFactory.Create);
gSQLDialectManager.RegisterSQLDialect('MS SQL Server', typeOf(acSQLDialectSQLServer), acSQLDialectSQLServerClassFactory.Create); gSQLDialectManager.RegisterSQLDialect('MS SQL Server', typeOf(acSQLDialectSQLServer), acSQLDialectSQLServerClassFactory.Create);
gSQLDialectManager.RegisterSQLDialect('Oracle', typeOf(acSQLDialectOracle), acSQLDialectOracleClassFactory.Create); // gSQLDialectManager.RegisterSQLDialect('Oracle', typeOf(acSQLDialectOracle), acSQLDialectOracleClassFactory.Create);
gSQLDialectManager.RegisterSQLDialect('DB2', typeOf(acSQLDialectDB2), acSQLDialectDB2ClassFactory.Create); // gSQLDialectManager.RegisterSQLDialect('DB2', typeOf(acSQLDialectDB2), acSQLDialectDB2ClassFactory.Create);
gLinksManager.RegisterLink('tcp/ip', typeOf(utLinkSock), utLinkSockClassFactory.Create);
MainPool := Nil;
Application.Initialize; Application.Initialize;
// Application.CaptureExceptions := True;
// ExtensionManager.LoadProfiles; // ExtensionManager.LoadProfiles;
// StarUMLApplication.OpenProject('D:\Users\sandrosantana\Documents\git\GED\mdl\GED.uml'); // StarUMLApplication.OpenProject('D:\Users\sandrosantana\Documents\git\GED\mdl\GED.uml');
// Application.CreateForm(TExplorerV2, ExplorerV2); // Application.CreateForm(TExplorerV2, ExplorerV2);
......
This diff is collapsed.
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
unit InstantCode; unit InstantCode;
{$IFDEF LINUX} {$IFDEF UNIX}
{$I 'InstantDefines.inc'} {$I 'InstantDefines.inc'}
{$ELSE} {$ELSE}
{$I 'InstantDefines.inc'} {$I 'InstantDefines.inc'}
...@@ -1263,7 +1263,7 @@ const ...@@ -1263,7 +1263,7 @@ const
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
CRLF = #13#10; CRLF = #13#10;
{$ENDIF} {$ENDIF}
{$IFDEF LINUX} {$IFDEF UNIX}
CRLF = #10; CRLF = #10;
{$ENDIF} {$ENDIF}
...@@ -6091,7 +6091,7 @@ begin ...@@ -6091,7 +6091,7 @@ begin
ReadTextChar; ReadTextChar;
{$ENDIF} {$ENDIF}
{$IFDEF LINUX} {$IFDEF UNIX}
if (Ch = #10) then if (Ch = #10) then
begin begin
{$ENDIF} {$ENDIF}
......
...@@ -146,7 +146,7 @@ begin ...@@ -146,7 +146,7 @@ begin
#10: Inc(Line); #10: Inc(Line);
{$ENDIF} {$ENDIF}
{$IFDEF LINUX} {$IFDEF UNIX}
#10:begin #10:begin
Inc(Line); Inc(Line);
Column := 1; Column := 1;
...@@ -169,7 +169,7 @@ begin ...@@ -169,7 +169,7 @@ begin
#10: Dec(Line); #10: Dec(Line);
{$ENDIF} {$ENDIF}
{$IFDEF LINUX} {$IFDEF UNIX}
#10:begin #10:begin
Dec(Line); Dec(Line);
Column := 0; Column := 0;
......
...@@ -3,7 +3,7 @@ unit IntegracaoDelphiSUML; ...@@ -3,7 +3,7 @@ unit IntegracaoDelphiSUML;
interface interface
uses uses
InstantCode, StarUMLintf, acuObject, SysUtils, acuModel, acuRepositorySQL, comobj, LCLType, InstantCode, StarUMLintf, acuObject, SysUtils, acuModel, acuRepositorySQL,
Classes, Mostra_Processamento, acuContainers, utuStateMachine, variants, Utility; Classes, Mostra_Processamento, acuContainers, utuStateMachine, variants, Utility;
const cOPTIONSCHEMAID = 'StarUML.Conexo'; const cOPTIONSCHEMAID = 'StarUML.Conexo';
...@@ -168,33 +168,32 @@ type ...@@ -168,33 +168,32 @@ type
property StarUMLApp: IStarUMLApplication read fStarUMLApp; property StarUMLApp: IStarUMLApplication read fStarUMLApp;
end; end;
function InitializeAddIn(const AApplicationHandle: THandle; const AStarUMLApplication: TObject): Integer; stdcall; function InitializeAddIn(AApplicationHandle: THandle; AStarUMLApplication: TObject): Integer; cdecl;
function FinalizeAddIn: Integer; stdcall; function FinalizeAddIn: Integer; cdecl;
function DoMenuAction(const ActionID: Integer): Integer; stdcall; function DoMenuAction(ActionID: Integer): Integer; cdecl;
var gStarUMLApp: IStarUMLApplication;
implementation implementation
uses dialogs, uDBAttributeParameters, acuUseCaseStateMachine, acuFramework, Forms, DelphiAddInObj, uses dialogs, uDBAttributeParameters, acuUseCaseStateMachine, acuFramework, Forms, DelphiAddInObj,
Controls, strutils, windows, utuMessage, acuOQL, utuXSD, utuOQL, acuModelMapping; Controls, strutils, utuMessage, acuOQL, utuXSD, utuOQL, acuModelMapping;
function InitializeAddIn(AApplicationHandle: THandle; AStarUMLApplication: TObject): Integer; cdecl;
var gStarUMLApp: IStarUMLApplication;
function InitializeAddIn(const AApplicationHandle: THandle; const AStarUMLApplication: TObject): Integer; stdcall;
begin begin
Application.Handle := AApplicationHandle; // Application.Handle := AApplicationHandle;
if AStarUMLApplication.GetInterface(IID_IStarUMLApplication, gStarUMLApp) if AStarUMLApplication.GetInterface(IID_IStarUMLApplication, gStarUMLApp)
then Result := 0 then Result := 0
else Result := -1; else Result := -1;
end; end;
function FinalizeAddIn: Integer; stdcall; function FinalizeAddIn: Integer; cdecl;
begin begin
Result := 0; Result := 0;
end; end;
function DoMenuAction(const ActionID: Integer): Integer; stdcall; function DoMenuAction(ActionID: Integer): Integer; cdecl;
begin begin
Result := TDelphiAddInObj.DoMenuAction(ActionID); Result := TDelphiAddInObj.DoMenuAction(ActionID);
end; end;
...@@ -317,8 +316,8 @@ procedure TUtil.SaveAllDiagrams(const piTargetDirectory: string); ...@@ -317,8 +316,8 @@ procedure TUtil.SaveAllDiagrams(const piTargetDirectory: string);
for I := 0 to piModel.GetOwnedDiagramCount - 1 do for I := 0 to piModel.GetOwnedDiagramCount - 1 do
begin begin
lDir := IncludeTrailingPathDelimiter(piTargetDirectory) + piUseCaseName; lDir := IncludeTrailingPathDelimiter(piTargetDirectory) + piUseCaseName;
if not DirectoryExists(lDir) then // if not DirectoryExists(lDir) then
CreateDirectory(PAnsiChar(lDir),nil); // CreateDirectory(PAnsiChar(lDir),nil);
piModel.GetOwnedDiagramAt(I).DiagramView.ExportDiagramAsJPEG(IncludeTrailingPathDelimiter(lDir) + piModel.GetOwnedDiagramAt(I).DiagramView.ExportDiagramAsJPEG(IncludeTrailingPathDelimiter(lDir) +
piModel.GetOwnedDiagramAt(I).GetMetaClass.Name + '_' + piModel.GetOwnedDiagramAt(I).GetMetaClass.Name + '_' +
...@@ -1608,7 +1607,7 @@ begin ...@@ -1608,7 +1607,7 @@ begin
lUMLBaseSubmachineState.Submachine := nil; lUMLBaseSubmachineState.Submachine := nil;
lElement := nil; lElement := nil;
if not piMetaModelOptions.SilentMode then PutMessage(FormatDateTime('hh:nn:ss', Time) + ' - Model mappings generated.', gStarUMLApp.GetProject, 2); if not piMetaModelOptions.SilentMode then PutMessage(FormatDateTime('hh:nn:ss', Time) + ' - Model mappings generated.', gStarUMLApp.GetProject, 2);
MetaModel.SetOrder; // MetaModel.SetOrder;
finally finally
end; end;
...@@ -1703,7 +1702,7 @@ begin ...@@ -1703,7 +1702,7 @@ begin
raise Exception.Create(Format('Need to define tagged value "Cod" for class "%s" in DBClassMap Tag Definition Set (DBMappings Profiler).',[lClassChild.Pathname])); raise Exception.Create(Format('Need to define tagged value "Cod" for class "%s" in DBClassMap Tag Definition Set (DBMappings Profiler).',[lClassChild.Pathname]));
end; end;
lClassMapTicket := poMetaModel.NewClassRegisterTicket(lsClassCode, lsNomeClasse, poClasseRaiz.Name, -1); lClassMapTicket := poMetaModel.NewClassRegisterTicket(lsClassCode, lsNomeClasse, poClasseRaiz.Name, 0);
lClassMapTicket.AuditDescription := lAuditDescription; lClassMapTicket.AuditDescription := lAuditDescription;
lClassMapTicket.DisplayName := lClassDisplayName; lClassMapTicket.DisplayName := lClassDisplayName;
lClassMapTicket.DBIndexes := lIndexes; lClassMapTicket.DBIndexes := lIndexes;
...@@ -1791,7 +1790,7 @@ begin ...@@ -1791,7 +1790,7 @@ begin
if sametext(lUMLAttribute.StereotypeName, 'Persistent') then if sametext(lUMLAttribute.StereotypeName, 'Persistent') then
begin begin
prop := lClassMapTicket.NewAttributeTicket(lsAtributo, lsAtributoType, acAttributeStereotype.pvPersistent, lAttributeIsAuditable, 0); prop := lClassMapTicket.NewAttributeTicket(lsAtributo, lsAtributoType, acAttributeStereotype.pvPersistent, lAttributeIsAuditable, -1);
prop.FixSize := lFixSize; prop.FixSize := lFixSize;
prop.VarSize := lVarSize; prop.VarSize := lVarSize;
prop.Mandatory := lbMandatory; prop.Mandatory := lbMandatory;
...@@ -6748,8 +6747,12 @@ destructor TUtil.Destroy; ...@@ -6748,8 +6747,12 @@ destructor TUtil.Destroy;
begin begin
fMetaModelPersistenceMap.Free; fMetaModelPersistenceMap.Free;
fMetaModel.Free; fMetaModel.Free;
gStarUMLApp := nil; fStarUMLApp := nil;
inherited; inherited;
end; end;
initialization
finalization
end. end.
object FMostra_Processamento: TFMostra_Processamento object FMostra_Processamento: TFMostra_Processamento
Left = 220 Left = 220
Height = 65
Top = 220 Top = 220
Width = 548
BorderStyle = bsDialog BorderStyle = bsDialog
ClientHeight = 65 ClientHeight = 65
ClientWidth = 548 ClientWidth = 548
Color = clBtnFace Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
Position = poScreenCenter Position = poScreenCenter
PixelsPerInch = 96 LCLVersion = '2.0.0.4'
TextHeight = 13
object pnlMensagem: TPanel object pnlMensagem: TPanel
Left = 0 Left = 0
Height = 27
Top = 38 Top = 38
Width = 548 Width = 548
Height = 27
Align = alBottom Align = alBottom
BevelInner = bvLowered BevelInner = bvLowered
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -12 Font.Height = -12
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'
Font.Style = [fsBold] Font.Style = [fsBold]
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
ExplicitTop = 54
end end
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Height = 38
Top = 0 Top = 0
Width = 548 Width = 548
Height = 38
Align = alClient Align = alClient
BevelInner = bvLowered BevelInner = bvLowered
ClientHeight = 38
ClientWidth = 548
TabOrder = 1 TabOrder = 1
ExplicitHeight = 68
object pgbBarraDeProgresso: TProgressBar object pgbBarraDeProgresso: TProgressBar
Left = 9 Left = 9
Height = 18
Top = 10 Top = 10
Width = 533 Width = 533
Height = 18
Smooth = True Smooth = True
TabOrder = 0 TabOrder = 0
end end
......
...@@ -79,6 +79,7 @@ end; ...@@ -79,6 +79,7 @@ end;
destructor TFShowProgressForm.destroy; destructor TFShowProgressForm.destroy;
begin begin
fFormProgress.Close;
fFormProgress.Free; fFormProgress.Free;
inherited; inherited;
end; end;
......
...@@ -91,7 +91,7 @@ function GetDllDirectory: string; ...@@ -91,7 +91,7 @@ function GetDllDirectory: string;
implementation implementation
uses uses
Windows, SysUtils,Forms; SysUtils, Forms;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// PStringWriter // PStringWriter
...@@ -231,7 +231,7 @@ var ...@@ -231,7 +231,7 @@ var
Path: string; Path: string;
begin begin
FillChar(ModuleName, Sizeof(ModuleName), #10); FillChar(ModuleName, Sizeof(ModuleName), #10);
GetModuleFileName(HInstance, ModuleName, Sizeof(ModuleName)); // GetModuleFileName(HInstance, ModuleName, Sizeof(ModuleName));
Path := ExtractFileDir(ModuleName); Path := ExtractFileDir(ModuleName);
Result := Path; Result := Path;
end; end;
......
...@@ -16,6 +16,8 @@ object ObjectExplorer: TObjectExplorer ...@@ -16,6 +16,8 @@ object ObjectExplorer: TObjectExplorer
Width = 320 Width = 320
Align = alClient Align = alClient
BorderStyle = bsNone BorderStyle = bsNone
ExpandSignSize = 9
Indent = 18
ReadOnly = True ReadOnly = True
ScrollBars = ssAutoBoth ScrollBars = ssAutoBoth
ShowLines = False ShowLines = False
......
...@@ -12,7 +12,6 @@ object CodeGen: TCodeGen ...@@ -12,7 +12,6 @@ object CodeGen: TCodeGen
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
OnShow = FormShow OnShow = FormShow
Position = poDesktopCenter Position = poDesktopCenter
LCLVersion = '2.1.0.0'
object PageControl1: TPageControl object PageControl1: TPageControl
Left = 0 Left = 0
Height = 616 Height = 616
...@@ -24,26 +23,26 @@ object CodeGen: TCodeGen ...@@ -24,26 +23,26 @@ object CodeGen: TCodeGen
TabOrder = 0 TabOrder = 0
object TabSheet1: TTabSheet object TabSheet1: TTabSheet
Caption = 'UseCase' Caption = 'UseCase'
ClientHeight = 590 ClientHeight = 577
ClientWidth = 881 ClientWidth = 883
object Panel3: TPanel object Panel3: TPanel
Left = 0 Left = 0
Height = 590 Height = 577
Top = 0 Top = 0
Width = 881 Width = 883
Align = alClient Align = alClient
BevelOuter = bvLowered BevelOuter = bvLowered
ClientHeight = 590 ClientHeight = 577
ClientWidth = 881 ClientWidth = 883
TabOrder = 0 TabOrder = 0
object Panel2: TPanel object Panel2: TPanel
Left = 1 Left = 1
Height = 465 Height = 452
Top = 124 Top = 124
Width = 280 Width = 280
Align = alLeft Align = alLeft
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 465 ClientHeight = 452
ClientWidth = 280 ClientWidth = 280
TabOrder = 0 TabOrder = 0
object Panel4: TPanel object Panel4: TPanel
...@@ -198,7 +197,7 @@ object CodeGen: TCodeGen ...@@ -198,7 +197,7 @@ object CodeGen: TCodeGen
end end
object lvUseCases: TListView object lvUseCases: TListView
Left = 0 Left = 0
Height = 380 Height = 367
Top = 41 Top = 41
Width = 280 Width = 280
Align = alClient Align = alClient
...@@ -219,7 +218,7 @@ object CodeGen: TCodeGen ...@@ -219,7 +218,7 @@ object CodeGen: TCodeGen
object Panel13: TPanel object Panel13: TPanel
Left = 0 Left = 0
Height = 44 Height = 44
Top = 421 Top = 408
Width = 280 Width = 280
Align = alBottom Align = alBottom
BevelInner = bvLowered BevelInner = bvLowered
...@@ -242,33 +241,33 @@ object CodeGen: TCodeGen ...@@ -242,33 +241,33 @@ object CodeGen: TCodeGen
end end
object PageControl2: TPageControl object PageControl2: TPageControl
Left = 281 Left = 281
Height = 465 Height = 452
Top = 124 Top = 124
Width = 599 Width = 601
ActivePage = TabSheet3 ActivePage = TabSheet2
Align = alClient Align = alClient
TabIndex = 1 TabIndex = 0
TabOrder = 1 TabOrder = 1
object TabSheet2: TTabSheet object TabSheet2: TTabSheet
Caption = 'Usecase' Caption = 'Usecase'
ClientHeight = 439 ClientHeight = 413
ClientWidth = 591 ClientWidth = 595
object Panel5: TPanel object Panel5: TPanel
Left = 0 Left = 0
Height = 439 Height = 413
Top = 0 Top = 0
Width = 591 Width = 595
Align = alClient Align = alClient
BevelInner = bvLowered BevelInner = bvLowered
Caption = 'Panel5' Caption = 'Panel5'
ClientHeight = 439 ClientHeight = 413
ClientWidth = 591 ClientWidth = 595
TabOrder = 0 TabOrder = 0
object Panel6: TPanel object Panel6: TPanel
Left = 2 Left = 2
Height = 20 Height = 20
Top = 2 Top = 2
Width = 587 Width = 591
Align = alTop Align = alTop
BevelInner = bvLowered BevelInner = bvLowered
Caption = 'UseCase code preview' Caption = 'UseCase code preview'
...@@ -276,9 +275,9 @@ object CodeGen: TCodeGen ...@@ -276,9 +275,9 @@ object CodeGen: TCodeGen
end end
inline memCode: TSynEdit inline memCode: TSynEdit
Left = 2 Left = 2
Height = 415 Height = 389
Top = 22 Top = 22
Width = 587 Width = 591
Align = alClient Align = alClient
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
...@@ -356,14 +355,14 @@ object CodeGen: TCodeGen ...@@ -356,14 +355,14 @@ object CodeGen: TCodeGen
end end
object TabSheet3: TTabSheet object TabSheet3: TTabSheet
Caption = 'XSD' Caption = 'XSD'
ClientHeight = 439 ClientHeight = 413
ClientWidth = 591 ClientWidth = 595
ImageIndex = 1 ImageIndex = 1
object lvXSD: TListView object lvXSD: TListView
Left = 0 Left = 0
Height = 129 Height = 129
Top = 0 Top = 0
Width = 591 Width = 595
Align = alTop Align = alTop
Columns = < Columns = <
item item
...@@ -396,22 +395,22 @@ object CodeGen: TCodeGen ...@@ -396,22 +395,22 @@ object CodeGen: TCodeGen
end end
object PageControl3: TPageControl object PageControl3: TPageControl
Left = 0 Left = 0
Height = 310 Height = 284
Top = 129 Top = 129
Width = 591 Width = 595
ActivePage = TabSheet5 ActivePage = TabSheet4
Align = alClient Align = alClient
TabIndex = 1 TabIndex = 0
TabOrder = 1 TabOrder = 1
object TabSheet4: TTabSheet object TabSheet4: TTabSheet
Caption = 'XSD In' Caption = 'XSD In'
ClientHeight = 0 ClientHeight = 245
ClientWidth = 0 ClientWidth = 589
inline memXSDIn: TSynEdit inline memXSDIn: TSynEdit
Left = 0 Left = 0
Height = 278 Height = 245
Top = 0 Top = 0
Width = 583 Width = 589
Align = alClient Align = alClient
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
...@@ -488,14 +487,14 @@ object CodeGen: TCodeGen ...@@ -488,14 +487,14 @@ object CodeGen: TCodeGen
end end
object TabSheet5: TTabSheet object TabSheet5: TTabSheet
Caption = 'XSD Out' Caption = 'XSD Out'
ClientHeight = 284 ClientHeight = 245
ClientWidth = 583 ClientWidth = 589
ImageIndex = 1 ImageIndex = 1
inline memXSDOut: TSynEdit inline memXSDOut: TSynEdit
Left = 0 Left = 0
Height = 284 Height = 245
Top = 0 Top = 0
Width = 583 Width = 589
Align = alClient Align = alClient
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
...@@ -577,27 +576,27 @@ object CodeGen: TCodeGen ...@@ -577,27 +576,27 @@ object CodeGen: TCodeGen
Left = 1 Left = 1
Height = 123 Height = 123
Top = 1 Top = 1
Width = 879 Width = 881
ActivePage = TabSheet7 ActivePage = TabSheet7
Align = alTop Align = alTop
TabIndex = 0 TabIndex = 0
TabOrder = 2 TabOrder = 2
object TabSheet7: TTabSheet object TabSheet7: TTabSheet
Caption = 'General' Caption = 'General'
ClientHeight = 97 ClientHeight = 84
ClientWidth = 871 ClientWidth = 875
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 97 Height = 84
Top = 0 Top = 0
Width = 871 Width = 875
Align = alClient Align = alClient
Caption = 'General' Caption = 'General'
ClientHeight = 97 ClientHeight = 84
ClientWidth = 871 ClientWidth = 875
TabOrder = 0 TabOrder = 0
object SpeedButton6: TSpeedButton object SpeedButton6: TSpeedButton
Left = 764 Left = 768
Height = 71 Height = 71
Top = 15 Top = 15
Width = 100 Width = 100
...@@ -838,8 +837,8 @@ object CodeGen: TCodeGen ...@@ -838,8 +837,8 @@ object CodeGen: TCodeGen
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 66 ClientHeight = 67
ClientWidth = 91 ClientWidth = 87
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
'Server' 'Server'
...@@ -862,8 +861,8 @@ object CodeGen: TCodeGen ...@@ -862,8 +861,8 @@ object CodeGen: TCodeGen
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 66 ClientHeight = 67
ClientWidth = 94 ClientWidth = 90
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
'Delphi' 'Delphi'
...@@ -879,8 +878,8 @@ object CodeGen: TCodeGen ...@@ -879,8 +878,8 @@ object CodeGen: TCodeGen
Top = 7 Top = 7
Width = 537 Width = 537
Caption = 'Output directory' Caption = 'Output directory'
ClientHeight = 66 ClientHeight = 67
ClientWidth = 533 ClientWidth = 529
TabOrder = 2 TabOrder = 2
object SpeedButton5: TSpeedButton object SpeedButton5: TSpeedButton
Left = 503 Left = 503
...@@ -920,7 +919,7 @@ object CodeGen: TCodeGen ...@@ -920,7 +919,7 @@ object CodeGen: TCodeGen
end end
object edtDirectory: TEdit object edtDirectory: TEdit
Left = 10 Left = 10
Height = 21 Height = 22
Top = 33 Top = 33
Width = 487 Width = 487
TabOrder = 0 TabOrder = 0
...@@ -954,8 +953,8 @@ object CodeGen: TCodeGen ...@@ -954,8 +953,8 @@ object CodeGen: TCodeGen
TabOrder = 0 TabOrder = 0
object TabSheet8: TTabSheet object TabSheet8: TTabSheet
Caption = 'Java' Caption = 'Java'
ClientHeight = 67 ClientHeight = 54
ClientWidth = 479 ClientWidth = 481
object Label1: TLabel object Label1: TLabel
Left = 10 Left = 10
Height = 13 Height = 13
...@@ -1027,8 +1026,8 @@ object CodeGen: TCodeGen ...@@ -1027,8 +1026,8 @@ object CodeGen: TCodeGen
TabOrder = 0 TabOrder = 0
object TabSheet9: TTabSheet object TabSheet9: TTabSheet
Caption = 'SQL Server' Caption = 'SQL Server'
ClientHeight = 564 ClientHeight = 551
ClientWidth = 873 ClientWidth = 875
object Panel7: TPanel object Panel7: TPanel
Left = 0 Left = 0
Height = 564 Height = 564
...@@ -1366,4 +1365,24 @@ object CodeGen: TCodeGen ...@@ -1366,4 +1365,24 @@ object CodeGen: TCodeGen
end end
end end
end end
object SynJavaSyn1: TSynJavaSyn
DefaultFilter = 'Java Files (*.java)|*.java'
Enabled = False
left = 602
top = 42
end
object SynSQLSyn1: TSynSQLSyn
DefaultFilter = 'SQL Files (*.sql)|*.sql'
Enabled = False
SQLDialect = sqlSybase
left = 784
top = 40
end
object SynFreePascalSyn1: TSynFreePascalSyn
Enabled = False
CompilerMode = pcmObjFPC
NestedComments = True
left = 704
top = 32
end
end end
...@@ -13,16 +13,23 @@ uses ...@@ -13,16 +13,23 @@ uses
LCLIntf, LCLType, LMessages, LCLIntf, LCLType, LMessages,
{$ENDIF} {$ENDIF}
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, SynEdit, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, SynEdit,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, acuframework, IntegracaoDelphiSUML, SynHighlighterJava, SynHighlighterPas, SynHighlighterSQL, SynHighlighterMulti,
Buttons, utuStateMachine, acuContainers, acuModel; SynHighlighterAny, Dialogs, StdCtrls, ExtCtrls, ComCtrls, acuframework,
IntegracaoDelphiSUML, Buttons, utuStateMachine, acuContainers, acuModel;
const cServer = 0; cClient = 1; const cServer = 0; cClient = 1;
cDelphi = 0; cJava = 1; cCCharp = 2; cDelphi = 0; cJava = 1; cCCharp = 2;
type type
{ TCodeGen }
TCodeGen = class(TForm) TCodeGen = class(TForm)
PageControl1: TPageControl; PageControl1: TPageControl;
SynFreePascalSyn1: TSynFreePascalSyn;
SynJavaSyn1: TSynJavaSyn;
SynSQLSyn1: TSynSQLSyn;
TabSheet1: TTabSheet; TabSheet1: TTabSheet;
Panel3: TPanel; Panel3: TPanel;
Panel2: TPanel; Panel2: TPanel;
......
object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions
Left = 640 Left = 640
Height = 464 Height = 496
Top = 251 Top = 251
Width = 376 Width = 376
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Model Mappings options' Caption = 'Model Mappings options'
ClientHeight = 464 ClientHeight = 496
ClientWidth = 376 ClientWidth = 376
Color = clBtnFace Color = clBtnFace
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
OnDestroy = FormDestroy OnDestroy = FormDestroy
OnShow = FormShow OnShow = FormShow
ParentFont = True
Position = poDesktopCenter Position = poDesktopCenter
LCLVersion = '2.1.0.0'
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 48 Height = 56
Top = 416 Top = 440
Width = 376 Width = 376
Align = alBottom Align = alBottom
ClientHeight = 48 ClientHeight = 56
ClientWidth = 376 ClientWidth = 376
TabOrder = 0 TabOrder = 0
object BitBtn1: TBitBtn object BitBtn1: TBitBtn
Left = 199 Left = 160
Height = 34 Height = 34
Top = 8 Top = 14
Width = 75 Width = 100
Caption = 'Generate' Caption = 'Generate'
Default = True Default = True
Glyph.Data = { Glyph.Data = {
...@@ -79,48 +76,31 @@ object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions ...@@ -79,48 +76,31 @@ object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions
TabOrder = 1 TabOrder = 1
end end
object BitBtn2: TBitBtn object BitBtn2: TBitBtn
Left = 289 Left = 268
Height = 34 Height = 34
Top = 8 Top = 14
Width = 75 Width = 100
Cancel = True Cancel = True
Caption = 'Cancel' DefaultCaption = True
Glyph.Data = { Kind = bkCancel
DE010000424DDE01000000000000760000002800000024000000120000000100
0400000000006801000000000000000000001000000000000000000000000000
80000080000000808000800000008000800080800000C0C0C000808080000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
333333333333333333333333000033338833333333333333333F333333333333
0000333911833333983333333388F333333F3333000033391118333911833333
38F38F333F88F33300003339111183911118333338F338F3F8338F3300003333
911118111118333338F3338F833338F3000033333911111111833333338F3338
3333F8330000333333911111183333333338F333333F83330000333333311111
8333333333338F3333383333000033333339111183333333333338F333833333
00003333339111118333333333333833338F3333000033333911181118333333
33338333338F333300003333911183911183333333383338F338F33300003333
9118333911183333338F33838F338F33000033333913333391113333338FF833
38F338F300003333333333333919333333388333338FFF830000333333333333
3333333333333333333888330000333333333333333333333333333333333333
0000
}
ModalResult = 2 ModalResult = 2
NumGlyphs = 2 NumGlyphs = 2
TabOrder = 0 TabOrder = 0
end end
object BitBtn3: TBitBtn object BitBtn3: TBitBtn
Left = 7 Left = 7
Height = 19 Height = 25
Top = 23 Top = 23
Width = 111 Width = 89
Caption = 'Retrieve last params' Caption = 'Load Default'
OnClick = BitBtn3Click OnClick = BitBtn3Click
TabOrder = 2 TabOrder = 2
end end
object ckbDefault: TCheckBox object ckbDefault: TCheckBox
Left = 7 Left = 7
Height = 19 Height = 18
Top = 3 Top = 3
Width = 55 Width = 66
Caption = 'Default' Caption = 'Default'
Checked = True Checked = True
State = cbChecked State = cbChecked
...@@ -129,25 +109,25 @@ object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions ...@@ -129,25 +109,25 @@ object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions
end end
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Height = 416 Height = 440
Top = 0 Top = 0
Width = 376 Width = 376
Align = alClient Align = alClient
ClientHeight = 416 ClientHeight = 440
ClientWidth = 376 ClientWidth = 376
TabOrder = 1 TabOrder = 1
object Label1: TLabel object Label1: TLabel
Left = 14 Left = 8
Height = 13 Height = 16
Top = 17 Top = 8
Width = 84 Width = 108
Caption = 'Output directory:' Caption = 'Output directory:'
ParentColor = False ParentColor = False
end end
object SpeedButton1: TSpeedButton object SpeedButton1: TSpeedButton
Left = 341 Left = 345
Height = 22 Height = 22
Top = 7 Top = 2
Width = 23 Width = 23
Flat = True Flat = True
Glyph.Data = { Glyph.Data = {
...@@ -186,12 +166,12 @@ object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions ...@@ -186,12 +166,12 @@ object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions
Top = 248 Top = 248
Width = 360 Width = 360
Caption = 'Output file name' Caption = 'Output file name'
ClientHeight = 38 ClientHeight = 33
ClientWidth = 356 ClientWidth = 352
TabOrder = 2 TabOrder = 2
object lblFileExists: TLabel object lblFileExists: TLabel
Left = 13 Left = 13
Height = 14 Height = 13
Top = 43 Top = 43
Width = 194 Width = 194
Caption = 'File already exists at specified directory.' Caption = 'File already exists at specified directory.'
...@@ -203,9 +183,9 @@ object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions ...@@ -203,9 +183,9 @@ object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions
ParentFont = False ParentFont = False
end end
object edtFileName: TEdit object edtFileName: TEdit
Left = 8 Left = 6
Height = 21 Height = 15
Top = 0 Top = 8
Width = 338 Width = 338
OnChange = edtFileNameChange OnChange = edtFileNameChange
TabOrder = 0 TabOrder = 0
...@@ -213,18 +193,18 @@ object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions ...@@ -213,18 +193,18 @@ object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions
end end
object GroupBox2: TGroupBox object GroupBox2: TGroupBox
Left = 8 Left = 8
Height = 48 Height = 56
Top = 296 Top = 312
Width = 360 Width = 360
Caption = 'Options' Caption = 'Options'
ClientHeight = 30 ClientHeight = 33
ClientWidth = 356 ClientWidth = 352
TabOrder = 0 TabOrder = 0
object ckbIgnoreXSD: TCheckBox object ckbIgnoreXSD: TCheckBox
Left = 6 Left = 8
Height = 19 Height = 18
Top = 0 Top = 8
Width = 113 Width = 142
Caption = 'Ignore XSD schema' Caption = 'Ignore XSD schema'
TabOrder = 0 TabOrder = 0
end end
...@@ -232,50 +212,54 @@ object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions ...@@ -232,50 +212,54 @@ object ModelMappingsGenerationOptions: TModelMappingsGenerationOptions
object GroupBox3: TGroupBox object GroupBox3: TGroupBox
Left = 8 Left = 8
Height = 56 Height = 56
Top = 352 Top = 376
Width = 360 Width = 360
Caption = 'Target Code Laguage' Caption = 'Target Code Laguage'
ClientHeight = 38 ClientHeight = 33
ClientWidth = 356 ClientWidth = 352
TabOrder = 1 TabOrder = 1
object rdObjectPascal: TRadioButton object rdObjectPascal: TRadioButton
Left = 13 Left = 8
Height = 19 Height = 18
Top = 8 Top = 8
Width = 85 Width = 104
Caption = 'Object Pascal' Caption = 'Object Pascal'
TabOrder = 0 TabOrder = 0
end end
object rdCSharp: TRadioButton object rdCSharp: TRadioButton
Left = 145 Left = 160
Height = 19 Height = 18
Top = 8 Top = 8
Width = 35 Width = 38
Caption = 'C#' Caption = 'C#'
TabOrder = 1 TabOrder = 1
end end
object rdJava: TRadioButton object rdJava: TRadioButton
Left = 238 Left = 272
Height = 19 Height = 18
Top = 8 Top = 8
Width = 43 Width = 46
Caption = 'Java' Caption = 'Java'
TabOrder = 2 TabOrder = 2
end end
end end
object dlbDirectory: TShellTreeView object dlbDirectory: TShellTreeView
Left = 8 Left = 8
Height = 192 Height = 200
Top = 40 Top = 32
Width = 360 Width = 360
BorderWidth = 1
ExpandSignType = tvestPlusMinus
FileSortType = fstNone FileSortType = fstNone
ReadOnly = True
TabOrder = 3 TabOrder = 3
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
ObjectTypes = [otFolders] ObjectTypes = [otFolders]
end end
end end
object OpenDialog1: TOpenDialog object OpenDialog1: TOpenDialog
Filter = '.pas|*.pas' Filter = '.pas|*.pas'
Left = 184 left = 184
Top = 24 top = 24
end end
end end
...@@ -81,9 +81,9 @@ begin ...@@ -81,9 +81,9 @@ begin
lReg := TRegistry.Create; lReg := TRegistry.Create;
try try
lReg.RootKey := HKEY_CURRENT_USER; lReg.RootKey := HKEY_CURRENT_USER;
// lReg.OpenKey(cPROJECT_SAVE_OPTIONS_PATH + ExtractFileName(StarUMLApp.ProjectManager.FileName), true); lReg.OpenKey(cPROJECT_SAVE_OPTIONS_PATH + ExtractFileName(gStarUMLApp.ProjectManager.FileName), true);
// lReg.WriteString('MODELMAPPINGS_IGNORE_XSD_SCHEMA', BoolToStr(ckbIgnoreXSD.Checked, true)); lReg.WriteString('MODELMAPPINGS_IGNORE_XSD_SCHEMA', BoolToStr(ckbIgnoreXSD.Checked, true));
// lReg.WriteString('MODELMAPPINGS_OUTPUT_DIRECTORY', dlbDirectory.Directory); lReg.WriteString('MODELMAPPINGS_OUTPUT_DIRECTORY', dlbDirectory.Path);
lReg.WriteString('MODELMAPPINGS_FILENAME', edtFileName.Text); lReg.WriteString('MODELMAPPINGS_FILENAME', edtFileName.Text);
if rdObjectPascal.Checked then if rdObjectPascal.Checked then
...@@ -142,14 +142,14 @@ begin ...@@ -142,14 +142,14 @@ begin
lReg := TRegistry.Create; lReg := TRegistry.Create;
try try
lReg.RootKey := HKEY_CURRENT_USER; lReg.RootKey := HKEY_CURRENT_USER;
// lReg.OpenKey(cPROJECT_SAVE_OPTIONS_PATH + ExtractFileName(StarUMLApp.ProjectManager.FileName), true); lReg.OpenKey(cPROJECT_SAVE_OPTIONS_PATH + ExtractFileName(gStarUMLApp.ProjectManager.FileName), true);
ckbIgnoreXSD.Checked := StrToBoolDef(lReg.ReadString('MODELMAPPINGS_IGNORE_XSD_SCHEMA'), false); ckbIgnoreXSD.Checked := StrToBoolDef(lReg.ReadString('MODELMAPPINGS_IGNORE_XSD_SCHEMA'), false);
if lReg.ReadString('MODELMAPPINGS_OUTPUT_DIRECTORY') <> '' then if lReg.ReadString('MODELMAPPINGS_OUTPUT_DIRECTORY') <> '' then
// dlbDirectory.Directory := lReg.ReadString('MODELMAPPINGS_OUTPUT_DIRECTORY') dlbDirectory.Path := lReg.ReadString('MODELMAPPINGS_OUTPUT_DIRECTORY')
else else
// dlbDirectory.Directory := ExtractFilePath(StarUMLApp.ProjectManager.FileName); dlbDirectory.Path := ExtractFilePath(gStarUMLApp.ProjectManager.FileName);
if lReg.ReadString('MODELMAPPINGS_FILENAME') <> '' then if lReg.ReadString('MODELMAPPINGS_FILENAME') <> '' then
edtFileName.Text := lReg.ReadString('MODELMAPPINGS_FILENAME') edtFileName.Text := lReg.ReadString('MODELMAPPINGS_FILENAME')
......
...@@ -14,7 +14,6 @@ object XSDEdit: TXSDEdit ...@@ -14,7 +14,6 @@ object XSDEdit: TXSDEdit
OnCreate = FormCreate OnCreate = FormCreate
OnShow = FormShow OnShow = FormShow
Position = poDesktopCenter Position = poDesktopCenter
LCLVersion = '2.1.0.0'
object pnlTransition: TPanel object pnlTransition: TPanel
Left = 0 Left = 0
Height = 23 Height = 23
...@@ -356,21 +355,20 @@ object XSDEdit: TXSDEdit ...@@ -356,21 +355,20 @@ object XSDEdit: TXSDEdit
Height = 459 Height = 459
Top = 75 Top = 75
Width = 701 Width = 701
ActivePage = tbsXSDIn ActivePage = tbsXSDOut
Align = alClient Align = alClient
TabIndex = 0 TabIndex = 1
TabOrder = 2 TabOrder = 2
TabWidth = 100
OnChanging = pgcPrincipalChanging OnChanging = pgcPrincipalChanging
object tbsXSDIn: TTabSheet object tbsXSDIn: TTabSheet
Caption = 'XSD In' Caption = 'XSD In'
ClientHeight = 433 ClientHeight = 420
ClientWidth = 693 ClientWidth = 695
object memXSDIn: TMemo object memXSDIn: TMemo
Left = 0 Left = 0
Height = 433 Height = 420
Top = 0 Top = 0
Width = 693 Width = 695
Align = alClient Align = alClient
Font.CharSet = ANSI_CHARSET Font.CharSet = ANSI_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
...@@ -384,14 +382,14 @@ object XSDEdit: TXSDEdit ...@@ -384,14 +382,14 @@ object XSDEdit: TXSDEdit
end end
object tbsXSDOut: TTabSheet object tbsXSDOut: TTabSheet
Caption = 'XSD Out' Caption = 'XSD Out'
ClientHeight = 433 ClientHeight = 420
ClientWidth = 693 ClientWidth = 695
ImageIndex = 1 ImageIndex = 1
object memXSDOut: TMemo object memXSDOut: TMemo
Left = 0 Left = 0
Height = 433 Height = 420
Top = 0 Top = 0
Width = 693 Width = 695
Align = alClient Align = alClient
Font.CharSet = ANSI_CHARSET Font.CharSet = ANSI_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
......
...@@ -3,8 +3,8 @@ unit fXSDEditor; ...@@ -3,8 +3,8 @@ unit fXSDEditor;
interface interface
uses uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, LCLType, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, ComCtrls, Buttons, StdCtrls; Dialogs, ExtCtrls, ComCtrls, Buttons, StdCtrls, StarUMLintf;
type type
TXSDEdit = class(TForm) TXSDEdit = class(TForm)
...@@ -34,10 +34,8 @@ type ...@@ -34,10 +34,8 @@ type
fXSDDoc: TMemo; fXSDDoc: TMemo;
fEditing: boolean; fEditing: boolean;
// fUMLTransition: IUMLTransition; fUMLTransition: IUMLTransition;
fCurrentFileName: string; fCurrentFileName: string;
// fStarUMLAPP: IStarUMLApplication;
// procedure SetUMLTransition(const Value: IUMLTransition);
function GetXSDIn: String; function GetXSDIn: String;
procedure SetXSDIn(const Value: String); procedure SetXSDIn(const Value: String);
function GetXSDOut: String; function GetXSDOut: String;
...@@ -49,12 +47,11 @@ type ...@@ -49,12 +47,11 @@ type
procedure SetEditing(const Value: boolean); procedure SetEditing(const Value: boolean);
public public
{ Public declarations } { Public declarations }
// property Transition: IUMLTransition read fUMLTransition write SetUMLTransition; property Transition: IUMLTransition read fUMLTransition write fUMLTransition;
property XSDIn: String read GetXSDIn write SetXSDIn; property XSDIn: String read GetXSDIn write SetXSDIn;
property XSDOut: String read GetXSDOut write SetXSDOut; property XSDOut: String read GetXSDOut write SetXSDOut;
property TempPath: String read GetTempPath; property TempPath: String read GetTempPath;
property CurrentFileName: string read GetCurrentFileName write SetCurrentFileName; property CurrentFileName: string read GetCurrentFileName write SetCurrentFileName;
// property StarUMLAPP: IStarUMLApplication read fStarUMLAPP write fStarUMLAPP;
property ExternalXSDEditor: string read GetExternalXSDEditor; property ExternalXSDEditor: string read GetExternalXSDEditor;
property Editing: boolean read fEditing write SetEditing; property Editing: boolean read fEditing write SetEditing;
end; end;
...@@ -123,7 +120,7 @@ end; ...@@ -123,7 +120,7 @@ end;
function TXSDEdit.GetExternalXSDEditor: string; function TXSDEdit.GetExternalXSDEditor: string;
begin begin
// result := Self.StarUMLAPP.GetOptionValue(cOPTIONSCHEMAID, 'EXTERNAL_XSD_EDITOR'); result := gStarUMLAPP.GetOptionValue(cOPTIONSCHEMAID, 'EXTERNAL_XSD_EDITOR');
if (result = '') or (not FileExists(result)) then if (result = '') or (not FileExists(result)) then
begin begin
result := ''; result := '';
...@@ -142,12 +139,12 @@ end; ...@@ -142,12 +139,12 @@ end;
function TXSDEdit.GetXSDIn: String; function TXSDEdit.GetXSDIn: String;
begin begin
// result := fUMLTransition.GetTaggedValueAsString('DBMappings', 'TransitionMap', 'XSD In'); result := fUMLTransition.GetTaggedValueAsString('DBMappings', 'TransitionMap', 'XSD In');
end; end;
function TXSDEdit.GetXSDOut: String; function TXSDEdit.GetXSDOut: String;
begin begin
// result := fUMLTransition.GetTaggedValueAsString('DBMappings', 'TransitionMap', 'XSD Out'); result := fUMLTransition.GetTaggedValueAsString('DBMappings', 'TransitionMap', 'XSD Out');
end; end;
procedure TXSDEdit.pgcPrincipalChanging(Sender: TObject; var AllowChange: Boolean); procedure TXSDEdit.pgcPrincipalChanging(Sender: TObject; var AllowChange: Boolean);
...@@ -160,15 +157,8 @@ begin ...@@ -160,15 +157,8 @@ begin
end; end;
procedure TXSDEdit.pgcPrincipalDrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; procedure TXSDEdit.pgcPrincipalDrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean);
Active: Boolean);
begin begin
// case TabIndex of
// 0: if memXSDIn.Text <> '' then Control.Canvas.Font.Color:=clblue else Control.Canvas.Font.Color:=clBlack;
// 1: if memXSDOut.Text <> '' then Control.Canvas.Font.Color:=clblue else Control.Canvas.Font.Color:=clBlack;
// end;
// Control.Canvas.TextOut(Rect.left + ((Rect.Right - Rect.left) div 2) - (Control.Canvas.TextWidth(pgcPrincipal.Pages[tabindex].Caption) div 2) ,Rect.top+3,pgcPrincipal.Pages[tabindex].Caption);
// pgcPrincipal.Pages[TabIndex].Font.Color := Control.Canvas.Font.Color;
end; end;
procedure TXSDEdit.SetCurrentFileName(const Value: string); procedure TXSDEdit.SetCurrentFileName(const Value: string);
...@@ -186,12 +176,12 @@ end; ...@@ -186,12 +176,12 @@ end;
procedure TXSDEdit.SetXSDIn(const Value: String); procedure TXSDEdit.SetXSDIn(const Value: String);
begin begin
// fUMLTransition.SetTaggedValueAsString('DBMappings', 'TransitionMap', 'XSD In', Value); fUMLTransition.SetTaggedValueAsString('DBMappings', 'TransitionMap', 'XSD In', Value);
end; end;
procedure TXSDEdit.SetXSDOut(const Value: String); procedure TXSDEdit.SetXSDOut(const Value: String);
begin begin
// fUMLTransition.SetTaggedValueAsString('DBMappings', 'TransitionMap', 'XSD Out', Value); fUMLTransition.SetTaggedValueAsString('DBMappings', 'TransitionMap', 'XSD Out', Value);
end; end;
procedure TXSDEdit.btnCancelClick(Sender: TObject); procedure TXSDEdit.btnCancelClick(Sender: TObject);
...@@ -235,12 +225,12 @@ end; ...@@ -235,12 +225,12 @@ end;
procedure TXSDEdit.btnSendExternalEditorClick(Sender: TObject); procedure TXSDEdit.btnSendExternalEditorClick(Sender: TObject);
var var
SUInfo: TStartupInfo; // SUInfo: TStartupInfo;
ProcInfo: TProcessInformation; // ProcInfo: TProcessInformation;
lOk: boolean; lOk: boolean;
lAux: TStringList; lAux: TStringList;
begin begin
if Self.ExternalXSDEditor = '' then (* if Self.ExternalXSDEditor = '' then
begin begin
Application.MessageBox('Need to define an external XSD editor.','StarUML', MB_ICONINFORMATION); Application.MessageBox('Need to define an external XSD editor.','StarUML', MB_ICONINFORMATION);
exit; exit;
...@@ -297,7 +287,7 @@ begin ...@@ -297,7 +287,7 @@ begin
begin begin
CloseHandle(ProcInfo.hProcess); CloseHandle(ProcInfo.hProcess);
CloseHandle(ProcInfo.hThread); CloseHandle(ProcInfo.hThread);
end; end;*)
end; end;
end. end.
This diff is collapsed.
...@@ -3,7 +3,7 @@ unit formMemo; ...@@ -3,7 +3,7 @@ unit formMemo;
interface interface
uses uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, SynEdit; Dialogs, StdCtrls, ExtCtrls, ComCtrls, SynEdit;
type type
...@@ -13,7 +13,6 @@ type ...@@ -13,7 +13,6 @@ type
Button1: TButton; Button1: TButton;
pgc_Main: TPageControl; pgc_Main: TPageControl;
TabSheet1: TTabSheet; TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
pgc_ClassCode: TPageControl; pgc_ClassCode: TPageControl;
TabSheet3: TTabSheet; TabSheet3: TTabSheet;
mem_ClassPascal: TSynEdit; mem_ClassPascal: TSynEdit;
...@@ -22,23 +21,6 @@ type ...@@ -22,23 +21,6 @@ type
TabSheet5: TTabSheet; TabSheet5: TTabSheet;
mem_ClassCSharp: TSynEdit; mem_ClassCSharp: TSynEdit;
TabSheet6: TTabSheet; TabSheet6: TTabSheet;
pgc_UseCase: TPageControl;
Client: TTabSheet;
Server: TTabSheet;
pgc_UseCaseCode: TPageControl;
TabSheet7: TTabSheet;
mem_UsecaseClientPascal: TSynEdit;
TabSheet8: TTabSheet;
mem_UsecaseClientJava: TSynEdit;
TabSheet9: TTabSheet;
mem_UsecaseClientCSharp: TSynEdit;
PageControl4: TPageControl;
TabSheet11: TTabSheet;
mem_UsecaseServerPascal: TSynEdit;
TabSheet12: TTabSheet;
mem_UsecaseServerJava: TSynEdit;
TabSheet13: TTabSheet;
mem_UsecaseServerCSharp: TSynEdit;
PageControl1: TPageControl; PageControl1: TPageControl;
TabSheet10: TTabSheet; TabSheet10: TTabSheet;
TabSheet14: TTabSheet; TabSheet14: TTabSheet;
......
...@@ -2,63 +2,47 @@ object DataBaseLogin: TDataBaseLogin ...@@ -2,63 +2,47 @@ object DataBaseLogin: TDataBaseLogin
Left = 2241 Left = 2241
Height = 543 Height = 543
Top = 255 Top = 255
Width = 442 Width = 440
BorderIcons = [biSystemMenu] BorderIcons = [biSystemMenu]
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Connect to Database Server' Caption = 'Connect to Database Server'
ClientHeight = 543 ClientHeight = 543
ClientWidth = 442 ClientWidth = 440
Color = clBtnFace Color = clBtnFace
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Trebuchet MS'
OnClose = FormClose OnClose = FormClose
OnShow = FormShow OnShow = FormShow
ParentFont = True
Position = poOwnerFormCenter Position = poOwnerFormCenter
LCLVersion = '2.0.0.4' object GroupBox2: TGroupBox
object Bevel1: TBevel Left = 8
Left = 21 Height = 208
Height = 8 Top = 288
Top = 494 Width = 424
Width = 400 TabOrder = 11
Shape = bsTopLine
end end
object Button1: TButton object GroupBox1: TGroupBox
Left = 265 Left = 8
Height = 25 Height = 272
Top = 504 Top = 8
Width = 75 Width = 424
Caption = 'Ok'
Default = True
OnClick = Button1Click
TabOrder = 9
end
object Button2: TButton
Left = 346
Height = 25
Top = 504
Width = 75
Cancel = True
Caption = 'Cancel'
OnClick = Button2Click
TabOrder = 10 TabOrder = 10
end end
object cbODBCD_DSN: TComboBox object cbODBCD_DSN: TComboBox
Left = 37 Left = 32
Height = 26 Height = 15
Top = 56 Top = 48
Width = 384 Width = 389
ItemHeight = 18 ItemHeight = 0
OnChange = cbODBCD_DSNChange OnChange = cbODBCD_DSNChange
Style = csDropDownList Style = csDropDownList
TabOrder = 1 TabOrder = 1
end end
object edtUsuario: TLabeledEdit object edtUsuario: TLabeledEdit
Left = 21 Left = 21
Height = 26 Height = 22
Top = 398 Top = 398
Width = 400 Width = 400
EditLabel.Height = 18 EditLabel.Height = 16
EditLabel.Width = 400 EditLabel.Width = 400
EditLabel.Caption = 'Usuário' EditLabel.Caption = 'Usuário'
EditLabel.ParentColor = False EditLabel.ParentColor = False
...@@ -66,11 +50,11 @@ object DataBaseLogin: TDataBaseLogin ...@@ -66,11 +50,11 @@ object DataBaseLogin: TDataBaseLogin
end end
object edtPassword: TLabeledEdit object edtPassword: TLabeledEdit
Left = 21 Left = 21
Height = 26 Height = 22
Top = 454 Top = 454
Width = 400 Width = 400
EchoMode = emPassword EchoMode = emPassword
EditLabel.Height = 18 EditLabel.Height = 16
EditLabel.Width = 400 EditLabel.Width = 400
EditLabel.Caption = 'Senha' EditLabel.Caption = 'Senha'
EditLabel.ParentColor = False EditLabel.ParentColor = False
...@@ -79,27 +63,27 @@ object DataBaseLogin: TDataBaseLogin ...@@ -79,27 +63,27 @@ object DataBaseLogin: TDataBaseLogin
end end
object cbDialect: TComboBox object cbDialect: TComboBox
Left = 21 Left = 21
Height = 26 Height = 15
Top = 339 Top = 339
Width = 400 Width = 400
ItemHeight = 18 ItemHeight = 0
OnChange = cbODBCD_DSNChange OnChange = cbODBCD_DSNChange
Style = csDropDownList Style = csDropDownList
TabOrder = 6 TabOrder = 6
end end
object Label2: TLabel object Label2: TLabel
Left = 21 Left = 21
Height = 18 Height = 16
Top = 320 Top = 320
Width = 41 Width = 45
Caption = 'Dialeto' Caption = 'Dialeto'
ParentColor = False ParentColor = False
end end
object rbDSN: TRadioButton object rbDSN: TRadioButton
Left = 21 Left = 16
Height = 22 Height = 18
Top = 24 Top = 16
Width = 107 Width = 115
Caption = 'Selecionar DSN' Caption = 'Selecionar DSN'
Checked = True Checked = True
OnClick = rbDSNClick OnClick = rbDSNClick
...@@ -107,54 +91,81 @@ object DataBaseLogin: TDataBaseLogin ...@@ -107,54 +91,81 @@ object DataBaseLogin: TDataBaseLogin
TabStop = True TabStop = True
end end
object rbPersonalizado: TRadioButton object rbPersonalizado: TRadioButton
Left = 21 Left = 16
Height = 22 Height = 18
Top = 96 Top = 88
Width = 100 Width = 108
Caption = 'Personalizado' Caption = 'Personalizado'
OnClick = rbPersonalizadoClick OnClick = rbPersonalizadoClick
TabOrder = 2 TabOrder = 2
end end
object cbODBCD_DRIVERS: TComboBox object cbODBCD_DRIVERS: TComboBox
Left = 40 Left = 35
Height = 26 Height = 15
Top = 128 Top = 120
Width = 384 Width = 386
Enabled = False Enabled = False
ItemHeight = 18 ItemHeight = 0
OnChange = cbODBCD_DSNChange OnChange = cbODBCD_DSNChange
Style = csDropDownList Style = csDropDownList
TabOrder = 3 TabOrder = 3
end end
object edtDatabaseName: TLabeledEdit object edtDatabaseName: TLabeledEdit
Left = 37 Left = 32
Height = 26 Height = 22
Top = 240 Top = 232
Width = 384 Width = 389
EditLabel.Height = 18 EditLabel.Height = 16
EditLabel.Width = 384 EditLabel.Width = 389
EditLabel.Caption = 'Nome do Banco de Dados' EditLabel.Caption = 'Nome do Banco de Dados'
EditLabel.ParentColor = False EditLabel.ParentColor = False
Enabled = False Enabled = False
TabOrder = 5 TabOrder = 5
end end
object edtServerName: TLabeledEdit object edtServerName: TLabeledEdit
Left = 37 Left = 32
Height = 26 Height = 22
Top = 184 Top = 176
Width = 384 Width = 389
EditLabel.Height = 18 EditLabel.Height = 16
EditLabel.Width = 384 EditLabel.Width = 389
EditLabel.Caption = 'Servidor' EditLabel.Caption = 'Servidor'
EditLabel.ParentColor = False EditLabel.ParentColor = False
Enabled = False Enabled = False
TabOrder = 4 TabOrder = 4
end end
object Bevel2: TBevel object Panel2: TPanel
Left = 21 Left = 0
Height = 8 Height = 40
Top = 296 Top = 503
Width = 400 Width = 440
Shape = bsTopLine Align = alBottom
ClientHeight = 40
ClientWidth = 440
TabOrder = 9
object BitBtn1: TBitBtn
Left = 268
Height = 25
Top = 7
Width = 75
Anchors = [akTop, akRight]
Caption = 'Ok'
Kind = bkOK
ModalResult = 1
OnClick = Button1Click
TabOrder = 0
end
object BitBtn2: TBitBtn
Left = 349
Height = 25
Top = 7
Width = 75
Anchors = [akTop, akRight]
Caption = 'Cancel'
Kind = bkCancel
ModalResult = 2
OnClick = Button2Click
TabOrder = 1
end
end end
end end
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TDataBaseLogin','FORMDATA',[
'TPF0'#14'TDataBaseLogin'#13'DataBaseLogin'#4'Left'#2#0#6'Height'#3#243#0#3'T'
+'op'#2#0#5'Width'#3'Y'#1#11'BorderIcons'#11#12'biSystemMenu'#0#11'BorderStyl'
+'e'#7#8'bsDialog'#7'Caption'#6#30'Connect to SQL Database Server'#12'ClientH'
+'eight'#3#243#0#11'ClientWidth'#3'Y'#1#5'Color'#7#9'clBtnFace'#10'Font.Color'
+#7#12'clWindowText'#11'Font.Height'#2#243#9'Font.Name'#6#12'Trebuchet MS'#7
+'OnClose'#7#9'FormClose'#6'OnShow'#7#8'FormShow'#8'Position'#7#15'poDesktopC'
+'enter'#10'LCLVersion'#6#7'2.1.0.0'#0#6'TBevel'#6'Bevel1'#4'Left'#2#7#6'Heig'
+'ht'#2#8#3'Top'#3#200#0#5'Width'#3'K'#1#5'Shape'#7#9'bsTopLine'#0#0#7'TButto'
+'n'#7'Button1'#4'Left'#3#180#0#6'Height'#2#25#3'Top'#3#210#0#5'Width'#2'K'#7
+'Caption'#6#2'Ok'#7'Default'#9#7'OnClick'#7#12'Button1Click'#8'TabOrder'#2#0
+#0#0#7'TButton'#7'Button2'#4'Left'#3#5#1#6'Height'#2#25#3'Top'#3#210#0#5'Wid'
+'th'#2'K'#6'Cancel'#9#7'Caption'#6#6'Cancel'#7'OnClick'#7#12'Button2Click'#8
+'TabOrder'#2#1#0#0#16'TValueListEditor'#7'vleConn'#4'Left'#2#0#6'Height'#3
+#194#0#3'Top'#2#0#5'Width'#3'Y'#1#5'Align'#7#5'alTop'#9'FixedCols'#2#0#8'Row'
+'Count'#2#2#10'ScrollBars'#7#6'ssNone'#8'TabOrder'#2#2#15'TitleFont.Color'#7
+#12'clWindowText'#16'TitleFont.Height'#2#243#14'TitleFont.Name'#6#12'Trebuch'
+'et MS'#10'KeyOptions'#11#9'keyUnique'#0#7'Options'#11#15'goFixedVertLine'#15
+'goFixedHorzLine'#10'goVertLine'#10'goHorzLine'#13'goRangeSelect'#19'goDrawF'
+'ocusSelected'#11'goColSizing'#9'goEditing'#18'goAlwaysShowEditor'#0#21'Titl'
+'eCaptions.Strings'#1#6#5'Param'#6#5'Value'#0#9'ColWidths'#1#3#150#0#3#191#0
+#0#0#0#7'TBitBtn'#7'BitBtn1'#4'Left'#2#16#6'Height'#2#25#3'Top'#3#210#0#5'Wi'
+'dth'#2'K'#7'Caption'#6#7'Options'#7'OnClick'#7#12'BitBtn1Click'#8'TabOrder'
+#2#3#0#0#0
]);
...@@ -3,8 +3,8 @@ unit ituDataBaseLogin; ...@@ -3,8 +3,8 @@ unit ituDataBaseLogin;
interface interface
uses uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Grids, ValEdit, Registry, Buttons, RTTICtrls, Dialogs, StdCtrls, ExtCtrls, Grids, ValEdit, Registry, Buttons,
IntegracaoDelphiSUML, acuSQLDialectManager; IntegracaoDelphiSUML, acuSQLDialectManager;
const cPROJECT_SAVE_OPTIONS_PATH = 'Software\StarUML\Options\' + cOPTIONSCHEMAID + '\Projects\'; const cPROJECT_SAVE_OPTIONS_PATH = 'Software\StarUML\Options\' + cOPTIONSCHEMAID + '\Projects\';
...@@ -14,10 +14,8 @@ type ...@@ -14,10 +14,8 @@ type
{ TDataBaseLogin } { TDataBaseLogin }
TDataBaseLogin = class(TForm) TDataBaseLogin = class(TForm)
Bevel1: TBevel; BitBtn1: TBitBtn;
Bevel2: TBevel; BitBtn2: TBitBtn;
Button1: TButton;
Button2: TButton;
cbODBCD_DSN: TComboBox; cbODBCD_DSN: TComboBox;
cbDialect: TComboBox; cbDialect: TComboBox;
cbODBCD_DRIVERS: TComboBox; cbODBCD_DRIVERS: TComboBox;
...@@ -25,7 +23,10 @@ type ...@@ -25,7 +23,10 @@ type
edtUsuario: TLabeledEdit; edtUsuario: TLabeledEdit;
edtPassword: TLabeledEdit; edtPassword: TLabeledEdit;
edtDatabaseName: TLabeledEdit; edtDatabaseName: TLabeledEdit;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Label2: TLabel; Label2: TLabel;
Panel2: TPanel;
rbDSN: TRadioButton; rbDSN: TRadioButton;
rbPersonalizado: TRadioButton; rbPersonalizado: TRadioButton;
procedure cbODBCD_DSNChange(Sender: TObject); procedure cbODBCD_DSNChange(Sender: TObject);
...@@ -57,16 +58,19 @@ procedure TDataBaseLogin.Button1Click(Sender: TObject); ...@@ -57,16 +58,19 @@ procedure TDataBaseLogin.Button1Click(Sender: TObject);
var lReg: TRegistry; var lReg: TRegistry;
begin begin
ModalResult := mrNone; ModalResult := mrNone;
if (cbODBCD_DSN.ItemIndex <> -1) and (cbDialect.ItemIndex <> -1) then if ((cbODBCD_DSN.ItemIndex <> -1) or (cbODBCD_DRIVERS.ItemIndex <> -1))and (cbDialect.ItemIndex <> -1) then
begin begin
lReg := TRegistry.Create; lReg := TRegistry.Create;
try try
lReg.RootKey := HKEY_CURRENT_USER; lReg.RootKey := HKEY_CURRENT_USER;
lReg.OpenKey(cPROJECT_SAVE_OPTIONS_PATH + ProjectFileName + '\Explorer', true); lReg.OpenKey(cPROJECT_SAVE_OPTIONS_PATH + ProjectFileName + '\Explorer', true);
lReg.WriteString('DEFAULT_DSN', cbODBCD_DSN.Caption); if rbDSN.Checked
lReg.WriteString('DEFAULT_DRIVER', cbODBCD_DRIVERS.Caption); then lReg.WriteString('DSN', 'Yes')
else lReg.WriteString('DSN', 'No');
lReg.WriteString('DEFAULT_DSN', cbODBCD_DSN.Text);
lReg.WriteString('DEFAULT_DRIVER', cbODBCD_DRIVERS.Text);
lReg.WriteString('DEFAULT_SERVER', edtServerName.Text); lReg.WriteString('DEFAULT_SERVER', edtServerName.Text);
lReg.WriteString('DEFAULT_DATABASE', edtServerName.Text); lReg.WriteString('DEFAULT_DATABASE', edtDatabaseName.Text);
lReg.WriteString('DEFAULT_DSN_USER', edtUsuario.Text); lReg.WriteString('DEFAULT_DSN_USER', edtUsuario.Text);
lReg.WriteString('DEFAULT_SQL_DIALECT', cbDialect.Caption); lReg.WriteString('DEFAULT_SQL_DIALECT', cbDialect.Caption);
finally finally
...@@ -92,7 +96,7 @@ end; ...@@ -92,7 +96,7 @@ end;
procedure TDataBaseLogin.FormShow(Sender: TObject); procedure TDataBaseLogin.FormShow(Sender: TObject);
var lReg: TRegistry; var lReg: TRegistry;
lDSN, lDriver, lDialect: string; lDSNActive, lDSN, lDriver, lDialect: string;
lObj: acObject; lObj: acObject;
begin begin
GetSystemDSNList(cbODBCD_DSN.Items); GetSystemDSNList(cbODBCD_DSN.Items);
...@@ -110,22 +114,28 @@ begin ...@@ -110,22 +114,28 @@ begin
lReg.RootKey := HKEY_CURRENT_USER; lReg.RootKey := HKEY_CURRENT_USER;
lReg.OpenKey(cPROJECT_SAVE_OPTIONS_PATH + ProjectFileName + '\Explorer', true); lReg.OpenKey(cPROJECT_SAVE_OPTIONS_PATH + ProjectFileName + '\Explorer', true);
lDSNActive := lReg.ReadString('DSN');
lDSN := lReg.ReadString('DEFAULT_DSN'); lDSN := lReg.ReadString('DEFAULT_DSN');
if lDSN <> '' then lDriver := lReg.ReadString('DEFAULT_DRIVER');
if lDriver <> ''
then cbODBCD_DRIVERS.ItemIndex := cbODBCD_DRIVERS.Items.IndexOf(lDriver);
if lDSN <> ''
then cbODBCD_DSN.ItemIndex := cbODBCD_DSN.Items.IndexOf(lDSN);
edtServerName.Text := lReg.ReadString('DEFAULT_SERVER');
edtDatabaseName.Text := lReg.ReadString('DEFAULT_DATABASE');
if lDSNActive = 'Yes' then
begin begin
rbDSN.Checked := True; rbDSN.Checked := True;
rbDSNClick(rbDSN); rbDSNClick(rbDSN);
cbODBCD_DSN.ItemIndex := cbODBCD_DSN.Items.IndexOf(lDSN);
end end
else else
begin begin
lDriver := lReg.ReadString('DEFAULT_DRIVER'); if lDSNActive = 'No' then
if lDriver <> '' then
begin begin
rbPersonalizado.Checked := True; rbPersonalizado.Checked := True;
rbPersonalizadoClick(rbPersonalizado); rbPersonalizadoClick(rbPersonalizado);
edtServerName.Text := lReg.ReadString('DEFAULT_SERVER');
edtDatabaseName.Text := lReg.ReadString('DEFAULT_DATABASE');
end; end;
end; end;
......
...@@ -7,9 +7,6 @@ object ExplorerV2: TExplorerV2 ...@@ -7,9 +7,6 @@ object ExplorerV2: TExplorerV2
ClientHeight = 695 ClientHeight = 695
ClientWidth = 1228 ClientWidth = 1228
Color = clWindow Color = clWindow
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Tahoma'
Icon.Data = { Icon.Data = {
96A5050000000100060000000000010020002820040066000000101000000100 96A5050000000100060000000000010020002820040066000000101000000100
2000680400008E2004003030000001002000A8250000F6240400202000000100 2000680400008E2004003030000001002000A8250000F6240400202000000100
...@@ -11581,9 +11578,9 @@ object ExplorerV2: TExplorerV2 ...@@ -11581,9 +11578,9 @@ object ExplorerV2: TExplorerV2
OnCreate = FormCreate OnCreate = FormCreate
OnDestroy = FormDestroy OnDestroy = FormDestroy
OnShow = FormShow OnShow = FormShow
Position = poOwnerFormCenter ParentFont = True
Position = poMainFormCenter
ShowInTaskBar = stAlways ShowInTaskBar = stAlways
LCLVersion = '2.0.0.4'
object splVertical: TSplitter object splVertical: TSplitter
Left = 360 Left = 360
Height = 695 Height = 695
...@@ -11605,7 +11602,7 @@ object ExplorerV2: TExplorerV2 ...@@ -11605,7 +11602,7 @@ object ExplorerV2: TExplorerV2
object pnlResult: TPanel object pnlResult: TPanel
Left = 0 Left = 0
Height = 185 Height = 185
Top = 483 Top = 495
Width = 863 Width = 863
Align = alBottom Align = alBottom
BevelOuter = bvNone BevelOuter = bvNone
...@@ -11637,8 +11634,8 @@ object ExplorerV2: TExplorerV2 ...@@ -11637,8 +11634,8 @@ object ExplorerV2: TExplorerV2
TabOrder = 0 TabOrder = 0
object tsList: TTabSheet object tsList: TTabSheet
Caption = 'Result List' Caption = 'Result List'
ClientHeight = 131 ClientHeight = 119
ClientWidth = 874 ClientWidth = 876
object lvXMLListResult: TListView object lvXMLListResult: TListView
Left = 0 Left = 0
Height = 131 Height = 131
...@@ -11677,15 +11674,15 @@ object ExplorerV2: TExplorerV2 ...@@ -11677,15 +11674,15 @@ object ExplorerV2: TExplorerV2
end end
object tsError: TTabSheet object tsError: TTabSheet
Caption = 'tsError' Caption = 'tsError'
ClientHeight = 158 ClientHeight = 146
ClientWidth = 855 ClientWidth = 857
ImageIndex = 1 ImageIndex = 1
TabVisible = False TabVisible = False
object memErrorText: TMemo object memErrorText: TMemo
Left = 0 Left = 0
Height = 158 Height = 146
Top = 0 Top = 0
Width = 855 Width = 857
Align = alClient Align = alClient
BorderStyle = bsNone BorderStyle = bsNone
ParentColor = True ParentColor = True
...@@ -11698,7 +11695,7 @@ object ExplorerV2: TExplorerV2 ...@@ -11698,7 +11695,7 @@ object ExplorerV2: TExplorerV2
end end
object pcEditor: TPageControl object pcEditor: TPageControl
Left = 0 Left = 0
Height = 430 Height = 442
Top = 48 Top = 48
Width = 498 Width = 498
ActivePage = tsOQL ActivePage = tsOQL
...@@ -11706,23 +11703,17 @@ object ExplorerV2: TExplorerV2 ...@@ -11706,23 +11703,17 @@ object ExplorerV2: TExplorerV2
MultiLine = True MultiLine = True
TabIndex = 0 TabIndex = 0
TabOrder = 1 TabOrder = 1
TabPosition = tpBottom
OnChange = pcEditorChange OnChange = pcEditorChange
Options = [nboMultiLine] Options = [nboMultiLine]
object tsOQL: TTabSheet object tsOQL: TTabSheet
Caption = 'OQL - Object Query Language' Caption = 'OQL - Object Query Language'
ClientHeight = 403 ClientHeight = 403
ClientWidth = 490 ClientWidth = 492
Font.CharSet = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Courier New'
ParentFont = False
inline SynEditOQL: TSynEdit inline SynEditOQL: TSynEdit
Left = 0 Left = 0
Height = 403 Height = 403
Top = 0 Top = 0
Width = 490 Width = 492
Align = alClient Align = alClient
Font.Height = -13 Font.Height = -13
Font.Name = 'Courier New' Font.Name = 'Courier New'
...@@ -11734,7 +11725,7 @@ object ExplorerV2: TExplorerV2 ...@@ -11734,7 +11725,7 @@ object ExplorerV2: TExplorerV2
OnDragDrop = memOQLQuery2DragDrop OnDragDrop = memOQLQuery2DragDrop
OnDragOver = memOQLQuery2DragOver OnDragOver = memOQLQuery2DragOver
BorderStyle = bsNone BorderStyle = bsNone
Gutter.Width = 23 Gutter.Width = 33
Gutter.MouseActions = <> Gutter.MouseActions = <>
RightGutter.Width = 0 RightGutter.Width = 0
RightGutter.MouseActions = <> RightGutter.MouseActions = <>
...@@ -12231,14 +12222,13 @@ object ExplorerV2: TExplorerV2 ...@@ -12231,14 +12222,13 @@ object ExplorerV2: TExplorerV2
end end
object tsSQL: TTabSheet object tsSQL: TTabSheet
Caption = 'SQL Translation' Caption = 'SQL Translation'
ClientHeight = 496 ClientHeight = 403
ClientWidth = 1099 ClientWidth = 492
ImageIndex = 1
inline SynEditSQL: TSynEdit inline SynEditSQL: TSynEdit
Left = 0 Left = 0
Height = 496 Height = 403
Top = 0 Top = 0
Width = 1099 Width = 492
Align = alClient Align = alClient
Font.Height = -13 Font.Height = -13
Font.Name = 'Courier New' Font.Name = 'Courier New'
...@@ -12248,7 +12238,7 @@ object ExplorerV2: TExplorerV2 ...@@ -12248,7 +12238,7 @@ object ExplorerV2: TExplorerV2
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
BorderStyle = bsNone BorderStyle = bsNone
Gutter.Width = 23 Gutter.Width = 33
Gutter.MouseActions = <> Gutter.MouseActions = <>
RightGutter.Width = 0 RightGutter.Width = 0
RightGutter.MouseActions = <> RightGutter.MouseActions = <>
...@@ -12812,7 +12802,7 @@ object ExplorerV2: TExplorerV2 ...@@ -12812,7 +12802,7 @@ object ExplorerV2: TExplorerV2
Style = tbsCheck Style = tbsCheck
end end
object ToolButton8: TToolButton object ToolButton8: TToolButton
Left = 343 Left = 351
Top = 2 Top = 2
Action = XMLQuery Action = XMLQuery
Grouped = True Grouped = True
...@@ -12834,7 +12824,7 @@ object ExplorerV2: TExplorerV2 ...@@ -12834,7 +12824,7 @@ object ExplorerV2: TExplorerV2
end end
object spResultObject: TSplitter object spResultObject: TSplitter
Left = 498 Left = 498
Height = 430 Height = 442
Top = 48 Top = 48
Width = 5 Width = 5
Align = alRight Align = alRight
...@@ -12843,18 +12833,17 @@ object ExplorerV2: TExplorerV2 ...@@ -12843,18 +12833,17 @@ object ExplorerV2: TExplorerV2
end end
inline OQLObjects: TObjectExplorer inline OQLObjects: TObjectExplorer
Left = 503 Left = 503
Height = 430 Height = 442
Top = 48 Top = 48
Width = 360 Width = 360
Align = alRight Align = alRight
ClientHeight = 430 ClientHeight = 442
ClientWidth = 360 ClientWidth = 360
TabOrder = 4 TabOrder = 4
Visible = False Visible = False
inherited tvExplorer: TTreeView inherited tvExplorer: TTreeView
Height = 430 Height = 442
Width = 360 Width = 360
BorderWidth = 1
Images = ilModel Images = ilModel
ParentColor = True ParentColor = True
PopupMenu = pmCopiar PopupMenu = pmCopiar
...@@ -12863,59 +12852,37 @@ object ExplorerV2: TExplorerV2 ...@@ -12863,59 +12852,37 @@ object ExplorerV2: TExplorerV2
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoRightClickSelect, tvoShowButtons, tvoShowRoot, tvoToolTips, tvoThemedDraw] Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoRightClickSelect, tvoShowButtons, tvoShowRoot, tvoToolTips, tvoThemedDraw]
end end
end end
object pnlStatusBar: TPanel
Left = 0
Height = 27
Top = 668
Width = 863
Align = alBottom
ClientHeight = 27
ClientWidth = 863
Color = clBtnFace
ParentColor = False
TabOrder = 5
object sbStatusBar: TStatusBar
Left = 1
Height = 25
Top = 1
Width = 664
Align = alLeft
Panels = <
item
Width = 400
end
item
Width = 150
end
item
Width = 100
end>
SimplePanel = False
end
object sbDB: TStatusBar
Left = 665
Height = 25
Top = 1
Width = 197
Align = alClient
Panels = <
item
Alignment = taRightJustify
Width = 300
end>
SimplePanel = False
end
end
object spResultXML: TSplitter object spResultXML: TSplitter
Cursor = crVSplit Cursor = crVSplit
Left = 0 Left = 0
Height = 5 Height = 5
Top = 478 Top = 490
Width = 863 Width = 863
Align = alBottom Align = alBottom
ResizeAnchor = akBottom ResizeAnchor = akBottom
ResizeStyle = rsPattern ResizeStyle = rsPattern
end end
object sbStatusBar: TStatusBar
Left = 0
Height = 15
Top = 680
Width = 863
Panels = <
item
Width = 400
end
item
Width = 150
end
item
Width = 100
end
item
Alignment = taRightJustify
Width = 300
end>
SimplePanel = False
end
end end
object pnlModel: TPanel object pnlModel: TPanel
Left = 0 Left = 0
...@@ -12934,16 +12901,18 @@ object ExplorerV2: TExplorerV2 ...@@ -12934,16 +12901,18 @@ object ExplorerV2: TExplorerV2
Width = 360 Width = 360
Align = alClient Align = alClient
BorderStyle = bsNone BorderStyle = bsNone
BorderWidth = 1
DragMode = dmAutomatic DragMode = dmAutomatic
ExpandSignSize = 10
Images = ilModel Images = ilModel
Indent = 18
ParentColor = True ParentColor = True
ReadOnly = True ReadOnly = True
ScrollBars = ssAutoBoth ScrollBars = ssAutoBoth
ShowLines = False
TabOrder = 0 TabOrder = 0
OnExpanding = tvModelExplorerItemExpanding OnExpanding = tvModelExplorerItemExpanding
OnGetSelectedIndex = tvModelExplorerGetSelectedIndex OnGetSelectedIndex = tvModelExplorerGetSelectedIndex
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw] Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowRoot, tvoToolTips, tvoThemedDraw]
end end
end end
object il1: TImageList object il1: TImageList
...@@ -13855,13 +13824,16 @@ object ExplorerV2: TExplorerV2 ...@@ -13855,13 +13824,16 @@ object ExplorerV2: TExplorerV2
end end
object OQLQuery: TAction object OQLQuery: TAction
Caption = ' OQL Query ' Caption = ' OQL Query '
Hint = 'Set Query Type as Object'
OnExecute = OQLQueryExecute OnExecute = OQLQueryExecute
end end
object XMLQuery: TAction object XMLQuery: TAction
Caption = 'XML Query' Caption = 'XML Query'
Hint = 'Set Query Type as XML'
OnExecute = XMLQueryExecute OnExecute = XMLQueryExecute
end end
object ReconnectDB: TAction object ReconnectDB: TAction
Hint = 'Connect to Database'
ImageIndex = 11 ImageIndex = 11
OnExecute = ReconnectDBExecute OnExecute = ReconnectDBExecute
end end
......
...@@ -31,9 +31,7 @@ type ...@@ -31,9 +31,7 @@ type
memXMLTextResult: TMemo; memXMLTextResult: TMemo;
OQLObjects: TObjectExplorer; OQLObjects: TObjectExplorer;
pcXMLResults: TPageControl; pcXMLResults: TPageControl;
pnlStatusBar: TPanel;
ReconnectDB: TAction; ReconnectDB: TAction;
sbDB: TStatusBar;
sbStatusBar: TStatusBar; sbStatusBar: TStatusBar;
spResultXML: TSplitter; spResultXML: TSplitter;
spResultObject: TSplitter; spResultObject: TSplitter;
...@@ -132,7 +130,8 @@ uses ituDataBaseLogin, DateUtils, acuObject, acuOQL, acuOQLtoSQLTranslator, ...@@ -132,7 +130,8 @@ uses ituDataBaseLogin, DateUtils, acuObject, acuOQL, acuOQLtoSQLTranslator,
{$R *.dfm} {$R *.dfm}
procedure TExplorerV2.actExecuteExecute(Sender: TObject); procedure TExplorerV2.actExecuteExecute(Sender: TObject);
var lList: acPersistentObjectList; var lSession: acPersistenceSession;
lList: acPersistentObjectList;
lStart: TDateTime; lStart: TDateTime;
lOQLQuery: acAbstractOQLQuery; lOQLQuery: acAbstractOQLQuery;
lOQLParams: TOQLParams; lOQLParams: TOQLParams;
...@@ -150,15 +149,18 @@ begin ...@@ -150,15 +149,18 @@ begin
begin begin
fExecuting := True; fExecuting := True;
try try
if assigned(fSession) then FreeAndNil(fSession); lSession := Connect;
fSession := Connect; if Assigned(lSession) then
if Assigned(fSession) then
begin begin
SynEditSQL.Text := ''; SynEditSQL.Text := '';
OQLObjects.SetList(nil, ''); OQLObjects.SetList(nil, '');
lvXMLListResult.Clear; lvXMLListResult.Clear;
lvXMLListResult.Columns.Clear; lvXMLListResult.Columns.Clear;
pcResults.ActivePageIndex := 0; pcResults.ActivePageIndex := 0;
if assigned(fSession) then FreeAndNil(fSession);
fSession := lSession;
if OQLQuery.Checked then if OQLQuery.Checked then
begin begin
lList := acPersistentObjectList.Create; lList := acPersistentObjectList.Create;
...@@ -418,17 +420,17 @@ begin ...@@ -418,17 +420,17 @@ begin
begin begin
fConnectionString := format('DSN=%s;UID=%s;PWD=%s',[lDataBaseLogin.cbODBCD_DSN.Text, lDataBaseLogin.edtUsuario.Text, lDataBaseLogin.edtPassword.Text]); fConnectionString := format('DSN=%s;UID=%s;PWD=%s',[lDataBaseLogin.cbODBCD_DSN.Text, lDataBaseLogin.edtUsuario.Text, lDataBaseLogin.edtPassword.Text]);
fSQLDialect := lDataBaseLogin.cbDialect.Items.Objects[lDataBaseLogin.cbDialect.ItemIndex] as acAbstractSQLDialect; fSQLDialect := lDataBaseLogin.cbDialect.Items.Objects[lDataBaseLogin.cbDialect.ItemIndex] as acAbstractSQLDialect;
sbDB.Panels[0].Text := Format('DSN:%s UID:%s Dialect:%s', [lDataBaseLogin.cbODBCD_DSN.Text, lDataBaseLogin.edtUsuario.Text, lDataBaseLogin.cbDialect.Caption]); sbStatusBar.Panels[3].Text := Format('%s.%s(%s)', [lDataBaseLogin.cbDialect.Text, lDataBaseLogin.cbODBCD_DSN.Text, lDataBaseLogin.edtUsuario.Text]);
end end
else else
begin begin
if lDataBaseLogin.edtDatabaseName.Text <> '' if lDataBaseLogin.edtDatabaseName.Text <> ''
then fConnectionString := format('DRIVER=%s;Server=%s;Database=%s;UID=%s;PWD=%s',[lDataBaseLogin.cbODBCD_DRIVERS.Text, lDataBaseLogin.edtServerName.Text, lDataBaseLogin.edtDatabaseName.Text, lDataBaseLogin.edtUsuario.Text, lDataBaseLogin.edtPassword.Text]) then fConnectionString := format('DRIVER=%s;Server=%s;Database=%s;UID=%s;PWD=%s',[lDataBaseLogin.cbODBCD_DRIVERS.Text, lDataBaseLogin.edtServerName.Text, lDataBaseLogin.edtDatabaseName.Text, lDataBaseLogin.edtUsuario.Text, lDataBaseLogin.edtPassword.Text])
else fConnectionString := format('DRIVER=%s;Server=%s;Database=%s;UID=%s;PWD=%s',[lDataBaseLogin.cbODBCD_DRIVERS.Text, lDataBaseLogin.edtServerName.Text, lDataBaseLogin.edtUsuario.Text, lDataBaseLogin.edtPassword.Text]); else fConnectionString := format('DRIVER=%s;Server=%s;UID=%s;PWD=%s',[lDataBaseLogin.cbODBCD_DRIVERS.Text, lDataBaseLogin.edtServerName.Text, lDataBaseLogin.edtUsuario.Text, lDataBaseLogin.edtPassword.Text]);
fSQLDialect := lDataBaseLogin.cbDialect.Items.Objects[lDataBaseLogin.cbDialect.ItemIndex] as acAbstractSQLDialect; fSQLDialect := lDataBaseLogin.cbDialect.Items.Objects[lDataBaseLogin.cbDialect.ItemIndex] as acAbstractSQLDialect;
if lDataBaseLogin.edtDatabaseName.Text <> '' if lDataBaseLogin.edtDatabaseName.Text <> ''
then sbDB.Panels[0].Text := Format('Server:%s Database:%s UID:%s Dialect:%s', [lDataBaseLogin.edtServerName.Text, lDataBaseLogin.edtDatabaseName.Text, lDataBaseLogin.edtUsuario.Text, lDataBaseLogin.cbDialect.Caption]) then sbStatusBar.Panels[3].Text := Format('%s.%s.%s(%s)', [lDataBaseLogin.cbDialect.Text, lDataBaseLogin.edtServerName.Text, lDataBaseLogin.edtDatabaseName.Text, lDataBaseLogin.edtUsuario.Text])
else sbDB.Panels[0].Text := Format('Server:%s UID:%s Dialect:%s', [lDataBaseLogin.edtServerName.Text, lDataBaseLogin.edtUsuario.Text, lDataBaseLogin.cbDialect.Caption]); else sbStatusBar.Panels[3].Text := Format('%s.%s.Default(%s)', [lDataBaseLogin.cbDialect.Text, lDataBaseLogin.edtServerName.Text, lDataBaseLogin.edtUsuario.Text]);
end; end;
end end
else exit; else exit;
...@@ -490,7 +492,7 @@ end; ...@@ -490,7 +492,7 @@ end;
procedure TExplorerV2.FormClose(Sender: TObject; var Action: TCloseAction); procedure TExplorerV2.FormClose(Sender: TObject; var Action: TCloseAction);
begin begin
Action := caHide; Action := caFree;
end; end;
procedure TExplorerV2.FormCreate(Sender: TObject); procedure TExplorerV2.FormCreate(Sender: TObject);
...@@ -730,11 +732,20 @@ begin ...@@ -730,11 +732,20 @@ begin
end; end;
procedure TExplorerV2.ReconnectDBExecute(Sender: TObject); procedure TExplorerV2.ReconnectDBExecute(Sender: TObject);
var lConnectionString: string;
lSession: acPersistenceSession;
begin begin
fConnectionString := ''; lConnectionString := fConnectionString;
sbDB.Panels[0].Text := ''; try
Connect.Free; fConnectionString := '';
lSession := Connect;
if Assigned(lSession)
then lSession.Free
else fConnectionString := lConnectionString;
except
fConnectionString := lConnectionString;
raise;
end;
end; end;
procedure TExplorerV2.ResizeColumns(piListView: TListView); procedure TExplorerV2.ResizeColumns(piListView: TListView);
......
...@@ -11582,7 +11582,7 @@ object OQLExplorerV2: TOQLExplorerV2 ...@@ -11582,7 +11582,7 @@ object OQLExplorerV2: TOQLExplorerV2
OnCreate = FormCreate OnCreate = FormCreate
OnResize = FormResize OnResize = FormResize
OnShow = FormShow OnShow = FormShow
LCLVersion = '2.0.0.4' LCLVersion = '2.0.2.0'
object pnlActionBar: TPanel object pnlActionBar: TPanel
Left = 0 Left = 0
Height = 35 Height = 35
......
...@@ -98,7 +98,7 @@ var ...@@ -98,7 +98,7 @@ var
implementation implementation
uses acuObject, acuOQL; uses acuObject, acuOQL, IntegracaoDelphiSUML;
{$R *.dfm} {$R *.dfm}
...@@ -166,7 +166,7 @@ begin ...@@ -166,7 +166,7 @@ begin
begin begin
try try
try try
// OpenDialog1.InitialDir := ExtractFilePath(gStarUMLApp .FileName); OpenDialog1.InitialDir := ExtractFilePath(gStarUMLApp.ProjectManager.FileName);
if OpenDialog1.Execute then if OpenDialog1.Execute then
begin begin
lvOQLList.ItemIndex := -1; lvOQLList.ItemIndex := -1;
......
object OQLParams: TOQLParams object OQLParams: TOQLParams
Left = 0 Left = 0
Height = 163 Height = 254
Top = 0 Top = 0
Width = 308 Width = 308
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'OQLParams' Caption = 'OQLParams'
ClientHeight = 163 ClientHeight = 254
ClientWidth = 308 ClientWidth = 308
Color = clBtnFace Color = clBtnFace
Font.Color = clWindowText Font.Color = clWindowText
...@@ -13,20 +13,19 @@ object OQLParams: TOQLParams ...@@ -13,20 +13,19 @@ object OQLParams: TOQLParams
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
OnClose = FormClose OnClose = FormClose
Position = poDesktopCenter Position = poDesktopCenter
LCLVersion = '2.1.0.0'
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 123 Height = 214
Top = 0 Top = 0
Width = 308 Width = 308
Align = alClient Align = alClient
ClientHeight = 123 ClientHeight = 214
ClientWidth = 308 ClientWidth = 308
TabOrder = 0 TabOrder = 0
object sbParams: TScrollBox object sbParams: TScrollBox
Tag = -20 Tag = -20
Left = 1 Left = 1
Height = 121 Height = 212
Top = 1 Top = 1
Width = 306 Width = 306
HorzScrollBar.Page = 1 HorzScrollBar.Page = 1
...@@ -38,7 +37,7 @@ object OQLParams: TOQLParams ...@@ -38,7 +37,7 @@ object OQLParams: TOQLParams
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Height = 40 Height = 40
Top = 123 Top = 214
Width = 308 Width = 308
Align = alBottom Align = alBottom
ClientHeight = 40 ClientHeight = 40
...@@ -51,6 +50,7 @@ object OQLParams: TOQLParams ...@@ -51,6 +50,7 @@ object OQLParams: TOQLParams
Width = 75 Width = 75
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
Kind = bkOK Kind = bkOK
ModalResult = 1
OnClick = BitBtn1Click OnClick = BitBtn1Click
TabOrder = 0 TabOrder = 0
end end
...@@ -61,6 +61,7 @@ object OQLParams: TOQLParams ...@@ -61,6 +61,7 @@ object OQLParams: TOQLParams
Width = 75 Width = 75
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
Kind = bkCancel Kind = bkCancel
ModalResult = 2
TabOrder = 1 TabOrder = 1
end end
object BitBtn3: TBitBtn object BitBtn3: TBitBtn
......
object itServiceParameters: TitServiceParameters object itServiceParameters: TitServiceParameters
Left = 0 Left = 0
Height = 276
Top = 0 Top = 0
Width = 306
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Propriedades do Servi'#231'o' Caption = 'Propriedades do Serviço'
ClientHeight = 225 ClientHeight = 276
ClientWidth = 258 ClientWidth = 306
Color = clBtnFace Color = clBtnFace
Font.Charset = DEFAULT_CHARSET ParentFont = True
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poDesktopCenter Position = poDesktopCenter
PixelsPerInch = 96
TextHeight = 13
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Height = 237
Top = 0 Top = 0
Width = 258 Width = 306
Height = 186
Align = alClient Align = alClient
ClientHeight = 237
ClientWidth = 306
TabOrder = 1 TabOrder = 1
ExplicitWidth = 229
ExplicitHeight = 191
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
Left = 6 Left = 6
Height = 77
Top = 3 Top = 3
Width = 243 Width = 296
Height = 64 ClientHeight = 70
ClientWidth = 288
TabOrder = 0 TabOrder = 0
object Label2: TLabel object Label2: TLabel
Left = 16 Left = 5
Top = 16 Height = 16
Width = 89 Top = 14
Height = 13 Width = 117
Caption = 'Nome do Servidor:' Caption = 'Nome do Servidor:'
ParentColor = False
end end
object Label1: TLabel object Label1: TLabel
Left = 20 Left = 11
Top = 40 Height = 16
Width = 85 Top = 42
Height = 13 Width = 111
Caption = 'N'#250'mero da Porta:' Caption = 'Número da Porta:'
ParentColor = False
end end
object edtServerName: TEdit object edtServerName: TEdit
Left = 113 Left = 133
Top = 13 Height = 22
Width = 121 Top = 8
Height = 21 Width = 155
TabOrder = 0 TabOrder = 0
end end
object edtPortNumber: TEdit object edtPortNumber: TEdit
Left = 113 Left = 133
Top = 37 Height = 22
Width = 121 Top = 36
Height = 21 Width = 155
TabOrder = 1 TabOrder = 1
end end
end end
object GroupBox2: TGroupBox object GroupBox2: TGroupBox
Left = 6 Left = 6
Top = 70 Height = 48
Width = 243 Top = 88
Height = 41 Width = 296
ClientHeight = 41
ClientWidth = 288
TabOrder = 1 TabOrder = 1
object Label3: TLabel object Label3: TLabel
Left = 13 Left = 0
Top = 15 Height = 16
Width = 92 Top = 12
Height = 13 Width = 122
Caption = 'C'#243'digo do Sistema:' Caption = 'Código do Sistema:'
ParentColor = False
end end
object edtSystemCode: TEdit object edtSystemCode: TEdit
Left = 113 Left = 133
Top = 12 Height = 22
Width = 121 Top = 8
Height = 21 Width = 155
TabOrder = 0 TabOrder = 0
end end
end end
object GroupBox3: TGroupBox object GroupBox3: TGroupBox
Left = 6 Left = 6
Top = 114 Height = 80
Width = 243 Top = 144
Height = 66 Width = 296
ClientHeight = 73
ClientWidth = 288
TabOrder = 2 TabOrder = 2
object Label5: TLabel object Label5: TLabel
Left = 20 Left = 9
Top = 16 Height = 16
Width = 85 Top = 12
Height = 13 Width = 113
Caption = 'Nome do Usu'#225'rio:' Caption = 'Nome do Usuário:'
ParentColor = False
end end
object Label4: TLabel object Label4: TLabel
Left = 71 Left = 80
Top = 40 Height = 16
Width = 34 Top = 46
Height = 13 Width = 42
Caption = 'Senha:' Caption = 'Senha:'
ParentColor = False
end end
object edtUserName: TEdit object edtUserName: TEdit
Left = 113 Left = 133
Top = 13 Height = 22
Width = 121 Top = 6
Height = 21 Width = 155
TabOrder = 0 TabOrder = 0
end end
object edtPassword: TEdit object edtPassword: TEdit
Left = 113 Left = 133
Top = 37 Height = 22
Width = 121 Top = 40
Height = 21 Width = 155
EchoMode = emPassword
PasswordChar = '*' PasswordChar = '*'
TabOrder = 1 TabOrder = 1
end end
...@@ -119,29 +126,35 @@ object itServiceParameters: TitServiceParameters ...@@ -119,29 +126,35 @@ object itServiceParameters: TitServiceParameters
end end
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Top = 186
Width = 258
Height = 39 Height = 39
Top = 237
Width = 306
Align = alBottom Align = alBottom
ClientHeight = 39
ClientWidth = 306
TabOrder = 0 TabOrder = 0
ExplicitTop = 187
ExplicitWidth = 229
object BitBtn1: TBitBtn object BitBtn1: TBitBtn
Left = 77 Left = 141
Height = 25
Top = 6 Top = 6
Width = 75 Width = 75
Height = 25 Anchors = [akTop, akLeft, akBottom]
TabOrder = 0 Caption = 'Ok'
OnClick = BitBtn1Click
Kind = bkOK Kind = bkOK
ModalResult = 1
OnClick = BitBtn1Click
TabOrder = 0
end end
object BitBtn2: TBitBtn object BitBtn2: TBitBtn
Left = 165 Left = 229
Height = 25
Top = 6 Top = 6
Width = 75 Width = 75
Height = 25 Anchors = [akTop, akLeft, akBottom]
TabOrder = 1 Caption = 'Cancel'
Kind = bkCancel Kind = bkCancel
ModalResult = 2
TabOrder = 1
end end
end end
end end
...@@ -3,7 +3,7 @@ unit ituServiceParameters; ...@@ -3,7 +3,7 @@ unit ituServiceParameters;
interface interface
uses uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, LCLType, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ExtCtrls; Dialogs, StdCtrls, Buttons, ExtCtrls;
type type
......
...@@ -11,7 +11,7 @@ object XSDExplorer: TXSDExplorer ...@@ -11,7 +11,7 @@ object XSDExplorer: TXSDExplorer
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
OnCreate = FormCreate OnCreate = FormCreate
OnShow = FormShow OnShow = FormShow
LCLVersion = '2.1.0.0' LCLVersion = '2.0.0.4'
WindowState = wsMaximized WindowState = wsMaximized
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
...@@ -715,8 +715,8 @@ object XSDExplorer: TXSDExplorer ...@@ -715,8 +715,8 @@ object XSDExplorer: TXSDExplorer
end end
end end
object alMain: TActionList object alMain: TActionList
Left = 664 left = 664
Top = 8 top = 8
object actNewXSD: TAction object actNewXSD: TAction
Caption = 'New XSD' Caption = 'New XSD'
OnExecute = actNewXSDExecute OnExecute = actNewXSDExecute
...@@ -745,8 +745,8 @@ object XSDExplorer: TXSDExplorer ...@@ -745,8 +745,8 @@ object XSDExplorer: TXSDExplorer
end end
end end
object imgOQLState: TImageList object imgOQLState: TImageList
Left = 760 left = 760
Top = 8 top = 8
Bitmap = { Bitmap = {
4C69020000001000000010000000000000000000000000000000000000000000 4C69020000001000000010000000000000000000000000000000000000000000
00001DA435FF139923FF139923FF139923FF139923FF138C2AFF000000000000 00001DA435FF139923FF139923FF139923FF139923FF138C2AFF000000000000
...@@ -817,8 +817,8 @@ object XSDExplorer: TXSDExplorer ...@@ -817,8 +817,8 @@ object XSDExplorer: TXSDExplorer
end end
object ppmTriggers: TPopupMenu object ppmTriggers: TPopupMenu
OnPopup = ppmTriggersPopup OnPopup = ppmTriggersPopup
Left = 528 left = 528
Top = 8 top = 8
object miClear: TMenuItem object miClear: TMenuItem
Caption = 'Clear' Caption = 'Clear'
OnClick = miClearClick OnClick = miClearClick
......
...@@ -3,7 +3,7 @@ unit ituXSDExplorer; ...@@ -3,7 +3,7 @@ unit ituXSDExplorer;
interface interface
uses uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, SynEdit, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, SynEdit,
Dialogs, ExtCtrls, StdCtrls, utuXSD, Menus, ComCtrls, Buttons, ActnList, ImgList; Dialogs, ExtCtrls, StdCtrls, utuXSD, Menus, ComCtrls, Buttons, ActnList, ImgList;
type type
...@@ -243,14 +243,14 @@ end; ...@@ -243,14 +243,14 @@ end;
procedure TXSDExplorer.btnSendExternalEditorClick(Sender: TObject); procedure TXSDExplorer.btnSendExternalEditorClick(Sender: TObject);
var var
SUInfo: TStartupInfo; // SUInfo: TStartupInfo;
ProcInfo: TProcessInformation; // ProcInfo: TProcessInformation;
lOk: boolean; lOk: boolean;
lAux: TStringList; lAux: TStringList;
begin begin
if Self.ExternalXSDEditor = '' then if Self.ExternalXSDEditor = '' then
begin begin
Application.MessageBox('Need to define an external XSD editor.','StarUML', MB_ICONINFORMATION); // Application.MessageBox('Need to define an external XSD editor.','StarUML', MB_ICONINFORMATION);
exit; exit;
end; end;
...@@ -278,12 +278,12 @@ begin ...@@ -278,12 +278,12 @@ begin
lAux.free; lAux.free;
end; end;
FillChar(SUInfo, SizeOf(SUInfo), #0); // FillChar(SUInfo, SizeOf(SUInfo), #0);
SUInfo.cb := SizeOf(SUInfo); // SUInfo.cb := SizeOf(SUInfo);
SUInfo.dwFlags := STARTF_USESHOWWINDOW; // SUInfo.dwFlags := STARTF_USESHOWWINDOW;
SUInfo.wShowWindow := SW_SHOWNORMAL; // SUInfo.wShowWindow := SW_SHOWNORMAL;
lOk := CreateProcess(nil, { lOk := CreateProcess(nil,
PChar(ExternalXSDEditor + ' ' + self.TempPath + Self.CurrentFileName), PChar(ExternalXSDEditor + ' ' + self.TempPath + Self.CurrentFileName),
nil, nil,
nil, nil,
...@@ -294,13 +294,13 @@ begin ...@@ -294,13 +294,13 @@ begin
nil, nil,
SUInfo, SUInfo,
ProcInfo); ProcInfo);
}
self.Editing := lOK; self.Editing := lOK;
if (lOk) then if (lOk) then
begin begin
CloseHandle(ProcInfo.hProcess); // CloseHandle(ProcInfo.hProcess);
CloseHandle(ProcInfo.hThread); // CloseHandle(ProcInfo.hThread);
end; end;
end; end;
......
...@@ -4,7 +4,7 @@ unit odbc_dsn_win; ...@@ -4,7 +4,7 @@ unit odbc_dsn_win;
interface interface
Uses Windows, Classes, SysUtils, Registry; Uses Classes, SysUtils, Registry;
procedure GetODBCDriversList(aODBCDriversList: TStrings); procedure GetODBCDriversList(aODBCDriversList: TStrings);
......
This diff is collapsed.
This diff is collapsed.
object CadastroCasoDeUsoIcones: TCadastroCasoDeUsoIcones object CadastroCasoDeUsoIcones: TCadastroCasoDeUsoIcones
Left = 0 Left = 0
Height = 405
Top = 0 Top = 0
Width = 497
Caption = 'Ícones' Caption = 'Ícones'
ClientHeight = 405 ClientHeight = 405
ClientWidth = 497 ClientWidth = 497
Color = clBtnFace Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poDesktopCenter Position = poDesktopCenter
PixelsPerInch = 96
TextHeight = 13
object Panel1: TPanel
Left = 0
Top = 364
Width = 497
Height = 41
Align = alBottom
TabOrder = 0
object BitBtn1: TBitBtn
Left = 311
Top = 8
Width = 75
Height = 25
TabOrder = 0
Kind = bkOK
end
object BitBtn2: TBitBtn
Left = 408
Top = 8
Width = 75
Height = 25
Caption = 'Cancelar'
TabOrder = 1
Kind = bkCancel
end
end
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Height = 366
Top = 0 Top = 0
Width = 497 Width = 497
Height = 364
Align = alClient Align = alClient
TabOrder = 1 ClientHeight = 366
ClientWidth = 497
TabOrder = 0
object ltvIcones: TListView object ltvIcones: TListView
Left = 1 Left = 1
Height = 364
Top = 1 Top = 1
Width = 495 Width = 495
Height = 362
Align = alClient Align = alClient
Columns = < Columns = <
item item
Caption = 'Operações' Caption = 'Operações'
Width = 10 Width = 10
end> end>
HideSelection = False HideSelection = False
LargeImages = imgListaIcone
ReadOnly = True ReadOnly = True
SortType = stText SortType = stText
TabOrder = 0 TabOrder = 0
ViewStyle = vsIcon
OnDblClick = ltvIconesDblClick OnDblClick = ltvIconesDblClick
end end
end end
object Panel1: TPanel
Left = 0
Height = 39
Top = 366
Width = 497
Align = alBottom
ClientHeight = 39
ClientWidth = 497
TabOrder = 1
object BitBtn1: TBitBtn
Left = 328
Height = 25
Top = 8
Width = 75
Anchors = [akTop, akLeft, akBottom]
Caption = 'Ok'
Kind = bkOK
ModalResult = 1
TabOrder = 0
end
object BitBtn2: TBitBtn
Left = 416
Height = 25
Top = 8
Width = 75
Anchors = [akTop, akLeft, akBottom]
Caption = 'Cancel'
Kind = bkCancel
ModalResult = 2
TabOrder = 1
end
end
object imgListaIcone: TImageList object imgListaIcone: TImageList
Height = 32 Height = 32
ShareImages = True ShareImages = True
Width = 32 Width = 32
Left = 440 left = 440
Top = 56 top = 56
end end
end end
...@@ -7,21 +7,20 @@ unit uCadastroCasoDeUsoIcones; ...@@ -7,21 +7,20 @@ unit uCadastroCasoDeUsoIcones;
interface interface
uses uses
{$IFnDEF FPC}
Windows,
{$ELSE}
LCLIntf, LCLType, LMessages, LCLIntf, LCLType, LMessages,
{$ENDIF}
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Buttons, ComCtrls, ImgList; Dialogs, ExtCtrls, StdCtrls, Buttons, ComCtrls, ImgList;
type type
{ TCadastroCasoDeUsoIcones }
TCadastroCasoDeUsoIcones = class(TForm) TCadastroCasoDeUsoIcones = class(TForm)
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Panel1: TPanel; Panel1: TPanel;
Panel2: TPanel; Panel2: TPanel;
ltvIcones: TListView; ltvIcones: TListView;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
imgListaIcone: TImageList; imgListaIcone: TImageList;
procedure ltvIconesDblClick(Sender: TObject); procedure ltvIconesDblClick(Sender: TObject);
private private
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -3,7 +3,7 @@ unit uDBAttributeParameters; ...@@ -3,7 +3,7 @@ unit uDBAttributeParameters;
interface interface
uses uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, ExtCtrls, Grids, ValEdit, StdCtrls, IntegracaoDelphiSUML, StarUMLintf; Dialogs, Buttons, ExtCtrls, Grids, ValEdit, StdCtrls, IntegracaoDelphiSUML, StarUMLintf;
type type
......
This diff is collapsed.
...@@ -130,7 +130,7 @@ type ...@@ -130,7 +130,7 @@ type
procedure SetupRuler; procedure SetupRuler;
procedure SetEditRect; procedure SetEditRect;
procedure UpdateCursorPos; procedure UpdateCursorPos;
procedure WMDropFiles(var Msg: TWMDropFiles); message WM_DROPFILES; // procedure WMDropFiles(var Msg: TWMDropFiles); message WM_DROPFILES;
procedure PerformFileOpen(const AFileName: string); procedure PerformFileOpen(const AFileName: string);
procedure SetModified(Value: Boolean); procedure SetModified(Value: Boolean);
function GetDocWithRTFInformation: string; function GetDocWithRTFInformation: string;
...@@ -142,12 +142,12 @@ type ...@@ -142,12 +142,12 @@ type
implementation implementation
uses //uses
{$IFnDEF FPC} {$IFnDEF FPC}
ShellAPI, ShellAPI,
{$ELSE} {$ELSE}
{$ENDIF} {$ENDIF}
RichEdit; // RichEdit;
resourcestring resourcestring
sSaveChanges = 'Save changes to %s?'; sSaveChanges = 'Save changes to %s?';
...@@ -260,7 +260,7 @@ begin ...@@ -260,7 +260,7 @@ begin
with Editor do with Editor do
begin begin
R := Rect(GutterWid, 0, ClientWidth-GutterWid, ClientHeight); R := Rect(GutterWid, 0, ClientWidth-GutterWid, ClientHeight);
SendMessage(Handle, EM_SETRECT, 0, Longint(@R)); // SendMessage(Handle, EM_SETRECT, 0, Longint(@R));
end; end;
end; end;
...@@ -368,7 +368,7 @@ end; ...@@ -368,7 +368,7 @@ end;
procedure TRTFEditor.EditUndo(Sender: TObject); procedure TRTFEditor.EditUndo(Sender: TObject);
begin begin
with Editor do with Editor do
if HandleAllocated then SendMessage(Handle, EM_UNDO, 0, 0); // if HandleAllocated then SendMessage(Handle, EM_UNDO, 0, 0);
end; end;
procedure TRTFEditor.EditCut(Sender: TObject); procedure TRTFEditor.EditCut(Sender: TObject);
...@@ -510,10 +510,10 @@ procedure TRTFEditor.UpdateCursorPos; ...@@ -510,10 +510,10 @@ procedure TRTFEditor.UpdateCursorPos;
var var
CharPos: TPoint; CharPos: TPoint;
begin begin
CharPos.Y := SendMessage(Editor.Handle, EM_EXLINEFROMCHAR, 0, // CharPos.Y := SendMessage(Editor.Handle, EM_EXLINEFROMCHAR, 0,
Editor.SelStart); // Editor.SelStart);
CharPos.X := (Editor.SelStart - // CharPos.X := (Editor.SelStart -
SendMessage(Editor.Handle, EM_LINEINDEX, CharPos.Y, 0)); // SendMessage(Editor.Handle, EM_LINEINDEX, CharPos.Y, 0));
Inc(CharPos.Y); Inc(CharPos.Y);
Inc(CharPos.X); Inc(CharPos.X);
StatusBar.Panels[0].Text := Format(sColRowInfo, [CharPos.Y, CharPos.X]); StatusBar.Panels[0].Text := Format(sColRowInfo, [CharPos.Y, CharPos.X]);
...@@ -530,7 +530,7 @@ begin ...@@ -530,7 +530,7 @@ begin
PerformFileOpen(ParamStr(1)); PerformFileOpen(ParamStr(1));
end; end;
procedure TRTFEditor.WMDropFiles(var Msg: TWMDropFiles); {procedure TRTFEditor.WMDropFiles(var Msg: TWMDropFiles);
var var
CFileName: array[0..MAX_PATH] of Char; CFileName: array[0..MAX_PATH] of Char;
begin begin
...@@ -545,7 +545,7 @@ begin ...@@ -545,7 +545,7 @@ begin
// DragFinish(Msg.Drop); // DragFinish(Msg.Drop);
end; end;
end; end;
}
procedure TRTFEditor.RichEditChange(Sender: TObject); procedure TRTFEditor.RichEditChange(Sender: TObject);
begin begin
SetModified(Editor.Modified); SetModified(Editor.Modified);
...@@ -565,8 +565,8 @@ begin ...@@ -565,8 +565,8 @@ begin
EditCopyCmd.Enabled := EditCutCmd.Enabled; EditCopyCmd.Enabled := EditCutCmd.Enabled;
if Editor.HandleAllocated then if Editor.HandleAllocated then
begin begin
EditUndoCmd.Enabled := Editor.Perform(EM_CANUNDO, 0, 0) <> 0; // EditUndoCmd.Enabled := Editor.Perform(EM_CANUNDO, 0, 0) <> 0;
EditPasteCmd.Enabled := Editor.Perform(EM_CANPASTE, 0, 0) <> 0; // EditPasteCmd.Enabled := Editor.Perform(EM_CANPASTE, 0, 0) <> 0;
end; end;
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