Changeset 27 for trunk/Forms
- Timestamp:
- Nov 9, 2011, 4:11:56 PM (13 years ago)
- Location:
- trunk/Forms
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/ULoginForm.lfm
r25 r27 44 44 Width = 75 45 45 Caption = 'Login' 46 Default = True 46 47 ModalResult = 1 47 48 OnClick = ButtonLoginClick … … 54 55 Width = 104 55 56 TabOrder = 2 56 end57 object MaskEditPassword: TMaskEdit58 Left = 8859 Height = 2160 Top = 9661 Width = 10462 CharCase = ecNormal63 MaxLength = 164 TabOrder = 365 EditMask = '*'66 Text = '*'67 SpaceChar = '_'68 57 end 69 58 object Label3: TLabel … … 82 71 ItemHeight = 13 83 72 Style = csDropDownList 84 TabOrder = 473 TabOrder = 3 85 74 end 86 75 object ButtonChange: TButton … … 91 80 Caption = 'Change' 92 81 OnClick = ButtonChangeClick 93 TabOrder = 582 TabOrder = 4 94 83 end 95 84 object Image1: TImage … … 99 88 Width = 152 100 89 end 90 object EditPassword: TEdit 91 Left = 89 92 Height = 21 93 Top = 96 94 Width = 104 95 EchoMode = emPassword 96 PasswordChar = '*' 97 TabOrder = 5 98 end 101 99 end -
trunk/Forms/ULoginForm.lrt
r25 r27 4 4 TLOGINFORM.BUTTONCANCEL.CAPTION=Close 5 5 TLOGINFORM.BUTTONLOGIN.CAPTION=Login 6 TLOGINFORM.MASKEDITPASSWORD.TEXT=*7 6 TLOGINFORM.LABEL3.CAPTION=Connection: 8 7 TLOGINFORM.BUTTONCHANGE.CAPTION=Change -
trunk/Forms/ULoginForm.pas
r25 r27 19 19 ComboBoxConnection: TComboBox; 20 20 EditUserName: TEdit; 21 EditPassword: TEdit; 21 22 Image1: TImage; 22 23 Label1: TLabel; 23 24 Label2: TLabel; 24 25 Label3: TLabel; 25 MaskEditPassword: TMaskEdit;26 26 procedure ButtonCancelClick(Sender: TObject); 27 27 procedure ButtonChangeClick(Sender: TObject); … … 49 49 Core.LastUserName := EditUserName.Text; 50 50 Core.LastProfile := ComboBoxConnection.ItemIndex; 51 Core.LastPassword := MaskEditPassword.Text;51 Core.LastPassword := EditPassword.Text; 52 52 end; 53 53 … … 60 60 begin 61 61 MainForm.PersistentForm.Load(Self); 62 EditUserName.Text := Core.LastUserName; 63 EditPassword.Text := ''; 64 Core.Profiles.FillStrings(ComboBoxConnection.Items); 62 65 ComboBoxConnection.ItemIndex := Core.LastProfile; 63 EditUserName.Text := Core.LastUserName; 64 MaskEditPassword.Text := ''; 65 Core.Profiles.FillStrings(ComboBoxConnection.Items); 66 if (ComboBoxConnection.Items.Count > 0) and 67 (ComboBoxConnection.ItemIndex = -1) then ComboBoxConnection.ItemIndex := 0; 66 68 end; 67 69 … … 75 77 if LoginProfileForm.ShowModal = mrOk then begin 76 78 Core.Profiles.FillStrings(ComboBoxConnection.Items); 79 Core.LastProfile := ComboBoxConnection.ItemIndex; 80 ComboBoxConnection.ItemIndex := Core.LastProfile; 81 if (ComboBoxConnection.Items.Count > 0) and 82 (ComboBoxConnection.ItemIndex = -1) then ComboBoxConnection.ItemIndex := 0; 77 83 end; 78 84 end; -
trunk/Forms/ULoginProfileForm.lfm
r25 r27 149 149 Top = 312 150 150 Width = 75 151 Anchors = [akTop, akRight] 151 152 Caption = 'Cancel' 152 153 ModalResult = 2 -
trunk/Forms/ULoginProfileForm.pas
r25 r27 10 10 11 11 type 12 TConnectProtocol = (cpXMLRPC );12 TConnectProtocol = (cpXMLRPC, cpDirect); 13 13 14 14 { TConnectProfile } … … 155 155 procedure TLoginProfileForm.ButtonAddClick(Sender: TObject); 156 156 begin 157 TConnectProfile(ProfileList.AddNew(TConnectProfile.Create));157 ProfileList.AddNew(TConnectProfile.Create); 158 158 ListBox1.Items.AddObject(TConnectProfile(ProfileList.Last).Name, 159 159 TConnectProfile(ProfileList.Last)); … … 183 183 ProfileList.Assign(Core.Profiles); 184 184 ProfileList.FillStrings(ListBox1.Items); 185 ListBox1.ItemIndex := Core.LastProfile; 186 if (ListBox1.Items.Count > 0) and 187 (ListBox1.ItemIndex = -1) then ListBox1.ItemIndex := 0; 185 188 end; 186 189 … … 218 221 OpenKey(AKey + '\ConnectProfile\' + IntToStr(I), True); 219 222 with TConnectProfile(AddNew(TConnectProfile.Create)) do begin 220 HostName := ReadStringWithDefault('HostName', 'localhost'); 221 Port := ReadIntegerWithDefault('Port', 8090); 222 Database := ReadStringWithDefault('Database', 'database'); 223 Protocol := TConnectProtocol(ReadIntegerWithDefault('Protocol', 0)); 224 UserName := ReadStringWithDefault('UserName', 'admin'); 223 Name := ReadStringWithDefault('Name', Name); 224 HostName := ReadStringWithDefault('HostName', HostName); 225 Port := ReadIntegerWithDefault('Port', Port); 226 Database := ReadStringWithDefault('Database', Database); 227 Protocol := TConnectProtocol(ReadIntegerWithDefault('Protocol', Integer(Protocol))); 228 UserName := ReadStringWithDefault('UserName', UserName); 225 229 end; 226 230 end; … … 242 246 OpenKey(AKey + '\ConnectProfile\' + IntToStr(I), True); 243 247 with TConnectProfile(Items[I]) do begin 248 WriteString('Name', Name); 244 249 WriteString('HostName', HostName); 245 250 WriteInteger('Port', Port); -
trunk/Forms/UMainForm.lfm
r25 r27 1 1 object MainForm: TMainForm 2 Left = 2712 Left = 307 3 3 Height = 446 4 Top = 1 594 Top = 126 5 5 Width = 640 6 6 ActiveControl = Panel1 … … 8 8 ClientHeight = 427 9 9 ClientWidth = 640 10 Icon.Data = { 11 BE1000000000010001002020000001002000A810000016000000280000002000 12 0000400000000100200000000000001000006400000064000000000000000000 13 0000000000000000000000000000000000000000000000000000000000000000 14 0000000000000000000000000000000000000000000000000000000000000000 15 0000000000000000000000000000000000000000000000000000000000000000 16 0000000000000000000000000000000000000000000000000000000000000000 17 00000000000000000000000000000000000000000000D6D2ABFFB7B06CFFB5AE 18 66FFB9B370FFCFCA9CFF00000000000000000000000000000000000000000000 19 0000000000000000000000000000000000000000000000000000E8E1B3FFDDD4 20 91FFDDD491FFE4DDA7FF00000000000000000000000000000000000000000000 21 000000000000000000000000000000000000A0963BFF877C09FF837700FF8377 22 00FF837700FF847801FF978C29FFCDC999FF0000000000000000000000000000 23 000000000000000000000000000000000000E3DBA4FFD3C86EFFD2C66AFFD2C6 24 6AFFD2C66AFFD2C66AFFD4C871FFE0D89AFF0000000000000000000000000000 25 00000000000000000000000000008F8418FF837700FF837700FF867A06FF877C 26 09FF877B08FF847801FF837700FF877B07FFBAB371FF00000000000000000000 27 0000000000000000000000000000DFD798FFD2C66AFFD2C66AFFD2C66AFFD5CA 28 74FFD5CA74FFD2C86DFFD2C66AFFD2C66AFFDAD188FF00000000000000000000 29 000000000000000000009A9030FF837700FF837700FFAAA251FF000000000000 30 000000000000B2AA61FF857904FF837700FF857904FFBAB371FF000000000000 31 00000000000000000000DED594FFD2C66AFFD2C66AFFD6CB79FF000000000000 32 00000000000000000000DBD189FFD2C66AFFD2C66AFFE3DBA4FF000000000000 33 000000000000BDB678FF847801FF847801FFAFA75CFF00000000000000000000 34 00000000000000000000C0BA7DFF887C0AFF837700FF948A23FF000000000000 35 000000000000DFD697FFD2C66AFFD2C66AFFD8CD7EFF00000000000000000000 36 0000000000000000000000000000DAD085FFD2C66AFFD4C871FF000000000000 37 000000000000998E2DFF837700FF8A7E0EFF0000000000000000000000000000 38 0000000000000000000000000000CBC695FF9A9030FF00000000000000000000 39 0000E0D89AFFD2C66AFFD2C66AFFD8CE81FF0000000000000000000000000000 40 000000000000000000000000000000000000D2C66CFFD2C66AFF000000000000 41 00000000000090851AFF837700FF988E2CFF0000000000000000000000000000 42 000000000000000000000000000000000000000000000000000000000000E0D7 43 9AFFD2C66AFFD2C66AFFD7CC7CFF000000000000000000000000000000000000 44 000000000000000000000000000000000000D3C76DFFD2C66AFFDED594FF0000 45 00000000000092871FFF837700FF91861CFF0000000000000000000000000000 46 0000000000000000000000000000000000000000000000000000DED695FFD2C6 47 6AFFD2C66AFFD6CA77FF00000000000000000000000000000000000000000000 48 000000000000000000000000000000000000D5CA74FFD2C66AFFDED695FF0000 49 000000000000A29941FF837700FF867A06FF0000000000000000000000000000 50 00000000000000000000000000000000000000000000DED594FFD2C66AFFD2C6 51 6AFFD7CC7CFF0000000000000000000000000000000000000000000000000000 52 000000000000000000000000000000000000D3C76DFFD2C66AFF000000000000 53 000000000000C2BD84FF847801FF837700FF968C29FF00000000000000000000 54 000000000000000000000000000000000000DFD798FFD2C66AFFD2C66AFFD8CE 55 81FF0000000000000000C9C490FFBEB87BFF0000000000000000000000000000 56 0000000000000000000000000000D5CA74FFD2C66AFFD7CC7CFF000000000000 57 000000000000000000009F9539FF837700FF837700FF9D9436FF000000000000 58 0000000000000000000000000000E0D89AFFD2C66AFFD2C66AFFD8CE7FFF0000 59 000000000000D1CCA1FF897D0BFF877B08FFBCB575FF00000000000000000000 60 00000000000000000000D6CB79FFD2C66AFFD2C66CFFE7E1B1FF000000000000 61 00000000000000000000000000009A9030FF837700FF837700FF9E9538FF0000 62 00000000000000000000E2DAA0FFD2C66AFFD2C66AFFD6CC7AFF000000000000 63 000000000000CFCA9CFF877B07FF837700FF867A06FFBBB473FF000000000000 64 000000000000D9CF82FFD2C66AFFD2C66AFFE0D79AFF00000000000000000000 65 000000000000000000000000000000000000978C29FF837700FF837700FF9B91 66 31FF000000000000000000000000D7CC7CFFD6CB79FF00000000000000000000 67 00000000000000000000CBC695FF877B07FF837700FF857A05FFBAB471FF0000 68 00000000000000000000D2C66CFFDED594FF0000000000000000000000000000 69 00000000000000000000000000000000000000000000978C29FF837700FF8377 70 00FF968C27FF0000000000000000000000000000000000000000000000000000 71 0000000000000000000000000000CBC695FF897D0DFF837700FF847801FFB7B0 72 6CFF000000000000000000000000000000000000000000000000000000000000 73 00000000000000000000000000000000000000000000000000009D9335FF8377 74 00FF837700FF9B9131FF00000000000000000000000000000000000000000000 75 000000000000000000000000000000000000CBC695FF8A7E0EFF837700FF8579 76 04FFB2AA61FF0000000000000000000000000000000000000000000000000000 77 0000000000000000000000000000000000000000000000000000000000009C93 78 34FF837700FF837700FF9E9538FF000000000000000000000000000000000000 79 00000000000000000000000000000000000000000000D1CCA1FF8E8215FF8377 80 00FF857904FFB2AA61FF00000000000000000000000000000000000000000000 81 0000000000000000000000000000000000000000000000000000000000000000 82 0000988E2CFF837700FF837700FF9D9436FF0000000000000000000000000000 83 0000000000000000000000000000EBE6C0FF000000000000000000000000887D 84 0CFF837700FF857903FFB0A85DFF000000000000000000000000000000000000 85 000000000000000000000000000000000000D4C871FFD5CA74FF000000000000 86 000000000000978C29FF837700FF837700FF978C29FF00000000000000000000 87 00000000000000000000E6DFADFFD3C76DFFD8CD7EFF00000000000000000000 88 00008E8215FF837700FF847801FFAEA659FF0000000000000000000000000000 89 0000000000000000000000000000D5CA74FFD2C66AFFD2C66AFFE7E1B1FF0000 90 000000000000000000009A9030FF837700FF837700FF988E2CFF000000000000 91 000000000000E7E1B1FFD3C76DFFD2C66AFFD5CA74FF00000000000000000000 92 00000000000091861CFF837700FF847801FFB0A85DFF00000000000000000000 93 00000000000000000000DCD38DFFD2C66AFFD2C66AFFE5DEAAFF000000000000 94 00000000000000000000000000009D9335FF837801FF9B9131FF000000000000 95 0000E7E1B1FFD3C86EFFD2C66AFFD5CA74FF0000000000000000000000000000 96 000000000000000000008F8418FF837700FF857903FFC2BC81FF000000000000 97 00000000000000000000D2C66AFFD2C66AFFE2DAA0FF00000000000000000000 98 000000000000000000000000000000000000ACA455FF0000000000000000E7E1 99 B1FFD3C86EFFD2C66AFFD4C871FF000000000000000000000000000000000000 100 00000000000000000000D2CEA3FF857A05FF837700FF938921FF000000000000 101 000000000000DBD38CFFD2C66AFFD4C871FF0000000000000000000000000000 102 0000000000000000000000000000000000000000000000000000E6E0B0FFD3C8 103 6EFFD2C66AFFD2C66CFF00000000000000000000000000000000000000000000 104 0000000000000000000000000000B0A85DFF837700FF837700FFCEC99BFF0000 105 000000000000D7CC7CFFD2C66AFFD7CC7CFF0000000000000000000000000000 106 00000000000000000000000000000000000000000000E5DEADFFD2C66CFFD2C6 107 6AFFD5C973FF0000000000000000000000000000000000000000000000000000 108 000000000000000000000000000000000000867A06FF837700FFB3AB64FF0000 109 000000000000D7CC7CFFD2C66AFFDAD085FF0000000000000000000000000000 110 000000000000000000000000000000000000E6DFB0FFD3C76DFFD2C66AFFD5CA 111 74FF000000000000000000000000000000000000000000000000000000000000 112 000000000000000000000000000000000000877B08FF837700FFB6AF68FF0000 113 000000000000DACF84FFD2C66AFFD5CA74FF0000000000000000000000000000 114 0000000000000000000000000000E7E1B1FFD3C86EFFD2C66AFFD5CA74FF0000 115 00000000000000000000AFA85CFF988E2BFF0000000000000000000000000000 116 0000000000000000000000000000C4BE86FF847801FF847801FF000000000000 117 000000000000EAE5BCFFD2C66AFFD2C66AFFE9E4B9FF00000000000000000000 118 00000000000000000000E7E1B1FFD3C86EFFD2C66AFFD3C76DFF000000000000 119 000000000000B9B471FF837700FF837700FF958A25FF00000000000000000000 120 00000000000000000000000000008F8418FF837700FF90851AFF000000000000 121 00000000000000000000DAD085FFD2C66AFFD2C66AFFE1D99CFF000000000000 122 000000000000E0D89AFFD2C66AFFD2C66AFFD3C870FF00000000000000000000 123 00000000000000000000978C29FF837700FF837700FF8F8418FFC7C28CFF0000 124 000000000000C8C38EFF8C8113FF837700FF837700FFBDB678FF000000000000 125 0000000000000000000000000000D8CD7EFFD2C66AFFD2C66AFFD3C86EFFD4C8 126 6FFFD3C76DFFD2C66AFFD2C66AFFD5CA74FF0000000000000000000000000000 127 00000000000000000000000000009F9539FF847801FF837700FF857904FF877C 128 09FF877C09FF857904FF837700FF837700FFA69D48FF00000000000000000000 129 000000000000000000000000000000000000DBD38CFFD2C66CFFD2C66AFFD2C6 130 6AFFD2C66AFFD2C66AFFD7CC7CFFEBE5BDFF0000000000000000000000000000 131 000000000000000000000000000000000000BAB371FF938921FF837700FF8377 132 00FF837700FF837700FF8A7E0EFFBDB678FF0000000000000000000000000000 133 0000000000000000000000000000000000000000000000000000E6DFADFFE3DC 134 A5FFEBE6BEFF0000000000000000000000000000000000000000000000000000 135 000000000000000000000000000000000000000000000000000000000000B7B0 136 6CFFB5AE66FFC2BC81FF00000000000000000000000000000000000000000000 137 0000000000000000000000000000000000000000000000000000000000000000 138 0000000000000000000000000000000000000000000000000000000000000000 139 0000000000000000000000000000000000000000000000000000000000000000 140 0000000000000000000000000000000000000000000000000000000000000000 141 0000000000000000000000000000000000000000000000000000000000000000 142 0000000000000000000000000000000000000000000000000000000000000000 143 0000000000000000000000000000000000000000000000000000000000000000 144 0000000000000000000000000000000000000000000000000000000000000000 145 0000 146 } 10 147 Menu = MainMenu1 11 148 OnClose = FormClose … … 189 326 Caption = 'About' 190 327 OnExecute = AAboutExecute 328 end 329 object ADisconnect: TAction 330 Caption = 'Disconnect' 331 OnExecute = ADisconnectExecute 191 332 end 192 333 end … … 323 464 OnClick = MenuItem17Click 324 465 end 466 object MenuItem22: TMenuItem 467 Action = ADisconnect 468 end 325 469 object MenuItem14: TMenuItem 326 470 Action = AExit -
trunk/Forms/UMainForm.lrt
r25 r27 21 21 TMAINFORM.AIMPORTSTRUCTURE.CAPTION=Import structure... 22 22 TMAINFORM.AABOUT.CAPTION=About 23 TMAINFORM.ADISCONNECT.CAPTION=Disconnect 23 24 TMAINFORM.MENUITEM13.CAPTION=Server 24 25 TMAINFORM.MENUITEM11.CAPTION=View -
trunk/Forms/UMainForm.pas
r25 r27 18 18 AConnect: TAction; 19 19 AAbout: TAction; 20 ADisconnect: TAction; 20 21 AImportStructure: TAction; 21 22 AInitSystemValues: TAction; … … 55 56 MenuItem20: TMenuItem; 56 57 MenuItem21: TMenuItem; 58 MenuItem22: TMenuItem; 57 59 MenuItem3: TMenuItem; 58 60 MenuItem4: TMenuItem; … … 71 73 procedure AAboutExecute(Sender: TObject); 72 74 procedure AConnectExecute(Sender: TObject); 75 procedure ADisconnectExecute(Sender: TObject); 73 76 procedure AExitExecute(Sender: TObject); 74 77 procedure AImportStructureExecute(Sender: TObject); … … 111 114 TreeState: TTreeState; 112 115 Report: TReport; 116 procedure UpdateInterface; 113 117 procedure LoadTree; 114 118 procedure LoadItemList; … … 130 134 uses 131 135 UItemView, UItemEdit, UItemAdd, ULoginForm, USettingForm, UApplicationInfo, 132 UCore, UImportStructureForm, UAboutForm, ULoginProfileForm ;136 UCore, UImportStructureForm, UAboutForm, ULoginProfileForm, UChronisClientDirect; 133 137 134 138 {$R *.lfm} … … 507 511 end; 508 512 513 procedure TMainForm.UpdateInterface; 514 begin 515 ADisconnect.Enabled := Core.System.Database.Connected; 516 AConnect.Enabled := not Core.System.Database.Connected; 517 AInitSystemValues.Enabled := Core.System.Database.Connected; 518 AImportStructure.Enabled := Core.System.Database.Connected; 519 end; 520 509 521 procedure TMainForm.FormCreate(Sender: TObject); 510 522 begin … … 639 651 Core.System.Database.UserName := Core.LastUserName; 640 652 Core.System.Database.Password := Core.LastPassword; 653 Core.System.Database.Port := Port; 654 if Protocol = cpDirect then Core.Client := TChronisClientDirect.Create; 655 end; 656 try 641 657 Core.System.Database.Connect; 642 end; 643 InitStructure; 644 Core.System.LoadTypes; 645 LoadTree; 646 end; 658 InitStructure; 659 Core.System.LoadTypes; 660 LoadTree; 661 except 662 on E:Exception do ShowMessage(E.Message); 663 end; 664 end; 665 end; 666 667 procedure TMainForm.ADisconnectExecute(Sender: TObject); 668 begin 669 Core.System.Database.Disconnect; 670 TreeView1.Items.Clear; 671 ListView1.Items.Clear; 672 Core.System.Types.Clear; 673 FreeAndNil(Core.Client); 647 674 end; 648 675 -
trunk/Forms/USettingForm.lfm
r22 r27 10 10 OnShow = FormShow 11 11 LCLVersion = '0.9.31' 12 object Label1: TLabel13 Left = 814 Height = 1415 Top = 816 Width = 7817 Caption = 'Server address:'18 ParentColor = False19 end20 object Edit1: TEdit21 Left = 11622 Height = 2123 Top = 824 Width = 25225 TabOrder = 026 end27 12 object ButtonSave: TButton 28 13 Left = 362 … … 33 18 Caption = 'Save' 34 19 ModalResult = 1 35 TabOrder = 120 TabOrder = 0 36 21 end 37 22 object ButtonCancel: TButton … … 43 28 Caption = 'Cancel' 44 29 ModalResult = 2 45 TabOrder = 230 TabOrder = 1 46 31 end 47 32 object Label2: TLabel … … 59 44 Width = 132 60 45 ItemHeight = 13 61 TabOrder = 346 TabOrder = 2 62 47 end 63 48 end -
trunk/Forms/USettingForm.lrt
r18 r27 1 1 TSETTINGFORM.CAPTION=Settings 2 TSETTINGFORM.LABEL1.CAPTION=Server address:3 2 TSETTINGFORM.BUTTONSAVE.CAPTION=Save 4 3 TSETTINGFORM.BUTTONCANCEL.CAPTION=Cancel -
trunk/Forms/USettingForm.pas
r12 r27 17 17 ButtonCancel: TButton; 18 18 ComboBoxLanguage: TComboBox; 19 Edit1: TEdit;20 Label1: TLabel;21 19 Label2: TLabel; 22 20 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
Note:
See TracChangeset
for help on using the changeset viewer.