public static string GetRestrictionStr(GEDCOMRestriction value) { string s; switch (value) { case GEDCOMRestriction.rnConfidential: s = "confidential"; break; case GEDCOMRestriction.rnLocked: s = "locked"; break; case GEDCOMRestriction.rnPrivacy: s = "privacy"; break; default: s = ""; break; } return(s); }
public PersonEditDlgController(IPersonEditDlg view) : base(view) { for (GEDCOMRestriction res = GEDCOMRestriction.rnNone; res <= GEDCOMRestriction.rnPrivacy; res++) { fView.RestrictionCombo.Add(LangMan.LS(GKData.Restrictions[(int)res])); } for (GEDCOMSex sx = GEDCOMSex.svNone; sx <= GEDCOMSex.svUndetermined; sx++) { string name = GKUtils.SexStr(sx); IImage image = null; #if SEX_SYMBOLS switch (sx) { case GEDCOMSex.svMale: image = AppHost.GfxProvider.LoadResourceImage("sym_male.png", true); break; case GEDCOMSex.svFemale: image = AppHost.GfxProvider.LoadResourceImage("sym_female.png", true); break; } #endif fView.SexCombo.AddItem(name, null, image); } }
public FamilyEditDlgController(IFamilyEditDlg view) : base(view) { for (GEDCOMRestriction res = GEDCOMRestriction.rnNone; res <= GEDCOMRestriction.rnLast; res++) { fView.Restriction.Add(LangMan.LS(GKData.Restrictions[(int)res])); } for (int i = 0; i < GKData.MarriageStatus.Length; i++) { fView.MarriageStatus.Add(LangMan.LS(GKData.MarriageStatus[i].Name)); } }
public FamilyEditDlg() { InitializeComponent(); txtHusband.TextChanged += EditSpouse_TextChanged; txtWife.TextChanged += EditSpouse_TextChanged; for (GEDCOMRestriction res = GEDCOMRestriction.rnNone; res <= GEDCOMRestriction.rnLast; res++) { cmbRestriction.Items.Add(LangMan.LS(GKData.Restrictions[(int)res])); } for (int i = 0; i < GKData.MarriageStatus.Length; i++) { cmbMarriageStatus.Items.Add(LangMan.LS(GKData.MarriageStatus[i].Name)); } fChildrenList = new GKSheetList(pageChilds); fChildrenList.OnItemValidating += FamilyEditDlg_ItemValidating; fChildrenList.OnModify += ModifyChildrenSheet; fEventsList = new GKSheetList(pageEvents); fNotesList = new GKSheetList(pageNotes); fMediaList = new GKSheetList(pageMultimedia); fSourcesList = new GKSheetList(pageSources); // SetLang() btnAccept.Text = LangMan.LS(LSID.LSID_DlgAccept); btnCancel.Text = LangMan.LS(LSID.LSID_DlgCancel); GroupBox1.Text = LangMan.LS(LSID.LSID_Family); lblHusband.Text = LangMan.LS(LSID.LSID_Husband); lblWife.Text = LangMan.LS(LSID.LSID_Wife); lblStatus.Text = LangMan.LS(LSID.LSID_Status); pageChilds.Text = LangMan.LS(LSID.LSID_Childs); pageEvents.Text = LangMan.LS(LSID.LSID_Events); pageNotes.Text = LangMan.LS(LSID.LSID_RPNotes); pageMultimedia.Text = LangMan.LS(LSID.LSID_RPMultimedia); pageSources.Text = LangMan.LS(LSID.LSID_RPSources); lblRestriction.Text = LangMan.LS(LSID.LSID_Restriction); btnHusbandAdd.ToolTip = LangMan.LS(LSID.LSID_HusbandAddTip); btnHusbandDelete.ToolTip = LangMan.LS(LSID.LSID_HusbandDeleteTip); btnHusbandSel.ToolTip = LangMan.LS(LSID.LSID_HusbandSelTip); btnWifeAdd.ToolTip = LangMan.LS(LSID.LSID_WifeAddTip); btnWifeDelete.ToolTip = LangMan.LS(LSID.LSID_WifeDeleteTip); btnWifeSel.ToolTip = LangMan.LS(LSID.LSID_WifeSelTip); }
public PersonEditDlg() { InitializeComponent(); txtMarriedSurname.TextChanged += Names_TextChanged; txtSurname.TextChanged += Names_TextChanged; txtName.TextChanged += Names_TextChanged; cmbPatronymic.TextChanged += Names_TextChanged; btnPortraitAdd.Image = Bitmap.FromResource("Resources.btn_rec_new.gif"); btnPortraitDelete.Image = Bitmap.FromResource("Resources.btn_rec_delete.gif"); btnParentsAdd.Image = Bitmap.FromResource("Resources.btn_rec_new.gif"); btnParentsEdit.Image = Bitmap.FromResource("Resources.btn_rec_edit.gif"); btnParentsDelete.Image = Bitmap.FromResource("Resources.btn_rec_delete.gif"); btnFatherAdd.Image = Bitmap.FromResource("Resources.btn_rec_new.gif"); btnFatherDelete.Image = Bitmap.FromResource("Resources.btn_rec_edit.gif"); btnFatherSel.Image = Bitmap.FromResource("Resources.btn_rec_delete.gif"); btnMotherAdd.Image = Bitmap.FromResource("Resources.btn_rec_new.gif"); btnMotherDelete.Image = Bitmap.FromResource("Resources.btn_rec_edit.gif"); btnMotherSel.Image = Bitmap.FromResource("Resources.btn_rec_delete.gif"); btnNameCopy.Image = Bitmap.FromResource("Resources.btn_copy.gif"); imgPortrait.AddButton(btnPortraitAdd); imgPortrait.AddButton(btnPortraitDelete); for (GEDCOMRestriction res = GEDCOMRestriction.rnNone; res <= GEDCOMRestriction.rnPrivacy; res++) { cmbRestriction.Items.Add(LangMan.LS(GKData.Restrictions[(int)res])); } for (GEDCOMSex sx = GEDCOMSex.svNone; sx <= GEDCOMSex.svUndetermined; sx++) { cmbSex.Items.Add(GKUtils.SexStr(sx)); } fEventsList = new GKSheetList(pageEvents); fSpousesList = new GKSheetList(pageSpouses); fSpousesList.OnModify += ModifySpousesSheet; fNamesList = new GKSheetList(pageNames); fAssociationsList = new GKSheetList(pageAssociations); fAssociationsList.OnModify += ModifyAssociationsSheet; fGroupsList = new GKSheetList(pageGroups); fGroupsList.OnModify += ModifyGroupsSheet; fNotesList = new GKSheetList(pageNotes); fMediaList = new GKSheetList(pageMultimedia); fSourcesList = new GKSheetList(pageSources); fUserRefList = new GKSheetList(pageUserRefs); btnPortraitAdd.Image = Bitmap.FromResource("Resources.btn_rec_new.gif"); btnPortraitDelete.Image = Bitmap.FromResource("Resources.btn_rec_delete.gif"); btnFatherAdd.Image = Bitmap.FromResource("Resources.btn_rec_new.gif"); btnFatherDelete.Image = Bitmap.FromResource("Resources.btn_rec_delete.gif"); btnFatherSel.Image = Bitmap.FromResource("Resources.btn_jump.gif"); btnMotherAdd.Image = Bitmap.FromResource("Resources.btn_rec_new.gif"); btnMotherDelete.Image = Bitmap.FromResource("Resources.btn_rec_delete.gif"); btnMotherSel.Image = Bitmap.FromResource("Resources.btn_jump.gif"); btnParentsAdd.Image = Bitmap.FromResource("Resources.btn_rec_new.gif"); btnParentsEdit.Image = Bitmap.FromResource("Resources.btn_rec_edit.gif"); btnParentsDelete.Image = Bitmap.FromResource("Resources.btn_rec_delete.gif"); SetLang(); }
public PersonEditDlg() { InitializeComponent(); txtMarriedSurname.TextChanged += Names_TextChanged; txtSurname.TextChanged += Names_TextChanged; txtName.TextChanged += Names_TextChanged; cmbPatronymic.TextChanged += Names_TextChanged; btnAccept.Image = GKResources.iBtnAccept; btnCancel.Image = GKResources.iBtnCancel; btnPortraitAdd.Image = GKResources.iRecNew; btnPortraitDelete.Image = GKResources.iRecDelete; btnParentsAdd.Image = GKResources.iRecNew; btnParentsEdit.Image = GKResources.iRecEdit; btnParentsDelete.Image = GKResources.iRecDelete; btnFatherAdd.Image = GKResources.iRecNew; btnFatherDelete.Image = GKResources.iRecEdit; btnFatherSel.Image = GKResources.iRecDelete; btnMotherAdd.Image = GKResources.iRecNew; btnMotherDelete.Image = GKResources.iRecEdit; btnMotherSel.Image = GKResources.iRecDelete; btnNameCopy.Image = GKResources.iCopy; imgPortrait.AddButton(btnPortraitAdd); imgPortrait.AddButton(btnPortraitDelete); for (GEDCOMRestriction res = GEDCOMRestriction.rnNone; res <= GEDCOMRestriction.rnPrivacy; res++) { cmbRestriction.Items.Add(LangMan.LS(GKData.Restrictions[(int)res])); } for (GEDCOMSex sx = GEDCOMSex.svNone; sx <= GEDCOMSex.svUndetermined; sx++) { cmbSex.Items.Add(GKUtils.SexStr(sx)); } fEventsList = new GKSheetList(pageEvents); fEventsList.SetControlName("fEventsList"); // for purpose of tests fSpousesList = new GKSheetList(pageSpouses); fSpousesList.SetControlName("fSpousesList"); // for purpose of tests fSpousesList.OnModify += ModifySpousesSheet; fNamesList = new GKSheetList(pageNames); fNamesList.SetControlName("fNamesList"); // for purpose of tests fAssociationsList = new GKSheetList(pageAssociations); fAssociationsList.OnModify += ModifyAssociationsSheet; fAssociationsList.SetControlName("fAssociationsList"); // for purpose of tests fGroupsList = new GKSheetList(pageGroups); fGroupsList.SetControlName("fGroupsList"); // for purpose of tests fGroupsList.OnModify += ModifyGroupsSheet; fNotesList = new GKSheetList(pageNotes); fNotesList.SetControlName("fNotesList"); // for purpose of tests fMediaList = new GKSheetList(pageMultimedia); fMediaList.SetControlName("fMediaList"); // for purpose of tests fSourcesList = new GKSheetList(pageSources); fSourcesList.SetControlName("fSourcesList"); // for purpose of tests fUserRefList = new GKSheetList(pageUserRefs); fUserRefList.SetControlName("fUserRefList"); // for purpose of tests btnPortraitAdd.Image = GKResources.iRecNew; btnPortraitDelete.Image = GKResources.iRecDelete; btnFatherAdd.Image = GKResources.iRecNew; btnFatherDelete.Image = GKResources.iRecDelete; btnFatherSel.Image = GKResources.iToMan; btnMotherAdd.Image = GKResources.iRecNew; btnMotherDelete.Image = GKResources.iRecDelete; btnMotherSel.Image = GKResources.iToMan; btnParentsAdd.Image = GKResources.iRecNew; btnParentsEdit.Image = GKResources.iRecEdit; btnParentsDelete.Image = GKResources.iRecDelete; imgPortrait.SizeMode = PictureBoxSizeMode.CenterImage; SetLang(); }