8 Temmuz 2013 Pazartesi

C Sharp Form Uygulamalar Hesap Makinesi Yapımı - Dört İşlem



KONU : C Sharp ( C# ) form uygulamalar hesap makinesi yapma, iki textbox girişi kullanarak hesap makinesi yapma, toplama, çıkarma, bölme ,çarpa,sin ve cos değerlerini hesaplama ve kapama fonksiyonu olan hesap makinesi yapma.
ETİKETLER : c sharp hesap makinesi - c sharp hesap makinesi örneği - c sharp hesap makinesi indir - c sharp hesap makinesi yapma - c sharp hesap makinesi kodları - c sharp hesap makinesi kodu - c# hesap makinesi - c# hesap makinesi kodu - c# hesap makinesi örneği - c# hesap makinesi indir - c# hesap makinesi yapımı - c# hesap makinesi yapımı - c sharp hesap makinesi yapımı




UYGULAMAYI İNDİR
 



using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace HESAPMAKINESI
{
    /// 
    /// Summary description for Form1.
    /// 
    public class Form1 : System.Windows.Forms.Form
    {
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.TextBox textBox2;
        private System.Windows.Forms.Label lblIslem;
        private System.Windows.Forms.Label lblSonuc;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.Button button3;
        private System.Windows.Forms.Button button4;
        private System.Windows.Forms.Button button5;
        private System.Windows.Forms.Button button6;
        private System.Windows.Forms.Button button7;
        private Label label4;
        private Button button8;
        /// 
        /// Required designer variable.
        /// 
        private System.ComponentModel.Container components = null;

        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        /// 
        /// Clean up any resources being used.
        /// 
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }


        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

       
        /// 
        /// The main entry point for the application.
        /// 
     

        private void button1_Click(object sender, System.EventArgs e)
        {
            try
            {
                double birinci_sayi, ikinci_sayi, sonuc;
                birinci_sayi = Convert.ToDouble(textBox1.Text);
                ikinci_sayi = Convert.ToDouble(textBox2.Text);
                sonuc = birinci_sayi + ikinci_sayi;
                lblSonuc.Text = sonuc.ToString();
                lblIslem.Text = "+";
            }
            catch { }
        }

        private void button2_Click(object sender, System.EventArgs e)
        {
            try
            {
                double s1, s2, s3;
                s1 = Convert.ToDouble(textBox1.Text);
                s2 = Convert.ToDouble(textBox2.Text);
                s3 = s1 - s2;
                lblSonuc.Text = s3.ToString();
                lblIslem.Text = "-";
            }
            catch { }
        }

        private void button3_Click(object sender, System.EventArgs e)
        {
            try
            {
                double s1, s2, s3;
                s1 = Convert.ToDouble(textBox1.Text);
                s2 = Convert.ToDouble(textBox2.Text);
                s3 = s1 / s2;
                lblSonuc.Text = s3.ToString();
                lblIslem.Text = "/";
            }
            catch { }
        }

        private void button4_Click(object sender, System.EventArgs e)
        {
            try
            {
                double s1, s2, s3;
                s1 = Convert.ToDouble(textBox1.Text);
                s2 = Convert.ToDouble(textBox2.Text);
                s3 = s1 * s2;
                lblSonuc.Text = s3.ToString();
                lblIslem.Text = "*";
            }
            catch { }
        }

        private void button5_Click(object sender, System.EventArgs e)
        {
            try
            {
                double s1, s2;
                s1 = Convert.ToDouble(textBox1.Text);
                s2 = Math.Sin(s1);
                lblSonuc.Text = s2.ToString();
                lblIslem.Text = "Sin";
            }
            catch { }
        }

        private void button6_Click(object sender, System.EventArgs e)
        {
            Close();
        }

        private void button7_Click(object sender, System.EventArgs e)
        {
            textBox1.Clear();
            textBox2.Clear();
            lblIslem.Text = "";
            lblSonuc.Text = "";
        }

        private void Form1_Load(object sender, System.EventArgs e)
        {
            textBox1.Text = "";
            textBox2.Text = "";
            lblIslem.Text = "";
            lblSonuc.Text = "";
        }

        private void button8_Click(object sender, EventArgs e)
        {
            try
            {
                double s1, s2;
                s1 = Convert.ToDouble(textBox1.Text);
                s2 = Math.Cos(s1);
                lblSonuc.Text = s2.ToString();
                lblIslem.Text = "Cos";
            }
            catch { }
        }
        
        
        #region Windows Form Designer generated code
        /// 
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// 
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.textBox2 = new System.Windows.Forms.TextBox();
            this.lblIslem = new System.Windows.Forms.Label();
            this.lblSonuc = new System.Windows.Forms.Label();
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.button3 = new System.Windows.Forms.Button();
            this.button4 = new System.Windows.Forms.Button();
            this.button5 = new System.Windows.Forms.Button();
            this.button6 = new System.Windows.Forms.Button();
            this.button7 = new System.Windows.Forms.Button();
            this.label4 = new System.Windows.Forms.Label();
            this.button8 = new System.Windows.Forms.Button();
            this.SuspendLayout();
            // 
            // textBox1
            // 
            this.textBox1.Location = new System.Drawing.Point(21, 12);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(100, 20);
            this.textBox1.TabIndex = 0;
            // 
            // textBox2
            // 
            this.textBox2.Location = new System.Drawing.Point(166, 12);
            this.textBox2.Name = "textBox2";
            this.textBox2.Size = new System.Drawing.Size(100, 20);
            this.textBox2.TabIndex = 1;
            // 
            // label1
            // 
            this.lblIslem.Location = new System.Drawing.Point(127, 15);
            this.lblIslem.Name = "label1";
            this.lblIslem.Size = new System.Drawing.Size(33, 12);
            this.lblIslem.TabIndex = 2;
            this.lblIslem.Text = "label1";
            // 
            // label2
            // 
            this.lblSonuc.Location = new System.Drawing.Point(312, 15);
            this.lblSonuc.Name = "label2";
            this.lblSonuc.Size = new System.Drawing.Size(93, 12);
            this.lblSonuc.TabIndex = 3;
            this.lblSonuc.Text = "label2";
            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(21, 56);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(80, 20);
            this.button1.TabIndex = 4;
            this.button1.Text = "Topla";
            this.button1.Click += new System.EventHandler(this.button1_Click);
            // 
            // button2
            // 
            this.button2.Location = new System.Drawing.Point(121, 56);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(80, 20);
            this.button2.TabIndex = 5;
            this.button2.Text = "Çıkar";
            this.button2.Click += new System.EventHandler(this.button2_Click);
            // 
            // button3
            // 
            this.button3.Location = new System.Drawing.Point(121, 81);
            this.button3.Name = "button3";
            this.button3.Size = new System.Drawing.Size(80, 20);
            this.button3.TabIndex = 6;
            this.button3.Text = "Böl";
            this.button3.Click += new System.EventHandler(this.button3_Click);
            // 
            // button4
            // 
            this.button4.Location = new System.Drawing.Point(21, 81);
            this.button4.Name = "button4";
            this.button4.Size = new System.Drawing.Size(80, 20);
            this.button4.TabIndex = 7;
            this.button4.Text = "Çarp";
            this.button4.Click += new System.EventHandler(this.button4_Click);
            // 
            // button5
            // 
            this.button5.Location = new System.Drawing.Point(222, 56);
            this.button5.Name = "button5";
            this.button5.Size = new System.Drawing.Size(84, 20);
            this.button5.TabIndex = 8;
            this.button5.Text = "Sin";
            this.button5.Click += new System.EventHandler(this.button5_Click);
            // 
            // button6
            // 
            this.button6.Location = new System.Drawing.Point(329, 82);
            this.button6.Name = "button6";
            this.button6.Size = new System.Drawing.Size(80, 20);
            this.button6.TabIndex = 9;
            this.button6.Text = "OFF";
            this.button6.Click += new System.EventHandler(this.button6_Click);
            // 
            // button7
            // 
            this.button7.Location = new System.Drawing.Point(329, 56);
            this.button7.Name = "button7";
            this.button7.Size = new System.Drawing.Size(80, 20);
            this.button7.TabIndex = 10;
            this.button7.Text = "C";
            this.button7.Click += new System.EventHandler(this.button7_Click);
            // 
            // label4
            // 
            this.label4.Location = new System.Drawing.Point(272, 15);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(34, 12);
            this.label4.TabIndex = 12;
            this.label4.Text = "=";
            // 
            // button8
            // 
            this.button8.Location = new System.Drawing.Point(222, 81);
            this.button8.Name = "button8";
            this.button8.Size = new System.Drawing.Size(84, 20);
            this.button8.TabIndex = 13;
            this.button8.Text = "Cos";
            this.button8.Click += new System.EventHandler(this.button8_Click);
            // 
            // Form1
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(432, 126);
            this.Controls.Add(this.button8);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.button7);
            this.Controls.Add(this.button6);
            this.Controls.Add(this.button5);
            this.Controls.Add(this.button4);
            this.Controls.Add(this.button3);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.lblSonuc);
            this.Controls.Add(this.lblIslem);
            this.Controls.Add(this.textBox2);
            this.Controls.Add(this.textBox1);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "Form1";
            this.Text = "HESAP MAKİNESİ";
            this.Load += new System.EventHandler(this.Form1_Load);
            this.ResumeLayout(false);
            this.PerformLayout();

        }
        #endregion

    }
}

 


UYGULAMAYI İNDİR




C Sharp Form Uygulamalar Dört İşlem Hesap Makinesi



C Sharp Form Uygulamalar Hesap Makinesi Yapımı - Dört İşlem



C Sharp Uygulamalar Modern Hesap Makinesi



Hiç yorum yok :

Yorum Gönder