Exemple #1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            string str;
            BoxInput frmInput = new BoxInput();
            frmInput.ShowDialog();
            str = frmInput.Text;
            frmInput.Close();

            //Box b = new Box(str);
            BoxType b = new BoxType(GetLineAndPos(), str);
            //string s1  = b.Draw();
            //m.Add(b, GetLineAndPos());
            m.Add(b);
            txtDrawingBoard.Text = m.ToString();
            model.Add(b);
        }
Exemple #2
0
 private void button12_Click(object sender, EventArgs e)
 {
     if (SelectedBox.type == CompType.box)
     {
         //model.Remove(SelectedBox);
         BoxType bt = new BoxType();
         bt.StartPt = GetLineAndPos();
         bt.Text = SelectedBox.Text;
         model.Add(bt);
         m.Reset();
         foreach (BaseType b in model.GetList)
         {
             m.Add(b);
         }
         /*m.Add(bt);*/
         txtDrawingBoard.Text = m.ToString();
         button12.Enabled = false;
         button10.Enabled = false;
         button14.Enabled = false;
     }
     else
     {
         LinkType l = new LinkType();
         l.Text = SelectedBox.Text;
         l.StartPt = GetLineAndPos();
         model.Add(l);
         m.Add(l);
         txtDrawingBoard.Text = m.ToString();
         button12.Enabled = false;
         button10.Enabled = false;
         button14.Enabled = false;
     }
 }