Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox3.Text == "" || textBox4.Text == "")
     {
         MessageBox.Show("Select two persons");
         textBox3.Text = "";
         textBox4.Text = "";
     }
     else if (Search.CheckName(textBox3.Text) == false || Search.CheckName(textBox4.Text) == false)
     {
         MessageBox.Show("Incorrect name");
         textBox3.Text = "";
         textBox4.Text = "";
     }
     else
     {
         int[] first  = Search.SearchAll(textBox3.Text);
         int[] second = Search.SearchAll(textBox4.Text);
         if (first == null || second == null)
         {
             MessageBox.Show("No such person");
             textBox3.Text = "";
             textBox4.Text = "";
         }
         else
         {
             //textBox2.Text = graph(textBox3.Text, textBox4.Text);
         }
     }
 }
Ejemplo n.º 2
0
 private void button3_Click(object sender, EventArgs e)
 {
     int[] find = Search.SearchAll(textBox1.Text);
     if (find == null)
     {
         MessageBox.Show("No such person");
         textBox1.Text = "";
     }
     else
     {
         GenealogicalTree genealogicalTree = new GenealogicalTree(find[0]);
         genealogicalTree.Show();
     }
 }
Ejemplo n.º 3
0
 public SearchPresenter(string str)
 {
     int[] find = Search.SearchAll(str);
     if (find == null)
     {
         MessageBox.Show("No such person");
     }
     else if (find.Length == 1)
     {
         RunAndStrartTree runAndStrartTree = new RunAndStrartTree(find[0]);
     }
     else
     {
         var          contId       = new ContainerId();
         ShowTreeList showTreeList = new ShowTreeList(find, contId);
         showTreeList.ShowDialog();
         RunAndStrartTree runAndStrartTree = new RunAndStrartTree(contId.ID);
     }
 }
Ejemplo n.º 4
0
 public Person(string Surname,
               string Maiden_Name,
               string Name,
               string Patronymic,
               string Birthday,
               string Birt,
               string Place_of_birth,
               string Date_of_death,
               string Death,
               string Place_of_death,
               string Nationality,
               string Sosial,
               string Educations,
               string Proffesions,
               string Address,
               string From_ty,
               string Source,
               string Curriculum,
               string Mother,
               string Father)
 {
     this.Surname = Surname;
     if (Maiden_Name != "-")
     {
         this.Maiden_Name = Maiden_Name;
     }
     this.Name       = Name;
     this.Patronymic = Patronymic;
     this.Birthday   = Birthday;
     if (Birt == "yes")
     {
         this.Birt = true;
     }
     else
     {
         this.Birt = false;
     }
     this.Place_of_birth = Place_of_birth;
     this.Date_of_death  = Date_of_death;
     if (Death == "yes")
     {
         this.Death = true;
     }
     else
     {
         this.Death = false;
     }
     this.Place_of_death = Place_of_death;
     this.Nationality    = Nationality;
     this.Sosial         = Sosial;
     this.Educations     = Educations;
     this.Proffesions    = Proffesions;
     this.Address        = Address;
     this.From_ty        = From_ty;
     this.Source         = Source;
     this.Curriculum     = Curriculum;
     this.Mother         = Mother;
     this.Father         = Father;
     ID++;
     id  = ID;
     idF = Search.SearchAll(Father)[0];
     idM = Search.SearchAll(Mother)[0];
     PersonList[idF].idch.Add(this.id);
 }