Changeset 184
- Timestamp:
- Jul 4, 2018, 2:05:48 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AcronymDecoder.lpi
r172 r184 104 104 </Item5> 105 105 </RequiredPackages> 106 <Units Count="1 7">106 <Units Count="18"> 107 107 <Unit0> 108 108 <Filename Value="AcronymDecoder.lpr"/> … … 218 218 <ResourceBaseClass Value="Form"/> 219 219 </Unit16> 220 <Unit17> 221 <Filename Value="Forms\UFormCheck.pas"/> 222 <IsPartOfProject Value="True"/> 223 <ComponentName Value="FormCheck"/> 224 <HasResources Value="True"/> 225 <ResourceBaseClass Value="Form"/> 226 </Unit17> 220 227 </Units> 221 228 </ProjectOptions> -
trunk/AcronymDecoder.lpr
r169 r184 9 9 Interfaces, // this includes the LCL widgetset 10 10 Forms, UAcronym, Common, SysUtils, TemplateGenerics, 11 CoolTranslator, UFormMain, UCore 11 CoolTranslator, UFormMain, UCore, UFormCheck 12 12 { you can add units after this }; 13 13 -
trunk/Forms/UFormAcronyms.pas
r174 r184 50 50 procedure ListViewSort1Filter(ListViewSort: TListViewSort); 51 51 private 52 FAcronyms: TAcronyms; 52 53 MeaningCount: Integer; 53 54 procedure FilterList(List: TListObject); 55 procedure SetAcronyms(AValue: TAcronyms); 54 56 procedure UpdateAcronymsList; 55 57 public 56 58 FocusAcronym: TAcronymMeaning; 59 property Acronyms: TAcronyms read FAcronyms write SetAcronyms; 57 60 procedure UpdateInterface; 58 61 end; … … 147 150 if FormAcronym.ShowModal = mrOk then begin 148 151 FormAcronym.Save(TempEntry); 149 Meaning := Core.AcronymDb.AddAcronym(TempEntry.Name, TempEntry.Meaning);152 Meaning := Acronyms.Db.AddAcronym(TempEntry.Name, TempEntry.Meaning); 150 153 Meaning.Description := TempEntry.Description; 151 154 Meaning.Categories.AssignFromStrings(TempEntry.Categories); … … 156 159 TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.Add(Meaning); 157 160 158 Core.AcronymDb.Update;161 Acronyms.Db.Update; 159 162 UpdateAcronymsList; 160 163 UpdateInterface; … … 193 196 not FormMain.CompareStrings(TempEntry.Categories, TempCategories) then begin 194 197 // TODO: Update item inplace if possible 195 Core.AcronymDb.RemoveMeaning(TAcronymMeaning(ListViewAcronyms.Selected.Data));196 Meaning := Core.AcronymDb.AddAcronym(TempEntry.Name, TempEntry.Meaning);198 Acronyms.Db.RemoveMeaning(TAcronymMeaning(ListViewAcronyms.Selected.Data)); 199 Meaning := Acronyms.Db.AddAcronym(TempEntry.Name, TempEntry.Meaning); 197 200 Meaning.Description := TempEntry.Description; 198 201 Meaning.Categories.AssignFromStrings(TempEntry.Categories); … … 202 205 if TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.IndexOf(Meaning) = -1 then 203 206 TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.Add(Meaning); 204 Core.AcronymDb.Update;207 Acronyms.Db.Update; 205 208 UpdateAcronymsList; 206 209 UpdateInterface; … … 222 225 if MessageDlg(SRemoveAcronym, SRemoveAcronymQuery, 223 226 TMsgDlgType.mtConfirmation, [mbCancel, mbOk], 0) = mrOk then begin 224 Core.AcronymDb.BeginUpdate;227 Acronyms.Db.BeginUpdate; 225 228 for I := ListViewAcronyms.Items.Count - 1 downto 0 do 226 229 if ListViewAcronyms.Items[I].Selected then begin 227 230 ListViewAcronyms.Items[I].Selected := False; 228 Core.AcronymDb.RemoveMeaning(TAcronymMeaning(ListViewAcronyms.Items[I].Data));231 Acronyms.Db.RemoveMeaning(TAcronymMeaning(ListViewAcronyms.Items[I].Data)); 229 232 end; 230 233 UpdateAcronymsList; 231 234 UpdateInterface; 232 Core.AcronymDb.EndUpdate;235 Acronyms.Db.EndUpdate; 233 236 end; 234 237 end; … … 287 290 procedure TFormAcronyms.ListViewSort1Filter(ListViewSort: TListViewSort); 288 291 begin 289 Core.AcronymDb.Acronyms.Sort(AcronymComparer);290 Core.AcronymDb.AssignToList(ListViewSort1.List);292 Acronyms.Db.Acronyms.Sort(AcronymComparer); 293 Acronyms.Db.AssignToList(ListViewSort1.List); 291 294 MeaningCount := ListViewSort1.List.Count; 292 295 FilterList(ListViewSort1.List); … … 322 325 end; 323 326 327 procedure TFormAcronyms.SetAcronyms(AValue: TAcronyms); 328 begin 329 if FAcronyms = AValue then Exit; 330 FAcronyms := AValue; 331 end; 332 324 333 procedure TFormAcronyms.UpdateAcronymsList; 325 334 begin … … 332 341 procedure TFormAcronyms.UpdateInterface; 333 342 begin 334 ARemove.Enabled := Assigned( Core.AcronymDb) and Assigned(ListViewAcronyms.Selected);335 AModify.Enabled := Assigned( Core.AcronymDb) and Assigned(ListViewAcronyms.Selected);336 AAdd.Enabled := Assigned( Core.AcronymDb);343 ARemove.Enabled := Assigned(FAcronyms) and Assigned(ListViewAcronyms.Selected); 344 AModify.Enabled := Assigned(FAcronyms) and Assigned(ListViewAcronyms.Selected); 345 AAdd.Enabled := Assigned(FAcronyms); 337 346 ASelectAll.Enabled := True; 338 347 end; -
trunk/Forms/UFormExport.lfm
r174 r184 8 8 ClientWidth = 850 9 9 DesignTimePPI = 120 10 OnClose = FormClose 10 11 OnCreate = FormCreate 12 OnShow = FormShow 11 13 Position = poScreenCenter 12 LCLVersion = '1.8. 0.6'14 LCLVersion = '1.8.2.0' 13 15 object ButtonProcess: TButton 14 16 Left = 18 -
trunk/Forms/UFormExport.pas
r174 r184 21 21 procedure ButtonProcessClick(Sender: TObject); 22 22 procedure ButtonSaveToFileClick(Sender: TObject); 23 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 23 24 procedure FormCreate(Sender: TObject); 25 procedure FormShow(Sender: TObject); 24 26 private 25 27 ItemCount: Integer; … … 58 60 end; 59 61 62 procedure TFormExport.FormClose(Sender: TObject; var CloseAction: TCloseAction); 63 begin 64 Core.PersistentForm1.Save(Self); 65 end; 66 60 67 procedure TFormExport.FormCreate(Sender: TObject); 61 68 begin 62 69 Core.CoolTranslator1.TranslateComponentRecursive(Self); 63 70 Core.ThemeManager.UseTheme(Self); 71 end; 72 73 procedure TFormExport.FormShow(Sender: TObject); 74 begin 75 Core.PersistentForm1.Load(Self); 64 76 end; 65 77 -
trunk/Forms/UFormImport.lfm
r174 r184 8 8 ClientWidth = 652 9 9 DesignTimePPI = 120 10 OnClose = FormClose 10 11 OnCreate = FormCreate 12 OnShow = FormShow 11 13 Position = poScreenCenter 12 LCLVersion = '1.8. 0.6'14 LCLVersion = '1.8.2.0' 13 15 object ButtonProcess: TButton 14 16 Left = 16 -
trunk/Forms/UFormImport.pas
r174 r184 22 22 procedure ButtonProcessClick(Sender: TObject); 23 23 procedure ButtonLoadFromFileClick(Sender: TObject); 24 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 24 25 procedure FormCreate(Sender: TObject); 26 procedure FormShow(Sender: TObject); 25 27 private 26 28 procedure ImportMediaWiki; … … 60 62 end; 61 63 64 procedure TFormImport.FormClose(Sender: TObject; var CloseAction: TCloseAction); 65 begin 66 Core.PersistentForm1.Save(Self); 67 end; 68 62 69 procedure TFormImport.FormCreate(Sender: TObject); 63 70 begin 64 71 Core.CoolTranslator1.TranslateComponentRecursive(Self); 65 72 Core.ThemeManager.UseTheme(Self); 73 end; 74 75 procedure TFormImport.FormShow(Sender: TObject); 76 begin 77 Core.PersistentForm1.Load(Self); 66 78 end; 67 79 -
trunk/Forms/UFormMain.lfm
r176 r184 15 15 OnHide = FormHide 16 16 OnShow = FormShow 17 LCLVersion = '1.8. 0.6'17 LCLVersion = '1.8.2.0' 18 18 object PanelMain: TPanel 19 19 Left = 0 … … 416 416 OnExecute = AManageAcronymExecute 417 417 end 418 object ADocumentCheck: TAction 419 Caption = 'Document check' 420 OnExecute = ADocumentCheckExecute 421 end 418 422 end 419 423 object MainMenu1: TMainMenu … … 488 492 object MenuItem23: TMenuItem 489 493 Action = AProcessImports 494 end 495 object MenuItem3: TMenuItem 496 Action = ADocumentCheck 497 end 498 object MenuItem2: TMenuItem 499 Caption = '-' 490 500 end 491 501 object MenuItem18: TMenuItem -
trunk/Forms/UFormMain.pas
r180 r184 16 16 17 17 TFormMain = class(TForm) 18 ADocumentCheck: TAction; 18 19 AFilterEnabledCategories: TAction; 19 20 AManageAcronym: TAction; … … 48 49 MainMenu1: TMainMenu; 49 50 MenuItem1: TMenuItem; 51 MenuItem2: TMenuItem; 52 MenuItem3: TMenuItem; 50 53 MenuItemShowItemsWithoutFilter: TMenuItem; 51 54 MenuItemStatusBar: TMenuItem; … … 98 101 ToolButton8: TToolButton; 99 102 ToolButton9: TToolButton; 103 procedure ADocumentCheckExecute(Sender: TObject); 100 104 procedure AExitExecute(Sender: TObject); 101 105 procedure AExportExecute(Sender: TObject); … … 175 179 uses 176 180 UFormImport, UFormSettings, UFormCategories, UFormAcronyms, UFormExport, 177 UFormImportSources, UFormAbout, UFormImportFormats, UCore ;181 UFormImportSources, UFormAbout, UFormImportFormats, UCore, UFormCheck; 178 182 179 183 resourcestring … … 240 244 begin 241 245 Close; 246 end; 247 248 procedure TFormMain.ADocumentCheckExecute(Sender: TObject); 249 begin 250 FormCheck := TFormCheck.Create(Self); 251 try 252 FormCheck.LoadConfig; 253 FormCheck.ShowModal; 254 FormCheck.SaveConfig; 255 finally 256 FreeAndNil(FormCheck); 257 end; 242 258 end; 243 259 … … 365 381 if Assigned(ListViewAcronyms.Selected) then 366 382 FormAcronyms.FocusAcronym := ListViewAcronyms.Selected.Data; 383 FormAcronyms.Acronyms := Core.AcronymDb.Acronyms; 367 384 FormAcronyms.ShowModal; 368 385 UpdateAcronymsList; … … 429 446 FormAcronyms := TFormAcronyms.Create(Self); 430 447 try 448 FormAcronyms.Acronyms := Core.AcronymDb.Acronyms; 431 449 FormAcronyms.ShowModal; 432 450 UpdateAcronymsList; -
trunk/Forms/UFormSettings.lfm
r174 r184 10 10 Constraints.MinWidth = 389 11 11 DesignTimePPI = 120 12 OnClose = FormClose 12 13 OnCreate = FormCreate 13 14 OnShow = FormShow 14 15 Position = poScreenCenter 15 LCLVersion = '1.8. 0.6'16 LCLVersion = '1.8.2.0' 16 17 object ComboBoxLanguage: TComboBox 17 18 Left = 152 -
trunk/Forms/UFormSettings.pas
r174 r184 31 31 procedure CheckBoxAutomaticDPIChange(Sender: TObject); 32 32 procedure CheckBoxStartOnLogonChange(Sender: TObject); 33 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 33 34 procedure FormCreate(Sender: TObject); 34 35 procedure FormShow(Sender: TObject); … … 55 56 procedure TFormSettings.FormShow(Sender: TObject); 56 57 begin 58 Core.PersistentForm1.Load(Self); 57 59 end; 58 60 … … 69 71 begin 70 72 UpdateInterface; 73 end; 74 75 procedure TFormSettings.FormClose(Sender: TObject; var CloseAction: TCloseAction 76 ); 77 begin 78 Core.PersistentForm1.Save(Self); 71 79 end; 72 80 -
trunk/Languages/AcronymDecoder.cs.po
r178 r184 190 190 msgstr "Vybrat kategories" 191 191 192 #: tformcheck.buttonacronymscontent.caption 193 msgctxt "tformcheck.buttonacronymscontent.caption" 194 msgid "Acronyms" 195 msgstr "Zkratky" 196 197 #: tformcheck.buttonacronymssummary.caption 198 msgctxt "tformcheck.buttonacronymssummary.caption" 199 msgid "Acronyms" 200 msgstr "Zkratky" 201 202 #: tformcheck.buttoncheck.caption 203 msgid "Check" 204 msgstr "Kontrolovat" 205 206 #: tformcheck.buttonloadfromfile.caption 207 msgctxt "tformcheck.buttonloadfromfile.caption" 208 msgid "Load from file" 209 msgstr "Načíst ze souboru" 210 211 #: tformcheck.caption 212 msgid "Check document" 213 msgstr "Kontrolovat dokument" 214 215 #: tformcheck.groupbox1.caption 216 msgid "Summary section" 217 msgstr "Sekce přehledu" 218 219 #: tformcheck.groupbox2.caption 220 msgid "Content" 221 msgstr "Obsah" 222 223 #: tformcheck.label1.caption 224 msgctxt "tformcheck.label1.caption" 225 msgid "Start string:" 226 msgstr "Počáteční řetězec:" 227 228 #: tformcheck.label2.caption 229 msgctxt "tformcheck.label2.caption" 230 msgid "End string:" 231 msgstr "Koncový řetězec:" 232 233 #: tformcheck.labelacronymcountcontent.caption 234 msgctxt "tformcheck.labelacronymcountcontent.caption" 235 msgid "Acronym count:" 236 msgstr "Počet zkratek:" 237 238 #: tformcheck.labelacronymcountsummary.caption 239 msgctxt "tformcheck.labelacronymcountsummary.caption" 240 msgid "Acronym count:" 241 msgstr "Počet zkratek:" 242 243 #: tformcheck.tabsheetreport.caption 244 msgid "Report" 245 msgstr "Hlášení" 246 247 #: tformcheck.tabsheetsource.caption 248 msgid "Source" 249 msgstr "Zdroj" 250 192 251 #: tformexport.buttonprocess.caption 193 252 msgctxt "tformexport.buttonprocess.caption" … … 210 269 211 270 #: tformimport.buttonloadfromfile.caption 271 msgctxt "tformimport.buttonloadfromfile.caption" 212 272 msgid "Load from file" 213 273 msgstr "Načíst ze souboru" … … 370 430 371 431 #: tformimportpattern.label8.caption 432 msgctxt "tformimportpattern.label8.caption" 372 433 msgid "Start string:" 373 434 msgstr "Počáteční řetězec" 374 435 375 436 #: tformimportpattern.label9.caption 437 msgctxt "tformimportpattern.label9.caption" 376 438 msgid "End string:" 377 439 msgstr "Koncový řetězec" … … 504 566 msgstr "ToolBar1" 505 567 568 #: tformmain.adocumentcheck.caption 569 msgid "Document check" 570 msgstr "Kontrola dokumentu" 571 506 572 #: tformmain.aexit.caption 507 573 msgid "Exit" … … 851 917 msgstr "Opravdu chcete odebrat vybrané kategorie?" 852 918 919 #: uformcheck.sacronymcountcontent 920 msgctxt "uformcheck.sacronymcountcontent" 921 msgid "Content acronym count:" 922 msgstr "Počet zkratek obsahu:" 923 924 #: uformcheck.sacronymcountsummary 925 msgctxt "uformcheck.sacronymcountsummary" 926 msgid "Summary acronym count:" 927 msgstr "Počet zkratek přehledu:" 928 929 #: uformcheck.sduplicateacronymcontent 930 msgid "Duplicate acronym %s with \"%s\" in document content." 931 msgstr "Zdvojená zkratka %s s významem \"%s\" v těle dokumentu." 932 933 #: uformcheck.sduplicateacronymsummary 934 msgid "Duplicate acronym %s with \"%s\" in acronym summary." 935 msgstr "Zdvojená zkratka %s s významem \"%s\" v přehledu zkratek." 936 937 #: uformcheck.smissingacronymcontent 938 msgid "Content acronym %s with meaning \"%s\" missing from summary acronyms." 939 msgstr "V zkratkách přehledu chybí zkratka obsahu %s s významem \"%s\"." 940 941 #: uformcheck.smissingacronymsummary 942 msgid "Summary acronym %s with meaning \"%s\" missing from content acronyms." 943 msgstr "V zkratkách obsahu chybí zkratka přehledu %s s významem \"%s\"." 944 853 945 #: uformexport.sexportedacronyms 854 946 msgctxt "uformexport.sexportedacronyms" -
trunk/Languages/AcronymDecoder.po
r178 r184 180 180 msgstr "" 181 181 182 #: tformcheck.buttonacronymscontent.caption 183 msgctxt "tformcheck.buttonacronymscontent.caption" 184 msgid "Acronyms" 185 msgstr "" 186 187 #: tformcheck.buttonacronymssummary.caption 188 msgctxt "tformcheck.buttonacronymssummary.caption" 189 msgid "Acronyms" 190 msgstr "" 191 192 #: tformcheck.buttoncheck.caption 193 msgid "Check" 194 msgstr "" 195 196 #: tformcheck.buttonloadfromfile.caption 197 msgctxt "tformcheck.buttonloadfromfile.caption" 198 msgid "Load from file" 199 msgstr "" 200 201 #: tformcheck.caption 202 msgid "Check document" 203 msgstr "" 204 205 #: tformcheck.groupbox1.caption 206 msgid "Summary section" 207 msgstr "" 208 209 #: tformcheck.groupbox2.caption 210 msgid "Content" 211 msgstr "" 212 213 #: tformcheck.label1.caption 214 msgctxt "tformcheck.label1.caption" 215 msgid "Start string:" 216 msgstr "" 217 218 #: tformcheck.label2.caption 219 msgctxt "tformcheck.label2.caption" 220 msgid "End string:" 221 msgstr "" 222 223 #: tformcheck.labelacronymcountcontent.caption 224 msgctxt "tformcheck.labelacronymcountcontent.caption" 225 msgid "Acronym count:" 226 msgstr "" 227 228 #: tformcheck.labelacronymcountsummary.caption 229 msgctxt "tformcheck.labelacronymcountsummary.caption" 230 msgid "Acronym count:" 231 msgstr "" 232 233 #: tformcheck.tabsheetreport.caption 234 msgid "Report" 235 msgstr "" 236 237 #: tformcheck.tabsheetsource.caption 238 msgid "Source" 239 msgstr "" 240 182 241 #: tformexport.buttonprocess.caption 183 242 msgctxt "TFORMEXPORT.BUTTONPROCESS.CAPTION" … … 200 259 201 260 #: tformimport.buttonloadfromfile.caption 261 msgctxt "tformimport.buttonloadfromfile.caption" 202 262 msgid "Load from file" 203 263 msgstr "" … … 360 420 361 421 #: tformimportpattern.label8.caption 422 msgctxt "tformimportpattern.label8.caption" 362 423 msgid "Start string:" 363 424 msgstr "" 364 425 365 426 #: tformimportpattern.label9.caption 427 msgctxt "tformimportpattern.label9.caption" 366 428 msgid "End string:" 367 429 msgstr "" … … 494 556 msgstr "" 495 557 558 #: tformmain.adocumentcheck.caption 559 msgid "Document check" 560 msgstr "" 561 496 562 #: tformmain.aexit.caption 497 563 msgid "Exit" … … 841 907 msgstr "" 842 908 909 #: uformcheck.sacronymcountcontent 910 msgctxt "uformcheck.sacronymcountcontent" 911 msgid "Content acronym count:" 912 msgstr "" 913 914 #: uformcheck.sacronymcountsummary 915 msgctxt "uformcheck.sacronymcountsummary" 916 msgid "Summary acronym count:" 917 msgstr "" 918 919 #: uformcheck.sduplicateacronymcontent 920 msgid "Duplicate acronym %s with \"%s\" in document content." 921 msgstr "" 922 923 #: uformcheck.sduplicateacronymsummary 924 msgid "Duplicate acronym %s with \"%s\" in acronym summary." 925 msgstr "" 926 927 #: uformcheck.smissingacronymcontent 928 msgid "Content acronym %s with meaning \"%s\" missing from summary acronyms." 929 msgstr "" 930 931 #: uformcheck.smissingacronymsummary 932 msgid "Summary acronym %s with meaning \"%s\" missing from content acronyms." 933 msgstr "" 934 843 935 #: uformexport.sexportedacronyms 844 936 msgctxt "uformexport.sexportedacronyms" -
trunk/Packages/Common/UTheme.pas
r181 r184 158 158 ApplyTheme(TPageControl(Component).Pages[I]); 159 159 end; 160 161 if Control is TCoolBar then begin 162 (Control as TCoolBar).Themed := False; 163 end; 160 164 end; 161 165 end; -
trunk/UAcronym.pas
r159 r184 17 17 TImportSources = class; 18 18 TImportFormats = class; 19 20 TSearchFlag = (sfCaseInsensitive); 21 TSearchFlags = set of TSearchFlag; 19 22 20 23 { TAcronym } … … 36 39 procedure SaveToNode(Node: TDOMNode); 37 40 procedure LoadFromNode(Node: TDOMNode); 38 function SearchByName(Name: string ): TAcronym;41 function SearchByName(Name: string; Flags: TSearchFlags = []): TAcronym; 39 42 function AddAcronym(Name: string): TAcronym; 40 43 end; … … 65 68 procedure SaveToNode(Node: TDOMNode); 66 69 procedure LoadFromNode(Node: TDOMNode); 67 function SearchByName(Name: string ): TAcronymMeaning;70 function SearchByName(Name: string; Flags: TSearchFlags = []): TAcronymMeaning; 68 71 function AddMeaning(Name: string): TAcronymMeaning; 69 72 end; … … 237 240 function GetMeaningsCount: Integer; 238 241 function AddAcronym(AcronymName, MeaningName: string): TAcronymMeaning; 242 function SearchAcronym(AcronymName, MeaningName: string; Flags: TSearchFlags = []): TAcronymMeaning; 239 243 procedure RemoveMeaning(Meaning: TAcronymMeaning); 240 244 procedure RemoveAcronym(AcronymName, MeaningName: string); … … 1031 1035 end; 1032 1036 1033 function TAcronymMeanings.SearchByName(Name: string): TAcronymMeaning; 1037 function TAcronymMeanings.SearchByName(Name: string; Flags: TSearchFlags 1038 ): TAcronymMeaning; 1034 1039 var 1035 1040 I: Integer; 1036 1041 begin 1037 1042 I := 0; 1038 while (I < Count) and (TAcronymMeaning(Items[I]).Name <> Name) do Inc(I); 1043 if sfCaseInsensitive in Flags then begin 1044 while (I < Count) and (LowerCase(TAcronymMeaning(Items[I]).Name) <> LowerCase(Name)) do Inc(I); 1045 end else begin 1046 while (I < Count) and (TAcronymMeaning(Items[I]).Name <> Name) do Inc(I); 1047 end; 1039 1048 if I < Count then Result := TAcronymMeaning(Items[I]) 1040 1049 else Result := nil; … … 1152 1161 end; 1153 1162 1154 function TAcronyms.SearchByName(Name: string ): TAcronym;1163 function TAcronyms.SearchByName(Name: string; Flags: TSearchFlags = []): TAcronym; 1155 1164 var 1156 1165 I: Integer; 1157 1166 begin 1158 1167 I := 0; 1159 while (I < Count) and (TAcronym(Items[I]).Name <> Name) do Inc(I); 1168 if sfCaseInsensitive in Flags then begin 1169 while (I < Count) and (LowerCase(TAcronym(Items[I]).Name) <> LowerCase(Name)) do Inc(I); 1170 end else begin 1171 while (I < Count) and (TAcronym(Items[I]).Name <> Name) do Inc(I); 1172 end; 1160 1173 if I < Count then Result := TAcronym(Items[I]) 1161 1174 else Result := nil; … … 1684 1697 end; 1685 1698 1699 function TAcronymDb.SearchAcronym(AcronymName, MeaningName: string; 1700 Flags: TSearchFlags = []): TAcronymMeaning; 1701 var 1702 Acronym: TAcronym; 1703 Meaning: TAcronymMeaning; 1704 begin 1705 Result := nil; 1706 Acronym := Acronyms.SearchByName(AcronymName); 1707 if Assigned(Acronym) then begin 1708 Meaning := Acronym.Meanings.SearchByName(MeaningName, Flags); 1709 if Assigned(Meaning) then begin 1710 Result := Meaning; 1711 end; 1712 end; 1713 end; 1714 1686 1715 procedure TAcronymDb.RemoveMeaning(Meaning: TAcronymMeaning); 1687 1716 var
Note:
See TracChangeset
for help on using the changeset viewer.