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