- Timestamp:
- Dec 26, 2010, 8:12:59 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 2 2 Config.xml 3 3 chronis 4 heaptrclog.trc
-
- Property svn:ignore
-
trunk/Forms/UItemAdd.lfm
r7 r9 4 4 Top = 130 5 5 Width = 567 6 ActiveControl = Panel1 6 7 Caption = 'Add item' 7 8 ClientHeight = 421 8 9 ClientWidth = 567 9 10 OnClose = FormClose 11 OnCreate = FormCreate 12 OnDestroy = FormDestroy 10 13 OnShow = FormShow 11 14 LCLVersion = '0.9.29' -
trunk/Forms/UItemAdd.pas
r7 r9 1 1 unit UItemAdd; 2 2 3 {$mode objfpc}{$H+}3 {$mode Delphi}{$H+} 4 4 5 5 interface … … 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, 9 StdCtrls, Spin, EditBtn, MaskEdit, USqlDatabase ;9 StdCtrls, Spin, EditBtn, MaskEdit, USqlDatabase, USystem; 10 10 11 11 type … … 20 20 procedure ButtonSaveClick(Sender: TObject); 21 21 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 22 procedure FormCreate(Sender: TObject); 23 procedure FormDestroy(Sender: TObject); 22 24 procedure FormShow(Sender: TObject); 23 25 private … … 25 27 { private declarations } 26 28 public 27 { public declarations }29 Report: TReport; 28 30 end; 29 31 … … 56 58 end; 57 59 60 procedure TItemAddForm.FormCreate(Sender: TObject); 61 begin 62 Report := TReport.Create; 63 Report.Base := MainForm.System; 64 end; 65 66 procedure TItemAddForm.FormDestroy(Sender: TObject); 67 begin 68 Report.Free; 69 end; 70 58 71 procedure TItemAddForm.FormShow(Sender: TObject); 59 72 begin … … 64 77 procedure TItemAddForm.BuildControls; 65 78 var 66 Properties: TDbRows;67 Values: TDbRows;68 79 NewControl: TControl; 69 80 LastTop: Integer; 70 81 I: Integer; 71 82 Column: Integer; 72 ObjectInfo: TDbRows;73 83 ValueType: Integer; 74 84 const … … 77 87 LastTop := 8; 78 88 Column := 0; 79 try80 ObjectInfo := TDbRows.Create;81 MainForm.Database.Query(ObjectInfo, 'SELECT * FROM `Object` WHERE `Id`=' + IntToStr(MainForm.SelectedObject));82 if ObjectInfo.Count = 1 then begin83 89 84 85 90 for I := Panel1.ControlCount - 1 downto 0 do 91 Panel1.Controls[I].Free; 86 92 87 // Load column names88 try89 Properties := TDbRows.Create; 90 MainForm.Database.Query(Properties, 'SELECT * FROM `Property` WHERE `Object`=' +91 IntToStr(MainForm.SelectedObject));92 for I := 0 to Properties.Count - 1 dobegin93 Report.Load(MainForm.SelectedObject, MainForm.SelectedObject.PrimaryKey + ' = ' + 94 IntToStr(MainForm.SelectedItem)); 95 96 // Load column names 97 for I := 0 to Report.Columns.Count - 1 do 98 if TReportColumn(Report.Columns[I]).ColumnName <> 'Id' then begin 93 99 NewControl := TLabel.Create(Panel1); 94 100 NewControl.Parent := Panel1; 95 101 NewControl.Top := LastTop; 96 102 NewControl.Left := Column * Width div ColumnCount + 10; 97 TLabel(NewControl).Caption := Properties[I].Values['Name']+ ':';103 TLabel(NewControl).Caption := TReportColumn(Report.Columns[I]).Caption + ':'; 98 104 99 ValueType := StrToInt(Properties[I].Values['Type']);105 ValueType := TReportColumn(Report.Columns[I]).TypeId; 100 106 if ValueType = Integer(vtInteger) then begin 101 107 NewControl := TSpinEdit.Create(Panel1); … … 149 155 if Column = 0 then LastTop := LastTop + NewControl.Height + 4; 150 156 end; 151 152 finally153 Properties.Free;154 end;155 end else ShowMessage(SObjectNotFound);156 finally157 ObjectInfo.Free;158 end;159 157 end; 160 158 -
trunk/Forms/UItemEdit.lfm
r7 r9 9 9 ClientWidth = 558 10 10 OnClose = FormClose 11 OnCreate = FormCreate 12 OnDestroy = FormDestroy 11 13 OnShow = FormShow 12 14 LCLVersion = '0.9.29' -
trunk/Forms/UItemEdit.pas
r7 r9 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, 9 StdCtrls, Spin, EditBtn, USqlDatabase, MaskEdit ;9 StdCtrls, Spin, EditBtn, USqlDatabase, MaskEdit, USystem; 10 10 11 11 type … … 20 20 procedure ButtonSaveClick(Sender: TObject); 21 21 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 22 procedure FormCreate(Sender: TObject); 23 procedure FormDestroy(Sender: TObject); 22 24 procedure FormShow(Sender: TObject); 23 25 private 24 26 { private declarations } 25 27 public 28 Report: TReport; 26 29 procedure BuildControls; 27 30 end; … … 57 60 end; 58 61 62 procedure TItemEditForm.FormCreate(Sender: TObject); 63 begin 64 Report := TReport.Create; 65 Report.Base := MainForm.System; 66 end; 67 68 procedure TItemEditForm.FormDestroy(Sender: TObject); 69 begin 70 Report.Free; 71 end; 72 59 73 procedure TItemEditForm.FormShow(Sender: TObject); 60 74 begin … … 65 79 procedure TItemEditForm.BuildControls; 66 80 var 67 Properties: TDbRows;68 81 Values: TDbRows; 69 82 NewControl: TControl; … … 71 84 I: Integer; 72 85 Column: Integer; 73 ObjectInfo: TDbRows;74 86 ValueType: Integer; 75 87 const … … 78 90 LastTop := 8; 79 91 Column := 0; 80 try 81 ObjectInfo := TDbRows.Create; 82 MainForm.Database.Query(ObjectInfo, 'SELECT * FROM `Object` WHERE `Id`=' + IntToStr(MainForm.SelectedObject)); 83 if ObjectInfo.Count = 1 then begin 92 Report.Load(MainForm.SelectedObject, MainForm.SelectedObject.PrimaryKey + ' = ' + 93 IntToStr(MainForm.SelectedItem)); 84 94 85 86 95 for I := Panel1.ControlCount - 1 downto 0 do 96 Panel1.Controls[I].Free; 87 97 88 // Load column names 89 try 90 Properties := TDbRows.Create; 91 MainForm.Database.Query(Properties, 'SELECT * FROM `Property` WHERE `Object`=' + 92 IntToStr(MainForm.SelectedObject)); 93 Values := TDbRows.Create; 94 MainForm.Database.Query(Values, 'SELECT * FROM `' + ObjectInfo[0].Values['Schema'] + '`.`' + 95 ObjectInfo[0].Values['Table'] + '` WHERE ' + ObjectInfo[0].Values['PrimaryKey'] + ' = ' + 96 IntToStr(MainForm.SelectedItem)); 97 if Values.Count = 1 then 98 for I := 0 to Properties.Count - 1 do begin 98 if Report.Count = 1 then 99 for I := 0 to Report.Columns.Count - 1 do 100 if TReportColumn(Report.Columns[I]).ColumnName <> 'Id' then begin 101 99 102 NewControl := TLabel.Create(Panel1); 100 103 NewControl.Parent := Panel1; 101 104 NewControl.Top := LastTop; 102 105 NewControl.Left := Column * Width div ColumnCount + 10; 103 TLabel(NewControl).Caption := Properties[I].Values['Name']+ ':';106 TLabel(NewControl).Caption := TReportColumn(Report.Columns[I]).Caption + ':'; 104 107 105 ValueType := StrToInt(Properties[I].Values['Type']);108 ValueType := TReportColumn(Report.Columns[I]).TypeId; 106 109 if ValueType = Integer(vtInteger) then begin 107 110 NewControl := TSpinEdit.Create(Panel1); … … 109 112 NewControl.Top := LastTop; 110 113 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 111 TSpinEdit(NewControl).Value := StrToInt( Values[0].Values[Properties[I].Values['ColumnName']]);114 TSpinEdit(NewControl).Value := StrToInt(TReportLine(Report[0]).Items[I]); 112 115 TSpinEdit(NewControl).Width := (Width div ColumnCount) div 2 - 20; 113 116 end else … … 117 120 NewControl.Top := LastTop; 118 121 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 119 TDateEdit(NewControl).Date := StrToDate( Values[0].Values[Properties[I].Values['ColumnName']]);122 TDateEdit(NewControl).Date := StrToDate(TReportLine(Report[0]).Items[I]); 120 123 TDateEdit(NewControl).Width := (Width div ColumnCount) div 2 - 20; 121 124 end else … … 125 128 NewControl.Top := LastTop; 126 129 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 127 TFloatSpinEdit(NewControl).Value := StrToFloat( Values[0].Values[Properties[I].Values['ColumnName']]);130 TFloatSpinEdit(NewControl).Value := StrToFloat(TReportLine(Report[0]).Items[I]); 128 131 TFloatSpinEdit(NewControl).Width := (Width div ColumnCount) div 2 - 20; 129 132 end else … … 133 136 NewControl.Top := LastTop; 134 137 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 135 TEdit(NewControl).Text := Values[0].Values[Properties[I].Values['ColumnName']];138 TEdit(NewControl).Text := TReportLine(Report[0]).Items[I]; 136 139 TEdit(NewControl).Width := (Width div ColumnCount) div 2 - 20; 137 140 end else … … 148 151 NewControl.Top := LastTop; 149 152 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 150 TCheckBox(NewControl).Checked := Boolean(StrToInt( Values[0].Values[Properties[I].Values['ColumnName']]));153 TCheckBox(NewControl).Checked := Boolean(StrToInt(TReportLine(Report[0]).Items[I])); 151 154 end else begin 152 155 NewControl := TEdit.Create(Panel1); … … 155 158 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 156 159 TEdit(NewControl).Width := (Width div ColumnCount) div 2 - 20; 157 TEdit(NewControl).Text := Values[0].Values[Properties[I].Values['ColumnName']];160 TEdit(NewControl).Text := TReportLine(Report[0]).Items[I]; 158 161 end; 159 162 160 163 Column := (Column + 1) mod 2; 161 164 if Column = 0 then LastTop := LastTop + NewControl.Height + 4; 162 end else ShowMessage(SItemNotFound); 163 finally 164 Values.Free; 165 Properties.Free; 166 end; 167 end else ShowMessage(SObjectNotFound); 168 finally 169 ObjectInfo.Free; 170 end; 165 end; 171 166 end; 172 167 -
trunk/Forms/UItemView.lfm
r7 r9 1 1 object ItemViewForm: TItemViewForm 2 Left = 3 373 Height = 4 164 Top = 1 355 Width = 5522 Left = 311 3 Height = 469 4 Top = 110 5 Width = 626 6 6 Caption = 'View item' 7 ClientHeight = 4 168 ClientWidth = 5527 ClientHeight = 469 8 ClientWidth = 626 9 9 OnClose = FormClose 10 OnCreate = FormCreate 11 OnDestroy = FormDestroy 10 12 OnShow = FormShow 11 13 LCLVersion = '0.9.29' 12 14 object ButtonClose: TButton 13 Left = 47215 Left = 546 14 16 Height = 25 15 Top = 38617 Top = 439 16 18 Width = 75 17 19 Anchors = [akRight, akBottom] … … 20 22 TabOrder = 0 21 23 end 22 object Panel1: TPanel23 Left = 024 Height = 37825 Top = 026 Width = 55227 Align = alTop28 Anchors = [akLeft, akRight, akBottom]29 BevelOuter = bvNone30 TabOrder = 131 end32 24 object ButtonEdit: TButton 33 Left = 38425 Left = 458 34 26 Height = 25 35 Top = 38627 Top = 439 36 28 Width = 75 37 29 Anchors = [akRight, akBottom] 38 30 Caption = 'Edit' 39 31 OnClick = ButtonEditClick 32 TabOrder = 1 33 end 34 object Panel1: TPanel 35 Left = 0 36 Height = 433 37 Top = 0 38 Width = 626 39 Align = alTop 40 Anchors = [akTop, akLeft, akRight, akBottom] 41 BevelOuter = bvNone 42 ClientHeight = 433 43 ClientWidth = 626 40 44 TabOrder = 2 45 object Panel2: TPanel 46 Left = 0 47 Height = 200 48 Top = 233 49 Width = 626 50 Align = alBottom 51 BevelOuter = bvNone 52 ClientHeight = 200 53 ClientWidth = 626 54 TabOrder = 0 55 object TabControl1: TTabControl 56 Left = 0 57 Height = 32 58 Top = 0 59 Width = 626 60 Align = alTop 61 TabIndex = 0 62 TabOrder = 0 63 Tabs.Strings = ( 64 'Tab1' 65 'Tab2' 66 'Tab3' 67 ) 68 TabStop = False 69 end 70 object ListView1: TListView 71 Left = 0 72 Height = 168 73 Top = 32 74 Width = 626 75 Align = alClient 76 Columns = <> 77 TabOrder = 1 78 end 79 end 80 object Splitter1: TSplitter 81 Cursor = crVSplit 82 Left = 0 83 Height = 3 84 Top = 230 85 Width = 626 86 Align = alBottom 87 ResizeAnchor = akBottom 88 end 89 object PanelControls: TPanel 90 Left = 0 91 Height = 230 92 Top = 0 93 Width = 626 94 Align = alClient 95 Anchors = [akLeft, akRight, akBottom] 96 BevelOuter = bvNone 97 TabOrder = 2 98 end 41 99 end 42 100 end -
trunk/Forms/UItemView.pas
r7 r9 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ExtCtrls, USqlDatabase;9 ExtCtrls, ComCtrls, USqlDatabase, USystem; 10 10 11 11 type … … 16 16 ButtonClose: TButton; 17 17 ButtonEdit: TButton; 18 ListView1: TListView; 18 19 Panel1: TPanel; 20 Panel2: TPanel; 21 PanelControls: TPanel; 22 Splitter1: TSplitter; 23 TabControl1: TTabControl; 19 24 procedure ButtonCancelClick(Sender: TObject); 20 25 procedure ButtonCloseClick(Sender: TObject); 21 26 procedure ButtonEditClick(Sender: TObject); 22 27 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 28 procedure FormCreate(Sender: TObject); 29 procedure FormDestroy(Sender: TObject); 23 30 procedure FormShow(Sender: TObject); 24 31 private 25 32 { private declarations } 26 33 public 34 Report: TReport; 27 35 procedure BuildControls; 28 36 end; … … 44 52 begin 45 53 MainForm.PersistentForm.Save(Self); 54 end; 55 56 procedure TItemViewForm.FormCreate(Sender: TObject); 57 begin 58 Report := TReport.Create; 59 Report.Base := MainForm.System; 60 end; 61 62 procedure TItemViewForm.FormDestroy(Sender: TObject); 63 begin 64 Report.Free; 46 65 end; 47 66 … … 70 89 procedure TItemViewForm.BuildControls; 71 90 var 72 Properties: TDbRows;73 Values: TDbRows;74 91 NewControl: TControl; 75 92 LastTop: Integer; 76 93 I: Integer; 77 94 Column: Integer; 78 ObjectInfo: TDbRows;79 95 const 80 96 ColumnCount = 2; … … 82 98 LastTop := 8; 83 99 Column := 0; 84 try85 ObjectInfo := TDbRows.Create;86 MainForm.Database.Query(ObjectInfo, 'SELECT * FROM `Object` WHERE `Id`=' + IntToStr(MainForm.SelectedObject));87 if ObjectInfo.Count = 1 then begin100 Report.Load(MainForm.SelectedObject, MainForm.SelectedObject.PrimaryKey + ' = ' + 101 IntToStr(MainForm.SelectedItem)); 102 for I := PanelControls.ControlCount - 1 downto 0 do 103 PanelControls.Controls[I].Free; 88 104 89 for I := Panel1.ControlCount - 1 downto 0 do90 Panel1.Controls[I].Free;105 TabControl1.Tabs.Clear; 106 // Load column names 91 107 92 // Load column names 93 try 94 Properties := TDbRows.Create; 95 MainForm.Database.Query(Properties, 'SELECT * FROM `Property` WHERE `Object`=' + 96 IntToStr(MainForm.SelectedObject)); 97 Values := TDbRows.Create; 98 MainForm.Database.Query(Values, 'SELECT * FROM `' + ObjectInfo[0].Values['Schema'] + '`.`' + 99 ObjectInfo[0].Values['Table'] + '` WHERE ' + ObjectInfo[0].Values['PrimaryKey'] + ' = ' + 100 IntToStr(MainForm.SelectedItem)); 101 if Values.Count = 1 then 102 for I := 0 to Properties.Count - 1 do begin 103 NewControl := TLabel.Create(Panel1); 104 NewControl.Parent := Panel1; 105 NewControl.Top := LastTop; 106 NewControl.Left := Column * Width div ColumnCount + 10; 107 TLabel(NewControl).Caption := Properties[I].Values['Name'] + ':'; 108 if Report.Count = 1 then 109 for I := 0 to Report.Columns.Count - 1 do 110 if TReportColumn(Report.Columns[I]).TypeId = 20 then begin 111 TabControl1.Tabs.Add(TReportColumn(Report.Columns[I]).Caption); 112 end else begin 113 NewControl := TLabel.Create(PanelControls); 114 NewControl.Parent := PanelControls; 115 NewControl.Top := LastTop; 116 NewControl.Left := Column * Width div ColumnCount + 10; 117 TLabel(NewControl).Caption := TReportColumn(Report.Columns[I]).Caption + ':'; 108 118 109 NewControl := TLabel.Create(Panel1);110 NewControl.Parent := Panel1;111 112 113 TLabel(NewControl).Caption := Values[0].Values[Properties[I].Values['ColumnName']];119 NewControl := TLabel.Create(PanelControls); 120 NewControl.Parent := PanelControls; 121 NewControl.Top := LastTop; 122 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 123 TLabel(NewControl).Caption := TReportLine(Report[0]).Items[I]; 114 124 115 Column := (Column + 1) mod 2; 116 if Column = 0 then LastTop := LastTop + NewControl.Height + 4; 117 end else ShowMessage(SItemNotFound); 118 finally 119 Values.Free; 120 Properties.Free; 121 end; 122 end else ShowMessage(SObjectNotFound); 123 finally 124 ObjectInfo.Free; 125 Column := (Column + 1) mod 2; 126 if Column = 0 then LastTop := LastTop + 24; 125 127 end; 128 Panel2.Visible := TabControl1.Tabs.Count > 0; 126 129 end; 127 130 -
trunk/Forms/UMainForm.lfm
r8 r9 6 6 ActiveControl = Panel1 7 7 Caption = 'ChronIS' 8 ClientHeight = 4 228 ClientHeight = 418 9 9 ClientWidth = 649 10 10 Menu = MainMenu1 … … 16 16 object Panel1: TPanel 17 17 Left = 0 18 Height = 4 2218 Height = 418 19 19 Top = 0 20 20 Width = 184 21 21 Align = alLeft 22 22 BevelOuter = bvNone 23 ClientHeight = 4 2223 ClientHeight = 418 24 24 ClientWidth = 184 25 25 TabOrder = 0 26 26 object Label1: TLabel 27 27 Left = 7 28 Height = 1 428 Height = 18 29 29 Top = 4 30 Width = 4430 Width = 51 31 31 Caption = 'Groups:' 32 32 ParentColor = False 33 33 end 34 34 object TreeView1: TTreeView 35 Left = 836 Height = 39 835 Left = 4 36 Height = 394 37 37 Top = 19 38 Width = 1 7638 Width = 180 39 39 Anchors = [akTop, akLeft, akRight, akBottom] 40 DefaultItemHeight = 1 640 DefaultItemHeight = 19 41 41 Images = ImageListActions 42 42 ReadOnly = True … … 48 48 object Panel2: TPanel 49 49 Left = 189 50 Height = 4 2250 Height = 418 51 51 Top = 0 52 52 Width = 460 53 53 Align = alClient 54 54 BevelOuter = bvNone 55 ClientHeight = 4 2255 ClientHeight = 418 56 56 ClientWidth = 460 57 57 TabOrder = 1 58 58 object Label2: TLabel 59 Left = 1160 Height = 1 459 Left = 2 60 Height = 18 61 61 Top = 4 62 Width = 4662 Width = 54 63 63 Caption = 'Reports:' 64 64 ParentColor = False 65 65 end 66 66 object ListView1: TListView 67 Left = 368 Height = 36 667 Left = 2 68 Height = 362 69 69 Top = 19 70 Width = 45 070 Width = 456 71 71 Anchors = [akTop, akLeft, akRight, akBottom] 72 72 Columns = <> … … 86 86 Left = 3 87 87 Height = 25 88 Top = 3 9388 Top = 389 89 89 Width = 75 90 90 Action = AItemAdd … … 95 95 Left = 83 96 96 Height = 25 97 Top = 3 9397 Top = 389 98 98 Width = 75 99 99 Action = AItemDelete … … 104 104 object Splitter1: TSplitter 105 105 Left = 184 106 Height = 4 22106 Height = 418 107 107 Top = 0 108 108 Width = 5 -
trunk/Forms/UMainForm.pas
r8 r9 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,8 Registry, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 9 StdCtrls, ActnList, Menus, ExtCtrls, USqlDatabase, DOM, XMLRead, XMLWrite, 10 UPersistentForm, UTreeState, SpecializedList ;10 UPersistentForm, UTreeState, SpecializedList, URegistry, USystem; 11 11 12 12 const … … 14 14 15 15 type 16 TDbValueType = (vtNone, vtInteger, vtString, vtText, vtDateTime, vtFloat, vtImage, vtBoolean,17 vtIPv4, vtMAC, vtIPv6, vtFile, vtGPS, vtEnumeration, vtHyperlink, vtPassword,18 vtReference, vtDate, vtTime, vtColor);19 20 { TReportLine }21 22 TReportLine = class23 Id: Integer;24 Items: TListString;25 constructor Create;26 destructor Destroy; override;27 end;28 29 16 { TMainForm } 30 17 … … 96 83 OriginalWindowState: TWindowState; 97 84 ScreenBounds: TRect; 85 RegistryKey: string; 86 RegistryRootKey: HKEY; 98 87 procedure LoadConfiguration; 88 procedure LoadFromRegistry; 89 procedure SaveToRegistry; 99 90 public 100 SelectedObject: Integer; 91 SelectedObjectId: Integer; 92 SelectedObject: TChronisObject; 101 93 SelectedItem: Integer; 102 94 PersistentForm: TPersistentForm; 103 Database: TSQLDatabase;104 95 TreeState: TTreeState; 105 Report: TListObject; 96 System: TChronisBase; 97 Report: TReport; 106 98 procedure LoadTree; 107 99 procedure LoadItemList; … … 121 113 uses 122 114 UItemView, UItemEdit, UItemAdd; 123 124 { TReportLine }125 126 constructor TReportLine.Create;127 begin128 Items := TListString.Create;129 end;130 131 destructor TReportLine.Destroy;132 begin133 Items.Free;134 inherited Destroy;135 end;136 115 137 116 {$R *.lfm} … … 157 136 with ChildNodes[I3] do begin 158 137 if NodeName = 'hostname' then 159 Database.HostName := TextContent;138 System.Database.HostName := TextContent; 160 139 if NodeName = 'schema' then 161 Database.Database := TextContent;140 System.Database.Database := TextContent; 162 141 if NodeName = 'username' then 163 Database.UserName := TextContent;142 System.Database.UserName := TextContent; 164 143 if NodeName = 'password' then 165 Database.Password := TextContent;144 System.Database.Password := TextContent; 166 145 end; 167 146 end; … … 172 151 end; 173 152 153 procedure TMainForm.LoadFromRegistry; 154 begin 155 with TRegistryEx.Create do 156 try 157 RootKey := RegistryRootKey; 158 OpenKey(RegistryKey, True); 159 Panel1.Width := ReadIntegerWithDefault('GroupTreeWidth', 200); 160 finally 161 Free; 162 end; 163 end; 164 165 procedure TMainForm.SaveToRegistry; 166 begin 167 with TRegistryEx.Create do 168 try 169 RootKey := RegistryRootKey; 170 OpenKey(RegistryKey, True); 171 WriteInteger('GroupTreeWidth', Panel1.Width); 172 finally 173 Free; 174 end; 175 end; 176 174 177 procedure TMainForm.FormCreate(Sender: TObject); 175 178 begin 176 Database := TSqlDatabase.Create; 179 System := TChronisBase.Create; 180 System.Database := TSqlDatabase.Create; 177 181 LoadConfiguration; 178 Database.Connect;182 System.Database.Connect; 179 183 TreeState := TTreeState.Create; 184 Report := TReport.Create; 185 Report.Base := System; 186 SelectedObject := TChronisObject.Create; 187 SelectedObject.Base := System; 188 RegistryRootKey := HKEY_CURRENT_USER; 189 RegistryKey := '\Software\Chronosoft\Chronis'; 180 190 PersistentForm := TPersistentForm.Create; 181 Report := TListObject.Create;191 PersistentForm.RegistryKey := RegistryKey; 182 192 end; 183 193 … … 186 196 Report.Free; 187 197 TreeState.Free; 188 Database.Free;189 198 PersistentForm.Free; 199 System.Free; 190 200 end; 191 201 … … 193 203 begin 194 204 PersistentForm.Save(Self); 205 SaveToRegistry; 195 206 end; 196 207 … … 208 219 begin 209 220 if Assigned(TreeView1.Selected) then begin 210 SelectedObject := 9;221 SelectedObjectId := 9; 211 222 SelectedItem := Integer(TreeView1.Selected.Data); 212 223 ItemEditForm.Show; … … 222 233 begin 223 234 if Assigned(TreeView1.Selected) then begin 224 SelectedObject := 8;235 SelectedObjectId := 8; 225 236 SelectedItem := Integer(TreeView1.Selected.Data); 226 237 ItemEditForm.Show; … … 274 285 PersistentForm.Load(Self); 275 286 LoadTree; 287 LoadFromRegistry; 276 288 end; 277 289 … … 351 363 try 352 364 DbRows := TDbRows.Create; 353 Database.Query(DbRows, 'SELECT * FROM `ObjectGroup`');365 System.Database.Query(DbRows, 'SELECT * FROM `ObjectGroup`'); 354 366 for I := 0 to DbRows.Count - 1 do begin 355 367 NewNode := AddChild(TopItem, DbRows[I].Values['Name']); … … 359 371 try 360 372 ObjectDbRows := TDbRows.Create; 361 Database.Query(ObjectDbRows, 'SELECT * FROM `Object` WHERE `Group`=' + DbRows[I].Values['Id']);373 System.Database.Query(ObjectDbRows, 'SELECT * FROM `Object` WHERE `Group`=' + DbRows[I].Values['Id']); 362 374 for O := 0 to ObjectDbRows.Count - 1 do begin 363 375 NewObjectNode := AddChild(NewNode, ObjectDbRows[O].Values['Name']); … … 380 392 procedure TMainForm.LoadItemList; 381 393 var 382 DbRows: TDbRows; 383 Properties: TDbRows; 384 Values: TDbRows; 394 NewColumn: TListColumn; 385 395 I: Integer; 386 C: Integer; 387 NewItem: TReportLine; 388 NewColumn: TListColumn; 389 begin 390 SelectedObject := 0; 396 begin 397 SelectedObjectId := 0; 391 398 if Assigned(TreeView1.Selected) then 392 399 with ListView1 do begin 393 400 Visible := True; 394 Report.Clear; 395 try 396 DbRows := TDbRows.Create; 397 Database.Query(DbRows, 'SELECT * FROM `Object` WHERE `Id`=' + IntToStr(Integer(TreeView1.Selected.Data))); 398 if DbRows.Count = 1 then begin 399 SelectedObject := StrToInt(DbRows[0].Values['Id']); 400 401 // Load column names 402 try 403 Properties := TDbRows.Create; 404 Database.Query(Properties, 'SELECT * FROM `Property` WHERE `Object`=' + 405 DbRows[0].Values['Id']); 406 Columns.Clear; 407 NewColumn := Columns.Add; 408 NewColumn.Caption := 'Id'; 409 for I := 0 to Properties.Count - 1 do begin 410 NewColumn := Columns.Add; 411 NewColumn.Caption := Properties[I].Values['Name']; 412 end; 413 414 ListView1Resize(Self); 415 416 // Load items 417 Values := TDbRows.Create; 418 Database.Query(Values, 'SELECT * FROM `' + DbRows[0].Values['Schema'] + '`.`' + 419 DbRows[0].Values['Table'] + '`'); 420 for I := 0 to Values.Count - 1 do begin 421 NewItem := TReportLine.Create; 422 NewItem.Items.Add(Values[I].Values[DbRows[0].Values['PrimaryKey']]); 423 NewItem.Id := StrToInt(Values[I].Values[DbRows[0].Values['PrimaryKey']]); 424 for C := 0 to Properties.Count - 1 do begin 425 NewItem.Items.Add(Values[I].Values[Properties[C].Values['ColumnName']]); 426 end; 427 Report.Add(NewItem); 428 end; 429 Items.Count := Values.Count; 430 Refresh; 431 finally 432 Properties.Free; 433 Values.Free; 434 end; 401 SelectedObject.Load(Integer(TreeView1.Selected.Data)); 402 Report.Load(SelectedObject); 403 404 Columns.Clear; 405 for I := 0 to Report.Columns.Count - 1 do begin 406 NewColumn := Columns.Add; 407 NewColumn.Caption := TReportColumn(Report.Columns[I]).Caption; 435 408 end; 436 finally437 DbRows.Free;438 439 end;409 Items.Count := Report.Count; 410 Refresh; 411 end; 412 ListView1Resize(Self); 440 413 end; 441 414 -
trunk/chronis.lpi
r8 r9 43 43 </Item2> 44 44 </RequiredPackages> 45 <Units Count=" 18">45 <Units Count="24"> 46 46 <Unit0> 47 47 <Filename Value="chronis.lpr"/> 48 48 <IsPartOfProject Value="True"/> 49 49 <UnitName Value="chronis"/> 50 <IsVisibleTab Value="True"/> 51 <EditorIndex Value="0"/> 52 <WindowIndex Value="1"/> 53 <TopLine Value="1"/> 54 <CursorPos X="16" Y="5"/> 50 <EditorIndex Value="10"/> 51 <WindowIndex Value="0"/> 52 <TopLine Value="1"/> 53 <CursorPos X="21" Y="5"/> 55 54 <UsageCount Value="274"/> 56 55 <Loaded Value="True"/> … … 64 63 <TopLine Value="330"/> 65 64 <CursorPos X="1" Y="347"/> 66 <UsageCount Value="5 2"/>65 <UsageCount Value="50"/> 67 66 <DefaultSyntaxHighlighter Value="Delphi"/> 68 67 </Unit1> … … 76 75 <TopLine Value="118"/> 77 76 <CursorPos X="25" Y="144"/> 78 <UsageCount Value="10 6"/>77 <UsageCount Value="104"/> 79 78 <DefaultSyntaxHighlighter Value="Delphi"/> 80 79 </Unit2> … … 88 87 <TopLine Value="1"/> 89 88 <CursorPos X="24" Y="14"/> 90 <UsageCount Value="10 6"/>89 <UsageCount Value="104"/> 91 90 <DefaultSyntaxHighlighter Value="Delphi"/> 92 91 </Unit3> … … 95 94 <IsPartOfProject Value="True"/> 96 95 <UnitName Value="UPersistentForm"/> 97 <WindowIndex Value="0"/> 98 <TopLine Value="42"/> 99 <CursorPos X="33" Y="46"/> 96 <EditorIndex Value="14"/> 97 <WindowIndex Value="0"/> 98 <TopLine Value="55"/> 99 <CursorPos X="3" Y="84"/> 100 100 <UsageCount Value="264"/> 101 <Loaded Value="True"/> 101 102 <DefaultSyntaxHighlighter Value="Delphi"/> 102 103 </Unit4> … … 105 106 <IsPartOfProject Value="True"/> 106 107 <UnitName Value="USqlDatabase"/> 107 <EditorIndex Value="2"/> 108 <WindowIndex Value="0"/> 109 <TopLine Value="362"/> 110 <CursorPos X="1" Y="424"/> 108 <IsVisibleTab Value="True"/> 109 <EditorIndex Value="8"/> 110 <WindowIndex Value="0"/> 111 <TopLine Value="204"/> 112 <CursorPos X="43" Y="225"/> 111 113 <UsageCount Value="264"/> 112 114 <Loaded Value="True"/> … … 117 119 <IsPartOfProject Value="True"/> 118 120 <UnitName Value="URegistry"/> 119 <WindowIndex Value="0"/> 120 <TopLine Value="32"/> 121 <CursorPos X="21" Y="13"/> 121 <EditorIndex Value="11"/> 122 <WindowIndex Value="0"/> 123 <TopLine Value="1"/> 124 <CursorPos X="10" Y="8"/> 122 125 <UsageCount Value="264"/> 126 <Loaded Value="True"/> 123 127 <DefaultSyntaxHighlighter Value="Delphi"/> 124 128 </Unit6> … … 131 135 <EditorIndex Value="0"/> 132 136 <WindowIndex Value="0"/> 133 <TopLine Value=" 1"/>134 <CursorPos X=" 32" Y="95"/>137 <TopLine Value="56"/> 138 <CursorPos X="1" Y="60"/> 135 139 <UsageCount Value="327"/> 136 140 <Loaded Value="True"/> … … 144 148 <ResourceBaseClass Value="Form"/> 145 149 <UnitName Value="UItemEdit"/> 146 <IsVisibleTab Value="True"/>147 150 <EditorIndex Value="1"/> 148 151 <WindowIndex Value="0"/> 149 <TopLine Value="8 9"/>150 <CursorPos X=" 1" Y="111"/>152 <TopLine Value="85"/> 153 <CursorPos X="5" Y="100"/> 151 154 <UsageCount Value="318"/> 152 155 <Loaded Value="True"/> … … 161 164 <ResourceBaseClass Value="Form"/> 162 165 <UnitName Value="ULoginForm"/> 163 <EditorIndex Value="1 0"/>166 <EditorIndex Value="16"/> 164 167 <WindowIndex Value="0"/> 165 168 <TopLine Value="1"/> … … 177 180 <ResourceBaseClass Value="Form"/> 178 181 <UnitName Value="UMainForm"/> 179 <EditorIndex Value=" 5"/>180 <WindowIndex Value="0"/> 181 <TopLine Value=" 300"/>182 <CursorPos X=" 69" Y="312"/>182 <EditorIndex Value="3"/> 183 <WindowIndex Value="0"/> 184 <TopLine Value="1"/> 185 <CursorPos X="47" Y="17"/> 183 186 <UsageCount Value="317"/> 184 187 <Loaded Value="True"/> … … 199 202 <ResourceBaseClass Value="Form"/> 200 203 <UnitName Value="UItemAdd"/> 201 <EditorIndex Value=" 9"/>202 <WindowIndex Value="0"/> 203 <TopLine Value=" 69"/>204 <CursorPos X=" 41" Y="90"/>204 <EditorIndex Value="15"/> 205 <WindowIndex Value="0"/> 206 <TopLine Value="1"/> 207 <CursorPos X="14" Y="3"/> 205 208 <UsageCount Value="313"/> 206 209 <Loaded Value="True"/> … … 210 213 <Unit13> 211 214 <Filename Value="/usr/share/fpcsrc/rtl/objpas/classes/classesh.inc"/> 212 <EditorIndex Value="8"/>213 215 <WindowIndex Value="0"/> 214 216 <TopLine Value="963"/> 215 217 <CursorPos X="3" Y="974"/> 216 <UsageCount Value=" 11"/>217 < Loaded Value="True"/>218 <UsageCount Value="9"/> 219 <DefaultSyntaxHighlighter Value="Delphi"/> 218 220 </Unit13> 219 221 <Unit14> 220 222 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericDictionary.inc"/> 221 <EditorIndex Value=" 3"/>222 <WindowIndex Value="0"/> 223 <TopLine Value=" 75"/>224 <CursorPos X="1" Y=" 89"/>225 <UsageCount Value="1 0"/>223 <EditorIndex Value="2"/> 224 <WindowIndex Value="0"/> 225 <TopLine Value="43"/> 226 <CursorPos X="1" Y="60"/> 227 <UsageCount Value="16"/> 226 228 <Loaded Value="True"/> 227 229 </Unit14> 228 230 <Unit15> 229 231 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericList.inc"/> 230 <EditorIndex Value=" 4"/>231 <WindowIndex Value="0"/> 232 <TopLine Value=" 387"/>233 <CursorPos X="1" Y=" 407"/>234 <UsageCount Value="1 0"/>232 <EditorIndex Value="5"/> 233 <WindowIndex Value="0"/> 234 <TopLine Value="68"/> 235 <CursorPos X="1" Y="85"/> 236 <UsageCount Value="13"/> 235 237 <Loaded Value="True"/> 236 238 </Unit15> … … 238 240 <Filename Value="../../../lazarus/trunk/lcl/forms.pp"/> 239 241 <UnitName Value="Forms"/> 240 <EditorIndex Value="6"/>241 242 <WindowIndex Value="0"/> 242 243 <TopLine Value="593"/> 243 244 <CursorPos X="15" Y="606"/> 244 <UsageCount Value="10"/> 245 <Loaded Value="True"/> 245 <UsageCount Value="8"/> 246 246 </Unit16> 247 247 <Unit17> 248 248 <Filename Value="../../../lazarus/trunk/lcl/include/customform.inc"/> 249 <EditorIndex Value="7"/>250 249 <WindowIndex Value="0"/> 251 250 <TopLine Value="2104"/> 252 251 <CursorPos X="3" Y="2109"/> 253 <UsageCount Value="10"/> 254 <Loaded Value="True"/> 252 <UsageCount Value="8"/> 255 253 </Unit17> 254 <Unit18> 255 <Filename Value="/usr/share/fpcsrc/2.4.0/packages/fcl-registry/src/registry.pp"/> 256 <UnitName Value="registry"/> 257 <EditorIndex Value="12"/> 258 <WindowIndex Value="0"/> 259 <TopLine Value="1"/> 260 <CursorPos X="6" Y="1"/> 261 <UsageCount Value="19"/> 262 <Loaded Value="True"/> 263 <DefaultSyntaxHighlighter Value="Delphi"/> 264 </Unit18> 265 <Unit19> 266 <Filename Value="/usr/share/fpcsrc/2.4.0/packages/fcl-registry/src/regdef.inc"/> 267 <EditorIndex Value="13"/> 268 <WindowIndex Value="0"/> 269 <TopLine Value="1"/> 270 <CursorPos X="3" Y="21"/> 271 <UsageCount Value="19"/> 272 <Loaded Value="True"/> 273 <DefaultSyntaxHighlighter Value="Delphi"/> 274 </Unit19> 275 <Unit20> 276 <Filename Value="usystem.pas"/> 277 <IsPartOfProject Value="True"/> 278 <UnitName Value="USystem"/> 279 <EditorIndex Value="7"/> 280 <WindowIndex Value="0"/> 281 <TopLine Value="21"/> 282 <CursorPos X="15" Y="38"/> 283 <UsageCount Value="36"/> 284 <Loaded Value="True"/> 285 <DefaultSyntaxHighlighter Value="Delphi"/> 286 </Unit20> 287 <Unit21> 288 <Filename Value="../../../lazarus/lcl/comctrls.pp"/> 289 <UnitName Value="ComCtrls"/> 290 <EditorIndex Value="6"/> 291 <WindowIndex Value="0"/> 292 <TopLine Value="912"/> 293 <CursorPos X="14" Y="929"/> 294 <UsageCount Value="16"/> 295 <Loaded Value="True"/> 296 </Unit21> 297 <Unit22> 298 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericListObject.inc"/> 299 <EditorIndex Value="9"/> 300 <WindowIndex Value="0"/> 301 <TopLine Value="1"/> 302 <CursorPos X="15" Y="18"/> 303 <UsageCount Value="14"/> 304 <Loaded Value="True"/> 305 </Unit22> 306 <Unit23> 307 <Filename Value="/usr/share/fpcsrc/2.4.0/rtl/inc/ustringh.inc"/> 308 <EditorIndex Value="4"/> 309 <WindowIndex Value="0"/> 310 <TopLine Value="1"/> 311 <CursorPos X="11" Y="30"/> 312 <UsageCount Value="11"/> 313 <Loaded Value="True"/> 314 <DefaultSyntaxHighlighter Value="Delphi"/> 315 </Unit23> 256 316 </Units> 257 317 <JumpHistory Count="30" HistoryIndex="29"> 258 318 <Position1> 259 <Filename Value=" Common/USqlDatabase.pas"/>260 <Caret Line=" 424" Column="1" TopLine="407"/>319 <Filename Value="usystem.pas"/> 320 <Caret Line="116" Column="45" TopLine="99"/> 261 321 </Position1> 262 322 <Position2> 263 <Filename Value=" ../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericDictionary.inc"/>264 <Caret Line=" 59" Column="1" TopLine="46"/>323 <Filename Value="usystem.pas"/> 324 <Caret Line="131" Column="10" TopLine="114"/> 265 325 </Position2> 266 326 <Position3> 267 <Filename Value=" ../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericDictionary.inc"/>268 <Caret Line=" 60" Column="1" TopLine="46"/>327 <Filename Value="usystem.pas"/> 328 <Caret Line="203" Column="1" TopLine="170"/> 269 329 </Position3> 270 330 <Position4> 271 <Filename Value=" ../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericDictionary.inc"/>272 <Caret Line=" 61" Column="1" TopLine="46"/>331 <Filename Value="usystem.pas"/> 332 <Caret Line="25" Column="31" TopLine="18"/> 273 333 </Position4> 274 334 <Position5> 275 <Filename Value=" Forms/UMainForm.pas"/>276 <Caret Line=" 429" Column="1" TopLine="411"/>335 <Filename Value="usystem.pas"/> 336 <Caret Line="131" Column="15" TopLine="111"/> 277 337 </Position5> 278 338 <Position6> 279 <Filename Value=" Common/USqlDatabase.pas"/>280 <Caret Line=" 423" Column="1" TopLine="407"/>339 <Filename Value="Forms/UMainForm.pas"/> 340 <Caret Line="128" Column="7" TopLine="111"/> 281 341 </Position6> 282 342 <Position7> 283 <Filename Value=" Common/USqlDatabase.pas"/>284 <Caret Line=" 424" Column="1" TopLine="407"/>343 <Filename Value="usystem.pas"/> 344 <Caret Line="132" Column="16" TopLine="114"/> 285 345 </Position7> 286 346 <Position8> 287 <Filename Value=" Common/USqlDatabase.pas"/>288 <Caret Line=" 423" Column="1" TopLine="407"/>347 <Filename Value="usystem.pas"/> 348 <Caret Line="8" Column="60" TopLine="1"/> 289 349 </Position8> 290 350 <Position9> 291 <Filename Value=" Common/USqlDatabase.pas"/>292 <Caret Line=" 424" Column="1" TopLine="407"/>351 <Filename Value="usystem.pas"/> 352 <Caret Line="131" Column="10" TopLine="114"/> 293 353 </Position9> 294 354 <Position10> 295 <Filename Value=" ../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericDictionary.inc"/>296 <Caret Line=" 59" Column="1" TopLine="46"/>355 <Filename Value="usystem.pas"/> 356 <Caret Line="70" Column="7" TopLine="47"/> 297 357 </Position10> 298 358 <Position11> 299 <Filename Value=" ../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericDictionary.inc"/>300 <Caret Line=" 60" Column="1" TopLine="46"/>359 <Filename Value="usystem.pas"/> 360 <Caret Line="54" Column="6" TopLine="43"/> 301 361 </Position11> 302 362 <Position12> 303 <Filename Value=" ../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericDictionary.inc"/>304 <Caret Line=" 88" Column="1" TopLine="75"/>363 <Filename Value="usystem.pas"/> 364 <Caret Line="34" Column="9" TopLine="17"/> 305 365 </Position12> 306 366 <Position13> 307 <Filename Value=" Forms/UMainForm.pas"/>308 <Caret Line=" 292" Column="12" TopLine="282"/>367 <Filename Value="usystem.pas"/> 368 <Caret Line="17" Column="15" TopLine="7"/> 309 369 </Position13> 310 370 <Position14> 311 <Filename Value=" Forms/UMainForm.pas"/>312 <Caret Line=" 204" Column="18" TopLine="202"/>371 <Filename Value="usystem.pas"/> 372 <Caret Line="134" Column="21" TopLine="114"/> 313 373 </Position14> 314 374 <Position15> 315 <Filename Value="Forms/UItem View.pas"/>316 <Caret Line=" 67" Column="13" TopLine="55"/>375 <Filename Value="Forms/UItemAdd.pas"/> 376 <Caret Line="23" Column="67" TopLine="27"/> 317 377 </Position15> 318 378 <Position16> 319 <Filename Value="Forms/U MainForm.pas"/>320 <Caret Line="1 6" Column="41" TopLine="4"/>379 <Filename Value="Forms/UItemAdd.pas"/> 380 <Caret Line="151" Column="1" TopLine="122"/> 321 381 </Position16> 322 382 <Position17> 323 <Filename Value="Forms/U MainForm.pas"/>324 <Caret Line=" 50" Column="25" TopLine="28"/>383 <Filename Value="Forms/UItemAdd.pas"/> 384 <Caret Line="84" Column="1" TopLine="78"/> 325 385 </Position17> 326 386 <Position18> 327 <Filename Value="Forms/U MainForm.pas"/>328 <Caret Line=" 87" Column="23" TopLine="65"/>387 <Filename Value="Forms/UItemAdd.pas"/> 388 <Caret Line="76" Column="20" TopLine="60"/> 329 389 </Position18> 330 390 <Position19> 331 <Filename Value="Forms/U MainForm.pas"/>332 <Caret Line=" 88" Column="23" TopLine="66"/>391 <Filename Value="Forms/UItemEdit.pas"/> 392 <Caret Line="92" Column="12" TopLine="85"/> 333 393 </Position19> 334 394 <Position20> 335 <Filename Value="Forms/U MainForm.pas"/>336 <Caret Line=" 89" Column="23" TopLine="67"/>395 <Filename Value="Forms/UItemAdd.pas"/> 396 <Caret Line="95" Column="15" TopLine="76"/> 337 397 </Position20> 338 398 <Position21> 339 <Filename Value="Forms/U MainForm.pas"/>340 <Caret Line="9 0" Column="23" TopLine="68"/>399 <Filename Value="Forms/UItemAdd.pas"/> 400 <Caret Line="94" Column="1" TopLine="80"/> 341 401 </Position21> 342 402 <Position22> 343 <Filename Value="Forms/U MainForm.pas"/>344 <Caret Line=" 91" Column="23" TopLine="69"/>403 <Filename Value="Forms/UItemAdd.pas"/> 404 <Caret Line="101" Column="21" TopLine="84"/> 345 405 </Position22> 346 406 <Position23> 347 <Filename Value="Forms/U MainForm.pas"/>348 <Caret Line=" 278" Column="29" TopLine="265"/>407 <Filename Value="Forms/UItemAdd.pas"/> 408 <Caret Line="79" Column="1" TopLine="72"/> 349 409 </Position23> 350 410 <Position24> 351 <Filename Value="Forms/U MainForm.pas"/>352 <Caret Line=" 290" Column="29" TopLine="277"/>411 <Filename Value="Forms/UItemAdd.pas"/> 412 <Caret Line="97" Column="33" TopLine="80"/> 353 413 </Position24> 354 414 <Position25> 355 <Filename Value="Forms/U MainForm.pas"/>356 <Caret Line=" 295" Column="29" TopLine="277"/>415 <Filename Value="Forms/UItemAdd.pas"/> 416 <Caret Line="102" Column="77" TopLine="85"/> 357 417 </Position25> 358 418 <Position26> 359 <Filename Value="Forms/U MainForm.pas"/>360 <Caret Line=" 300" Column="29" TopLine="287"/>419 <Filename Value="Forms/UItemAdd.pas"/> 420 <Caret Line="92" Column="40" TopLine="67"/> 361 421 </Position26> 362 422 <Position27> 363 423 <Filename Value="Forms/UMainForm.pas"/> 364 <Caret Line=" 304" Column="25" TopLine="287"/>424 <Caret Line="159" Column="63" TopLine="131"/> 365 425 </Position27> 366 426 <Position28> 367 427 <Filename Value="Forms/UMainForm.pas"/> 368 <Caret Line=" 305" Column="63" TopLine="287"/>428 <Caret Line="1" Column="1" TopLine="1"/> 369 429 </Position28> 370 430 <Position29> 371 431 <Filename Value="Forms/UMainForm.pas"/> 372 <Caret Line=" 308" Column="29" TopLine="287"/>432 <Caret Line="401" Column="25" TopLine="383"/> 373 433 </Position29> 374 434 <Position30> 375 435 <Filename Value="Forms/UMainForm.pas"/> 376 <Caret Line=" 312" Column="69" TopLine="300"/>436 <Caret Line="17" Column="47" TopLine="1"/> 377 437 </Position30> 378 438 </JumpHistory> … … 417 477 </Linking> 418 478 <Other> 419 <CompilerMessages>420 <IgnoredMessages idx5023="True" idx5024="True" idx5025="True" idx5028="True" idx5029="True" idx5031="True"/>421 <UseMsgFile Value="True"/>422 </CompilerMessages>423 479 <CompilerPath Value="$(CompPath)"/> 424 480 </Other> 425 481 </CompilerOptions> 426 482 <Debugging> 483 <BreakPoints Count="1"> 484 <Item1> 485 <Source Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericListObject.inc"/> 486 <Line Value="52"/> 487 </Item1> 488 </BreakPoints> 427 489 <Exceptions Count="3"> 428 490 <Item1> -
trunk/chronis.lpr
r7 r9 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UPersistentForm, URegistry, USqlDatabase, UTreeState, 11 UItemView, UItemEdit, ULoginForm, UMainForm, UItemAdd, TemplateGenerics 10 Forms, UPersistentForm, URegistry, USqlDatabase, UTreeState, SysUtils, 11 UItemView, UItemEdit, ULoginForm, UMainForm, UItemAdd, TemplateGenerics, USystem 12 12 { you can add units after this }; 13 13 14 14 {$R *.res} 15 15 16 const 17 HeapTraceLog = 'heaptrclog.trc'; 16 18 begin 19 // Heap trace 20 DeleteFile(ExtractFilePath(ParamStr(0)) + HeapTraceLog); 21 SetHeapTraceOutput(ExtractFilePath(ParamStr(0)) + HeapTraceLog); 17 22 Application.Initialize; 18 23 Application.CreateForm(TMainForm, MainForm);
Note:
See TracChangeset
for help on using the changeset viewer.