コード例 #1
0
        private void GraphicObject_Click(object sender, System.EventArgs e)
        {
            if (SelectedPerson != null)
            {
                SelectedPerson.Selected = false;
            }
            if (SelectedUnion != null)
            {
                SelectedUnion.Selected = false;
            }

            System.Windows.Forms.Label l = (System.Windows.Forms.Label)sender;
            SelectedPerson = GeneaManager.Persons[l.Tag.ToString()];
            if (SelectedPerson != null)
            {
                SelectedGraphicObject   = SelectedPerson;
                SelectedPerson.Selected = true;
                ShowPersonDetail(SelectedPerson);
            }
            SelectedUnion = GeneaManager.Unions[l.Tag.ToString()];
            if (SelectedUnion != null)
            {
                SelectedGraphicObject  = SelectedUnion;
                SelectedUnion.Selected = true;
                ShowUnionDetail(SelectedUnion);
            }
        }
コード例 #2
0
 public CUnion Add(string strFolderName)
 {
     try{
         CUnion p = new CUnion(strFolderName);
         return(this.Add(p));
     }
     catch (System.Exception e) {
         GeneaTools.ShowError(e.Message);
         return(null);
     }
 }
コード例 #3
0
        public bool CreateUnion(CPerson UnionMember1, CGeneaManager GeneaManager)
        {
            GeneaManager.Persons.FillComboBox(cboMAN, UnionMember1.IsMan() ? UnionMember1.Guid : null);
            GeneaManager.Persons.FillComboBox(cboWoman, UnionMember1.IsMan() ? null : UnionMember1.Guid);

            if (this.ShowDialog() == DialogResult.OK)
            {
                CPerson Man   = (CPerson)((CSLib.CObjectBoxItem)cboMAN.SelectedItem).Value;
                CPerson Woman = (CPerson)((CSLib.CObjectBoxItem)cboWoman.SelectedItem).Value;

                CUnion u = new CUnion();
                u.Create(Man.Guid, Woman.Guid, this.StartDate.Text, this.EndDate.Text);
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #4
0
 public CUnion Add(CUnion p)
 {
     return((CUnion)this.Add(p.Guid, p));
 }
コード例 #5
0
 private void ShowUnionDetail(CUnion SelectedUnion)
 {
 }