Changeset 12 for trunk/Forms
- Timestamp:
- Jun 9, 2011, 1:04:45 PM (13 years ago)
- Location:
- trunk/Forms
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UItemAdd.lfm
r9 r12 12 12 OnDestroy = FormDestroy 13 13 OnShow = FormShow 14 LCLVersion = '0.9. 29'14 LCLVersion = '0.9.31' 15 15 object Panel1: TPanel 16 16 Left = 0 -
trunk/Forms/UItemAdd.lrt
r7 r12 1 TITEMADDFORM. ITEMADDFORM.CAPTION=Add item1 TITEMADDFORM.CAPTION=Add item 2 2 TITEMADDFORM.BUTTONCANCEL.CAPTION=Cancel 3 3 TITEMADDFORM.BUTTONSAVE.CAPTION=Add -
trunk/Forms/UItemAdd.pas
r9 r12 103 103 TLabel(NewControl).Caption := TReportColumn(Report.Columns[I]).Caption + ':'; 104 104 105 ValueType := TReportColumn(Report.Columns[I]).Type Id;105 ValueType := TReportColumn(Report.Columns[I]).TypeDef.TypeIndex; 106 106 if ValueType = Integer(vtInteger) then begin 107 107 NewControl := TSpinEdit.Create(Panel1); -
trunk/Forms/UItemEdit.lfm
r9 r12 12 12 OnDestroy = FormDestroy 13 13 OnShow = FormShow 14 LCLVersion = '0.9. 29'14 LCLVersion = '0.9.31' 15 15 object Panel1: TPanel 16 16 Left = 0 -
trunk/Forms/UItemEdit.lrt
r7 r12 1 TITEMEDITFORM. ITEMEDITFORM.CAPTION=Edit item1 TITEMEDITFORM.CAPTION=Edit item 2 2 TITEMEDITFORM.BUTTONCANCEL.CAPTION=Cancel 3 3 TITEMEDITFORM.BUTTONSAVE.CAPTION=Save -
trunk/Forms/UItemEdit.pas
r9 r12 106 106 TLabel(NewControl).Caption := TReportColumn(Report.Columns[I]).Caption + ':'; 107 107 108 ValueType := TReportColumn(Report.Columns[I]).Type Id;108 ValueType := TReportColumn(Report.Columns[I]).TypeDef.TypeIndex; 109 109 if ValueType = Integer(vtInteger) then begin 110 110 NewControl := TSpinEdit.Create(Panel1); -
trunk/Forms/UItemView.lfm
r9 r12 11 11 OnDestroy = FormDestroy 12 12 OnShow = FormShow 13 LCLVersion = '0.9. 29'13 LCLVersion = '0.9.31' 14 14 object ButtonClose: TButton 15 15 Left = 546 -
trunk/Forms/UItemView.lrt
r7 r12 1 TITEMVIEWFORM. ITEMVIEWFORM.CAPTION=View item1 TITEMVIEWFORM.CAPTION=View item 2 2 TITEMVIEWFORM.BUTTONCLOSE.CAPTION=Close 3 3 TITEMVIEWFORM.BUTTONEDIT.CAPTION=Edit -
trunk/Forms/UItemView.pas
r9 r12 108 108 if Report.Count = 1 then 109 109 for I := 0 to Report.Columns.Count - 1 do 110 if TReportColumn(Report.Columns[I]).Type Id = 20then begin110 if TReportColumn(Report.Columns[I]).TypeDef.TypeIndex = Integer(vtPointer) then begin 111 111 TabControl1.Tabs.Add(TReportColumn(Report.Columns[I]).Caption); 112 112 end else begin -
trunk/Forms/UMainForm.pas
r11 r12 121 121 122 122 uses 123 UItemView, UItemEdit, UItemAdd, ULoginForm, USettingForm, UApplicationInfo; 123 UItemView, UItemEdit, UItemAdd, ULoginForm, USettingForm, UApplicationInfo, 124 UCore; 124 125 125 126 {$R *.lfm} … … 138 139 System.Database.UserName := ReadStringWithDefault('DatabaseUserName', 'chronis'); 139 140 System.Database.Password := ReadStringWithDefault('DatabasePassword', ''); 140 finally 141 with Core.CoolTranslator1 do 142 Language := Languages.SearchByCode(ReadStringWithDefault('LanguageCode', '')); 143 finally 141 144 Free; 142 145 end; … … 154 157 WriteString('DatabaseUserName', System.Database.UserName); 155 158 WriteString('DatabasePassword', System.Database.Password); 159 with Core.CoolTranslator1 do 160 WriteString('LanguageCode', Language.Code); 156 161 finally 157 162 Free; … … 434 439 System.Database.Connect; 435 440 InitStructure; 441 System.LoadTypes; 436 442 LoadTree; 437 443 end; -
trunk/Forms/USettingForm.lfm
r10 r12 7 7 ClientHeight = 328 8 8 ClientWidth = 446 9 OnClose = FormClose 10 OnShow = FormShow 9 11 LCLVersion = '0.9.31' 10 12 object Label1: TLabel … … 43 45 TabOrder = 2 44 46 end 47 object Label2: TLabel 48 Left = 9 49 Height = 14 50 Top = 38 51 Width = 52 52 Caption = 'Language:' 53 ParentColor = False 54 end 55 object ComboBoxLanguage: TComboBox 56 Left = 116 57 Height = 21 58 Top = 32 59 Width = 132 60 ItemHeight = 13 61 TabOrder = 3 62 Text = 'ComboBoxLanguage' 63 end 45 64 end -
trunk/Forms/USettingForm.lrt
r10 r12 3 3 TSETTINGFORM.BUTTONSAVE.CAPTION=Save 4 4 TSETTINGFORM.BUTTONCANCEL.CAPTION=Cancel 5 TSETTINGFORM.LABEL2.CAPTION=Language: 6 TSETTINGFORM.COMBOBOXLANGUAGE.TEXT=ComboBoxLanguage -
trunk/Forms/USettingForm.pas
r10 r12 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls; 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 CoolTranslator, ULanguages; 9 10 10 11 type … … 15 16 ButtonSave: TButton; 16 17 ButtonCancel: TButton; 18 ComboBoxLanguage: TComboBox; 17 19 Edit1: TEdit; 18 20 Label1: TLabel; 21 Label2: TLabel; 22 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 23 procedure FormShow(Sender: TObject); 19 24 private 20 { private declarations } 25 procedure Save; 26 procedure Load; 21 27 public 22 28 { public declarations } … … 30 36 {$R *.lfm} 31 37 38 uses 39 UCore, UMainForm; 40 41 { TSettingForm } 42 43 procedure TSettingForm.FormShow(Sender: TObject); 44 begin 45 MainForm.PersistentForm.Load(Self); 46 47 Load; 48 end; 49 50 procedure TSettingForm.FormClose(Sender: TObject; var CloseAction: TCloseAction 51 ); 52 begin 53 if ModalResult = mrOK then Save; 54 MainForm.PersistentForm.Save(Self); 55 end; 56 57 procedure TSettingForm.Save; 58 begin 59 with Core.CoolTranslator1 do 60 Language := TLanguage(Languages[ComboBoxLanguage.ItemIndex]); 61 end; 62 63 procedure TSettingForm.Load; 64 begin 65 with Core.CoolTranslator1 do begin 66 LanguageListToStrings(ComboBoxLanguage.Items); 67 if Assigned(Language) then begin 68 ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Language); 69 // Select automatic if no other match 70 if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0; 71 end else ComboBoxLanguage.ItemIndex := 0; 72 end; 73 end; 74 32 75 end. 33 76
Note:
See TracChangeset
for help on using the changeset viewer.