Changeset 8


Ignore:
Timestamp:
Jan 23, 2015, 12:00:37 AM (10 years ago)
Author:
chronos
Message:
  • Modified: All data types have own table which is used to specify supported data types by database engines.
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/DbEngines/UEngineXML.pas

    r7 r8  
    6464  I := 0;
    6565  while Assigned(Node2) and (Node2.NodeName = 'Value') and (I < Row.Values.Count) do begin
    66     case TField(Row.Parent.Fields[I]).FieldType of
     66    case TField(Row.Parent.Fields[I]).DataType.FieldType of
    6767      ftString: TValueString(Row.Values[I]).Value := Node2.TextContent;
    6868      ftInteger: TValueInteger(Row.Values[I]).Value := StrToInt(Node2.TextContent);
     
    8484    NewNode := Node.OwnerDocument.CreateElement('Value');
    8585    Node.AppendChild(NewNode);
    86     case TField(Row.Parent.Fields[I]).FieldType of
     86    case TField(Row.Parent.Fields[I]).DataType.FieldType of
    8787      ftString: NewNode.TextContent := TValueString(Row.Values[I]).Value;
    8888      ftInteger: NewNode.TextContent := IntToStr(TValueInteger(Row.Values[I]).Value);
     
    125125begin
    126126  Field.Name := ReadString(Node, 'Name', '');
    127   Field.FieldType := TFieldType(ReadInteger(Node, 'Type', 0));
     127  Field.DataType := Field.Table.Database.Engine.DataTypes.FindByType(TFieldType(ReadInteger(Node, 'Type', 0)));
    128128  Field.TextBefore := ReadString(Node, 'TextBefore', '');
    129129  Field.TextAfter := ReadString(Node, 'TextAfter', '');
     
    133133begin
    134134  WriteString(Node, 'Name', Field.Name);
    135   WriteInteger(Node, 'Type', Integer(Field.FieldType));
     135  WriteInteger(Node, 'Type', Integer(Field.DataType.FieldType));
    136136  WriteString(Node, 'TextBefore', Field.TextBefore);
    137137  WriteString(Node, 'TextAfter', Field.TextAfter);
     
    147147  while Assigned(Node2) and (Node2.NodeName = 'Field') do begin
    148148    NewField := TField.Create;
     149    NewField.Table := Fields.Table;
    149150    LoadNodeField(NewField, Node2);
    150151    Fields.Add(NewField);
     
    206207  while Assigned(Node2) and (Node2.NodeName = 'Table') do begin
    207208    NewTable := TTable.Create;
     209    NewTable.Database := Tables.Database;
    208210    LoadNodeTable(NewTable, Node2);
    209211    Tables.Add(NewTable);
  • trunk/Forms/UFormField.lfm

    r5 r8  
    1010  OnShow = FormShow
    1111  Position = poMainFormCenter
    12   LCLVersion = '1.3'
     12  LCLVersion = '1.5'
    1313  object EditName: TEdit
    1414    Left = 168
  • trunk/Forms/UFormField.pas

    r5 r8  
    6060
    6161uses
    62   UDataTypes;
     62  UDataTypes, UCore;
    6363
    6464{$R *.lfm}
     
    7171
    7272procedure TFormField.FormCreate(Sender: TObject);
    73 var
    74   I: TFieldType;
    7573begin
    76   ComboBoxType.Items.Clear;
    77   for I := Low(TFieldType) to High(TFieldType) do
    78     ComboBoxType.Items.Add(FieldTypeString[I]);
    7974end;
    8075
     
    8580
    8681procedure TFormField.Load(Field: TField);
     82var
     83  I: Integer;
     84  SelectedItem: TDataType;
    8785begin
     86  if ComboBoxType.ItemIndex <> -1 then
     87    SelectedItem := TDataType(ComboBoxType.Items.Objects[ComboBoxType.ItemIndex])
     88    else SelectedItem := nil;
     89
     90  with Field.Table.Database.Engine.DataTypes do begin
     91    while ComboBoxType.Items.Count > Count do
     92      ComboBoxType.Items.Delete(ComboBoxType.Items.Count - 1);
     93    while ComboBoxType.Items.Count < Count do
     94      ComboBoxType.Items.Add('');
     95    for I := 0 to Count - 1 do begin
     96      ComboBoxType.Items.Strings[I] := TDataType(Items[I]).Name;
     97      ComboBoxType.Items.Objects[I] := Items[I];
     98    end;
     99    if Assigned(SelectedItem) then
     100      ComboBoxType.ItemIndex := ComboBoxType.Items.IndexOfObject(SelectedItem);
     101  end;
     102
    88103  EditName.Text := Field.Name;
    89104  EditTextAfter.Text := Field.TextAfter;
    90105  EditTextBefore.Text := Field.TextBefore;
    91   ComboBoxType.ItemIndex := Integer(Field.FieldType);
     106  ComboBoxType.ItemIndex := ComboBoxType.Items.IndexOfObject(Field.DataType);
    92107  ComboBoxTypeChange(Self);
    93   if Field.FieldType = ftString then
    94     EditStringDefault.Text := TFieldString(Field.TypeRelated).DefaultValue;
    95   if Field.FieldType = ftDateTime then begin
    96     DateEditMin.Date := TFieldDateTime(Field.TypeRelated).Min;
    97     DateEditMax.Date := TFieldDateTime(Field.TypeRelated).Max;
    98   end;
    99   if Field.FieldType = ftInteger then begin
    100     SpinEditMin.Value := TFieldInteger(Field.TypeRelated).Min;
    101     SpinEditMax.Value := TFieldInteger(Field.TypeRelated).Max;
    102   end;
    103   if Field.FieldType = ftFloat then begin
    104     FloatSpinEditMin.Value := TFieldFloat(Field.TypeRelated).Min;
    105     FloatSpinEditMax.Value := TFieldFloat(Field.TypeRelated).Max;
     108  case Field.DataType.FieldType of
     109    ftString: begin
     110      EditStringDefault.Text := TFieldString(Field.TypeRelated).DefaultValue;
     111    end;
     112    ftDateTime: begin
     113      DateEditMin.Date := TFieldDateTime(Field.TypeRelated).Min;
     114      DateEditMax.Date := TFieldDateTime(Field.TypeRelated).Max;
     115    end;
     116    ftInteger: begin
     117      SpinEditMin.Value := TFieldInteger(Field.TypeRelated).Min;
     118      SpinEditMax.Value := TFieldInteger(Field.TypeRelated).Max;
     119    end;
     120    ftFloat: begin
     121      FloatSpinEditMin.Value := TFieldFloat(Field.TypeRelated).Min;
     122      FloatSpinEditMax.Value := TFieldFloat(Field.TypeRelated).Max;
     123    end;
    106124  end;
    107125end;
     
    112130  Field.TextBefore := EditTextBefore.Text;
    113131  Field.TextAfter := EditTextAfter.Text;
    114   Field.FieldType := TFieldType(ComboBoxType.ItemIndex);
    115   if Field.FieldType = ftString then
    116     TFieldString(Field.TypeRelated).DefaultValue := EditStringDefault.Text;
    117   if Field.FieldType = ftDateTime then begin
    118     TFieldDateTime(Field.TypeRelated).Min := DateEditMin.Date;
    119     TFieldDateTime(Field.TypeRelated).Max := DateEditMax.Date;
    120   end;
    121   if Field.FieldType = ftInteger then begin
    122     TFieldInteger(Field.TypeRelated).Min := SpinEditMin.Value;
    123     TFieldInteger(Field.TypeRelated).Max := SpinEditMax.Value;
    124   end;
    125   if Field.FieldType = ftFloat then begin
    126     TFieldFloat(Field.TypeRelated).Min := FloatSpinEditMin.Value;
    127     TFieldFloat(Field.TypeRelated).Max := FloatSpinEditMax.Value;
     132  Field.DataType := TDataType(ComboBoxType.Items.Objects[ComboBoxType.ItemIndex]);
     133  case Field.DataType.FieldType of
     134    ftString: TFieldString(Field.TypeRelated).DefaultValue := EditStringDefault.Text;
     135    ftDateTime: begin
     136      TFieldDateTime(Field.TypeRelated).Min := DateEditMin.Date;
     137      TFieldDateTime(Field.TypeRelated).Max := DateEditMax.Date;
     138    end;
     139    ftInteger: begin
     140      TFieldInteger(Field.TypeRelated).Min := SpinEditMin.Value;
     141      TFieldInteger(Field.TypeRelated).Max := SpinEditMax.Value;
     142    end;
     143    ftFloat: begin
     144      TFieldFloat(Field.TypeRelated).Min := FloatSpinEditMin.Value;
     145      TFieldFloat(Field.TypeRelated).Max := FloatSpinEditMax.Value;
     146    end;
    128147  end;
    129148end;
  • trunk/Forms/UFormFields.lfm

    r5 r8  
    99  OnShow = FormShow
    1010  Position = poMainFormCenter
    11   LCLVersion = '1.3'
     11  LCLVersion = '1.5'
    1212  object ToolBar1: TToolBar
    1313    Left = 0
     
    121121    object MenuItem1: TMenuItem
    122122      Action = AAdd
     123      Bitmap.Data = {
     124        36100000424D3610000000000000360000002800000020000000200000000100
     125        2000000000000010000064000000640000000000000000000000FFFFFF00FFFF
     126        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     127        FF00DBDBDBFF949494FF707070FF707070FF707070FF707070FF707070FF7070
     128        70FF707070FF707070FF707070FF949494FFDBDBDBFFFFFFFF00FFFFFF00FFFF
     129        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     130        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     131        FF00005104FF005104FF005104FF005104FF005104FF005104FF005104FF0051
     132        04FF005104FF005104FF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     133        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     134        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     135        FF00005104FF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D0
     136        7FFF76D07FFF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     137        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     138        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     139        FF00005104FF76D07FFF09A514FF089F12FF069710FF06920EFF06920EFF0694
     140        0FFF079910FF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     141        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     142        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     143        FF00005104FF76D07FFF09A514FF089F12FF079910FF06940FFF06920EFF0692
     144        0EFF06940FFF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     145        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     146        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     147        FF00005104FF76D07FFF09A514FF09A514FF089F12FF079910FF06940FFF0692
     148        0EFF06920EFF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     149        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     150        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     151        FF00005104FF76D07FFF09A715FF09A514FF09A514FF089F12FF079910FF0694
     152        0FFF06920EFF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     153        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     154        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     155        FF00005104FF76D07FFF09A715FF09A514FF09A514FF09A514FF089F12FF0799
     156        10FF06940FFF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     157        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     158        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     159        FF00005104FF76D07FFF09A715FF09A715FF09A514FF09A514FF09A514FF089F
     160        12FF079910FF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     161        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F3F3F3FFDBDB
     162        DBFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCF
     163        CFFF005104FF76D07FFF09A715FF09A715FF09A715FF09A514FF09A514FF09A5
     164        14FF089F12FF76D07FFF005104FF646464FFABABABFFCFCFCFFFCFCFCFFFCFCF
     165        CFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFDBDBDBFFDBDBDBFF9494
     166        94FF707070FF707070FF707070FF707070FF707070FF707070FF707070FF7070
     167        70FF005104FF76D07FFF09A715FF09A715FF09A715FF09A715FF09A715FF09A5
     168        14FF09A514FF76D07FFF005104FF4C4C4CFF646464FF707070FF707070FF7070
     169        70FF707070FF707070FF707070FF707070FF707070FF949494FF005104FF0051
     170        04FF005104FF005104FF005104FF005104FF005104FF005104FF005104FF0051
     171        04FF005104FF76D07FFF09A715FF09A715FF09A715FF09A715FF09A715FF09A7
     172        15FF09A514FF76D07FFF005104FF005104FF005104FF005104FF005104FF0051
     173        04FF005104FF005104FF005104FF005104FF005104FF707070FF005104FF76D0
     174        7FFF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D0
     175        7FFF76D07FFF76D07FFF09A715FF09A715FF09A715FF09A715FF09A715FF09A7
     176        15FF09A715FF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D0
     177        7FFF76D07FFF76D07FFF76D07FFF76D07FFF005104FF707070FF005104FF76D0
     178        7FFF74CD7BFF6FCC76FF6ACA72FF66C86DFF4ABE52FF25B130FF09A715FF09A7
     179        15FF09A715FF09A715FF09A715FF09A715FF09A715FF09A715FF09A715FF09A7
     180        15FF09A715FF09A514FF09A514FF09A514FF089F12FF079910FF06940FFF0692
     181        0EFF06920EFF06940FFF069710FF76D07FFF005104FF707070FF005104FF76D0
     182        7FFF79CF7FFF74CD7BFF6FCC76FF6ACA72FF6ACA72FF50C159FF25B130FF09A7
     183        15FF09A715FF09A715FF09A715FF09A715FF09A715FF09A715FF09A715FF09A7
     184        15FF09A715FF09A715FF09A715FF09A514FF09A514FF089F12FF079910FF0694
     185        0FFF06940FFF06920EFF06940FFF76D07FFF005104FF707070FF005104FF76D0
     186        7FFF7ED184FF79CF7FFF74CD7BFF6FCC76FF6FCC76FF6ACA72FF5AC462FF32B5
     187        3CFF09A715FF09A715FF09A715FF09A715FF09A715FF09A715FF09A715FF09A7
     188        15FF09A715FF09A715FF09A715FF09A715FF09A514FF09A514FF089F12FF0799
     189        10FF069710FF06940FFF06920EFF76D07FFF005104FF707070FF005104FF76D0
     190        7FFF84D38AFF7ED184FF79CF7FFF74CD7BFF74CD7BFF6FCC76FF6ACA72FF66C8
     191        6DFF41BB4AFF25B130FF09A715FF09A715FF09A715FF09A715FF09A715FF09A7
     192        15FF09A715FF09A715FF09A715FF09A715FF09A715FF09A514FF09A514FF089F
     193        12FF089F12FF069710FF06940FFF76D07FFF005104FF707070FF005104FF76D0
     194        7FFF84D38AFF84D38AFF7ED184FF79CF7FFF79CF7FFF74CD7BFF6FCC76FF6ACA
     195        72FF6ACA72FF50C159FF32B53CFF09A715FF09A715FF09A715FF09A715FF09A7
     196        15FF09A715FF09A715FF09A715FF09A715FF09A715FF09A715FF09A514FF09A5
     197        14FF089F12FF089F12FF069710FF76D07FFF005104FF707070FF005104FF76D0
     198        7FFF8CD692FF84D38AFF84D38AFF7ED184FF7ED184FF79CF7FFF74CD7BFF6FCC
     199        76FF6FCC76FF6ACA72FF66C86DFF4ABE52FF25B130FF09A715FF09A715FF09A7
     200        15FF09A715FF09A715FF09A715FF09A715FF09A715FF09A715FF09A514FF09A5
     201        14FF09A514FF089F12FF089F12FF76D07FFF005104FF707070FF005104FF76D0
     202        7FFF90D795FF8CD692FF84D38AFF84D38AFF84D38AFF7ED184FF79CF7FFF74CD
     203        7BFF74CD7BFF6FCC76FF6ACA72FF66C86DFF66C86DFF41BB4AFF25B130FF09A7
     204        15FF09A715FF09A715FF09A715FF09A715FF09A715FF09A715FF09A715FF09A7
     205        15FF09A514FF09A514FF089F12FF76D07FFF005104FF707070FF005104FF76D0
     206        7FFF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D0
     207        7FFF76D07FFF76D07FFF6FCC76FF6ACA72FF6ACA72FF66C86DFF66C86DFF41BB
     208        4AFF25B130FF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D0
     209        7FFF76D07FFF76D07FFF76D07FFF76D07FFF005104FF949494FF005104FF0051
     210        04FF005104FF005104FF005104FF005104FF005104FF005104FF005104FF0051
     211        04FF005104FF76D07FFF74CD7BFF6FCC76FF6FCC76FF6ACA72FF66C86DFF66C8
     212        6DFF5AC462FF76D07FFF005104FF005104FF005104FF005104FF005104FF0051
     213        04FF005104FF005104FF005104FF005104FF005104FFDBDBDBFFFFFFFF00FFFF
     214        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     215        FF00005104FF76D07FFF79CF7FFF74CD7BFF74CD7BFF6FCC76FF6ACA72FF66C8
     216        6DFF66C86DFF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     217        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     218        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     219        FF00005104FF76D07FFF7ED184FF79CF7FFF79CF7FFF74CD7BFF6FCC76FF6ACA
     220        72FF6ACA72FF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     221        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     222        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     223        FF00005104FF76D07FFF84D38AFF7ED184FF7ED184FF79CF7FFF74CD7BFF6FCC
     224        76FF6FCC76FF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     225        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     226        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     227        FF00005104FF76D07FFF84D38AFF84D38AFF84D38AFF7ED184FF79CF7FFF74CD
     228        7BFF74CD7BFF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     229        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     230        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     231        FF00005104FF76D07FFF8CD692FF8CD692FF84D38AFF84D38AFF7ED184FF79CF
     232        7FFF79CF7FFF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     233        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     234        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     235        FF00005104FF76D07FFF90D795FF8CD692FF8CD692FF84D38AFF84D38AFF7ED1
     236        84FF7ED184FF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     237        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     238        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     239        FF00005104FF76D07FFF9BDBA0FF90D795FF90D795FF8CD692FF84D38AFF84D3
     240        8AFF7ED184FF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     241        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     242        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     243        FF00005104FF76D07FFF9BDBA0FF9BDBA0FF90D795FF90D795FF8CD692FF8CD6
     244        92FF84D38AFF76D07FFF005104FF707070FFCFCFCFFFFFFFFF00FFFFFF00FFFF
     245        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     246        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     247        FF00005104FF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D07FFF76D0
     248        7FFF76D07FFF76D07FFF005104FF949494FFDBDBDBFFFFFFFF00FFFFFF00FFFF
     249        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     250        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     251        FF00005104FF005104FF005104FF005104FF005104FF005104FF005104FF0051
     252        04FF005104FF005104FF005104FFDBDBDBFFF3F3F3FFFFFFFF00FFFFFF00FFFF
     253        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
     254      }
    123255    end
    124256    object MenuItem2: TMenuItem
    125257      Action = AModify
    126258      Default = True
     259      Bitmap.Data = {
     260        36100000424D3610000000000000360000002800000020000000200000000100
     261        2000000000000010000064000000640000000000000000000000FFFFFF00FFFF
     262        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     263        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     264        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     265        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     266        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     267        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     268        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     269        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     270        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     271        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     272        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     273        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     274        FF00BABABAFFCFCFCFFFF6F6F6FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     275        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     276        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     277        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     278        FF00BABABAFF415D77FF4D697FFFC0C7CCFFFFFFFF00FFFFFF00FFFFFF00FFFF
     279        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     280        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     281        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     282        FF00D8D8D8FF415D77FF597EAEFF5492E5FF69AAEDFFA3CEF5FFFFFFFF00FFFF
     283        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     284        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     285        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     286        FF00F6F6F6FF8EAAC2FF9BC1F3FFA8CAF6FF649CE8FF5492E5FF5094E6FF69AA
     287        EDFFC8E0F8FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     288        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     289        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     290        FF00FFFFFF00ECF5FDFF81B0EEFFC8E0F8FFBDD8FAFF81B0EEFF5492E5FF5492
     291        E5FF5094E6FF007DE7FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     292        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     293        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     294        FF00FFFFFF00FFFFFF00649CE8FFBDD8FAFFD6E8FEFFC8E0F8FF9BC1F3FF5094
     295        E6FF209BEDFF0489EBFF007DE7FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     296        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     297        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     298        FF00FFFFFF00FFFFFF007CB3EEFF9BC1F3FFD6E8FEFFD6E8FEFFC8E0F8FF71C9
     299        FAFF2CB1F7FF149CF1FF0489EBFF007DE7FFFFFFFF00FFFFFF00FFFFFF00FFFF
     300        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     301        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     302        FF00FFFFFF00FFFFFF00A3CEF5FF77A9ECFFC8E0F8FFD6E8FEFFBFE4FEFF5BD5
     303        FFFF45C5FCFF2CB1F7FF149CF1FF0489EBFF007DE7FFFFFFFF00FFFFFF00FFFF
     304        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     305        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     306        FF00FFFFFF00FFFFFF00E0EFFCFF5492E5FFBDD8FAFFC8E0F8FFA9E6FFFF79E1
     307        FFFF5BD5FFFF45C5FCFF2CB1F7FF149CF1FF0489EBFF007DE7FFFFFFFF00FFFF
     308        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     309        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     310        FF00FFFFFF00FFFFFF00FFFFFF00209BEDFF6DBCF4FF98DBFCFF9CE4FFFF94E4
     311        FFFF79E1FFFF5BD5FFFF45C5FCFF2CB1F7FF149CF1FF0489EBFF007DE7FFFFFF
     312        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     313        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     314        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00209BEDFF55B9F4FF87D7FBFF9CE4
     315        FFFF94E4FFFF79E1FFFF5BD5FFFF45C5FCFF2CB1F7FF149CF1FF0489EBFF007D
     316        E7FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     317        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     318        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00209BEDFF55B9F4FF87D7
     319        FBFF9CE4FFFF94E4FFFF79E1FFFF5BD5FFFF45C5FCFF2CB1F7FF149CF1FF0489
     320        EBFF007DE7FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     321        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     322        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00209BEDFF55B9
     323        F4FF87D7FBFF9CE4FFFF94E4FFFF79E1FFFF5BD5FFFF45C5FCFF2CB1F7FF149C
     324        F1FF0489EBFF007DE7FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     325        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     326        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00209B
     327        EDFF55B9F4FF87D7FBFF9CE4FFFF94E4FFFF79E1FFFF5BD5FFFF45C5FCFF2CB1
     328        F7FF149CF1FF0489EBFF007DE7FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     329        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     330        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     331        FF00209BEDFF55B9F4FF87D7FBFF9CE4FFFF94E4FFFF79E1FFFF5BD5FFFF45C5
     332        FCFF2CB1F7FF149CF1FF0489EBFF007DE7FFFFFFFF00FFFFFF00FFFFFF00FFFF
     333        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     334        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     335        FF00FFFFFF00209BEDFF55B9F4FF87D7FBFF9CE4FFFF94E4FFFF79E1FFFF5BD5
     336        FFFF45C5FCFF2CB1F7FF149CF1FF0489EBFF007DE7FFFFFFFF00FFFFFF00FFFF
     337        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     338        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     339        FF00FFFFFF00FFFFFF00209BEDFF55B9F4FF87D7FBFF9CE4FFFF94E4FFFF79E1
     340        FFFF5BD5FFFF45C5FCFF2CB1F7FF149CF1FF0489EBFF007DE7FFFFFFFF00FFFF
     341        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     342        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     343        FF00FFFFFF00FFFFFF00FFFFFF00209BEDFF55B9F4FF87D7FBFF9CE4FFFF94E4
     344        FFFF79E1FFFF5BD5FFFF45C5FCFF2CB1F7FF149CF1FF0489EBFF007DE7FFFFFF
     345        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     346        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     347        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00209BEDFF55B9F4FF87D7FBFF9CE4
     348        FFFF94E4FFFF79E1FFFF5BD5FFFF45C5FCFF2CB1F7FF149CF1FF611CDDFF5400
     349        D5FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     350        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     351        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00209BEDFF55B9F4FF87D7
     352        FBFF9CE4FFFF94E4FFFF79E1FFFF5BD5FFFF45C5FCFF8163F0FF7547E9FF611C
     353        DDFF5400D5FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     354        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     355        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00209BEDFF55B9
     356        F4FF87D7FBFF9CE4FFFF94E4FFFF79E1FFFF9185F9FF8A75F5FF8163F0FF7547
     357        E9FF611CDDFF5400D5FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     358        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     359        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00209B
     360        EDFF55B9F4FF87D7FBFF9CE4FFFF9998FFFF9691FDFF9185F9FF8A75F5FF8163
     361        F0FF7547E9FF611CDDFFD4BFF4FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     362        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     363        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     364        FF00209BEDFF55B9F4FF948CFBFF9998FFFF9998FFFF9691FDFF9185F9FF8A75
     365        F5FF8163F0FF7547E9FFD7C6F6FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     366        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     367        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     368        FF00FFFFFF007950EBFF8A75F5FF948CFBFF9998FFFF9998FFFF9691FDFF9185
     369        F9FF8A75F5FF8163F0FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     370        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     371        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     372        FF00FFFFFF00FFFFFF007950EBFF8A75F5FF948CFBFF9998FFFF9998FFFF9691
     373        FDFF9185F9FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     374        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     375        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     376        FF00FFFFFF00FFFFFF00FFFFFF007950EBFF8A75F5FF948CFBFF9998FFFF9998
     377        FFFFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     378        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     379        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     380        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF007950EBFF8A75F5FF948CFBFFFFFF
     381        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     382        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     383        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     384        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     385        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     386        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     387        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     388        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     389        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
     390      }
    127391    end
    128392    object MenuItem3: TMenuItem
    129393      Action = ARemove
     394      Bitmap.Data = {
     395        36100000424D3610000000000000360000002800000020000000200000000100
     396        2000000000000010000064000000640000000000000000000000FFFFFF00FFFF
     397        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     398        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     399        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     400        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     401        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     402        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     403        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     404        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     405        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     406        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     407        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     408        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     409        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     410        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     411        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     412        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     413        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     414        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     415        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     416        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     417        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     418        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     419        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     420        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     421        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     422        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     423        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     424        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     425        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     426        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     427        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     428        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     429        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     430        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     431        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     432        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     433        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     434        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     435        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     436        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     437        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     438        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     439        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     440        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00463C
     441        8BFF342C6AFF342C6AFF342C6AFF342C6AFF342C6AFF342C6AFF342C6AFF342C
     442        6AFF342C6AFF342C6AFF342C6AFF342C6AFF342C6AFF342C6AFF342C6AFF342C
     443        6AFF342C6AFF342C6AFF342C6AFF342C6AFF342C6AFF342C6AFF342C6AFF342C
     444        6AFF342C6AFF342C6AFF342C6AFF342C6AFF463C8BFFFFFFFF00FFFFFF003C34
     445        77FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4F
     446        B7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4F
     447        B7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4F
     448        B7FF5B4FB7FF5B4FB7FF5B4FB7FF5B4FB7FF3C3477FFFFFFFF00FFFFFF00433B
     449        84FF5D51C1FF2716ABFF2716ABFF2716ABFF2716ABFF2716ABFF2716ABFF2716
     450        ABFF2716ABFF2716ABFF2716ABFF2716ABFF2716ABFF2716ABFF2716ABFF2716
     451        ABFF2716ABFF2716ABFF2716ABFF2716ABFF2716ABFF2716ABFF2716ABFF2716
     452        ABFF2716ABFF2716ABFF2716ABFF5D51C1FF433B84FFFFFFFF00FFFFFF004B42
     453        92FF6052CCFF2A18BAFF2A18BAFF2A18BAFF2A18BAFF2A18BAFF2A18BAFF2A18
     454        BAFF2A18BAFF2A18BAFF2A18BAFF2A18BAFF2A18BAFF2A18BAFF2A18BAFF2A18
     455        BAFF2A18BAFF2A18BAFF2A18BAFF2A18BAFF2A18BAFF2A18BAFF2A18BAFF2A18
     456        BAFF2A18BAFF2A18BAFF2A18BAFF6052CCFF4B4292FFFFFFFF00FFFFFF00544A
     457        A0FF6455D6FF3623CBFF3623CBFF3623CBFF3623CBFF3623CBFF3623CBFF3623
     458        CBFF3623CBFF3623CBFF3623CBFF3623CBFF3623CBFF3623CBFF3623CBFF3623
     459        CBFF3623CBFF3623CBFF3623CBFF3623CBFF3623CBFF3623CBFF3623CBFF3623
     460        CBFF3623CBFF3623CBFF3623CBFF6455D6FF544AA0FFFFFFFF00FFFFFF005D51
     461        AFFF6C5DE3FF503EDEFF503EDEFF503EDEFF503EDEFF503EDEFF503EDEFF503E
     462        DEFF503EDEFF503EDEFF503EDEFF503EDEFF503EDEFF503EDEFF503EDEFF503E
     463        DEFF503EDEFF503EDEFF503EDEFF503EDEFF503EDEFF503EDEFF503EDEFF503E
     464        DEFF503EDEFF503EDEFF4937DCFF6C5DE3FF5D51AFFFFFFFFF00FFFFFF006357
     465        B8FF7364EAFF6251E7FF6757E8FF6757E8FF6757E8FF6757E8FF6757E8FF6757
     466        E8FF6757E8FF6757E8FF6757E8FF6757E8FF6757E8FF6757E8FF6757E8FF6757
     467        E8FF6757E8FF6757E8FF6757E8FF6757E8FF6757E8FF6757E8FF6757E8FF6757
     468        E8FF6757E8FF6757E8FF5C4AE6FF7364EAFF6357B8FFFFFFFF00FFFFFF006357
     469        B8FF7869EAFF7364EAFF7D6FEBFF7D6FEBFF7D6FEBFF7D6FEBFF7D6FEBFF7D6F
     470        EBFF7D6FEBFF7D6FEBFF7D6FEBFF7D6FEBFF7D6FEBFF7D6FEBFF7D6FEBFF7D6F
     471        EBFF7D6FEBFF7D6FEBFF7D6FEBFF7D6FEBFF7D6FEBFF7D6FEBFF7D6FEBFF7D6F
     472        EBFF7D6FEBFF7869EAFF6757E8FF7869EAFF6357B8FFFFFFFF00FFFFFF006357
     473        B8FF7D6FEBFF8174ECFF8D81EEFF9387EFFF9387EFFF9387EFFF9387EFFF9387
     474        EFFF9387EFFF9387EFFF9387EFFF9387EFFF9387EFFF9387EFFF9387EFFF9387
     475        EFFF9387EFFF9387EFFF9387EFFF9387EFFF9387EFFF9387EFFF9387EFFF9387
     476        EFFF9387EFFF8D81EEFF7869EAFF7869EAFF6357B8FFFFFFFF00FFFFFF006E62
     477        C3FF7A6CE3FF897EE6FF9186E7FF9186E7FF9186E7FF9186E7FF9186E7FF9186
     478        E7FF9186E7FF9186E7FF9186E7FF9186E7FF9186E7FF9186E7FF9186E7FF9186
     479        E7FF9186E7FF9186E7FF9186E7FF9186E7FF9186E7FF9186E7FF9186E7FF9186
     480        E7FF9186E7FF897EE6FF867AE6FF7A6CE3FF6E62C3FFFFFFFF00FFFFFF007468
     481        CEFF6E62C3FF6E62C3FF6E62C3FF6E62C3FF6E62C3FF6E62C3FF6E62C3FF6E62
     482        C3FF6E62C3FF6E62C3FF6E62C3FF6E62C3FF6E62C3FF6E62C3FF6E62C3FF6E62
     483        C3FF6E62C3FF6E62C3FF6E62C3FF6E62C3FF6E62C3FF6E62C3FF6E62C3FF6E62
     484        C3FF6E62C3FF6E62C3FF6E62C3FF6E62C3FF7468CEFFFFFFFF00FFFFFF00FFFF
     485        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     486        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     487        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     488        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     489        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     490        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     491        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     492        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     493        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     494        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     495        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     496        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     497        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     498        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     499        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     500        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     501        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     502        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     503        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     504        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     505        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     506        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     507        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     508        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     509        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     510        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     511        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     512        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     513        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     514        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     515        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     516        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     517        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     518        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     519        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     520        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     521        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     522        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     523        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     524        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
     525      }
    130526    end
    131527  end
  • trunk/Forms/UFormFields.pas

    r4 r8  
    6363procedure TFormFields.FormShow(Sender: TObject);
    6464begin
     65  if not Assigned(Fields) then
     66    raise Exception.Create('Fields not set');
    6567  Caption := 'Table fields - ' + TableName;
    6668  UpdateInterface;
     
    7375begin
    7476  NewField := TField.Create;
     77  NewField.Table := Fields.Table;
    7578  NewField.Name := 'New field';
    7679  FormField.Load(NewField);
     
    117120  with TField(Fields[Item.Index]) do begin
    118121    Item.Caption := Name;
    119     Item.SubItems.Add(FieldTypeString[FieldType]);
     122    Item.SubItems.Add(DataType.Name);
    120123    Item.SubItems.Add(BoolToStr(Required));
    121124    Item.SubItems.Add(TextBefore);
  • trunk/Forms/UFormRecord.lfm

    r6 r8  
    1111  OnShow = FormShow
    1212  Position = poMainFormCenter
    13   LCLVersion = '1.3'
     13  LCLVersion = '1.5'
    1414  object Panel1: TPanel
    1515    Left = 4
  • trunk/Forms/UFormRecord.pas

    r5 r8  
    100100    NewLabel.Visible := True;
    101101    Labels.Add(NewLabel);
    102     case TField(Table.Fields[I]).FieldType of
     102    case TField(Table.Fields[I]).DataType.FieldType of
    103103      ftString: begin
    104104        NewControl := TEdit.Create(Panel1);
     
    160160begin
    161161  for I := 0 to Table.Fields.Count - 1 do begin
    162     case TField(Table.Fields[I]).FieldType of
     162    case TField(Table.Fields[I]).DataType.FieldType of
    163163      ftString: TValueString(Row.Values[I]).Value := TEdit(Controls[I]).Text;
    164164      ftInteger: TValueInteger(Row.Values[I]).Value := TSpinEdit(Controls[I]).Value;
  • trunk/Forms/UFormTables.pas

    r6 r8  
    9494  NewTable := TTable.Create;
    9595  NewTable.Name := 'New table';
     96  NewTable.Database := Database;
    9697  FormTable.Load(NewTable);
    9798  if FormTable.ShowModal = mrOk then begin
     
    137138    FormFields.TableName := OldTable.Caption;
    138139    FormFields.Fields := TFields.Create;
     140    FormFields.Fields.Table := OldTable;
    139141    FormFields.Fields.Assign(OldTable.Fields);
     142    for I := 0 to FormFields.Fields.Count - 1 do
     143      TField(FormFields.Fields[I]).Table := TField(OldTable.Fields[I]).Table;
    140144    if FormFields.ShowModal = mrOk then begin
    141145      // Inefficient way to update table data. Copy original columns to new records and
  • trunk/MyData.lpi

    r6 r8  
    168168        <IsPartOfProject Value="True"/>
    169169        <ComponentName Value="FormMain"/>
     170        <HasResources Value="True"/>
    170171        <ResourceBaseClass Value="Form"/>
    171172        <UnitName Value="UFormMain"/>
     
    175176        <IsPartOfProject Value="True"/>
    176177        <ComponentName Value="FormConnect"/>
     178        <HasResources Value="True"/>
    177179        <ResourceBaseClass Value="Form"/>
    178180        <UnitName Value="UFormConnect"/>
     
    182184        <IsPartOfProject Value="True"/>
    183185        <ComponentName Value="FormDatabases"/>
     186        <HasResources Value="True"/>
    184187        <ResourceBaseClass Value="Form"/>
    185188        <UnitName Value="UFormDatabases"/>
  • trunk/UCore.pas

    r7 r8  
    2424    Initialized: Boolean;
    2525    procedure InitEngines;
     26    procedure InitDataTypes;
    2627  public
    2728    Databases: TDatabases;
    2829    Engines: TDatabaseEngines;
     30    DataTypes: TDataTypes;
    2931    procedure LoadConfig;
    3032    procedure SaveConfig;
     
    3941
    4042uses
    41   UEngineXML, UEngineMySQL, UEngineSQLite, UFormTables, UFormConnect, UFormDatabases;
     43  UEngineXML, UEngineMySQL, UEngineSQLite, UFormTables, UFormConnect,
     44  UFormDatabases, UDataTypes;
    4245
    4346{$R *.lfm}
     
    4952  Databases := TDatabases.Create;
    5053  Engines := TDatabaseEngines.Create;
     54  DataTypes := TDataTypes.Create;
    5155end;
    5256
     
    5862procedure TCore.DataModuleDestroy(Sender: TObject);
    5963begin
     64  DataTypes.Free;
    6065  Engines.Free;
    6166  Databases.Free;
     
    6772begin
    6873  Engines.Clear;
    69 
    7074  NewEngine := Engines.RegisterEngine('XML file', TDatabaseXML);
    71   with NewEngine.DataTypes do begin
    72     RegisterType('String', ftString);
    73     RegisterType('Integer', ftInteger);
    74     RegisterType('Date and time', ftDateTime);
    75     RegisterType('Boolean', ftBoolean);
    76     RegisterType('Float', ftFloat);
    77   end;
     75  NewEngine.UseTypes(DataTypes, [ftString, ftInteger, ftDateTime, ftBoolean, ftFloat]);
    7876
    7977  NewEngine := Engines.RegisterEngine('MySQL', TDatabaseMySQL);
    80   with NewEngine.DataTypes do begin
    81     RegisterType('String', ftString);
    82     RegisterType('Integer', ftInteger);
    83     RegisterType('Date and time', ftDateTime);
    84     RegisterType('Boolean', ftBoolean);
    85     RegisterType('Float', ftFloat);
    86   end;
     78  NewEngine.UseTypes(DataTypes, [ftString, ftInteger, ftDateTime, ftBoolean, ftFloat]);
    8779
    8880  NewEngine := Engines.RegisterEngine('SQLite', TDatabaseSQLite);
    89   with NewEngine.DataTypes do begin
    90     RegisterType('String', ftString);
    91     RegisterType('Integer', ftInteger);
    92     RegisterType('Date and time', ftDateTime);
    93     RegisterType('Boolean', ftBoolean);
    94     RegisterType('Float', ftFloat);
     81  NewEngine.UseTypes(DataTypes, [ftString, ftInteger, ftDateTime, ftBoolean, ftFloat]);
     82end;
     83
     84procedure TCore.InitDataTypes;
     85begin
     86  DataTypes.Clear;
     87  with DataTypes do begin
     88    RegisterType('String', ftString, TFieldString);
     89    RegisterType('Integer', ftInteger, TFieldInteger);
     90    RegisterType('Date and time', ftDateTime, TFieldDateTime);
     91    RegisterType('Boolean', ftBoolean, TFieldBoolean);
     92    RegisterType('Float', ftFloat, TFieldFloat);
     93    RegisterType('MapPosition', ftMapPosition, TFieldMapPosition);
     94    RegisterType('Date', ftDate, TFieldDate);
     95    RegisterType('Time', ftTime, TFieldTime);
     96    RegisterType('Image', ftImage, TFieldImage);
    9597  end;
    9698end;
     
    130132begin
    131133  if not Initialized then begin
     134    InitDataTypes;
    132135    InitEngines;
    133136    FormConnect.Init;
  • trunk/UDataTypes.pas

    r6 r8  
    112112  end;
    113113
    114 const
    115   FieldTypeString: array[TFieldType] of string = ('String', 'Numeric', 'DateTime',
    116     'Boolean', 'Float', 'Image', 'Date', 'Time', 'MapPosition');
    117   FieldTypeClass: array[TFieldType] of TFieldTypeSpecificClass = (TFieldString,
    118     TFieldInteger, TFieldDateTime, TFieldBoolean, TFieldFloat, TFieldImage,
    119     TFieldDate, TFieldTime, TFieldMapPosition);
    120 
    121114
    122115implementation
  • trunk/UDatabase.pas

    r7 r8  
    1212  TDatabaseEngine = class;
    1313  TDatabaseClient = class;
     14  TDatabase = class;
     15  TDataType = class;
    1416
    1517  TFieldType = (ftString, ftInteger, ftDateTime, ftBoolean, ftFloat, ftImage,
    16     ftDate, tfTime, ftMapPosition);
     18    ftDate, ftTime, ftMapPosition);
    1719
    1820  { TValue }
     
    4446  TField = class
    4547  private
    46     FFieldType: TFieldType;
    47     procedure SetFieldType(AValue: TFieldType);
     48    FDataType: TDataType;
     49    procedure SetDataType(AValue: TDataType);
    4850  public
    4951    Name: string;
     
    5759    Pos: TPoint;
    5860    Size: TPoint;
     61    Table: TTable;
    5962    procedure Assign(Source: TField);
    6063    function GetValueClass: TValueClass;
    61     property FieldType: TFieldType read FFieldType write SetFieldType;
     64    property DataType: TDataType read FDataType write SetDataType;
    6265    constructor Create;
    6366  end;
     
    6669
    6770  TFields = class(TObjectList)
     71    Table: TTable;
    6872    function FindByName(Name: string): TField;
    6973    procedure Assign(Source: TFields);
     
    9498    Records: TRecords;
    9599    Fields: TFields;
     100    Database: TDatabase;
    96101    procedure Assign(Source: TTable);
    97102    constructor Create;
     
    100105
    101106  TTables = class(TObjectList)
    102 
     107    Database: TDatabase;
    103108  end;
    104109
     
    134139    Name: string;
    135140    FieldType: TFieldType;
    136   end;
     141    FieldTypeClass: TFieldTypeSpecificClass;
     142  end;
     143
     144  { TDataTypes }
    137145
    138146  TDataTypes = class(TObjectList)
    139     function RegisterType(Name: string; FieldType: TFieldType): TDataType;
     147    function RegisterType(Name: string; FieldType: TFieldType; FieldTypeClass: TFieldTypeSpecificClass): TDataType;
     148    function FindByType(FieldType: TFieldType): TDataType;
    140149  end;
    141150
     
    150159  TDatabaseClientClass = class of TDatabaseClient;
    151160
     161  TFieldTypeSet = set of TFieldType;
     162
    152163  { TDatabaseEngine }
    153164
     
    156167    DataTypes: TDataTypes;
    157168    DatabaseClientClass: TDatabaseClientClass;
     169    procedure UseTypes(ADataTypes: TDataTypes; Types: TFieldTypeSet);
    158170    constructor Create;
    159171    destructor Destroy; override;
     
    208220{ TDataTypes }
    209221
    210 function TDataTypes.RegisterType(Name: string; FieldType: TFieldType): TDataType;
     222function TDataTypes.RegisterType(Name: string; FieldType: TFieldType;
     223  FieldTypeClass: TFieldTypeSpecificClass): TDataType;
    211224begin
    212225  Result := TDataType.Create;
    213226  Result.Name := Name;
    214227  Result.FieldType := FieldType;
     228  Result.FieldTypeClass := FieldTypeClass;
    215229  Add(Result);
    216230end;
    217231
     232function TDataTypes.FindByType(FieldType: TFieldType): TDataType;
     233var
     234  I: Integer;
     235begin
     236  I := 0;
     237  while (I < Count) and (TDataType(Items[I]).FieldType <> FieldType) do Inc(I);
     238  if I < Count then Result := TDataType(Items[I])
     239    else Result := nil;
     240end;
     241
    218242{ TDatabaseEngine }
    219243
     244procedure TDatabaseEngine.UseTypes(ADataTypes: TDataTypes; Types: TFieldTypeSet);
     245var
     246  I: TFieldType;
     247begin
     248  DataTypes.Clear;
     249  for I := Low(TFieldType) to High(TFieldType) do
     250    if I in Types then DataTypes.Add(ADataTypes.FindByType(I));
     251end;
     252
    220253constructor TDatabaseEngine.Create;
    221254begin
    222255  DataTypes := TDataTypes.Create;
     256  DataTypes.OwnsObjects := False;
    223257end;
    224258
     
    335369{ TField }
    336370
    337 procedure TField.SetFieldType(AValue: TFieldType);
    338 begin
    339   if FFieldType = AValue then Exit;
     371procedure TField.SetDataType(AValue: TDataType);
     372begin
     373  if FDataType = AValue then Exit;
    340374  if Assigned(TypeRelated) then TypeRelated.Free;
    341   FFieldType := AValue;
    342   TypeRelated := FieldTypeClass[FFieldType].Create;
     375  FDataType := AValue;
     376  if Assigned(AValue) then
     377    TypeRelated := AValue.FieldTypeClass.Create
     378    else TypeRelated := nil;
    343379end;
    344380
     
    346382begin
    347383  Name := Source.Name;
    348   FieldType := Source.FieldType;
     384  DataType := Source.DataType;
    349385  TextAfter := Source.TextAfter;
    350386  TextBefore := Source.TextBefore;
     
    382418  Records.Parent := Self;
    383419  Fields := TFields.Create;
     420  Fields.Table := Self;
    384421end;
    385422
     
    408445begin
    409446  Tables := TTables.Create;
     447  Tables.Database := Self;
    410448  Engine := nil;
    411449end;
Note: See TracChangeset for help on using the changeset viewer.