예제 #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);
     }
 }
        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)
 {
 }