예제 #1
0
 void button1_Click(object sender, EventArgs e)
 {
     try { if (si1.Text != si2.Text)
           {
               b = int.Parse(textBox1.Text);
               a = int.Parse(textBox2.Text);
               if (b <= maxwi && a <= maxhe)
               {
                   swi                = new Switch();
                   swimen             = new SwitchMenu();
                   swi.main           = this;
                   swimen.main        = this;
                   swimen.label3.Text = si1.Text + " / " + si2.Text;
                   int k = b * a / 2;
                   swi.createscheme(k);
                   int n1 = (b * 28 + 5);
                   if (n1 < 200)
                   {
                       n1 = 200;
                   }
                   swi.Size = new Size(n1, a * 28 + 37);
                   swimen.Show();
                   swi.Show();
                   this.Hide();
               }
           }
           else
           {
               label7.Visible = true;
           } }catch (FormatException) { }
 }
예제 #2
0
 void button1_Click(object sender, EventArgs e)
 {
     try {if(si1.Text!=si2.Text) {
         b =int.Parse(textBox1.Text);
     a=int.Parse(textBox2.Text);
     if(b<=maxwi&&a<=maxhe) {
             swi=new Switch();
             swimen=new SwitchMenu();
             swi.main=this;
             swimen.main=this;
                 swimen.label3.Text=si1.Text+" / "+si2.Text;
            int k=b*a/2;
         swi.createscheme(k);
                 int n1=(b*28+5);
                 if(n1<200) {n1=200; }
         swi.Size=new Size(n1,a*28+37);
           swimen.Show();
     swi.Show();
     this.Hide();}}else {label7.Visible=true;} }catch(FormatException) { }
 }