Changeset 28 for trunk/Forms
- Timestamp:
- Jul 12, 2016, 4:28:22 PM (9 years ago)
- Location:
- trunk/Forms
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormAbout.lfm
r23 r28 1 1 object FormAbout: TFormAbout 2 Left = 8662 Left = 561 3 3 Height = 397 4 Top = 6234 Top = 276 5 5 Width = 473 6 6 Caption = 'About' … … 12 12 object LabelAppName: TLabel 13 13 Left = 20 14 Height = 5 514 Height = 54 15 15 Top = 20 16 16 Width = 433 … … 24 24 object LabelDescription: TLabel 25 25 Left = 20 26 Height = 4 827 Top = 9 526 Height = 40 27 Top = 94 28 28 Width = 433 29 29 Align = alTop … … 45 45 object LabelContent: TLabel 46 46 Left = 20 47 Height = 2 448 Top = 1 6347 Height = 20 48 Top = 154 49 49 Width = 433 50 50 Align = alTop … … 73 73 EmailContact = 'robie@centrum.cz' 74 74 AppName = 'Acronym Decoder' 75 ReleaseDate = 42 49475 ReleaseDate = 42563 76 76 RegistryKey = '\Software\' 77 77 RegistryRoot = rrKeyCurrentUser -
trunk/Forms/UFormImportFormat.lfm
r27 r28 1 1 object FormImportFormat: TFormImportFormat 2 Left = 5142 Left = 461 3 3 Height = 433 4 Top = 3 164 Top = 321 5 5 Width = 664 6 6 Caption = 'Import format' 7 7 ClientHeight = 433 8 8 ClientWidth = 664 9 OnCreate = FormCreate 9 10 OnShow = FormShow 10 11 LCLVersion = '1.6.0.4' … … 99 100 Caption = 'Variable' 100 101 Width = 100 102 end 103 item 104 Caption = 'Repetition' 105 Width = 100 101 106 end> 102 107 OwnerData = True -
trunk/Forms/UFormImportFormat.lrt
r27 r28 9 9 TFORMIMPORTFORMAT.LISTVIEWITEMRULES.COLUMNS[2].CAPTION=Action 10 10 TFORMIMPORTFORMAT.LISTVIEWITEMRULES.COLUMNS[3].CAPTION=Variable 11 TFORMIMPORTFORMAT.LISTVIEWITEMRULES.COLUMNS[4].CAPTION=Repetition 11 12 TFORMIMPORTFORMAT.LABEL2.CAPTION=Item rules: 12 13 TFORMIMPORTFORMAT.AADD.CAPTION=Add -
trunk/Forms/UFormImportFormat.pas
r27 r28 41 41 procedure AMoveUpExecute(Sender: TObject); 42 42 procedure ARemoveExecute(Sender: TObject); 43 procedure FormCreate(Sender: TObject); 43 44 procedure FormShow(Sender: TObject); 44 45 procedure ListViewItemRulesData(Sender: TObject; Item: TListItem); … … 54 55 var 55 56 FormImportFormat: TFormImportFormat; 57 YesNoString: array[Boolean] of string; 56 58 57 59 … … 66 68 SRemoveImportPattern = 'Remove import pattern'; 67 69 SRemoveImportPatternQuery = 'Do you really want to remove selected import patterns?'; 70 SYes = 'Yes'; 71 SNo = 'No'; 68 72 69 73 … … 135 139 end; 136 140 141 procedure TFormImportFormat.FormCreate(Sender: TObject); 142 begin 143 YesNoString[False] := SNo; 144 YesNoString[True] := SYes; 145 end; 146 137 147 procedure TFormImportFormat.FormShow(Sender: TObject); 138 148 begin … … 149 159 Item.SubItems.Add(ImportPatternFlagString[Flag]); 150 160 Item.SubItems.Add(ImportVariableString[Variable]); 161 Item.SubItems.Add(YesNoString[Repetition]); 151 162 Item.Data := ImportFormat.ItemPatterns[Item.Index]; 152 163 end; -
trunk/Forms/UFormImportPattern.lfm
r27 r28 47 47 Top = 384 48 48 Width = 75 49 Anchors = [akRight, akBottom] 49 50 Caption = 'Cancel' 50 51 ModalResult = 2 … … 56 57 Top = 384 57 58 Width = 75 59 Anchors = [akRight, akBottom] 58 60 Caption = 'Ok' 59 61 ModalResult = 1 … … 99 101 TabOrder = 5 100 102 end 103 object CheckBoxRepetition: TCheckBox 104 Left = 24 105 Height = 24 106 Top = 160 107 Width = 93 108 Caption = 'Repetition' 109 TabOrder = 6 110 end 101 111 end -
trunk/Forms/UFormImportPattern.lrt
r27 r28 6 6 TFORMIMPORTPATTERN.LABEL10.CAPTION=Action: 7 7 TFORMIMPORTPATTERN.LABEL11.CAPTION=Variable: 8 TFORMIMPORTPATTERN.CHECKBOXREPETITION.CAPTION=Repetition -
trunk/Forms/UFormImportPattern.pas
r27 r28 16 16 ButtonCancel: TButton; 17 17 ButtonOk: TButton; 18 CheckBoxRepetition: TCheckBox; 18 19 ComboBoxAction: TComboBox; 19 20 ComboBoxVariable: TComboBox; … … 78 79 Pattern.Variable := TImportVariable(ComboBoxVariable.ItemIndex); 79 80 Pattern.Flag := TImportPatternFlag(ComboBoxAction.ItemIndex); 81 Pattern.Repetition := CheckBoxRepetition.Checked; 80 82 end; 81 83 … … 86 88 ComboBoxVariable.ItemIndex := Integer(Pattern.Variable); 87 89 ComboBoxAction.ItemIndex := Integer(Pattern.Flag); 90 CheckBoxRepetition.Checked := Pattern.Repetition; 88 91 end; 89 92 -
trunk/Forms/UFormImportSource.lfm
r22 r28 10 10 object EditName: TEdit 11 11 Left = 160 12 Height = 3412 Height = 28 13 13 Top = 10 14 14 Width = 432 … … 18 18 object Label1: TLabel 19 19 Left = 10 20 Height = 2 420 Height = 20 21 21 Top = 9 22 Width = 5622 Width = 43 23 23 Caption = 'Name:' 24 24 ParentColor = False … … 26 26 object Label2: TLabel 27 27 Left = 8 28 Height = 2 428 Height = 20 29 29 Top = 48 30 Width = 10130 Width = 78 31 31 Caption = 'Source URL:' 32 32 ParentColor = False … … 34 34 object EditURL: TEdit 35 35 Left = 160 36 Height = 3436 Height = 28 37 37 Top = 49 38 38 Width = 432 … … 62 62 object Label3: TLabel 63 63 Left = 11 64 Height = 2 464 Height = 20 65 65 Top = 96 66 Width = 10866 Width = 84 67 67 Caption = 'Data format:' 68 68 ParentColor = False … … 70 70 object ComboBox1: TComboBox 71 71 Left = 160 72 Height = 3672 Height = 28 73 73 Top = 91 74 Width = 43274 Width = 304 75 75 Anchors = [akTop, akLeft, akRight] 76 ItemHeight = 076 ItemHeight = 20 77 77 Style = csDropDownList 78 78 TabOrder = 4 79 79 end 80 object ButtonShowFormat: TButton 81 Left = 472 82 Height = 25 83 Top = 91 84 Width = 120 85 Anchors = [akTop, akRight] 86 Caption = 'Configure' 87 OnClick = ButtonShowFormatClick 88 TabOrder = 5 89 end 80 90 end -
trunk/Forms/UFormImportSource.lrt
r22 r28 5 5 TFORMIMPORTSOURCE.BUTTONCANCEL.CAPTION=Cancel 6 6 TFORMIMPORTSOURCE.LABEL3.CAPTION=Data format: 7 TFORMIMPORTSOURCE.BUTTONSHOWFORMAT.CAPTION=Configure -
trunk/Forms/UFormImportSource.pas
r22 r28 14 14 15 15 TFormImportSource = class(TForm) 16 ButtonShowFormat: TButton; 16 17 ButtonOk: TButton; 17 18 ButtonCancel: TButton; … … 22 23 Label2: TLabel; 23 24 Label3: TLabel; 25 procedure ButtonShowFormatClick(Sender: TObject); 24 26 private 25 27 { private declarations } … … 37 39 38 40 uses 39 UFormMain ;41 UFormMain, UFormImportFormat; 40 42 41 43 { TFormImportSource } 44 45 procedure TFormImportSource.ButtonShowFormatClick(Sender: TObject); 46 var 47 NewImportFormat: TImportFormat; 48 begin 49 if ComboBox1.ItemIndex <> -1 then begin 50 NewImportFormat := TImportFormat.Create; 51 NewImportFormat.Assign(TImportFormat(ComboBox1.Items.Objects[ComboBox1.ItemIndex])); 52 FormImportFormat.Load(NewImportFormat); 53 if FormImportFormat.ShowModal = mrOk then begin 54 FormImportFormat.Save(NewImportFormat); 55 TImportFormat(ComboBox1.Items.Objects[ComboBox1.ItemIndex]).Assign(NewImportFormat); 56 FormMain.AcronymDb.Modified := True; 57 ComboBox1.Items.Strings[ComboBox1.ItemIndex] := NewImportFormat.Name; 58 end; 59 if Assigned(NewImportFormat) then NewImportFormat.Free; 60 end; 61 end; 42 62 43 63 procedure TFormImportSource.Load(ImportSource: TImportSource); -
trunk/Forms/UFormImportSources.pas
r22 r28 146 146 procedure TFormImportSources.AProcessExecute(Sender: TObject); 147 147 begin 148 if Assigned(ListView1.Selected) then 148 if Assigned(ListView1.Selected) then begin 149 149 TImportSource(ListView1.Selected.Data).Process; 150 ShowMessage(Format(SAddedCount, [TImportSource(ListView1.Selected.Data).ItemCount])); 151 end; 150 152 end; 151 153 -
trunk/Forms/UFormMain.pas
r27 r28 119 119 FormMain: TFormMain; 120 120 121 resourcestring 122 SAddedCount = 'Imported %d acronyms'; 123 124 121 125 implementation 122 126 … … 252 256 var 253 257 I: Integer; 254 begin 255 for I := 0 to AcronymDb.ImportSources.Count - 1 do 258 TotalItemCount: Integer; 259 begin 260 TotalItemCount := 0; 261 for I := 0 to AcronymDb.ImportSources.Count - 1 do begin 256 262 TImportSource(AcronymDb.ImportSources[I]).Process; 263 TotalItemCount := TotalItemCount + TImportSource(AcronymDb.ImportSources[I]).ItemCount; 264 end; 265 ShowMessage(Format(SAddedCount, [TotalItemCount])); 257 266 UpdateAcronymsList; 258 267 UpdateInterface;
Note:
See TracChangeset
for help on using the changeset viewer.