diff --git a/Project1.dproj b/Project1.dproj index 49a329e..8cb1a38 100644 --- a/Project1.dproj +++ b/Project1.dproj @@ -157,27 +157,12 @@ true - - - 0 - .dll;.bpl - + 1 - .dylib - - - Contents\MacOS - 1 - .dylib 1 - .dylib - - - 1 - .dylib @@ -531,12 +516,27 @@ 1 - + + + 0 + .dll;.bpl + 1 + .dylib + + + Contents\MacOS + 1 + .dylib 1 + .dylib + + + 1 + .dylib diff --git a/Project1.dproj.local b/Project1.dproj.local index 3d1a545..d295a29 100644 --- a/Project1.dproj.local +++ b/Project1.dproj.local @@ -2,34 +2,34 @@ 2018/08/02 11:30:33.000.203,=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Unit1.pas - 2018/08/02 11:33:44.000.784,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormSplash.dfm=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Unit1.dfm - 2018/08/02 11:33:44.000.784,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormSplash.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Unit1.pas - 2018/08/02 11:34:22.000.896,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Project1.dproj + 2018/08/02 11:33:44.000.784,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Unit1.dfm=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormSplash.dfm + 2018/08/02 11:33:44.000.784,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Unit1.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormSplash.pas + 2018/08/02 11:34:22.000.896,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Project1.dproj=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj 2018/08/02 11:34:57.000.485,=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_Cadastro_Forms\UnitLista.pas - 2018/08/02 11:35:17.000.765,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitLista.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_Cadastro_Forms\UnitLista.pas + 2018/08/02 11:35:17.000.765,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_Cadastro_Forms\UnitLista.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitLista.pas 2018/08/02 11:35:39.000.518,=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas - 2018/08/02 11:37:42.000.005,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormPadrao.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas - 2018/08/02 11:37:42.000.005,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormPadrao.dfm=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.dfm + 2018/08/02 11:37:42.000.005,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormPadrao.pas + 2018/08/02 11:37:42.000.005,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.dfm=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormPadrao.dfm 2018/08/02 11:50:57.000.642,=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas - 2018/08/02 11:51:22.000.511,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormCidade.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas - 2018/08/02 11:51:22.000.511,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormCidade.dfm=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.dfm + 2018/08/02 11:51:22.000.511,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.dfm=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormCidade.dfm + 2018/08/02 11:51:22.000.511,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormCidade.pas 2018/08/02 11:54:03.000.448,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj 2018/08/03 07:57:41.000.908,=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas - 2018/08/03 07:59:28.000.101,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormEstado.dfm=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.dfm - 2018/08/03 07:59:28.000.101,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormEstado.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas + 2018/08/03 07:59:28.000.101,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.dfm=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormEstado.dfm + 2018/08/03 07:59:28.000.101,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormEstado.pas 2018/08/03 09:19:04.000.339,=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas - 2018/08/03 09:22:08.000.430,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormPais.pas - 2018/08/03 09:22:08.000.430,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.dfm=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormPais.dfm + 2018/08/03 09:22:08.000.430,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormPais.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas + 2018/08/03 09:22:08.000.430,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormPais.dfm=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.dfm 2018/08/03 11:37:12.000.927,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj 2018/08/03 12:44:44.000.083,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj 2018/08/06 10:32:04.000.123,=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas - 2018/08/06 10:39:43.000.299,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.dfm=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormGrid.dfm - 2018/08/06 10:39:43.000.299,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormGrid.pas + 2018/08/06 10:39:43.000.299,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormGrid.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas + 2018/08/06 10:39:43.000.299,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitFormGrid.dfm=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.dfm 2018/08/07 12:32:02.000.009,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj 2018/08/08 10:01:00.000.149,=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitSharedVariables.pas 2018/08/08 10:50:02.000.574,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitSharedVariables.pas= 2018/08/08 10:52:58.000.982,=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas - 2018/08/08 10:53:51.000.544,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitDados.pas + 2018/08/08 10:53:51.000.544,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\UnitDados.pas=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Unit1.pas 2018/08/08 12:16:26.000.969,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj 2018/08/08 14:58:46.000.344,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj 2018/08/14 14:54:15.000.469,C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj=C:\Users\programacaounico38\Documents\Embarcadero\Studio\Projects\Ex_CRUD\Project1.dproj diff --git a/Project1.stat b/Project1.stat index a8c20d2..5d746b5 100644 --- a/Project1.stat +++ b/Project1.stat @@ -1,10 +1,10 @@ [Stats] -EditorSecs=60702 -DesignerSecs=6684 -InspectorSecs=2336 -CompileSecs=360808 -OtherSecs=2143 +EditorSecs=62163 +DesignerSecs=6844 +InspectorSecs=2376 +CompileSecs=373514 +OtherSecs=2081 StartTime=03/08/2018 07:57:26 RealKeys=0 EffectiveKeys=0 -DebugSecs=27197 +DebugSecs=28213 diff --git a/UnitFormCidade.dfm b/UnitFormCidade.dfm index 99b166f..2c1141f 100644 --- a/UnitFormCidade.dfm +++ b/UnitFormCidade.dfm @@ -1,11 +1,14 @@ inherited FormCidade: TFormCidade Caption = 'Cadastro de cidade:' ClientHeight = 312 + ClientWidth = 600 OnCreate = FormCreate + ExplicitWidth = 616 ExplicitHeight = 351 PixelsPerInch = 96 TextHeight = 15 inherited ToolBar1: TToolBar + Width = 600 inherited btAnterior: TButton TabOrder = 2 OnClick = btAnteriorClick @@ -34,10 +37,11 @@ inherited FormCidade: TFormCidade end end inherited Panel1: TPanel + Width = 600 Height = 264 ExplicitHeight = 264 inherited Panel2: TPanel - Left = 99 + Left = 100 Top = 6 ExplicitLeft = 99 ExplicitTop = 6 @@ -121,6 +125,7 @@ inherited FormCidade: TFormCidade end inherited StatusBar1: TStatusBar Top = 293 + Width = 600 Panels = < item Text = 'Aguardando' diff --git a/UnitFormGrid.dfm b/UnitFormGrid.dfm index 3d55671..2454cf0 100644 --- a/UnitFormGrid.dfm +++ b/UnitFormGrid.dfm @@ -22,7 +22,7 @@ object FormGrid: TFormGrid Left = 0 Top = 59 Width = 265 - Height = 184 + Height = 222 ColCount = 4 DrawingStyle = gdsClassic FixedCols = 0 diff --git a/UnitFormGrid.pas b/UnitFormGrid.pas index b588cfc..9bd87af 100644 --- a/UnitFormGrid.pas +++ b/UnitFormGrid.pas @@ -93,16 +93,39 @@ begin for wCont := 0 to FLista.Count-1 do begin wObj := FLista.getObjectByIndex(wCont); - if FClass = TCidade then - begin - with wObj as TCidade do + if wObj.ClassType = TCidade then begin - if ContainsText(wCidade, palavra) then + with wObj as TCidade do + begin + if ContainsText(wCidade, palavra) then + begin + wLista.Inserir(wObj, TCidade); + end; + end; + end + else + if wObj.ClassType = TEstado then begin - wLista.Inserir(wObj, TCidade); - end; - end; - end; + with wObj as TEstado do + begin + if ContainsText (wEstado, palavra) then + begin + wLista.Inserir(wObj, TEstado); + end; + end; + end + else + if wObj.ClassType = TPais then + begin + with wObj as TPais do + begin + if ContainsText (wPais, palavra) then + begin + wLista.Inserir(wObj, TPais); + end; + end; + end; + end; if wLista.Count > 0 then @@ -115,13 +138,38 @@ begin for wCont := 0 to wLista.Count-1 do begin wObj := wLista.getObjectByIndex(wCont); - with wObj as TCidade do + if wObj.ClassType = TCidade then begin - StringGrid1.Cells[0, wCont] := inttostr(wCod); - StringGrid1.Cells[1, wCont] := wCidade; - StringGrid1.Cells[2, wCont] := wPais; - StringGrid1.Cells[3, wCont] := wUF; - end; + with wObj as TCidade do + begin + StringGrid1.Cells[0, wCont] := inttostr(wCod); + StringGrid1.Cells[1, wCont] := wCidade; + StringGrid1.Cells[2, wCont] := wPais; + StringGrid1.Cells[3, wCont] := wUF; + end; + end + else + if wObj.ClassType = TEstado then + begin + with wObj as TEstado do + begin + StringGrid1.Cells[0, wCont] := inttostr(wCod); + StringGrid1.Cells[1, wCont] := wEstado; + StringGrid1.Cells[2, wCont] := wPais; + StringGrid1.Cells[3, wCont] := inttostr(wAliquota); + end; + end + else + if wObj.ClassType = TPais then + begin + with wObj as Tpais do + begin + StringGrid1.Cells[0, wCont] := inttostr(wCod); + StringGrid1.Cells[1, wCont] := wPais; + StringGrid1.Cells[2, wCont] := wNacionalidade; + StringGrid1.Cells[3, wCont] := inttostr(wCodfed); + end; + end; end; end; end @@ -131,13 +179,38 @@ begin for wCont := 0 to FLista.Count-1 do begin wObj := FLista.getObjectByIndex(wCont); - with wObj as TCidade do - begin - StringGrid1.Cells[0, wCont] := inttostr(wCod); - StringGrid1.Cells[1, wCont] := wCidade; - StringGrid1.Cells[2, wCont] := wPais; - StringGrid1.Cells[3, wCont] := wUF; - end; + if wObj.ClassType = TCidade then + begin + with wObj as TCidade do + begin + StringGrid1.Cells[0, wCont] := inttostr(wCod); + StringGrid1.Cells[1, wCont] := wCidade; + StringGrid1.Cells[2, wCont] := wPais; + StringGrid1.Cells[3, wCont] := wUF; + end; + end + else + if wObj.ClassType = TEstado then + begin + with wObj as TEstado do + begin + StringGrid1.Cells[0, wCont] := inttostr(wCod); + StringGrid1.Cells[1, wCont] := wEstado; + StringGrid1.Cells[2, wCont] := wPais; + StringGrid1.Cells[3, wCont] := inttostr(wAliquota); + end; + end + else + if wObj.ClassType = TPais then + begin + with wObj as TPais do + begin + StringGrid1.Cells[0, wCont] := inttostr(wCod); + StringGrid1.Cells[1, wCont] := wPais; + StringGrid1.Cells[2, wCont] := wNacionalidade; + StringGrid1.Cells[3, wCont] := inttostr(wCodFed); + end; + end; end; end; end; diff --git a/UnitFormPadrao.dfm b/UnitFormPadrao.dfm index 1f5fa7e..d370044 100644 --- a/UnitFormPadrao.dfm +++ b/UnitFormPadrao.dfm @@ -3,7 +3,7 @@ object FormPadrao: TFormPadrao Top = 0 Caption = 'FormPadrao' ClientHeight = 332 - ClientWidth = 598 + ClientWidth = 601 Color = clBtnFace Font.Charset = ANSI_CHARSET Font.Color = clWindowText @@ -20,11 +20,12 @@ object FormPadrao: TFormPadrao object ToolBar1: TToolBar Left = 0 Top = 0 - Width = 598 + Width = 601 Height = 29 ButtonHeight = 20 Caption = 'ToolBar1' TabOrder = 0 + ExplicitWidth = 598 object btAnterior: TButton Left = 0 Top = 0 @@ -109,21 +110,23 @@ object FormPadrao: TFormPadrao object Panel1: TPanel Left = 0 Top = 29 - Width = 598 + Width = 601 Height = 284 Align = alClient TabOrder = 1 + ExplicitWidth = 598 DesignSize = ( - 598 + 601 284) object Panel2: TPanel - Left = 354 + Left = 357 Top = 296 Width = 400 Height = 250 Anchors = [] BevelOuter = bvNone TabOrder = 0 + ExplicitLeft = 354 object cbLimparCampos: TCheckBox Left = 344 Top = 229 @@ -137,7 +140,7 @@ object FormPadrao: TFormPadrao object StatusBar1: TStatusBar Left = 0 Top = 313 - Width = 598 + Width = 601 Height = 19 Panels = < item @@ -146,6 +149,7 @@ object FormPadrao: TFormPadrao Text = 'Aguardando' Width = 50 end> + ExplicitWidth = 598 end object SaveTextFileDialog1: TSaveTextFileDialog Left = 552 diff --git a/UnitFormPais.dfm b/UnitFormPais.dfm index f5d82e4..47d2a7d 100644 --- a/UnitFormPais.dfm +++ b/UnitFormPais.dfm @@ -22,7 +22,6 @@ inherited FormPais: TFormPais OnClick = btBuscarClick end inherited btInserir: TButton - Default = False OnClick = btInserirClick end inherited btExcluir: TButton @@ -43,14 +42,12 @@ inherited FormPais: TFormPais DesignSize = ( 602 266) - inherited cbLimparCampos: TCheckBox - TabOrder = 1 - end inherited Panel2: TPanel + Left = 99 Top = 6 - TabOrder = 0 - ExplicitLeft = 98 - object Label1: TLabel + ExplicitLeft = 99 + ExplicitTop = 6 + object Label1: TLabel [0] Left = 49 Top = 74 Width = 42 @@ -58,7 +55,7 @@ inherited FormPais: TFormPais Anchors = [] Caption = 'C'#243'digo:' end - object Label2: TLabel + object Label2: TLabel [1] Left = 66 Top = 117 Width = 25 @@ -66,7 +63,7 @@ inherited FormPais: TFormPais Anchors = [] Caption = 'Pa'#237's:' end - object Label3: TLabel + object Label3: TLabel [2] Left = 12 Top = 165 Width = 79 @@ -74,7 +71,7 @@ inherited FormPais: TFormPais Anchors = [] Caption = 'Nacionalidade:' end - object Label4: TLabel + object Label4: TLabel [3] Left = 268 Top = 163 Width = 51 @@ -82,6 +79,9 @@ inherited FormPais: TFormPais Anchors = [] Caption = 'C'#243'd.Fed.:' end + inherited cbLimparCampos: TCheckBox + TabOrder = 4 + end object edCod: TEdit Left = 110 Top = 71 diff --git a/Win32/Debug/Project1.exe b/Win32/Debug/Project1.exe index f4ffd49..62e73ee 100644 Binary files a/Win32/Debug/Project1.exe and b/Win32/Debug/Project1.exe differ diff --git a/Win32/Debug/UnitFormGrid.dcu b/Win32/Debug/UnitFormGrid.dcu index 7cdb295..d05103e 100644 Binary files a/Win32/Debug/UnitFormGrid.dcu and b/Win32/Debug/UnitFormGrid.dcu differ