コード例 #1
0
ファイル: Form1.cs プロジェクト: JenyaKirmiza/AutoCad
 private void сфераToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (toolStripButton6.Checked)
     {
         сфераToolStripMenuItem.Checked = true;
         numericUpDown1.Enabled = false;
         fd = FigureGraw.Sphere;
         state = States.NONE;
         ломаннаяЛинияToolStripMenuItem.Checked = false;
         пирамидаToolStripMenuItem.Checked = false;
         курсорToolStripMenuItem.Checked = false;
         toolStripButton5.Checked = false;
         toolStripButton4.Checked = false;
         toolStripButton1.Checked = false;
     }
     if (сфераToolStripMenuItem.Checked)
     {
         numericUpDown1.Enabled = false;
         fd = FigureGraw.Sphere;
         state = States.NONE;
         ломаннаяЛинияToolStripMenuItem.Checked = false;
         пирамидаToolStripMenuItem.Checked = false;
         курсорToolStripMenuItem.Checked = false;
         toolStripButton5.Checked = false;
         toolStripButton4.Checked = false;
         toolStripButton1.Checked = false;
         toolStripButton6.Checked = true;
     }
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: JenyaKirmiza/AutoCad
 private void ломаннаяЛинияToolStripMenuItem_Click(object sender, EventArgs e)
 {
     numericUpDown1.Enabled = false;
     if (toolStripButton4.Checked)
     {
         ломаннаяЛинияToolStripMenuItem.Checked = true;
         сфераToolStripMenuItem.Checked = false;
         пирамидаToolStripMenuItem.Checked = false;
         курсорToolStripMenuItem.Checked = false;
         toolStripButton6.Checked = false;
         toolStripButton5.Checked = false;
         toolStripButton1.Checked = false;
         toolStripButton1.Checked = false;
         fd = FigureGraw.Line;
         state = States.NONE;
         for (int i = 0; i < count; i++)
         {
             select[i].width = select[i].width - 2;
         } drawfigures();
         count = 0;
     }
     if (ломаннаяЛинияToolStripMenuItem.Checked)
     {
         toolStripButton4.Checked = true;
         сфераToolStripMenuItem.Checked = false;
         пирамидаToolStripMenuItem.Checked = false;
         курсорToolStripMenuItem.Checked = false;
         toolStripButton6.Checked = false;
         toolStripButton5.Checked = false;
         toolStripButton1.Checked = false;
         toolStripButton1.Checked = false;
         fd = FigureGraw.Line;
         state = States.NONE;
         for (int i = 0; i < count; i++)
         {
             select[i].width = select[i].width - 2;
         } drawfigures();
         count = 0;
     }
     else
     {
         return;
     }
 }