Changeset 29


Ignore:
Timestamp:
Nov 23, 2011, 8:24:07 PM (12 years ago)
Author:
chronos
Message:
  • Added: Preliminary support for modules.
  • Modified: Database initialization moved to module System.
Location:
trunk
Files:
3 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/UApplicationInfo.pas

    r25 r29  
    5050  Name := 'ChronIS';
    5151  Identification := 1;
    52   ReleaseDate := EncodeDate(2011, 11, 9);
     52  ReleaseDate := EncodeDate(2011, 11, 23);
    5353  MajorVersion := 0;
    5454  MinorVersion := 1;
  • trunk/Forms/ULoginProfileForm.lfm

    r28 r29  
    11object LoginProfileForm: TLoginProfileForm
    2   Left = 314
     2  Left = 276
    33  Height = 395
    4   Top = 133
     4  Top = 147
    55  Width = 521
    66  Caption = 'Connection profile'
     
    149149  end
    150150  object ButtonCancel: TButton
    151     Left = 355
     151    Left = 360
    152152    Height = 25
    153     Top = 312
     153    Top = 362
    154154    Width = 75
    155     Anchors = [akTop, akRight]
     155    Anchors = [akRight, akBottom]
    156156    Caption = 'Cancel'
    157157    ModalResult = 2
  • trunk/Forms/ULoginProfileForm.pas

    r27 r29  
    183183  ProfileList.Assign(Core.Profiles);
    184184  ProfileList.FillStrings(ListBox1.Items);
    185   ListBox1.ItemIndex := Core.LastProfile;
     185  if Core.LastProfile < ListBox1.Count then
     186    ListBox1.ItemIndex := Core.LastProfile;
    186187  if (ListBox1.Items.Count > 0) and
    187188    (ListBox1.ItemIndex = -1) then ListBox1.ItemIndex := 0;
  • trunk/Forms/UMainForm.lfm

    r27 r29  
    66  ActiveControl = Panel1
    77  Caption = 'ChronIS'
    8   ClientHeight = 427
     8  ClientHeight = 421
    99  ClientWidth = 640
    1010  Icon.Data = {
     
    153153  object Panel1: TPanel
    154154    Left = 0
    155     Height = 427
     155    Height = 421
    156156    Top = 0
    157157    Width = 184
    158158    Align = alLeft
    159159    BevelOuter = bvNone
    160     ClientHeight = 427
     160    ClientHeight = 421
    161161    ClientWidth = 184
    162162    TabOrder = 0
    163163    object Label1: TLabel
    164164      Left = 7
    165       Height = 14
     165      Height = 18
    166166      Top = 4
    167       Width = 39
     167      Width = 51
    168168      Caption = 'Groups:'
    169169      ParentColor = False
     
    171171    object TreeView1: TTreeView
    172172      Left = 4
    173       Height = 403
     173      Height = 397
    174174      Top = 19
    175175      Width = 180
    176176      Anchors = [akTop, akLeft, akRight, akBottom]
    177       DefaultItemHeight = 16
    178177      Images = ImageListActions
    179178      ReadOnly = True
     
    185184  object Panel2: TPanel
    186185    Left = 189
    187     Height = 427
     186    Height = 421
    188187    Top = 0
    189188    Width = 451
    190189    Align = alClient
    191190    BevelOuter = bvNone
    192     ClientHeight = 427
     191    ClientHeight = 421
    193192    ClientWidth = 451
    194193    TabOrder = 1
    195194    object Label2: TLabel
    196195      Left = 2
    197       Height = 14
     196      Height = 18
    198197      Top = 4
    199       Width = 43
     198      Width = 54
    200199      Caption = 'Reports:'
    201200      ParentColor = False
     
    203202    object ListView1: TListView
    204203      Left = 2
    205       Height = 371
     204      Height = 365
    206205      Top = 19
    207206      Width = 447
     
    223222      Left = 3
    224223      Height = 25
    225       Top = 398
     224      Top = 392
    226225      Width = 75
    227226      Action = AItemAdd
     
    232231      Left = 83
    233232      Height = 25
    234       Top = 398
     233      Top = 392
    235234      Width = 75
    236235      Action = AItemDelete
     
    241240  object Splitter1: TSplitter
    242241    Left = 184
    243     Height = 427
     242    Height = 421
    244243    Top = 0
    245244    Width = 5
     
    314313      Hint = 'Settings'
    315314      OnExecute = ASettingsExecute
    316     end
    317     object AInitSystemValues: TAction
    318       Caption = 'Init system values'
    319       OnExecute = AInitSystemValuesExecute
    320315    end
    321316    object AImportStructure: TAction
     
    482477    object MenuItem18: TMenuItem
    483478      Caption = 'Admin'
    484       object MenuItem19: TMenuItem
    485         Action = AInitSystemValues
    486       end
    487479      object MenuItem20: TMenuItem
    488480        Action = AImportStructure
  • trunk/Forms/UMainForm.lrt

    r27 r29  
    1818TMAINFORM.ASETTINGS.CAPTION=Settings
    1919TMAINFORM.ASETTINGS.HINT=Settings
    20 TMAINFORM.AINITSYSTEMVALUES.CAPTION=Init system values
    2120TMAINFORM.AIMPORTSTRUCTURE.CAPTION=Import structure...
    2221TMAINFORM.AABOUT.CAPTION=About
  • trunk/Forms/UMainForm.pas

    r27 r29  
    2020    ADisconnect: TAction;
    2121    AImportStructure: TAction;
    22     AInitSystemValues: TAction;
    2322    ASettings: TAction;
    2423    AToggleFullscreen: TAction;
     
    5251    MenuItem17: TMenuItem;
    5352    MenuItem18: TMenuItem;
    54     MenuItem19: TMenuItem;
    5553    MenuItem2: TMenuItem;
    5654    MenuItem20: TMenuItem;
     
    7674    procedure AExitExecute(Sender: TObject);
    7775    procedure AImportStructureExecute(Sender: TObject);
    78     procedure AInitSystemValuesExecute(Sender: TObject);
    7976    procedure AItemAddExecute(Sender: TObject);
    8077    procedure AItemDeleteExecute(Sender: TObject);
     
    9895      Selected: Boolean);
    9996    procedure MenuItem17Click(Sender: TObject);
     97    procedure MenuItem19Click(Sender: TObject);
    10098    procedure TreeView1Change(Sender: TObject; Node: TTreeNode);
    10199  private
     
    105103    procedure LoadFromRegistry;
    106104    procedure SaveToRegistry;
    107     procedure InitStructure;
    108     procedure InitSystemValues;
    109105  public
    110106    SelectedObjectId: Integer;
     
    168164end;
    169165
    170 procedure TMainForm.InitStructure;
    171 var
    172   DbRows: TDbRows;
    173   DbRows2: TDbRows;
    174   StructureVersion: string;
    175   Data: TDictionaryStringString;
    176   ObjectId: Integer;
    177   Tables: TListString;
    178   I: Integer;
    179 begin
    180   with Core.System do
    181   try
    182     DbRows := TDbRows.Create;
    183     Tables := TListString.Create;
    184     Data := TDictionaryStringString.Create;
    185 
    186     Database.Query(DbRows, 'SHOW TABLES');
    187     Tables.Count := DbRows.Count;
    188     for I := 0 to DbRows.Count - 1 do
    189       Tables[I] := DbRows[I].Items[0].Value;
    190 
    191     if Tables.IndexOf(InformationTable) = -1 then begin
    192       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + InformationTable + '` ( ' +
    193   '`Version` varchar(255) NOT NULL,' +
    194   '`LastUpdateTime` datetime NOT NULL' +
    195 ') ENGINE=InnoDB DEFAULT CHARSET=utf8;');
    196       Database.Query(DbRows, 'INSERT INTO `' + InformationTable + '` (`Version`, `LastUpdateTime`) VALUES ' +
    197   '("0.1", "0000-00-00 00:00:00");');
    198     end;
    199     Database.Select(DbRows, InformationTable);
    200     StructureVersion := DbRows[0].Values['Version'];
    201 
    202     if Tables.IndexOf(ObjectTable) = -1 then begin
    203       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + ObjectTable + '` ( ' +
    204         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    205         '`Name` varchar(255) NOT NULL,' +
    206         '`Schema` varchar(255) NOT NULL,' +
    207         '`Table` varchar(255) NOT NULL,' +
    208         '`PrimaryKey` varchar(255) NOT NULL DEFAULT "Id", ' +
    209         '`Sequence` int(11) NOT NULL DEFAULT 0,' +
    210         '`Group` int(11) NOT NULL,' +
    211         'KEY `Group` (`Group`),' +
    212         'PRIMARY KEY (`Id`)' +
    213       ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    214 
    215     end;
    216 
    217     if Tables.IndexOf(ObjectGroupTable) = -1 then begin
    218       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + ObjectGroupTable + '` ( ' +
    219         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    220         '`Name` varchar(255) NOT NULL,' +
    221         '`Parent` int(11) NOT NULL DEFAULT 0,' +
    222         '`Sequence` int(11) NOT NULL DEFAULT 0,' +
    223         'KEY `Parent` (`Parent`),' +
    224         'PRIMARY KEY (`Id`)' +
    225       ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    226     end;
    227 
    228     if Tables.IndexOf(PropertyTable) = -1 then begin
    229       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + PropertyTable + '` ( ' +
    230         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    231       '`Name` varchar(255) NOT NULL,' +
    232       '`Object` int(11) NOT NULL,' +
    233       '`PropertyGroup` int(11) NOT NULL DEFAULT 0,' +
    234       '`CustomType` int(11) NOT NULL,' +
    235       '`Editable` bool NOT NULL DEFAULT 1,' +
    236       '`ColumnName` varchar(255) NOT NULL,' +
    237       'KEY `Object` (`Object`),' +
    238       'KEY `PropertyGroup` (`PropertyGroup`),' +
    239       'KEY `CustomType` (`CustomType`),' +
    240       'PRIMARY KEY (`Id`)' +
    241       ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    242     end;
    243     if Tables.IndexOf(PropertyTypeTable) = -1 then begin
    244       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + PropertyTypeTable + '` ( ' +
    245         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    246       '`Name` varchar(255) NOT NULL,' +
    247       '`DbType` varchar(255) NOT NULL,' +
    248       'PRIMARY KEY (`Id`)' +
    249       ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    250     end;
    251 
    252     if Tables.IndexOf(PropertyGroupTable) = -1 then begin
    253       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + PropertyGroupTable + '` ( ' +
    254         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    255       '`Name` varchar(255) NOT NULL,' +
    256       '`Object` int(11) NOT NULL,' +
    257       'KEY `Object` (`Object`),' +
    258       'PRIMARY KEY (`Id`)' +
    259       ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    260     end;
    261 
    262     if Tables.IndexOf(EnumerationState) = -1 then begin
    263       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + EnumerationState + '` ( ' +
    264         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    265         '`Enumeration` int(11) NOT NULL,' +
    266         '`Name` varchar(255) NOT NULL,' +
    267         '`Sequence` int(11) NOT NULL DEFAULT 0,' +
    268         'KEY `Enumeration` (`Enumeration`),' +
    269         'PRIMARY KEY (`Id`)' +
    270         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    271     end;
    272 
    273     if Tables.IndexOf(Enumeration) = -1 then begin
    274       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + Enumeration + '` ( ' +
    275         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    276         '`Name` varchar(255) NOT NULL,' +
    277         'PRIMARY KEY (`Id`)' +
    278         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    279     end;
    280 
    281     if Tables.IndexOf(TypeEnumeration) = -1 then begin
    282       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + TypeEnumeration + '` ( ' +
    283         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    284         '`Enumeration` int(11) NOT NULL,' +
    285         'KEY `Enumeration` (`Enumeration`),' +
    286         'PRIMARY KEY (`Id`)' +
    287         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    288     end;
    289 
    290     if Tables.IndexOf(TypeRelationOne) = -1 then begin
    291       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + TypeRelationOne + '` ( ' +
    292         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    293         '`CustomType` int(11) NOT NULL,' +
    294         '`Object` int(11) NOT NULL,' +
    295         'KEY `CustomType` (`CustomType`),' +
    296         'PRIMARY KEY (`Id`)' +
    297         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    298     end;
    299 
    300     if Tables.IndexOf(TypeRelationMany) = -1 then begin
    301       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + TypeRelationMany + '` ( ' +
    302         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    303         '`CustomType` int(11) NOT NULL,' +
    304         '`ObjectProperty` int(11) NOT NULL,' +
    305         'KEY `CustomType` (`CustomType`),' +
    306         'PRIMARY KEY (`Id`)' +
    307         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    308     end;
    309 
    310     if Tables.IndexOf(TypeFile) = -1 then begin
    311       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + TypeFile + '` ( ' +
    312         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    313         '`Name` varchar(255) NOT NULL,' +
    314         '`Size` int(11) NOT NULL,' +
    315         'PRIMARY KEY (`Id`)' +
    316         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    317     end;
    318 
    319     if Tables.IndexOf(TypeGPS) = -1 then begin
    320       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + TypeGPS + '` ( ' +
    321         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    322         '`Latitude` double NOT NULL,' +
    323         '`Longitude` double NOT NULL,' +
    324         'PRIMARY KEY (`Id`)' +
    325         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    326     end;
    327 
    328     if Tables.IndexOf(CustomTypeTableName) = -1 then begin
    329       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + CustomTypeTableName + '` ( ' +
    330         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    331         '`Type` int NOT NULL,' +
    332         'KEY `Type` (`Type`),' +
    333         'PRIMARY KEY (`Id`)' +
    334         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    335     end;
    336 
    337     if Tables.IndexOf(TypeNumber) = -1 then begin
    338       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + TypeNumber + '` ( ' +
    339         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    340         '`CustomType` int NOT NULL,' +
    341         '`Default` int NOT NULL,' +
    342         '`Min` int NOT NULL,' +
    343         '`Max` int NOT NULL,' +
    344         'KEY `CustomType` (`CustomType`),' +
    345         'PRIMARY KEY (`Id`)' +
    346         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    347     end;
    348 
    349     if Tables.IndexOf(TypeFloat) = -1 then begin
    350       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + TypeFloat + '` ( ' +
    351         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    352         '`CustomType` int NOT NULL,' +
    353         '`Default` float NOT NULL,' +
    354         '`Min` float NOT NULL,' +
    355         '`Max` float NOT NULL,' +
    356         'KEY `CustomType` (`CustomType`),' +
    357         'PRIMARY KEY (`Id`)' +
    358         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    359     end;
    360 
    361     if Tables.IndexOf(TypeDateTime) = -1 then begin
    362       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + TypeDateTime + '` ( ' +
    363         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    364         '`CustomType` int NOT NULL,' +
    365         '`Default` datetime NOT NULL,' +
    366         '`Min` datetime NOT NULL,' +
    367         '`Max` datetime NOT NULL,' +
    368         'KEY `CustomType` (`CustomType`),' +
    369         'PRIMARY KEY (`Id`)' +
    370         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    371     end;
    372 
    373     if Tables.IndexOf(TypeString) = -1 then begin
    374       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + TypeString + '` ( ' +
    375         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    376         '`CustomType` int NOT NULL,' +
    377         '`Default` VARCHAR(255) NOT NULL,' +
    378         '`MaxLength` int NOT NULL,' +
    379         'KEY `CustomType` (`CustomType`),' +
    380         'PRIMARY KEY (`Id`)' +
    381         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    382     end;
    383 
    384       if Tables.IndexOf(ModuleTable) = -1 then begin
    385       Database.Query(DbRows, 'CREATE TABLE IF NOT EXISTS `' + ModuleTable + '` ( ' +
    386         '`Id` int(11) NOT NULL AUTO_INCREMENT,' +
    387         '`Name` VARCHAR(255) NOT NULL,' +
    388         '`Author` VARCHAR(255) NOT NULL,' +
    389         '`Website` VARCHAR(255) NOT NULL,' +
    390         '`Version` VARCHAR(255) NOT NULL,' +
    391         '`License` VARCHAR(255) NOT NULL,' +
    392         '`Description` TEXT NOT NULL,' +
    393         'PRIMARY KEY (`Id`)' +
    394         ') ENGINE=InnoDB  DEFAULT CHARSET=utf8');
    395     end;
    396   finally
    397     Tables.Free;
    398     Data.Free;
    399     DbRows.Free;
    400   end;
    401 end;
    402 
    403 procedure TMainForm.InitSystemValues;
    404 var
    405   ObjectId: Integer;
    406   ObjectGroupId: Integer;
    407   PropertyParentId: Integer;
    408   ObjectPropertyGroupId: Integer;
    409   PropertyTypeId: Integer;
    410   ObjectPropertyId: Integer;
    411   ObjectPropertyIdGroup: Integer;
    412   PropertyObjectId: Integer;
    413   CustomTypeId: Integer;
    414   CustomTypeIdType: Integer;
    415   ObjectIdGroupId: Integer;
    416   TypeNumber: Integer;
    417   ObjectGroupParentId: Integer;
    418   TypeString: Integer;
    419   TypeBoolean: Integer;
    420   GroupId: Integer;
    421   EnumId: Integer;
    422   ModuleId: Integer;
    423   ModuleBaseId: Integer;
    424 begin
    425   with Core.System do begin
    426   TypeNumber := AddType('Number', 'INT', vtInteger);
    427   TypeString := AddType('String', 'VARCHAR(255)', vtString);
    428   AddType('Text', 'TEXT', vtText);
    429   AddType('Date and time', 'DATETIME', vtDateTime);
    430   AddType('Floating number', 'FLOAT', vtFloat);
    431   AddType('Image', 'BLOB', vtImage);
    432   TypeBoolean := AddType('Boolean', 'BOOL', vtBoolean);
    433   AddType('IPv4', 'BINARY(4)', vtIPv4);
    434   AddType('IPv6', 'BINARY(16)', vtIPv6);
    435   AddType('MAC address', 'BINARY(6)', vtMAC);
    436   AddType('File', 'INT', vtFile);
    437   AddType('GPS', 'INT', vtGPS);
    438   AddType('Currency', 'FLOAT', vtCurrency);
    439   AddType('Enumeration', 'INT', vtEnumeration);
    440   AddType('Time', 'TIME', vtTime);
    441   AddType('Date', 'DATE', vtDate);
    442   AddType('Color', 'INT', vtColor);
    443   AddType('Hyperlink', 'VARCHAR(255)', vtHyperlink);
    444   AddType('RelationOne', 'INT', vtRelationOne);
    445   AddType('RelationMany', 'INT', vtRelationMany);
    446   AddType('Password', 'VARCHAR(255)', vtPassword);
    447 
    448   EnumId := AddEnumeration('Boolean');
    449   AddEnumerationState(EnumId, 'False');
    450   AddEnumerationState(EnumId, 'True');
    451 
    452   EnumId := AddEnumeration('Priority');
    453   AddEnumerationState(EnumId, 'Low');
    454   AddEnumerationState(EnumId, 'Normal');
    455   AddEnumerationState(EnumId, 'High');
    456 
    457   GroupId := AddObjectGroup('System');
    458 
    459   ObjectGroupId := AddObject('Object groups', 'ObjectGroup', Core.System.Database.Database, GroupId);
    460     AddPropertyNumber(ObjectGroupId, 'Id', 'Id', False);
    461     AddPropertyString(ObjectGroupId, 'Name', 'Name', True);
    462     ObjectGroupParentId := AddPropertyRelationOne(ObjectGroupId, 'Parent', 'Parent', True, ObjectGroupId);
    463 
    464   ObjectId := AddObject('Objects', 'Object', Core.System.Database.Database, GroupId);
    465     AddPropertyNumber(ObjectId, 'Id', 'Id', False);
    466     AddPropertyString(ObjectId, 'Name', 'Name', True);
    467     ObjectIdGroupId := AddPropertyRelationOne(ObjectId, 'Group', 'Group', True, ObjectGroupId);
    468     AddPropertyString(ObjectId, 'Schema', 'Schema', True);
    469     AddPropertyString(ObjectId, 'Table', 'Table', True);
    470     AddPropertyString(ObjectId, 'Primary key', 'PrimaryKey', True);
    471     AddPropertyNumber(ObjectId, 'Sequence', 'Sequence', True);
    472 
    473   PropertyTypeId := AddObject('Property types', 'Type', Core.System.Database.Database, GroupId);
    474     AddPropertyNumber(PropertyTypeId, 'Id', 'Id', False);
    475     AddPropertyString(PropertyTypeId, 'Name', 'Name', True);
    476     AddPropertyString(PropertyTypeId, 'Type', 'DbType', True);
    477     //AddPropertyNumber(ObjectId, 'Parent', 'Parent');
    478 
    479   CustomTypeId := AddObject('Custom types', 'TypeCustom', Core.System.Database.Database, GroupId);
    480     AddPropertyNumber(CustomTypeId, 'Id', 'Id', False);
    481     CustomTypeIdType := AddPropertyRelationOne(CustomTypeId, 'Type', 'Type', True, PropertyTypeId);
    482 
    483   ObjectPropertyGroupId := AddObject('Property groups', 'PropertyGroup', Core.System.Database.Database, GroupId);
    484     AddPropertyNumber(ObjectPropertyGroupId, 'Id', 'Id', False);
    485 
    486   ObjectPropertyId := AddObject('Properties', 'Property', Core.System.Database.Database, GroupId);
    487     AddPropertyNumber(ObjectPropertyId, 'Id', 'Id', False);
    488     AddPropertyString(ObjectPropertyId, 'Name', 'Name', True);
    489     PropertyParentId := AddPropertyRelationOne(ObjectPropertyId, 'Object', 'Object', True, ObjectId);
    490     ObjectPropertyIdGroup := AddPropertyRelationOne(ObjectPropertyId, 'Property group', 'PropertyGroup', True, ObjectPropertyGroupId);
    491     AddPropertyNumber(ObjectPropertyId, 'Custom type', 'CustomType', True);
    492     AddProperty(ObjectPropertyId, 'Editable', 'Editable', TypeBoolean, True);
    493     AddPropertyString(ObjectPropertyId, 'Column name', 'ColumnName', True);
    494 
    495     AddPropertyRelationMany(ObjectGroupId, 'Childs', 'Childs', True, PropertyParentId);
    496     AddPropertyRelationMany(ObjectGroupId, 'Objects', 'Objects', True, ObjectIdGroupId);
    497     AddPropertyRelationMany(ObjectId, 'Properties', 'Properties', True, PropertyParentId);
    498     AddPropertyRelationMany(ObjectPropertyGroupId, 'Properties', 'Properties', True, ObjectPropertyIdGroup);
    499     AddPropertyRelationMany(PropertyTypeId, 'Custom types', 'CustomTypes', True, CustomTypeIdType);
    500   ModuleId := AddObject('Modules', 'Module', Core.System.Database.Database, GroupId);
    501     AddPropertyNumber(ModuleId, 'Id', 'Id', False);
    502     AddPropertyString(ModuleId, 'Name', 'Name', True);
    503     AddPropertyString(ModuleId, 'Author', 'Author', True);
    504     AddPropertyString(ModuleId, 'Website', 'Website', False);
    505     AddPropertyString(ModuleId, 'Version', 'Version', True);
    506     AddPropertyText(ModuleId, 'Description', 'Description', False);
    507     AddPropertyString(ModuleId, 'License', 'License', False);
    508 
    509   ModuleBaseId := AddModule('Base', 'Chronos', '', '0.1', '', 'GNU/GPL');
    510   end;
    511 end;
    512 
    513166procedure TMainForm.UpdateInterface;
    514167begin
    515168  ADisconnect.Enabled := Core.System.Database.Connected;
    516169  AConnect.Enabled := not Core.System.Database.Connected;
    517   AInitSystemValues.Enabled := Core.System.Database.Connected;
    518170  AImportStructure.Enabled := Core.System.Database.Connected;
    519171end;
     
    624276end;
    625277
    626 procedure TMainForm.AInitSystemValuesExecute(Sender: TObject);
    627 begin
    628   InitSystemValues;
    629   LoadTree;
    630 end;
    631 
    632278procedure TMainForm.AItemAddExecute(Sender: TObject);
    633279begin
     
    656302    try
    657303      Core.System.Database.Connect;
    658       InitStructure;
     304      if Core.System.IsDatabaseEmpty then Core.System.ModuleSystem.Install;
    659305      Core.System.LoadTypes;
    660306      LoadTree;
     
    733379begin
    734380  LoginForm.ShowModal;
     381end;
     382
     383procedure TMainForm.MenuItem19Click(Sender: TObject);
     384begin
     385
    735386end;
    736387
  • trunk/Languages/chronis.cs.po

    r28 r29  
    214214msgstr "Importovat strukturu..."
    215215
    216 #: TMAINFORM.AINITSYSTEMVALUES.CAPTION
    217 msgctxt "TMAINFORM.AINITSYSTEMVALUES.CAPTION"
    218 msgid "Init system values"
    219 msgstr "Inicializovat systémové hodnoty"
    220 
    221216#: TMAINFORM.AITEMADD.CAPTION
    222217#| msgid "Přidat"
  • trunk/Languages/chronis.po

    r28 r29  
    200200msgstr ""
    201201
    202 #: TMAINFORM.AINITSYSTEMVALUES.CAPTION
    203 msgctxt "TMAINFORM.AINITSYSTEMVALUES.CAPTION"
    204 msgid "Init system values"
    205 msgstr ""
    206 
    207202#: TMAINFORM.AITEMADD.CAPTION
    208203msgctxt "TMAINFORM.AITEMADD.CAPTION"
  • trunk/UCore.lfm

    r25 r29  
    1414  object SqlDatabase1: TSqlDatabase
    1515    Connected = False
     16    Port = 3306
    1617    Encoding = 'utf8'
    1718    OnLogQuery = SqlDatabase1LogQuery
  • trunk/UCore.pas

    r27 r29  
    77uses
    88  Classes, SysUtils, FileUtil, UCoolTranslator, UDebugLog, USystem, Registry,
    9   USqlDatabase, ULoginProfileForm, URegistry, UChronisClient;
     9  USqlDatabase, ULoginProfileForm, URegistry, UChronisClient, UModuleSystem;
    1010
    1111type
     
    4343
    4444uses
    45   UApplicationInfo;
     45  UApplicationInfo, UChronisClientDirect;
    4646
    4747{ TCore }
     
    5656  System := TChronisBase.Create;
    5757  System.Database := SqlDatabase1;
     58  System.Client := TChronisClientDirect.Create;
     59  System.RegisterModule(TModuleSystem);
     60  System.ModuleSystem := TModuleSystem(System.Modules.Last);
     61
    5862  {$IFDEF DEBUG}
    5963  DebugLog1.WriteToFileEnable := True;
  • trunk/USystem.pas

    r28 r29  
    77uses
    88  Classes, SysUtils, SpecializedList, SpecializedDictionary, USqlDatabase,
    9   Strings, UDataTypes, Dialogs, ComCtrls, StdCtrls, Controls, UChronisClient;
     9  Strings, UDataTypes, Dialogs, ComCtrls, StdCtrls, Controls, UChronisClient,
     10  UChronisModule;
    1011
    1112const
     
    105106    Client: TChronisClient;
    106107    Database: TSqlDatabase;
     108    Modules: TListObject; // TListObject<TChronisModule>
     109    ModuleSystem: TChronisModule;
     110    procedure RegisterModule(ModuleClass: TChronisModuleClass);
    107111    function AddType(Name, DataType: string; TypeIndex: TDbValueType): Integer;
    108112    function AddGroup(Name: string; ParentGroupId: Integer = 0): Integer;
     
    132136    function AddModule(Name, Author, Website, Version, Description, License: string): Integer;
    133137    procedure LoadTypes;
     138    function IsDatabaseEmpty: Boolean;
    134139    constructor Create;
    135140    destructor Destroy; override;
     
    235240end;
    236241
     242procedure TChronisBase.RegisterModule(ModuleClass: TChronisModuleClass);
     243begin
     244  Modules.AddNew(ModuleClass.Create);
     245  TChronisModule(Modules.Last).System := TChronisBase(Self);
     246end;
     247
    237248function TChronisBase.AddType(Name, DataType: string; TypeIndex: TDbValueType): Integer;
    238249var
     
    625636end;
    626637
     638function TChronisBase.IsDatabaseEmpty: Boolean;
     639var
     640  DbRows: TDbRows;
     641begin
     642  try
     643    DbRows := TDbRows.Create;
     644    Database.Query(DbRows, 'SELECT 1 FROM information_schema.tables WHERE table_name = "Information" AND table_schema = "' +
     645      Database.Database + '"');
     646    Result := DbRows.Count = 0;
     647  finally
     648    DbRows.Free;
     649  end;
     650end;
     651
    627652constructor TChronisBase.Create;
    628653begin
    629654  Types := TChronisTypeList.Create;
     655  Modules := TListObject.Create;
    630656  Client := nil;
    631657end;
     
    634660begin
    635661  Types.Free;
     662  Modules.Free;
    636663  Client.Free;
    637664  inherited Destroy;
  • trunk/chronis.lpi

    r28 r29  
    105105      </Item6>
    106106    </RequiredPackages>
    107     <Units Count="49">
     107    <Units Count="52">
    108108      <Unit0>
    109109        <Filename Value="chronis.lpr"/>
     
    233233        <EditorIndex Value="3"/>
    234234        <WindowIndex Value="0"/>
    235         <TopLine Value="643"/>
    236         <CursorPos X="67" Y="663"/>
     235        <TopLine Value="286"/>
     236        <CursorPos X="1" Y="304"/>
    237237        <UsageCount Value="317"/>
    238238        <Loaded Value="True"/>
     
    269269        <IsPartOfProject Value="True"/>
    270270        <UnitName Value="USystem"/>
    271         <EditorIndex Value="11"/>
    272         <WindowIndex Value="0"/>
    273         <TopLine Value="390"/>
    274         <CursorPos X="1" Y="232"/>
     271        <EditorIndex Value="7"/>
     272        <WindowIndex Value="0"/>
     273        <TopLine Value="242"/>
     274        <CursorPos X="51" Y="248"/>
    275275        <UsageCount Value="200"/>
    276276        <Loaded Value="True"/>
     
    283283        <ResourceBaseClass Value="DataModule"/>
    284284        <UnitName Value="UCore"/>
    285         <EditorIndex Value="9"/>
    286         <WindowIndex Value="0"/>
    287         <TopLine Value="34"/>
    288         <CursorPos X="116" Y="42"/>
     285        <EditorIndex Value="6"/>
     286        <WindowIndex Value="0"/>
     287        <TopLine Value="42"/>
     288        <CursorPos X="60" Y="60"/>
    289289        <UsageCount Value="230"/>
    290290        <Loaded Value="True"/>
     
    298298        <ResourceBaseClass Value="Form"/>
    299299        <UnitName Value="USettingForm"/>
    300         <EditorIndex Value="8"/>
    301300        <WindowIndex Value="0"/>
    302301        <TopLine Value="48"/>
    303302        <CursorPos X="42" Y="66"/>
    304303        <UsageCount Value="229"/>
    305         <Loaded Value="True"/>
    306         <LoadedDesigner Value="True"/>
    307304        <DefaultSyntaxHighlighter Value="Delphi"/>
    308305      </Unit15>
     
    311308        <IsPartOfProject Value="True"/>
    312309        <UnitName Value="UApplicationInfo"/>
     310        <IsVisibleTab Value="True"/>
    313311        <EditorIndex Value="14"/>
    314312        <WindowIndex Value="0"/>
    315         <TopLine Value="39"/>
    316         <CursorPos X="32" Y="54"/>
     313        <TopLine Value="32"/>
     314        <CursorPos X="41" Y="52"/>
    317315        <UsageCount Value="229"/>
    318316        <Loaded Value="True"/>
     
    326324        <CursorPos X="44" Y="500"/>
    327325        <UsageCount Value="11"/>
     326        <DefaultSyntaxHighlighter Value="Delphi"/>
    328327      </Unit17>
    329328      <Unit18>
     
    334333        <CursorPos X="24" Y="1673"/>
    335334        <UsageCount Value="11"/>
     335        <DefaultSyntaxHighlighter Value="Delphi"/>
    336336      </Unit18>
    337337      <Unit19>
     
    339339        <IsPartOfProject Value="True"/>
    340340        <UnitName Value="UDataTypes"/>
    341         <EditorIndex Value="12"/>
    342         <WindowIndex Value="0"/>
    343         <TopLine Value="246"/>
    344         <CursorPos X="47" Y="256"/>
     341        <EditorIndex Value="8"/>
     342        <WindowIndex Value="0"/>
     343        <TopLine Value="1"/>
     344        <CursorPos X="12" Y="14"/>
    345345        <UsageCount Value="204"/>
    346346        <Loaded Value="True"/>
     
    354354        <CursorPos X="26" Y="1458"/>
    355355        <UsageCount Value="2"/>
     356        <DefaultSyntaxHighlighter Value="Delphi"/>
    356357      </Unit20>
    357358      <Unit21>
     
    361362        <CursorPos X="1" Y="561"/>
    362363        <UsageCount Value="13"/>
     364        <DefaultSyntaxHighlighter Value="Delphi"/>
    363365      </Unit21>
    364366      <Unit22>
     
    371373        <TopLine Value="149"/>
    372374        <CursorPos X="44" Y="164"/>
    373         <UsageCount Value="140"/>
     375        <UsageCount Value="143"/>
    374376        <DefaultSyntaxHighlighter Value="Delphi"/>
    375377      </Unit22>
     
    388390        <CursorPos X="1" Y="2286"/>
    389391        <UsageCount Value="25"/>
     392        <DefaultSyntaxHighlighter Value="Delphi"/>
    390393      </Unit24>
    391394      <Unit25>
     
    395398        <CursorPos X="3" Y="298"/>
    396399        <UsageCount Value="25"/>
     400        <DefaultSyntaxHighlighter Value="Delphi"/>
    397401      </Unit25>
    398402      <Unit26>
     
    402406        <CursorPos X="10" Y="427"/>
    403407        <UsageCount Value="25"/>
     408        <DefaultSyntaxHighlighter Value="Delphi"/>
    404409      </Unit26>
    405410      <Unit27>
     
    437442        <TopLine Value="40"/>
    438443        <CursorPos X="29" Y="54"/>
    439         <UsageCount Value="89"/>
     444        <UsageCount Value="92"/>
    440445        <DefaultSyntaxHighlighter Value="Delphi"/>
    441446      </Unit30>
     
    447452        <CursorPos X="20" Y="1219"/>
    448453        <UsageCount Value="32"/>
     454        <DefaultSyntaxHighlighter Value="Delphi"/>
    449455      </Unit31>
    450456      <Unit32>
     
    454460        <CursorPos X="29" Y="950"/>
    455461        <UsageCount Value="31"/>
     462        <DefaultSyntaxHighlighter Value="Delphi"/>
    456463      </Unit32>
    457464      <Unit33>
     
    470477        <CursorPos X="14" Y="510"/>
    471478        <UsageCount Value="29"/>
     479        <DefaultSyntaxHighlighter Value="Delphi"/>
    472480      </Unit34>
    473481      <Unit35>
    474482        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
    475483        <UnitName Value="USqlDatabase"/>
    476         <IsVisibleTab Value="True"/>
    477         <EditorIndex Value="4"/>
    478         <WindowIndex Value="0"/>
    479         <TopLine Value="177"/>
    480         <CursorPos X="63" Y="198"/>
     484        <EditorIndex Value="11"/>
     485        <WindowIndex Value="0"/>
     486        <TopLine Value="233"/>
     487        <CursorPos X="80" Y="254"/>
    481488        <UsageCount Value="18"/>
    482489        <Loaded Value="True"/>
     
    490497        <EditorIndex Value="15"/>
    491498        <WindowIndex Value="0"/>
    492         <TopLine Value="1"/>
    493         <CursorPos X="52" Y="23"/>
    494         <UsageCount Value="39"/>
     499        <TopLine Value="167"/>
     500        <CursorPos X="53" Y="187"/>
     501        <UsageCount Value="42"/>
    495502        <Loaded Value="True"/>
    496503        <LoadedDesigner Value="True"/>
     
    503510        <TopLine Value="1"/>
    504511        <CursorPos X="24" Y="4"/>
    505         <UsageCount Value="16"/>
     512        <UsageCount Value="17"/>
    506513        <Loaded Value="True"/>
    507514      </Unit37>
     
    513520        <CursorPos X="14" Y="81"/>
    514521        <UsageCount Value="11"/>
     522        <DefaultSyntaxHighlighter Value="Delphi"/>
    515523      </Unit38>
    516524      <Unit39>
     
    520528        <CursorPos X="3" Y="245"/>
    521529        <UsageCount Value="11"/>
     530        <DefaultSyntaxHighlighter Value="Delphi"/>
    522531      </Unit39>
    523532      <Unit40>
     
    527536        <CursorPos X="23" Y="112"/>
    528537        <UsageCount Value="8"/>
     538        <DefaultSyntaxHighlighter Value="Delphi"/>
    529539      </Unit40>
    530540      <Unit41>
     
    538548        <TopLine Value="4"/>
    539549        <CursorPos X="20" Y="19"/>
    540         <UsageCount Value="33"/>
     550        <UsageCount Value="36"/>
    541551        <DefaultSyntaxHighlighter Value="Delphi"/>
    542552      </Unit41>
     
    547557        <CursorPos X="1" Y="1589"/>
    548558        <UsageCount Value="11"/>
     559        <DefaultSyntaxHighlighter Value="Delphi"/>
    549560      </Unit42>
    550561      <Unit43>
     
    558569        <Filename Value="../../PascalClassLibrary/Common/UDebugLog.pas"/>
    559570        <UnitName Value="UDebugLog"/>
    560         <EditorIndex Value="10"/>
    561571        <WindowIndex Value="0"/>
    562572        <TopLine Value="90"/>
    563573        <CursorPos X="3" Y="104"/>
    564574        <UsageCount Value="14"/>
    565         <Loaded Value="True"/>
    566575      </Unit44>
    567576      <Unit45>
     
    572581        <CursorPos X="10" Y="215"/>
    573582        <UsageCount Value="9"/>
     583        <DefaultSyntaxHighlighter Value="Delphi"/>
    574584      </Unit45>
    575585      <Unit46>
     
    577587        <IsPartOfProject Value="True"/>
    578588        <UnitName Value="UChronisClient"/>
    579         <EditorIndex Value="5"/>
    580         <WindowIndex Value="0"/>
    581         <TopLine Value="31"/>
    582         <CursorPos X="1" Y="68"/>
    583         <UsageCount Value="29"/>
     589        <EditorIndex Value="4"/>
     590        <WindowIndex Value="0"/>
     591        <TopLine Value="11"/>
     592        <CursorPos X="26" Y="40"/>
     593        <UsageCount Value="32"/>
    584594        <Loaded Value="True"/>
    585595        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    589599        <IsPartOfProject Value="True"/>
    590600        <UnitName Value="UChronisServer"/>
    591         <EditorIndex Value="6"/>
     601        <EditorIndex Value="5"/>
    592602        <WindowIndex Value="0"/>
    593603        <TopLine Value="1"/>
    594604        <CursorPos X="1" Y="14"/>
    595         <UsageCount Value="29"/>
     605        <UsageCount Value="32"/>
    596606        <Loaded Value="True"/>
    597607        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    601611        <IsPartOfProject Value="True"/>
    602612        <UnitName Value="UChronisClientDirect"/>
    603         <EditorIndex Value="7"/>
    604613        <WindowIndex Value="0"/>
    605614        <TopLine Value="8"/>
    606615        <CursorPos X="53" Y="32"/>
    607         <UsageCount Value="28"/>
    608         <Loaded Value="True"/>
     616        <UsageCount Value="31"/>
    609617        <DefaultSyntaxHighlighter Value="Delphi"/>
    610618      </Unit48>
     619      <Unit49>
     620        <Filename Value="Application/UChronisModule.pas"/>
     621        <IsPartOfProject Value="True"/>
     622        <UnitName Value="UChronisModule"/>
     623        <EditorIndex Value="9"/>
     624        <WindowIndex Value="0"/>
     625        <TopLine Value="1"/>
     626        <CursorPos X="5" Y="15"/>
     627        <UsageCount Value="22"/>
     628        <Loaded Value="True"/>
     629        <DefaultSyntaxHighlighter Value="Delphi"/>
     630      </Unit49>
     631      <Unit50>
     632        <Filename Value="Module/UModuleSystem.pas"/>
     633        <IsPartOfProject Value="True"/>
     634        <UnitName Value="UModuleSystem"/>
     635        <EditorIndex Value="10"/>
     636        <WindowIndex Value="0"/>
     637        <TopLine Value="138"/>
     638        <CursorPos X="20" Y="164"/>
     639        <UsageCount Value="22"/>
     640        <Loaded Value="True"/>
     641        <DefaultSyntaxHighlighter Value="Delphi"/>
     642      </Unit50>
     643      <Unit51>
     644        <Filename Value="../../../other/lazarus/lcl/include/customlistbox.inc"/>
     645        <EditorIndex Value="12"/>
     646        <WindowIndex Value="0"/>
     647        <TopLine Value="195"/>
     648        <CursorPos X="40" Y="213"/>
     649        <UsageCount Value="10"/>
     650        <Loaded Value="True"/>
     651      </Unit51>
    611652    </Units>
    612653    <JumpHistory Count="30" HistoryIndex="29">
    613654      <Position1>
    614655        <Filename Value="USystem.pas"/>
    615         <Caret Line="628" Column="3" TopLine="626"/>
     656        <Caret Line="641" Column="1" TopLine="633"/>
    616657      </Position1>
    617658      <Position2>
    618659        <Filename Value="USystem.pas"/>
    619         <Caret Line="134" Column="17" TopLine="120"/>
     660        <Caret Line="642" Column="1" TopLine="633"/>
    620661      </Position2>
    621662      <Position3>
    622663        <Filename Value="USystem.pas"/>
    623         <Caret Line="633" Column="3" TopLine="631"/>
     664        <Caret Line="643" Column="1" TopLine="633"/>
    624665      </Position3>
    625666      <Position4>
    626667        <Filename Value="USystem.pas"/>
    627         <Caret Line="133" Column="16" TopLine="121"/>
     668        <Caret Line="644" Column="1" TopLine="633"/>
    628669      </Position4>
    629670      <Position5>
    630671        <Filename Value="USystem.pas"/>
    631         <Caret Line="629" Column="16" TopLine="626"/>
     672        <Caret Line="645" Column="1" TopLine="633"/>
    632673      </Position5>
    633674      <Position6>
    634675        <Filename Value="USystem.pas"/>
    635         <Caret Line="133" Column="17" TopLine="120"/>
     676        <Caret Line="647" Column="1" TopLine="633"/>
    636677      </Position6>
    637678      <Position7>
    638679        <Filename Value="USystem.pas"/>
    639         <Caret Line="8" Column="61" TopLine="1"/>
     680        <Caret Line="649" Column="1" TopLine="633"/>
    640681      </Position7>
    641682      <Position8>
    642         <Filename Value="USystem.pas"/>
    643         <Caret Line="182" Column="24" TopLine="169"/>
     683        <Filename Value="Forms/UMainForm.pas"/>
     684        <Caret Line="305" Column="89" TopLine="286"/>
    644685      </Position8>
    645686      <Position9>
    646         <Filename Value="USystem.pas"/>
    647         <Caret Line="183" Column="20" TopLine="170"/>
     687        <Filename Value="Module/UModuleSystem.pas"/>
     688        <Caret Line="165" Column="38" TopLine="141"/>
    648689      </Position9>
    649690      <Position10>
    650         <Filename Value="USystem.pas"/>
    651         <Caret Line="195" Column="30" TopLine="182"/>
     691        <Filename Value="Module/UModuleSystem.pas"/>
     692        <Caret Line="145" Column="1" TopLine="138"/>
    652693      </Position10>
    653694      <Position11>
    654         <Filename Value="USystem.pas"/>
    655         <Caret Line="196" Column="25" TopLine="176"/>
     695        <Filename Value="Forms/UMainForm.pas"/>
     696        <Caret Line="304" Column="1" TopLine="286"/>
    656697      </Position11>
    657698      <Position12>
    658         <Filename Value="USystem.pas"/>
    659         <Caret Line="197" Column="29" TopLine="176"/>
     699        <Filename Value="Module/UModuleSystem.pas"/>
     700        <Caret Line="165" Column="17" TopLine="138"/>
    660701      </Position12>
    661702      <Position13>
    662         <Filename Value="Application/UChronisClient.pas"/>
    663         <Caret Line="56" Column="57" TopLine="26"/>
     703        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     704        <Caret Line="241" Column="3" TopLine="235"/>
    664705      </Position13>
    665706      <Position14>
    666         <Filename Value="Application/UChronisClient.pas"/>
    667         <Caret Line="28" Column="32" TopLine="1"/>
     707        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     708        <Caret Line="240" Column="1" TopLine="233"/>
    668709      </Position14>
    669710      <Position15>
    670         <Filename Value="Application/UChronisClient.pas"/>
    671         <Caret Line="40" Column="7" TopLine="19"/>
     711        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     712        <Caret Line="241" Column="1" TopLine="233"/>
    672713      </Position15>
    673714      <Position16>
    674         <Filename Value="Application/UChronisClient.pas"/>
    675         <Caret Line="67" Column="1" TopLine="45"/>
     715        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     716        <Caret Line="242" Column="1" TopLine="233"/>
    676717      </Position16>
    677718      <Position17>
    678         <Filename Value="USystem.pas"/>
    679         <Caret Line="197" Column="29" TopLine="176"/>
     719        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     720        <Caret Line="243" Column="1" TopLine="233"/>
    680721      </Position17>
    681722      <Position18>
    682         <Filename Value="USystem.pas"/>
    683         <Caret Line="196" Column="9" TopLine="185"/>
     723        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     724        <Caret Line="244" Column="1" TopLine="233"/>
    684725      </Position18>
    685726      <Position19>
    686         <Filename Value="USystem.pas"/>
    687         <Caret Line="106" Column="28" TopLine="78"/>
     727        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     728        <Caret Line="245" Column="1" TopLine="233"/>
    688729      </Position19>
    689730      <Position20>
    690         <Filename Value="USystem.pas"/>
    691         <Caret Line="205" Column="44" TopLine="187"/>
     731        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     732        <Caret Line="249" Column="1" TopLine="233"/>
    692733      </Position20>
    693734      <Position21>
    694         <Filename Value="USystem.pas"/>
    695         <Caret Line="107" Column="1" TopLine="73"/>
     735        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     736        <Caret Line="250" Column="1" TopLine="233"/>
    696737      </Position21>
    697738      <Position22>
    698         <Filename Value="USystem.pas"/>
    699         <Caret Line="8" Column="75" TopLine="1"/>
     739        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     740        <Caret Line="263" Column="1" TopLine="234"/>
    700741      </Position22>
    701742      <Position23>
    702         <Filename Value="USystem.pas"/>
    703         <Caret Line="197" Column="33" TopLine="179"/>
     743        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     744        <Caret Line="264" Column="1" TopLine="235"/>
    704745      </Position23>
    705746      <Position24>
    706         <Filename Value="USystem.pas"/>
    707         <Caret Line="184" Column="18" TopLine="165"/>
     747        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     748        <Caret Line="201" Column="1" TopLine="183"/>
    708749      </Position24>
    709750      <Position25>
    710         <Filename Value="USystem.pas"/>
    711         <Caret Line="196" Column="28" TopLine="178"/>
     751        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     752        <Caret Line="240" Column="1" TopLine="222"/>
    712753      </Position25>
    713754      <Position26>
    714         <Filename Value="Application/UChronisClientDirect.pas"/>
    715         <Caret Line="16" Column="7" TopLine="1"/>
     755        <Filename Value="Module/UModuleSystem.pas"/>
     756        <Caret Line="165" Column="16" TopLine="138"/>
    716757      </Position26>
    717758      <Position27>
    718         <Filename Value="Forms/ULoginProfileForm.pas"/>
    719         <Caret Line="23" Column="52" TopLine="1"/>
     759        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     760        <Caret Line="241" Column="3" TopLine="235"/>
    720761      </Position27>
    721762      <Position28>
    722         <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
    723         <Caret Line="187" Column="73" TopLine="177"/>
     763        <Filename Value="USystem.pas"/>
     764        <Caret Line="248" Column="51" TopLine="242"/>
    724765      </Position28>
    725766      <Position29>
    726         <Filename Value="Forms/ULoginForm.pas"/>
    727         <Caret Line="28" Column="66" TopLine="14"/>
     767        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     768        <Caret Line="254" Column="80" TopLine="233"/>
    728769      </Position29>
    729770      <Position30>
    730         <Filename Value="Forms/UMainForm.pas"/>
    731         <Caret Line="663" Column="67" TopLine="643"/>
     771        <Filename Value="../../../other/lazarus/lcl/include/customlistbox.inc"/>
     772        <Caret Line="213" Column="40" TopLine="195"/>
    732773      </Position30>
    733774    </JumpHistory>
     
    741782      <IncludeFiles Value="$(ProjOutDir)"/>
    742783      <Libraries Value="/usr/lib/mysql/;/usr/lib64/mysql/"/>
    743       <OtherUnitFiles Value="Common;Forms;Application"/>
     784      <OtherUnitFiles Value="Common;Forms;Application;Module"/>
    744785      <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
    745786    </SearchPaths>
  • trunk/chronis.lpr

    r27 r29  
    1212  CoolWeb, USystem, UCore, UApplicationInfo, USettingForm, UDataTypes,
    1313  UImportStructureForm, UItemSelect, ULoginProfileForm, UAboutForm,
    14   UChronisClient, UChronisServer, UChronisClientDirect
     14  UChronisClient, UChronisServer, UChronisClientDirect, UChronisModule, UModuleSystem
    1515  { you can add units after this };
    1616
Note: See TracChangeset for help on using the changeset viewer.