Changeset 89 for trunk/Forms


Ignore:
Timestamp:
Aug 9, 2016, 10:53:36 PM (8 years ago)
Author:
chronos
Message:
  • Added: Show from which imports acronym meanings comes from.

This would easy correcting wrong acronyms directly in source.

  • Modified: References to categories stored more efficiently in XML project file.
Location:
trunk/Forms
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormAbout.lfm

    r76 r89  
    1313  object LabelAppName: TLabel
    1414    Left = 20
    15     Height = 54
     15    Height = 55
    1616    Top = 20
    1717    Width = 433
     
    2525  object LabelDescription: TLabel
    2626    Left = 20
    27     Height = 40
    28     Top = 94
     27    Height = 48
     28    Top = 95
    2929    Width = 433
    3030    Align = alTop
     
    3535  end
    3636  object ButtonClose: TButton
    37     Left = 378
     37    Left = 360
    3838    Height = 25
    3939    Top = 357
    40     Width = 75
     40    Width = 93
    4141    Anchors = [akRight, akBottom]
    4242    Caption = 'Close'
     
    4646  object LabelContent: TLabel
    4747    Left = 20
    48     Height = 20
    49     Top = 154
     48    Height = 24
     49    Top = 163
    5050    Width = 433
    5151    Align = alTop
     
    5858    Height = 25
    5959    Top = 357
    60     Width = 139
     60    Width = 176
    6161    Anchors = [akLeft, akBottom]
    6262    Caption = 'Home page'
  • trunk/Forms/UFormAcronym.lfm

    r85 r89  
    11object FormAcronym: TFormAcronym
    22  Left = 845
    3   Height = 448
     3  Height = 595
    44  Top = 528
    5   Width = 509
     5  Width = 686
    66  Caption = 'Acronym'
    7   ClientHeight = 448
    8   ClientWidth = 509
     7  ClientHeight = 595
     8  ClientWidth = 686
    99  OnClose = FormClose
     10  OnCreate = FormCreate
    1011  OnShow = FormShow
    1112  Position = poScreenCenter
     
    1314  object Label1: TLabel
    1415    Left = 8
    15     Height = 20
     16    Height = 24
    1617    Top = 16
    17     Width = 43
     18    Width = 56
    1819    Caption = 'Name:'
    1920    ParentColor = False
    2021  end
    2122  object EditAcronym: TEdit
    22     Left = 136
    23     Height = 28
     23    Left = 153
     24    Height = 34
    2425    Top = 15
    25     Width = 361
     26    Width = 521
    2627    Anchors = [akTop, akLeft, akRight]
    2728    OnKeyPress = EditMeaningKeyPress
     
    3031  object Label2: TLabel
    3132    Left = 8
    32     Height = 20
     33    Height = 24
    3334    Top = 49
    34     Width = 61
     35    Width = 79
    3536    Caption = 'Meaning:'
    3637    ParentColor = False
    3738  end
    3839  object EditMeaning: TEdit
    39     Left = 136
    40     Height = 28
     40    Left = 153
     41    Height = 34
    4142    Top = 49
    42     Width = 361
     43    Width = 521
    4344    Anchors = [akTop, akLeft, akRight]
    4445    OnKeyPress = EditMeaningKeyPress
     
    4647  end
    4748  object ButtonOk: TButton
    48     Left = 409
    49     Height = 25
    50     Top = 408
     49    Left = 586
     50    Height = 25
     51    Top = 555
    5152    Width = 75
    5253    Anchors = [akRight, akBottom]
     
    5758  end
    5859  object ButtonCancel: TButton
    59     Left = 313
    60     Height = 25
    61     Top = 408
     60    Left = 490
     61    Height = 25
     62    Top = 555
    6263    Width = 75
    6364    Anchors = [akRight, akBottom]
     
    6970  object Label3: TLabel
    7071    Left = 8
    71     Height = 20
     72    Height = 24
    7273    Top = 88
    73     Width = 79
     74    Width = 103
    7475    Caption = 'Description:'
    7576    ParentColor = False
    7677  end
    7778  object MemoDescription: TMemo
    78     Left = 136
     79    Left = 153
    7980    Height = 114
    8081    Top = 88
    81     Width = 361
     82    Width = 521
    8283    Anchors = [akTop, akLeft, akRight]
    8384    OnKeyPress = EditMeaningKeyPress
     
    8788  object Label4: TLabel
    8889    Left = 12
    89     Height = 20
     90    Height = 24
    9091    Top = 208
    91     Width = 74
     92    Width = 96
    9293    Caption = 'Categories:'
    9394    ParentColor = False
    9495  end
    95   object ListBox1: TListBox
    96     Left = 136
     96  object ListBoxCategories: TListBox
     97    Left = 153
    9798    Height = 141
    9899    Top = 208
    99     Width = 360
     100    Width = 520
    100101    Anchors = [akTop, akLeft, akRight]
    101102    ItemHeight = 0
    102103    MultiSelect = True
    103104    OnKeyPress = EditMeaningKeyPress
    104     OnSelectionChange = ListBox1SelectionChange
     105    OnSelectionChange = ListBoxCategoriesSelectionChange
    105106    PopupMenu = PopupMenuCategory
    106     ScrollWidth = 358
     107    ScrollWidth = 518
    107108    TabOrder = 3
     109    TopIndex = -1
    108110  end
    109111  object Button1: TButton
    110     Left = 136
     112    Left = 153
    111113    Height = 25
    112114    Top = 360
    113     Width = 75
     115    Width = 87
    114116    Action = ACategoryAdd
    115117    OnKeyPress = EditMeaningKeyPress
     
    117119  end
    118120  object Button2: TButton
    119     Left = 232
     121    Left = 256
    120122    Height = 25
    121123    Top = 360
    122     Width = 75
     124    Width = 104
    123125    Action = ACategoryRemove
    124126    OnKeyPress = EditMeaningKeyPress
    125127    TabOrder = 5
     128  end
     129  object Label5: TLabel
     130    Left = 8
     131    Height = 24
     132    Top = 392
     133    Width = 131
     134    Caption = 'Imported from:'
     135    ParentColor = False
     136  end
     137  object ListBoxImportSources: TListBox
     138    Left = 153
     139    Height = 112
     140    Top = 392
     141    Width = 521
     142    Anchors = [akTop, akLeft, akRight]
     143    ItemHeight = 0
     144    MultiSelect = True
     145    OnKeyPress = EditMeaningKeyPress
     146    OnSelectionChange = ListBoxCategoriesSelectionChange
     147    ScrollWidth = 519
     148    TabOrder = 8
     149    TopIndex = -1
    126150  end
    127151  object ActionList1: TActionList
  • trunk/Forms/UFormAcronym.lrt

    r17 r89  
    66TFORMACRONYM.LABEL3.CAPTION=Description:
    77TFORMACRONYM.LABEL4.CAPTION=Categories:
     8TFORMACRONYM.LABEL5.CAPTION=Imported from:
    89TFORMACRONYM.ACATEGORYREMOVE.CAPTION=Remove
    910TFORMACRONYM.ACATEGORYADD.CAPTION=Add
  • trunk/Forms/UFormAcronym.pas

    r85 r89  
    2727    Label3: TLabel;
    2828    Label4: TLabel;
    29     ListBox1: TListBox;
     29    Label5: TLabel;
     30    ListBoxCategories: TListBox;
     31    ListBoxImportSources: TListBox;
    3032    MemoDescription: TMemo;
    3133    MenuItem1: TMenuItem;
     
    3638    procedure EditMeaningKeyPress(Sender: TObject; var Key: char);
    3739    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
     40    procedure FormCreate(Sender: TObject);
    3841    procedure FormShow(Sender: TObject);
    39     procedure ListBox1SelectionChange(Sender: TObject; User: boolean);
     42    procedure ListBoxCategoriesSelectionChange(Sender: TObject; User: boolean);
    4043  private
    4144    procedure UpdateInterface;
     
    6366end;
    6467
     68procedure TFormAcronym.FormCreate(Sender: TObject);
     69begin
     70
     71end;
     72
    6573procedure TFormAcronym.ACategoryAddExecute(Sender: TObject);
    6674var
    6775  I: Integer;
    6876begin
    69   FormCategorySelect.Load(ListBox1.Items);
     77  FormCategorySelect.Load(ListBoxCategories.Items);
    7078  if FormCategorySelect.ShowModal = mrOk then begin
    7179    for I := 0 to FormCategorySelect.ListBox1.Count - 1 do
    7280      if FormCategorySelect.ListBox1.Selected[I] then begin
    73         ListBox1.Items.AddObject(FormCategorySelect.ListBox1.Items[I], FormCategorySelect.ListBox1.Items.Objects[I]);
     81        ListBoxCategories.Items.AddObject(FormCategorySelect.ListBox1.Items[I], FormCategorySelect.ListBox1.Items.Objects[I]);
    7482      end;
    7583  end;
     
    8290  if MessageDlg(SRemoveCategory, SRemoveCategoryQuery,
    8391  TMsgDlgType.mtConfirmation, [mbCancel, mbOk], 0) = mrOk then begin
    84     for I := ListBox1.Items.Count - 1 downto 0 do
    85     if ListBox1.Selected[I] then
    86       ListBox1.Items.Delete(I);
     92    for I := ListBoxCategories.Items.Count - 1 downto 0 do
     93    if ListBoxCategories.Selected[I] then
     94      ListBoxCategories.Items.Delete(I);
    8795    UpdateInterface;
    8896  end;
     
    101109end;
    102110
    103 procedure TFormAcronym.ListBox1SelectionChange(Sender: TObject; User: boolean);
     111procedure TFormAcronym.ListBoxCategoriesSelectionChange(Sender: TObject; User: boolean);
    104112begin
    105113  UpdateInterface;
     
    108116procedure TFormAcronym.UpdateInterface;
    109117begin
    110   ACategoryRemove.Enabled := ListBox1.ItemIndex <> -1;
     118  ACategoryRemove.Enabled := ListBoxCategories.ItemIndex <> -1;
    111119end;
    112120
     
    116124  EditMeaning.Text := Entry.Meaning;
    117125  MemoDescription.Text := Entry.Description;
    118   ListBox1.Items.Assign(Entry.Categories);
     126  ListBoxCategories.Items.Assign(Entry.Categories);
     127  ListBoxImportSources.Items.Assign(Entry.Sources);
    119128end;
    120129
     
    124133  Entry.Meaning := EditMeaning.Text;
    125134  Entry.Description := MemoDescription.Text;
    126   Entry.Categories.Assign(ListBox1.Items);
     135  Entry.Categories.Assign(ListBoxCategories.Items);
    127136end;
    128137
  • trunk/Forms/UFormAcronyms.pas

    r86 r89  
    151151    TempEntry.Description := Description;
    152152    Categories.AssignToStrings(TempEntry.Categories);
     153    Sources.AssignToStrings(TempEntry.Sources);
    153154    TempCategories := TStringList.Create;
    154155    TempCategories.Assign(TempEntry.Categories);
  • trunk/Forms/UFormCategories.pas

    r86 r89  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   StdCtrls, ActnList, Menus, UAcronym;
     9  ActnList, Menus, UAcronym;
    1010
    1111type
  • trunk/Forms/UFormImportSource.pas

    r86 r89  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ActnList, Menus, ExtCtrls, MaskEdit, UAcronym, LCLIntf;
     9  ActnList, Menus, ExtCtrls, UAcronym, LCLIntf;
    1010
    1111type
Note: See TracChangeset for help on using the changeset viewer.