سفارش تبلیغ
صبا ویژن
هرکس سه بار بر تو خشمگین شد و درباره ات سخنی ناروا نگفت، او را به دوستی بگیر . [امام صادق علیه السلام]

علمی ،آموزشی،تحقیقاتی

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace WindowsApplication1

{

public partial class Form1 : Form

{

bool p = true;

byte mod;

double a, b, c;

public Form1()

{

InitializeComponent();

}

private void button1_Click( sender, EventArgs e)

{

if (p)

textBox1.Text += button1.Text;

else

{

textBox1.Clear();

textBox1.Text += button1.Text;

p = !p;

}

}

private void button16_Click( sender, EventArgs e)

{

a = Convert.ToDouble(textBox1.Text );

p = !p;

mod = 1;

}

private void button2_Click( sender, EventArgs e)

{

if (p)

textBox1.Text += button2.Text;

else

{

textBox1.Clear();

textBox1.Text += button2.Text;

p = !p;

}

}

private void button12_Click( sender, EventArgs e)

{

b = Convert.ToDouble(textBox1.Text);

switch (mod)

{

case 1:

c = a + b;

break;

case 2:

c = a - b;

break;

case 3:

c = a * b;

break;

case 4:

c = a / b;

break;

}

textBox1.Text = c.ToString();

}

private void button13_Click( sender, EventArgs e)

{

a = Convert.ToDouble(textBox1.Text);

p = !p;

mod = 2;

}

private void button15_Click( sender, EventArgs e)

{

a = Convert.ToDouble(textBox1.Text);

p = !p;

mod = 3;

}

private void button14_Click( sender, EventArgs e)

{

a = Convert.ToDouble(textBox1.Text);

p = !p;

mod = 4;

}

private void button3_Click( sender, EventArgs e)

{

if (p)

textBox1.Text += button3.Text;

else

{

textBox1.Clear();

textBox1.Text += button3.Text;

p = !p;

}

}

private void button4_Click( sender, EventArgs e)

{

if (p)

textBox1.Text += button4.Text;

else

{

textBox1.Clear();

textBox1.Text += button4.Text;

p = !p;

}

}

private void button5_Click( sender, EventArgs e)

{

if (p)

textBox1.Text += button5.Text;

else

{

textBox1.Clear();

textBox1.Text += button5.Text;

p = !p;

}

}

private void button6_Click( sender, EventArgs e)

{

if (p)

textBox1.Text += button6.Text;

else

{

textBox1.Clear();

textBox1.Text += button6.Text;

p = !p;

}

}

private void button7_Click( sender, EventArgs e)

{

if (p)

textBox1.Text += button7.Text;

else

{

textBox1.Clear();

textBox1.Text += button7.Text;

p = !p;

}

}

private void button8_Click( sender, EventArgs e)

{

if (p)

textBox1.Text += button8.Text;

else

{

textBox1.Clear();

textBox1.Text += button8.Text;

p = !p;

}

}

private void button9_Click( sender, EventArgs e)

{

if (p)

textBox1.Text += button9.Text;

else

{

textBox1.Clear();

textBox1.Text += button9.Text;

p = !p;

}

}

private void button10_Click( sender, EventArgs e)

{

if (p)

textBox1.Text += button10.Text;

else

{

textBox1.Clear();

textBox1.Text += button10.Text;

p = !p;

}

}

private void button17_Click( sender, EventArgs e)

{

a = Convert.ToDouble(textBox1.Text );

a = Math.Sin(a);

textBox1.Text = a.ToString();

}

private void Form1_Load( sender, EventArgs e)

{

}

}

}




مژده فرجی ::: یکشنبه 87/9/3::: ساعت 1:16 عصر

>> بازدیدهای وبلاگ <<
بازدید امروز: 0


بازدید دیروز: 12


کل بازدید :59550
 
 >>اوقات شرعی <<
 
>> درباره خودم<<
مدیر وبلاگ : مژده فرجی[85]
نویسندگان وبلاگ :
سمانه طالبی (@)[0]

مژده فرجی (@)[0]


 
 
>>موسیقی وبلاگ<<
 
>>اشتراک در خبرنامه<<
 
 
>>طراح قالب<<