Commit 473fdaef authored by Lucio Sandrini's avatar Lucio Sandrini

Início da implementação da interface de cadastro formulário.

parent e1a62b33
......@@ -10,13 +10,14 @@
</HEADER>
<BODY>
<MAINMENU>
<MAINITEM index="6" base="NEW_TOP" caption="Curio" beginGroup="TRUE">
<MAINITEM index="7" base="NEW_TOP" caption="Curio" beginGroup="TRUE">
<MAINITEM caption="Generate RegisterModelMappings" actionId="1" />
<MAINITEM caption="Code Generator" actionId="6" beginGroup="TRUE"/>
<MAINITEM caption="Quick OQL" actionId="18" beginGroup="TRUE"/>
<MAINITEM caption="OQL Studio" actionId="19" />
<MAINITEM caption="Element documentation" actionId="12" beginGroup="TRUE"/>
<MAINITEM caption="Convert ALL XSDs to Usecase XSD" actionId="14" beginGroup="TRUE"/>
<MAINITEM caption="Dynamo" actionId="20" beginGroup="TRUE"/>
</MAINITEM>
<MAINITEM caption="Curio" beginGroup="TRUE" availableWhen="MODEL_SELECTED">
......
......@@ -192,7 +192,7 @@
<PackageName Value="LCL"/>
</Item5>
</RequiredPackages>
<Units Count="31">
<Units Count="32">
<Unit0>
<Filename Value="CurioAddIn.dpr"/>
<IsPartOfProject Value="True"/>
......@@ -375,6 +375,13 @@
<Filename Value="cxuCadastroDefinicaoClasse.pas"/>
<IsPartOfProject Value="True"/>
</Unit30>
<Unit31>
<Filename Value="ituCadastrarFormulario.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="itCadastrarFormulario"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit31>
</Units>
</ProjectOptions>
<CompilerOptions>
......
......@@ -469,27 +469,22 @@ var lDynamoDef: TitCadastrarFormulario;
lCadastroDefinicaoClasseUC: cxCadastroDefinicaoClasse;
lModel: IModel;
lUMLPackageAux: IUMLPackage;
lUMLClassAux: IUMLClass;
begin
//lDynamoDef := TitCadastrarFormulario.Create(nil);
//lDynamoDef.Show;
lModel := gStarUMLApp.SelectionManager.GetSelectedModelAt(0);
if lModel.QueryInterface(IUMLClass, lUMLClassAux) = S_OK then
begin
lUMLClassAux := lModel as IUMLClass;
lDynamoDef := nil;
lSession := GetServiceSession;
if Assigned(lSession) then
begin
lModel := gStarUMLApp.SelectionManager.GetSelectedModelAt(0);
lCadastroDefinicaoClasseUC := cxCadastroDefinicaoClasse.Create(lSession);
try
lDynamoDef := TitCadastrarFormulario.Create(nil, lCadastroDefinicaoClasseUC, Nil);
lDynamoDef := TitCadastrarFormulario.Create(nil, lCadastroDefinicaoClasseUC, lUMLClassAux);
try
if lModel.QueryInterface(IUMLPackage, lUMLPackageAux) = S_OK then
begin
lDynamoDef.ClassPackage := lModel as IUMLPackage;
end;
lDynamoDef.Show;
//if lDynamoDef.ShowModal = mrok then
// gStarUMLApp.SelectInModelExplorer(lCadClasse.UMLClass);
if lDynamoDef.ShowModal = mrok then
gStarUMLApp.SelectInModelExplorer(lDynamoDef.UMLClass);
finally
lDynamoDef.Free;
end;
......@@ -497,6 +492,33 @@ begin
lCadastroDefinicaoClasseUC.Free;
end;
end;
end else raise Exception.Create('This option is avaliable only for classes.');
//lDynamoDef := nil;
//lSession := GetServiceSession;
//if Assigned(lSession) then
//begin
// lModel := gStarUMLApp.SelectionManager.GetSelectedModelAt(0);
//
// lCadastroDefinicaoClasseUC := cxCadastroDefinicaoClasse.Create(lSession);
// try
// lDynamoDef := TitCadastrarFormulario.Create(nil, lCadastroDefinicaoClasseUC, Nil);
// try
// if lModel.QueryInterface(IUMLPackage, lUMLPackageAux) = S_OK then
// begin
// lDynamoDef.ClassPackage := lModel as IUMLPackage;
// end;
// lDynamoDef.ShowModal;
// //if lDynamoDef.ShowModal = mrok then
// // gStarUMLApp.SelectInModelExplorer(lCadClasse.UMLClass);
// finally
// lDynamoDef.Free;
// end;
// finally
// lCadastroDefinicaoClasseUC.Free;
// end;
//end;
end;
......
......@@ -26,7 +26,7 @@ procedure cxCadastroDefinicaoClasse.rmObtemContexto(piField: utField; const piRe
var lRequestMessage: mxRequestMessage;
lResponseMessage: mxAnswerMessage;
begin
lRequestMessage := self.NewRequest('RM_OBTEM_CONTEXTO', piField);
lRequestMessage := self.NewRequest('RM_OBTER_CONTEXTO', piField);
try
lResponseMessage := self.Session.SendRequest(lRequestMessage);
try
......
object itCadastrarDefinicao: TitCadastrarDefinicao
Left = 0
Height = 240
Top = 0
Width = 320
ClientHeight = 240
ClientWidth = 320
Left = 398
Height = 323
Top = 166
Width = 817
ClientHeight = 323
ClientWidth = 817
LCLVersion = '2.1.0.0'
object pnPrincipal: TPanel
Left = 0
Height = 589
Height = 312
Top = 0
Width = 993
ClientHeight = 589
ClientWidth = 993
Width = 809
ClientHeight = 312
ClientWidth = 809
Color = 15855852
ParentColor = False
TabOrder = 0
object lblClasses: TLabel
Left = 350
Left = 144
Height = 18
Top = 192
Top = 48
Width = 132
Caption = 'CLASSES DO SISTEMA:'
Font.Color = clWindowText
......@@ -30,50 +30,11 @@ object itCadastrarDefinicao: TitCadastrarDefinicao
ParentFont = False
end
object lblUC: TLabel
Left = 345
Left = 544
Height = 18
Top = 120
Width = 157
Caption = 'CÓDIGO DO CASO DE USO:'
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Trebuchet MS'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object lblClasseDoSistema: TLabel
Left = 329
Height = 18
Top = 430
Width = 189
Caption = 'ADICIONAR CLASSE AO SISTEMA'
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Trebuchet MS'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object lblCodigoDaClasse: TLabel
Left = 368
Height = 18
Top = 502
Width = 114
Caption = 'CÓDIGO DA CLASSE'
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Trebuchet MS'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object lblConexao: TLabel
Left = 54
Height = 18
Top = 30
Width = 132
Caption = 'STRING DE CONEXÃO:'
Top = 48
Width = 92
Caption = 'CASOS DE USO:'
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Trebuchet MS'
......@@ -81,17 +42,10 @@ object itCadastrarDefinicao: TitCadastrarDefinicao
ParentColor = False
ParentFont = False
end
object edtUC: TEdit
Left = 254
Height = 23
Top = 144
Width = 360
TabOrder = 0
end
object lvClass: TListView
Left = 254
Height = 174
Top = 216
Left = 32
Height = 170
Top = 72
Width = 360
Columns = <
item
......@@ -99,66 +53,48 @@ object itCadastrarDefinicao: TitCadastrarDefinicao
Width = 356
end>
ColumnClick = False
Font.Color = clWindowText
Font.Height = -11
Font.CharSet = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -12
Font.Name = 'Trebuchet MS'
Font.Pitch = fpVariable
Font.Quality = fqDraft
GridLines = True
HideSelection = False
ParentFont = False
ParentShowHint = False
ReadOnly = True
RowSelect = True
TabOrder = 1
TabOrder = 0
ViewStyle = vsReport
end
object edtAddClass: TEdit
Left = 254
Height = 23
Top = 454
object ListView1: TListView
Left = 424
Height = 170
Top = 72
Width = 360
TabOrder = 2
end
object chkManual: TCheckBox
Left = 638
Height = 22
Top = 488
Width = 165
Caption = 'Adicionar Manualmente'
Font.Color = clWindowText
Font.Height = -13
Columns = <
item
Caption = 'NOME'
Width = 356
end>
ColumnClick = False
Font.CharSet = ANSI_CHARSET
Font.Name = 'Trebuchet MS'
Font.Style = [fsBold]
OnClick = chkManualClick
Font.Pitch = fpVariable
Font.Quality = fqDraft
GridLines = True
ParentFont = False
TabOrder = 3
TabOrder = 1
ViewStyle = vsReport
end
object edtCodigoDaClasse: TEdit
Left = 254
Height = 23
Top = 526
Width = 360
TabOrder = 4
end
object btnConectar: TButton
Left = 838
Height = 25
Top = 54
Width = 105
Caption = 'OBTER CLASSES'
OnClick = btnConectarClick
TabOrder = 5
end
object edtConexao: TEdit
Left = 54
Height = 26
Top = 54
Width = 750
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Trebuchet MS'
ParentFont = False
TabOrder = 6
Text = 'ServerName=localhost;portNumber=7777;systemCode=38;username=administrador;password='
object btnCancel: TButton
Left = 648
Height = 33
Top = 264
Width = 136
Caption = 'CANCELAR'
TabOrder = 2
end
end
object pnMenuSuperior: TPanel
......@@ -226,4 +162,12 @@ object itCadastrarDefinicao: TitCadastrarDefinicao
Width = 993
TabOrder = 2
end
object btnSave: TButton
Left = 504
Height = 33
Top = 264
Width = 136
Caption = 'SALVAR'
TabOrder = 3
end
end
......@@ -14,20 +14,14 @@ type
{ TitCadastrarDefinicao }
TitCadastrarDefinicao = class(TForm)
btnCancel: TButton;
btnSave: TButton;
FlowPanel1: TFlowPanel;
jvGradientSuperior: TPanel;
lblClasses: TLabel;
lblUC: TLabel;
edtUC: TEdit;
ListView1: TListView;
lvClass: TListView;
edtAddClass: TEdit;
chkManual: TCheckBox;
lblClasseDoSistema: TLabel;
edtCodigoDaClasse: TEdit;
lblCodigoDaClasse: TLabel;
btnConectar: TButton;
edtConexao: TEdit;
lblConexao: TLabel;
pnDivisor: TPanel;
pnMenuSuperior: TPanel;
pnPrincipal: TPanel;
......@@ -37,8 +31,6 @@ type
sbSair: TSpeedButton;
sbSalvar: TSpeedButton;
procedure FormShow(Sender: TObject);
procedure chkManualClick(Sender: TObject);
procedure btnConectarClick(Sender: TObject);
......@@ -63,61 +55,11 @@ begin
edtConexao.ReadOnly := False;
btnConectar.Enabled := True;
edtAddClass.Enabled := False;
edtCodigoDaClasse.Enabled := False;
end;
procedure TitCadastrarDefinicao.btnConectarClick(Sender: TObject);
//var
// lRequest : acRequest;
begin
inherited;
//
// itCadastrarDefinicao(self.Controller).NewRequest('RM_OBTER_CLASSES', itCadastrarDefinicao(Self.Controller).SendToInterface).Post;
// Self.Enabled := False;
// Screen.Cursor := crHourGlass;
// lRequest := itCadastrarDefinicao(self.Controller).NewRequest('RM_OBTER_CLASSES', itCadastrarDefinicao(Self.Controller).SendToInterface);
// lRequest.Message.RootField.AddAttribute('stringConnection').AsString := edtConexao.Text;
// lRequest.Post;
end;
procedure TitCadastrarDefinicao.chkManualClick(Sender: TObject);
begin
inherited;
if chkManual.Checked = True then
begin
lvClass.Enabled := False;
lvClass.ReadOnly := True;
edtAddClass.Enabled := True;
edtCodigoDaClasse.Enabled := True;
btnConectar.Enabled := False;
edtConexao.Enabled := False;
end
else
begin
lvClass.Enabled := True;
lvClass.ReadOnly := True;
edtAddClass.Enabled := False;
edtAddClass.Clear;
edtCodigoDaClasse.Enabled := False;
edtCodigoDaClasse.Clear;
// btnConectar.Enabled := True;
edtConexao.Enabled := True;
end;
end;
......
object itCadastrarFormulario: TitCadastrarFormulario
Left = 463
Height = 550
Top = 256
Width = 1000
ClientHeight = 550
ClientWidth = 1000
Left = 356
Height = 511
Top = 218
Width = 948
ClientHeight = 511
ClientWidth = 948
LCLVersion = '2.1.0.0'
object scrlbxTudo: TScrollBox
Left = 0
Height = 908
Height = 869
Top = 0
Width = 1718
HorzScrollBar.Page = 975
Width = 1666
HorzScrollBar.Page = 931
HorzScrollBar.Tracking = True
VertScrollBar.Page = 498
VertScrollBar.Page = 490
VertScrollBar.Tracking = True
Anchors = [akTop, akLeft, akRight, akBottom]
BorderStyle = bsNone
ClientHeight = 908
ClientWidth = 1718
ClientHeight = 869
ClientWidth = 1666
TabOrder = 0
object Panel1: TPanel
Left = 0
Height = 908
Height = 869
Top = 0
Width = 1718
Width = 1666
Align = alClient
ClientHeight = 908
ClientWidth = 1718
ClientHeight = 869
ClientWidth = 1666
TabOrder = 0
object edtCampo: TEdit
Left = 447
Left = 104
Height = 23
Top = 95
Top = 448
Width = 142
AutoSize = False
OnKeyPress = edtCampoKeyPress
TabOrder = 0
end
object btnCancelar: TButton
Left = 685
Left = 785
Height = 49
Top = 448
Top = 440
Width = 145
Caption = 'CANCELAR'
OnClick = btnCancelarClick
TabOrder = 1
end
object btnSalvar: TButton
Left = 521
Left = 641
Height = 49
Top = 448
Top = 440
Width = 145
Caption = 'SALVAR'
OnClick = btnSalvarClick
......@@ -60,24 +60,28 @@ object itCadastrarFormulario: TitCadastrarFormulario
Left = 16
Height = 300
Top = 130
Width = 650
Width = 604
Checkboxes = True
Columns = <
item
Caption = 'Nome'
Width = 350
Width = 180
end
item
Caption = 'Display Nome'
Width = 180
end
item
Caption = 'Obrigatório'
Width = 100
Width = 80
end
item
Caption = 'ID'
Width = 100
Width = 80
end
item
Caption = 'Tipo'
Width = 100
Width = 80
end>
ColumnClick = False
GridLines = True
......@@ -89,20 +93,6 @@ object itCadastrarFormulario: TitCadastrarFormulario
OnClick = lvCamposClick
OnSelectItem = lvCamposSelectItem
end
object lstAtributos: TValueListEditor
Left = 685
Height = 145
Top = 285
Width = 289
FixedCols = 0
RowCount = 2
TabOrder = 4
OnValidate = lstAtributosValidate
ColWidths = (
144
141
)
end
object edtCodigo: TEdit
Left = 74
Height = 23
......@@ -110,48 +100,20 @@ object itCadastrarFormulario: TitCadastrarFormulario
Width = 143
AutoSize = False
Enabled = False
TabOrder = 5
end
object chkRequerido: TCheckBox
Left = 684
Height = 22
Top = 188
Width = 96
Caption = 'OBRIGATÓRIO'
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Trebuchet MS'
OnClick = chkRequeridoClick
ParentFont = False
TabOrder = 6
end
object cbbTipo: TComboBox
Left = 685
Height = 24
Hint = 'Tipo'
Top = 255
Width = 145
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Trebuchet MS'
ItemHeight = 16
OnChange = cbbTipoChange
ParentFont = False
Style = csDropDownList
TabOrder = 7
TabOrder = 4
end
object btnAdd: TSpeedButton
Left = 596
Left = 253
Height = 25
Top = 95
Top = 448
Width = 70
Caption = 'Adicionar'
OnClick = btnAddClick
end
object lblNovoCampo: TLabel
Left = 360
Left = 16
Height = 18
Top = 100
Top = 451
Width = 81
Caption = 'NOVO CAMPO:'
Font.Color = clWindowText
......@@ -160,14 +122,6 @@ object itCadastrarFormulario: TitCadastrarFormulario
ParentColor = False
ParentFont = False
end
object btnUp: TSpeedButton
Left = 685
Height = 25
Top = 149
Width = 70
Caption = 'Sobe'
OnClick = btnUpClick
end
object lblCodigo: TLabel
Left = 16
Height = 18
......@@ -194,20 +148,34 @@ object itCadastrarFormulario: TitCadastrarFormulario
ParentColor = False
ParentFont = False
end
object lblOrdem: TLabel
Left = 684
object lblClasseName: TLabel
Left = 88
Height = 18
Top = 130
Width = 43
Caption = 'ORDEM:'
Top = 24
Width = 65
Caption = 'ClassName'
Font.Color = clWindowText
Font.Height = -12
Font.Height = -13
Font.Name = 'Trebuchet MS'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object lblClassIDO: TLabel
Left = 192
Height = 18
Top = 24
Width = 52
Caption = 'ClassIDO'
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Trebuchet MS'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object lblTipoAtributo: TLabel
Left = 684
Left = 641
Height = 18
Top = 234
Width = 98
......@@ -218,37 +186,90 @@ object itCadastrarFormulario: TitCadastrarFormulario
ParentColor = False
ParentFont = False
end
object cbbTipo: TComboBox
Left = 641
Height = 24
Hint = 'Tipo'
Top = 255
Width = 145
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Trebuchet MS'
ItemHeight = 16
OnChange = cbbTipoChange
ParentFont = False
Style = csDropDownList
TabOrder = 5
end
object lstAtributos: TValueListEditor
Left = 641
Height = 145
Top = 285
Width = 289
FixedCols = 0
RowCount = 2
TabOrder = 6
OnValidate = lstAtributosValidate
ColWidths = (
144
141
)
end
object btnUp: TSpeedButton
Left = 641
Height = 25
Top = 196
Width = 70
Caption = 'Sobe'
OnClick = btnUpClick
end
object btnDown: TSpeedButton
Left = 760
Left = 718
Height = 25
Top = 149
Top = 196
Width = 70
Caption = 'Desce'
OnClick = btnDownClick
end
object lblClasseName: TLabel
Left = 88
object lblOrdem: TLabel
Left = 641
Height = 18
Top = 24
Width = 65
Caption = 'ClassName'
Top = 175
Width = 43
Caption = 'ORDEM:'
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = 'Trebuchet MS'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object lblClassIDO: TLabel
Left = 192
object rbNao: TRadioButton
Left = 866
Height = 19
Top = 199
Width = 42
Caption = 'Não'
OnChange = rbNaoChange
TabOrder = 7
end
object rbSim: TRadioButton
Left = 820
Height = 19
Top = 199
Width = 40
Caption = 'Sim'
OnChange = rbSimChange
TabOrder = 8
end
object lblObrigatorio: TLabel
Left = 820
Height = 18
Top = 24
Width = 52
Caption = 'ClassIDO'
Top = 175
Width = 79
Caption = 'OBRIGATÓRIO:'
Font.Color = clWindowText
Font.Height = -13
Font.Height = -12
Font.Name = 'Trebuchet MS'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
......
This diff is collapsed.
This diff is collapsed.
object itServiceParameters: TitServiceParameters
Left = 2317
Left = 795
Height = 333
Top = 486
Top = 334
Width = 314
BorderStyle = bsDialog
Caption = 'Propriedades do Serviço'
......@@ -9,7 +9,7 @@ object itServiceParameters: TitServiceParameters
ClientWidth = 314
ParentFont = True
Position = poScreenCenter
LCLVersion = '2.0.2.0'
LCLVersion = '2.1.0.0'
object Panel2: TPanel
Left = 0
Height = 284
......
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