1 /* 2 * "GEDKeeper", the personal genealogical database editor. 3 * Copyright (C) 2009-2020 by Sergey V. Zhdanovskih. 4 * 5 * This file is part of "GEDKeeper". 6 * 7 * This program is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 using System.IO; 22 using BSLib; 23 using BSLib.Design.Graphics; 24 using BSLib.Design.MVP; 25 using BSLib.Design.MVP.Controls; 26 using GDModel; 27 using GKCore.Charts; 28 using GKCore.Interfaces; 29 using GKCore.Lists; 30 using GKCore.MVP.Controls; 31 using GKCore.Names; 32 using GKCore.Options; 33 using GKCore.Types; 34 35 namespace GKCore.MVP.Views 36 { 37 public interface IAboutDlg : ICommonDialog 38 { 39 } 40 41 42 public interface IAddressEditDlg : ICommonDialog, IBaseEditor 43 { 44 GDMAddress Address { get; set; } 45 46 ITextBox Country { get; } 47 ITextBox State { get; } 48 ITextBox City { get; } 49 ITextBox PostalCode { get; } 50 ITextBox AddressLine { get; } 51 52 ISheetList PhonesList { get; } 53 ISheetList MailsList { get; } 54 ISheetList WebsList { get; } 55 } 56 57 58 public interface IAssociationEditDlg : ICommonDialog, IBaseEditor 59 { 60 GDMAssociation Association { get; set; } 61 62 ITextBox Person { get; } 63 IComboBox Relation { get; } 64 } 65 66 67 public interface IBaseWindowView : IBaseWindow 68 { 69 ITabControl RecordTabs { get; } 70 IMenuItem ReportsItem { get; } 71 IMenuItem PluginsItem { get; } 72 CheckModified()73 bool CheckModified(); 74 } 75 76 77 public interface ICircleChartWin : IChartWindow 78 { 79 ICircleChart CircleChart { get; } 80 } 81 82 83 public interface ICommonFilterDlg : ICommonDialog 84 { 85 IFilterGridView FilterGrid { get; } 86 } 87 88 89 public interface ICommunicationEditDlg : ICommonDialog, IBaseEditor 90 { 91 GDMCommunicationRecord Communication { get; set; } 92 93 ITextBox Corresponder { get; } 94 IComboBox CorrType { get; } 95 IDateBox Date { get; } 96 IComboBox Dir { get; } 97 ITextBox Name { get; } 98 99 ISheetList NotesList { get; } 100 ISheetList MediaList { get; } 101 } 102 103 104 public interface IDayTipsDlg : ICommonDialog 105 { 106 bool ShowTipsChecked { get; set; } 107 Init(string caption, bool showTipsChecked, StringList tips)108 void Init(string caption, bool showTipsChecked, StringList tips); 109 110 ILabel TitleLabel { get; } 111 ITextBox TipText { get; } 112 IButton NextButton { get; } 113 } 114 115 116 public interface IEventEditDlg : ICommonDialog, IBaseEditor 117 { 118 GDMCustomEvent Event { get; set; } 119 120 IComboBox EventType { get; } 121 122 IDateControl Date { get; } 123 124 IComboBox Attribute { get; } 125 ITextBox Place { get; } 126 ITextBox EventName { get; } 127 ITextBox Cause { get; } 128 ITextBox Agency { get; } 129 130 ISheetList NotesList { get; } 131 ISheetList MediaList { get; } 132 ISheetList SourcesList { get; } 133 SetLocationMode(bool active)134 void SetLocationMode(bool active); 135 } 136 137 138 public interface IFamilyEditDlg : ICommonDialog, IBaseEditor 139 { 140 GDMFamilyRecord Family { get; set; } 141 SetTarget(TargetMode targetType, GDMIndividualRecord target)142 void SetTarget(TargetMode targetType, GDMIndividualRecord target); LockEditor(bool locked)143 void LockEditor(bool locked); SetHusband(string value)144 void SetHusband(string value); SetWife(string value)145 void SetWife(string value); 146 147 ISheetList NotesList { get; } 148 ISheetList MediaList { get; } 149 ISheetList SourcesList { get; } 150 ISheetList ChildrenList { get; } 151 ISheetList EventsList { get; } 152 153 IComboBox MarriageStatus { get; } 154 IComboBox Restriction { get; } 155 ITextBox Husband { get; } 156 ITextBox Wife { get; } 157 } 158 159 160 public interface IFilePropertiesDlg : ICommonDialog, IBaseEditor 161 { 162 IListView RecordStats { get; } 163 164 ITextBox Language { get; } 165 ITextBox Name { get; } 166 ITextBox Address { get; } 167 ITextBox Tel { get; } 168 } 169 170 171 public interface IGroupEditDlg : ICommonDialog, IBaseEditor 172 { 173 GDMGroupRecord Group { get; set; } 174 175 ITextBox Name { get; } 176 177 ISheetList NotesList { get; } 178 ISheetList MediaList { get; } 179 ISheetList MembersList { get; } 180 } 181 182 183 public interface ILanguageEditDlg : ICommonDialog 184 { 185 GDMLanguageID LanguageID { get; set; } 186 187 IComboBox LanguageCombo { get; } 188 } 189 190 191 public interface ILanguageSelectDlg : ICommonDialog 192 { 193 int SelectedLanguage { get; set; } 194 195 IListViewEx LanguagesList { get; } 196 } 197 198 199 public interface ILocationEditDlg : ICommonDialog, IBaseEditor 200 { 201 GDMLocationRecord LocationRecord { get; set; } 202 203 IMapBrowser MapBrowser { get; } 204 ISheetList MediaList { get; } 205 ISheetList NotesList { get; } 206 IListView GeoCoordsList { get; } 207 ITextBox Name { get; } 208 ITextBox Latitude { get; } 209 ITextBox Longitude { get; } 210 } 211 212 213 public interface IMapsViewerWin : IWindow 214 { 215 IMapBrowser MapBrowser { get; } 216 IComboBox PersonsCombo { get; } 217 ITreeView PlacesTree { get; } 218 IButton SelectPlacesBtn { get; } 219 ICheckBox BirthCheck { get; } 220 ICheckBox DeathCheck { get; } 221 ICheckBox ResidenceCheck { get; } 222 ICheckBox LinesVisibleCheck { get; } 223 IRadioButton TotalRadio { get; } 224 IRadioButton SelectedRadio { get; } 225 FindTreeNode(string place)226 ITVNode FindTreeNode(string place); 227 } 228 229 230 public interface IMediaEditDlg : ICommonDialog, IBaseEditor 231 { 232 GDMMultimediaRecord MediaRec { get; set; } 233 234 ISheetList NotesList { get; } 235 ISheetList SourcesList { get; } 236 237 IComboBox MediaType { get; } 238 IComboBox StoreType { get; } 239 ITextBox Name { get; } 240 ITextBox File { get; } 241 IButton FileSelectButton { get; } 242 } 243 244 245 public interface IMediaViewerWin : IWindow 246 { 247 GDMFileReferenceWithTitle FileRef { get; set; } 248 GDMMultimediaRecord Multimedia { get; set; } 249 SetViewImage(IImage img, GDMFileReferenceWithTitle fileRef)250 void SetViewImage(IImage img, GDMFileReferenceWithTitle fileRef); SetViewMedia(string mediaFile)251 void SetViewMedia(string mediaFile); SetViewText(string text)252 void SetViewText(string text); SetViewRTF(string text)253 void SetViewRTF(string text); SetViewHTML(Stream stm)254 void SetViewHTML(Stream stm); DisposeViewControl()255 void DisposeViewControl(); 256 } 257 258 259 public interface INameEditDlg : ICommonDialog 260 { 261 NameEntry IName { get; set; } 262 263 ITextBox Name { get; } 264 ITextBox FPatr { get; } 265 ITextBox MPatr { get; } 266 IComboBox SexCombo { get; } 267 } 268 269 270 public interface INoteEdit : ICommonDialog, IBaseEditor 271 { 272 GDMNoteRecord NoteRecord { get; set; } 273 274 ITextBox Note { get; } 275 } 276 277 278 public interface INoteEditDlg : INoteEdit 279 { 280 } 281 282 public interface INoteEditDlgEx : INoteEdit 283 { 284 } 285 286 287 public interface IOrganizerWin : ICommonDialog 288 { 289 ISheetList AdrList { get; } 290 ISheetList PhonesList { get; } 291 ISheetList MailsList { get; } 292 ISheetList WebsList { get; } 293 } 294 295 296 public interface IOptionsDlg : ICommonDialog 297 { SetPage(OptionsPage page)298 void SetPage(OptionsPage page); 299 } 300 301 302 public interface IParentsEditDlg : ICommonDialog, IBaseEditor 303 { 304 GDMChildToFamilyLink Link { get; set; } 305 GDMIndividualRecord Person { get; set; } 306 307 ITextBox Father { get; } 308 ITextBox Mother { get; } 309 ITextBox ChildName { get; } 310 IComboBox LinkageTypeCombo { get; } 311 SetParentsAvl(bool avail)312 void SetParentsAvl(bool avail); SetFatherAvl(bool avail)313 void SetFatherAvl(bool avail); SetMotherAvl(bool avail)314 void SetMotherAvl(bool avail); 315 } 316 317 318 public interface IPersonalNameEditDlg : ICommonDialog, IBaseEditor 319 { 320 GDMIndividualRecord Individual { get; set; } 321 GDMPersonalName PersonalName { get; set; } 322 323 ILabel SurnameLabel { get; } 324 ITextBox Surname { get; } 325 ITextBox Name { get; } 326 ITextBox Patronymic { get; } 327 IComboBox NameType { get; } 328 ITextBox NamePrefix { get; } 329 ITextBox Nickname { get; } 330 ITextBox SurnamePrefix { get; } 331 ITextBox NameSuffix { get; } 332 ITextBox MarriedSurname { get; } 333 IComboBox Language { get; } 334 } 335 336 337 public interface IPersonEditDlg : ICommonDialog, IBaseEditor 338 { 339 GDMIndividualRecord Person { get; set; } 340 GDMIndividualRecord Target { get; set; } 341 TargetMode TargetMode { get; set; } SetNeedSex(GDMSex needSex)342 void SetNeedSex(GDMSex needSex); 343 344 ISheetList EventsList { get; } 345 ISheetList SpousesList { get; } 346 ISheetList AssociationsList { get; } 347 ISheetList GroupsList { get; } 348 ISheetList UserRefList { get; } 349 ISheetList NamesList { get; } 350 ISheetList NotesList { get; } 351 ISheetList MediaList { get; } 352 ISheetList SourcesList { get; } 353 ISheetList ParentsList { get; } 354 355 IPortraitControl Portrait { get; } 356 ITextBox Father { get; } 357 ITextBox Mother { get; } 358 ITextBox Surname { get; } 359 ITextBox Name { get; } 360 IComboBox Patronymic { get; } 361 ITextBox NamePrefix { get; } 362 ITextBox Nickname { get; } 363 ITextBox SurnamePrefix { get; } 364 ITextBox NameSuffix { get; } 365 ITextBox MarriedSurname { get; } 366 367 ILabel SurnameLabel { get; } 368 IComboBox RestrictionCombo { get; } 369 IComboBox SexCombo { get; } 370 371 ICheckBox Patriarch { get; } 372 ICheckBox Bookmark { get; } 373 SetParentsAvl(bool avail, bool locked)374 void SetParentsAvl(bool avail, bool locked); SetFatherAvl(bool avail, bool locked)375 void SetFatherAvl(bool avail, bool locked); SetMotherAvl(bool avail, bool locked)376 void SetMotherAvl(bool avail, bool locked); 377 //void UpdatePortrait(bool totalUpdate); 378 SetPortrait(IImage portrait)379 void SetPortrait(IImage portrait); SetPortraitAvl(bool avail, bool locked)380 void SetPortraitAvl(bool avail, bool locked); 381 } 382 383 384 public interface IPersonsFilterDlg : ICommonDialog 385 { 386 IComboBox SourceCombo { get; } 387 IComboBox GroupCombo { get; } 388 ITextBox AliveBeforeDate { get; } 389 ICheckBox OnlyPatriarchsCheck { get; } 390 IComboBox EventValCombo { get; } 391 IComboBox ResidenceCombo { get; } 392 IComboBox NameCombo { get; } 393 SetLifeRadio(int lifeSel)394 void SetLifeRadio(int lifeSel); SetSexRadio(int sexSel)395 void SetSexRadio(int sexSel); GetLifeRadio()396 int GetLifeRadio(); GetSexRadio()397 int GetSexRadio(); SetLifeEnabled(bool value)398 void SetLifeEnabled(bool value); 399 } 400 401 402 public interface IPortraitSelectDlg : ICommonDialog, IBaseEditor 403 { 404 GDMMultimediaLink MultimediaLink { get; set; } 405 406 IImageView ImageCtl { get; } 407 } 408 409 410 public interface IQuickSearchDlg : IView, ILocalizable 411 { 412 ITextBox SearchPattern { get; } 413 } 414 415 416 /// <summary> 417 /// 418 /// </summary> 419 public interface IRecordSelectDialog : ICommonDialog, IBaseEditor 420 { 421 string FastFilter { get; set; } 422 GDMRecord ResultRecord { get; set; } 423 424 ITextBox FilterBox { get; } 425 IListViewEx RecordsList { get; } 426 SetTarget(TargetMode mode, GDMIndividualRecord target, GDMSex needSex)427 void SetTarget(TargetMode mode, GDMIndividualRecord target, GDMSex needSex); 428 } 429 430 431 public interface IRelationshipCalculatorDlg : ICommonDialog 432 { 433 ILabel Label1 { get; } 434 ILabel Label2 { get; } 435 ITextBox Person1 { get; } 436 ITextBox Person2 { get; } 437 ITextBox Result { get; } 438 } 439 440 441 public interface IRepositoryEditDlg : ICommonDialog, IBaseEditor 442 { 443 GDMRepositoryRecord Repository { get; set; } 444 445 ISheetList NotesList { get; } 446 ITextBox Name { get; } 447 } 448 449 450 public interface IResearchEditDlg : ICommonDialog, IBaseEditor 451 { 452 GDMResearchRecord Research { get; set; } 453 454 ISheetList TasksList { get; } 455 ISheetList CommunicationsList { get; } 456 ISheetList GroupsList { get; } 457 ISheetList NotesList { get; } 458 459 ITextBox Name { get; } 460 IComboBox Priority { get; } 461 IComboBox Status { get; } 462 IDateBox StartDate { get; } 463 IDateBox StopDate { get; } 464 INumericBox Percent { get; } 465 } 466 467 468 public interface IScriptEditWin : ICommonDialog, ILocalizable 469 { 470 ITextBox ScriptText { get; } 471 ITextBox DebugOutput { get; } 472 473 string FileName { get; set; } 474 bool Modified { get; set; } 475 CheckModified()476 bool CheckModified(); 477 } 478 479 480 public interface ISexCheckDlg : ICommonDialog 481 { 482 string IndividualName { get; set; } 483 GDMSex Sex { get; set; } 484 } 485 486 487 public interface ISlideshowWin : IWindow, IStatusForm 488 { SetImage(IImage image)489 void SetImage(IImage image); UpdateControls()490 void UpdateControls(); 491 } 492 493 494 public interface ISourceCitEditDlg : ICommonDialog, IBaseEditor 495 { 496 GDMSourceCitation SourceCitation { get; set; } 497 498 ITextBox Page { get; } 499 IComboBox Certainty { get; } 500 IComboBox Source { get; } 501 502 IDateControl DataDate { get; } 503 ITextBox DataText { get; } 504 } 505 506 507 public interface ISourceEditDlg : ICommonDialog, IBaseEditor, IView<GDMSourceRecord, ISourceEditDlg> 508 { 509 ISheetList NotesList { get; } 510 ISheetList MediaList { get; } 511 ISheetList RepositoriesList { get; } 512 513 ITextBox ShortTitle { get; } 514 ITextBox Author { get; } 515 ITextBox Title { get; } 516 ITextBox Publication { get; } 517 ITextBox Text { get; } 518 } 519 520 521 public interface IStatisticsWin : IWindow 522 { 523 IGraphControl Graph { get; } 524 IListView ListStats { get; } 525 IListView Summary { get; } 526 IComboBox StatsType { get; } 527 } 528 529 530 public interface ITaskEditDlg : ICommonDialog, IBaseEditor 531 { 532 GDMTaskRecord Task { get; set; } 533 534 ISheetList NotesList { get; } 535 IComboBox Priority { get; } 536 IDateBox StartDate { get; } 537 IDateBox StopDate { get; } 538 IComboBox GoalType { get; } 539 ITextBox Goal { get; } 540 IButton GoalSelect { get; } 541 } 542 543 544 public interface ITreeChartWin : IChartWindow 545 { 546 ITreeChart TreeBox { get; } 547 GenChart(TreeChartKind chartKind)548 void GenChart(TreeChartKind chartKind); 549 } 550 551 552 public interface ITreeFilterDlg : ICommonDialog 553 { 554 ChartFilter Filter { get; set; } 555 556 ISheetList PersonsList { get; } 557 INumericBox YearNum { get; } 558 IComboBox SourceCombo { get; } 559 GetCutModeRadio()560 int GetCutModeRadio(); SetCutModeRadio(int cutMode)561 void SetCutModeRadio(int cutMode); 562 } 563 564 565 public interface IUserRefEditDlg : ICommonDialog, IBaseEditor 566 { 567 GDMUserReference UserRef { get; set; } 568 569 IComboBox Ref { get; } 570 IComboBox RefType { get; } 571 } 572 573 574 575 public interface IFragmentSearchDlg : ICommonDialog, IBaseEditor 576 { 577 ITreeView GroupsTree { get; } 578 ILogChart LogChart { get; } 579 } 580 581 582 public interface IPatriarchsSearchDlg : ICommonDialog, IBaseEditor 583 { 584 INumericBox MinGensNum { get; } 585 ICheckBox WithoutDatesCheck { get; } 586 IListView PatriarchsList { get; } 587 } 588 589 590 public interface IPatriarchsViewer : IWindow 591 { 592 } 593 594 595 public interface IPlacesManagerDlg : ICommonDialog, IBaseEditor 596 { 597 IListViewEx PlacesList { get; } 598 } 599 600 601 public interface IRecMergeDlg : ICommonDialog, IBaseEditor 602 { 603 IMergeControl MergeCtl { get; } 604 IButton SkipBtn { get; } 605 IProgressBar ProgressBar { get; } 606 ICheckBox IndistinctMatchingChk { get; } 607 INumericBox NameAccuracyNum { get; } 608 ICheckBox BirthYearChk { get; } 609 INumericBox YearInaccuracyNum { get; } 610 } 611 612 613 public interface ITreeCheckDlg : ICommonDialog, IBaseEditor 614 { 615 IListViewEx ChecksList { get; } 616 } 617 618 619 public enum TreeMatchType { tmtInternal, tmtExternal, tmtAnalysis } 620 621 public interface ITreeCompareDlg : ICommonDialog, IBaseEditor 622 { 623 ITextBox ExternalBase { get; } 624 ITextBox CompareOutput { get; } 625 GetTreeMatchType()626 TreeMatchType GetTreeMatchType(); 627 } 628 629 630 public interface ITreeMergeDlg : ICommonDialog, IBaseEditor 631 { 632 ITextBox UpdateBase { get; } 633 ITextBox SyncLog { get; } 634 } 635 636 637 public interface ITreeSplitDlg : ICommonDialog, IBaseEditor 638 { 639 IListViewEx SelectedList { get; } 640 IListViewEx SkippedList { get; } 641 } 642 643 644 public interface IRecordInfoDlg : ICommonDialog, IBaseEditor 645 { 646 GDMRecord Record { get; set; } 647 648 IHyperView HyperView { get; } 649 } 650 } 651