Changeset 40 for trunk/Forms
- Timestamp:
- Mar 9, 2012, 8:11:13 AM (13 years ago)
- Location:
- trunk/Forms
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UItemAdd.pas
r37 r40 124 124 Panel1.Controls[I].Free; 125 125 126 Report.Load(SelectedObject, SelectedObject.PrimaryKey + ' = ' +127 IntToStr(SelectedItemId));126 //Report.Load(SelectedObject, SelectedObject.PrimaryKey + ' = ' + 127 // IntToStr(SelectedItemId)); 128 128 129 129 // Load column names -
trunk/Forms/UItemList.pas
r39 r40 117 117 NewItemEditForm: TItemEditForm; 118 118 begin 119 if Assigned(ListView1.Selected) then begin 119 if Assigned(ListView1.Selected) then 120 try 120 121 NewItemEditForm := TItemEditForm.Create(nil); 121 122 NewItemEditForm.SelectedObject.Assign(SelectedObject); 122 123 NewItemEditForm.SelectedItemId := Integer(ListView1.Selected.Data); 123 124 NewItemEditForm.Caption := NewItemEditForm.Caption + ' ' + SelectedObject.Name; 124 MainForm.SetMainPanelForm(NewItemEditForm); 125 NewItemEditForm.ShowModal; 126 finally 127 NewItemEditForm.Free; 125 128 end; 126 129 end; … … 130 133 NewItemAddForm: TItemAddForm; 131 134 begin 132 NewItemAddForm := TItemAddForm.Create(nil); 133 NewItemAddForm.SelectedObject.Assign(SelectedObject); 134 NewItemAddForm.SelectedItemId := Integer(ListView1.Selected.Data); 135 NewItemAddForm.Caption := NewItemAddForm.Caption + ' ' + SelectedObject.Name; 136 MainForm.SetMainPanelForm(NewItemAddForm); 135 try 136 NewItemAddForm := TItemAddForm.Create(nil); 137 NewItemAddForm.SelectedObject.Assign(SelectedObject); 138 //NewItemAddForm.SelectedItemId := Integer(ListView1.Selected.Data); 139 NewItemAddForm.Caption := NewItemAddForm.Caption + ' ' + SelectedObject.Name; 140 NewItemAddForm.ShowModal; 141 finally 142 NewItemAddForm.Free; 143 end; 137 144 end; 138 145 -
trunk/Forms/UItemView.pas
r36 r40 56 56 {$R *.lfm} 57 57 58 resourcestring 59 SExpectedOneRow = 'Expected one row'; 60 58 61 { TItemViewForm } 59 62 … … 106 109 NewItemEditForm: TItemEditForm; 107 110 begin 108 Close; 109 NewItemEditForm := TItemEditForm.Create(nil); 110 NewItemEditForm.SelectedObject.Assign(SelectedObject); 111 NewItemEditForm.SelectedItemId := SelectedItemId; 112 NewItemEditForm.Caption := NewItemEditForm.Caption + ' ' + SelectedObject.Name; 113 MainForm.SetMainPanelForm(NewItemEditForm); 111 try 112 NewItemEditForm := TItemEditForm.Create(nil); 113 NewItemEditForm.SelectedObject.Assign(SelectedObject); 114 NewItemEditForm.SelectedItemId := SelectedItemId; 115 NewItemEditForm.Caption := NewItemEditForm.Caption + ' ' + SelectedObject.Name; 116 NewItemEditForm.ShowModal; 117 finally 118 NewItemEditForm.Free; 119 end; 114 120 end; 115 121 … … 156 162 // Load column names 157 163 158 if Report.Count = 1 then 164 if Report.Count > 1 then raise Exception.Create(SExpectedOneRow); 165 if Report.Count > 0 then 159 166 for I := 0 to Report.Columns.Count - 1 do begin 160 167 DataType := TReportColumn(Report.Columns[I]).CustomType; -
trunk/Forms/ULoginForm.lfm
r30 r40 1 1 object LoginForm: TLoginForm 2 2 Left = 312 3 Height = 1 633 Height = 177 4 4 Top = 186 5 Width = 4 335 Width = 451 6 6 BorderIcons = [biSystemMenu] 7 7 BorderStyle = bsDialog 8 8 Caption = 'Login' 9 ClientHeight = 1 6310 ClientWidth = 4 339 ClientHeight = 177 10 ClientWidth = 451 11 11 OnClose = FormClose 12 12 OnShow = FormShow … … 31 31 Left = 112 32 32 Height = 25 33 Top = 1 2833 Top = 144 34 34 Width = 75 35 35 Caption = 'Close' 36 36 ModalResult = 11 37 37 OnClick = ButtonCancelClick 38 TabOrder = 538 TabOrder = 6 39 39 end 40 40 object ButtonLogin: TButton 41 41 Left = 16 42 42 Height = 25 43 Top = 1 2843 Top = 144 44 44 Width = 75 45 45 Caption = 'Login' … … 47 47 ModalResult = 1 48 48 OnClick = ButtonLoginClick 49 TabOrder = 449 TabOrder = 5 50 50 end 51 51 object EditUserName: TEdit … … 84 84 object Image1: TImage 85 85 Left = 272 86 Height = 1 4086 Height = 156 87 87 Top = 12 88 Width = 1 5288 Width = 168 89 89 end 90 90 object EditPassword: TEdit … … 97 97 TabOrder = 3 98 98 end 99 object CheckBoxRememberPassword: TCheckBox 100 Left = 16 101 Height = 17 102 Top = 121 103 Width = 120 104 Caption = 'Remember password' 105 TabOrder = 4 106 end 99 107 end -
trunk/Forms/ULoginForm.lrt
r27 r40 6 6 TLOGINFORM.LABEL3.CAPTION=Connection: 7 7 TLOGINFORM.BUTTONCHANGE.CAPTION=Change 8 TLOGINFORM.CHECKBOXREMEMBERPASSWORD.CAPTION=Remember password -
trunk/Forms/ULoginForm.pas
r30 r40 17 17 ButtonCancel: TButton; 18 18 ButtonLogin: TButton; 19 CheckBoxRememberPassword: TCheckBox; 19 20 ComboBoxConnection: TComboBox; 20 21 EditUserName: TEdit; … … 50 51 Core.LastProfile := ComboBoxConnection.ItemIndex; 51 52 Core.LastPassword := EditPassword.Text; 53 Core.RememberPassword := CheckBoxRememberPassword.Checked; 52 54 end; 53 55 54 56 procedure TLoginForm.FormClose(Sender: TObject; var CloseAction: TCloseAction); 55 57 begin 56 MainForm.PersistentForm.Save(Self);58 //MainForm.PersistentForm.Save(Self); 57 59 end; 58 60 59 61 procedure TLoginForm.FormShow(Sender: TObject); 60 62 begin 61 MainForm.PersistentForm.Load(Self);63 //MainForm.PersistentForm.Load(Self); 62 64 EditUserName.Text := Core.LastUserName; 63 EditPassword.Text := '';65 EditPassword.Text := Core.LastPassword; 64 66 EditPassword.SetFocus; 67 CheckBoxRememberPassword.Checked := Core.RememberPassword; 65 68 Core.Profiles.FillStrings(ComboBoxConnection.Items); 66 69 ComboBoxConnection.ItemIndex := Core.LastProfile; -
trunk/Forms/UMainForm.lfm
r39 r40 1 1 object MainForm: TMainForm 2 Left = 3072 Left = 242 3 3 Height = 446 4 Top = 12 64 Top = 129 5 5 Width = 640 6 6 ActiveControl = PanelMenu -
trunk/Forms/UMainForm.pas
r39 r40 288 288 Core.System.Types.Clear; 289 289 FreeAndNil(Core.Client); 290 UpdateInterface; 290 291 end; 291 292 end;
Note:
See TracChangeset
for help on using the changeset viewer.