KONU : C Sharp ( C# ) form uygulamalar dört işlem hesap makinesi yapma, iki textbox girişi kullanarak hesap makinesi yapma, toplama, çıkarma, bölme ,çarpma işlemleri 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ı
ETİKETLER:
UYGULAMAYI İNDİR
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace Hesap_Makinesi
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox txtBirinciSayi;
private System.Windows.Forms.TextBox txtIkinciSayi;
private System.Windows.Forms.Label lblOperatör;
private System.Windows.Forms.Button btnTopla;
private System.Windows.Forms.Button btnCikar;
private System.Windows.Forms.Button btnCarp;
private System.Windows.Forms.Button btnBol;
private System.Windows.Forms.Label lblSonucText;
private System.Windows.Forms.Label lblSonuc;
///
/// 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);
}
#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.txtBirinciSayi = new System.Windows.Forms.TextBox();
this.txtIkinciSayi = new System.Windows.Forms.TextBox();
this.lblOperatör = new System.Windows.Forms.Label();
this.btnTopla = new System.Windows.Forms.Button();
this.btnCikar = new System.Windows.Forms.Button();
this.btnCarp = new System.Windows.Forms.Button();
this.btnBol = new System.Windows.Forms.Button();
this.lblSonucText = new System.Windows.Forms.Label();
this.lblSonuc = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// textBox1
//
this.txtBirinciSayi.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtBirinciSayi.ForeColor = System.Drawing.SystemColors.HotTrack;
this.txtBirinciSayi.Location = new System.Drawing.Point(24, 19);
this.txtBirinciSayi.Name = "textBox1";
this.txtBirinciSayi.Size = new System.Drawing.Size(100, 20);
this.txtBirinciSayi.TabIndex = 0;
this.txtBirinciSayi.Text = "0";
//
// textBox2
//
this.txtIkinciSayi.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtIkinciSayi.ForeColor = System.Drawing.SystemColors.HotTrack;
this.txtIkinciSayi.Location = new System.Drawing.Point(160, 19);
this.txtIkinciSayi.Name = "textBox2";
this.txtIkinciSayi.Size = new System.Drawing.Size(100, 20);
this.txtIkinciSayi.TabIndex = 1;
this.txtIkinciSayi.Text = "0";
//
// label2
//
this.lblOperatör.AutoSize = true;
this.lblOperatör.Location = new System.Drawing.Point(136, 22);
this.lblOperatör.Name = "label2";
this.lblOperatör.Size = new System.Drawing.Size(13, 13);
this.lblOperatör.TabIndex = 3;
this.lblOperatör.Text = "_";
this.lblOperatör.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// button1
//
this.btnTopla.ForeColor = System.Drawing.Color.DarkRed;
this.btnTopla.Location = new System.Drawing.Point(48, 59);
this.btnTopla.Name = "button1";
this.btnTopla.Size = new System.Drawing.Size(32, 23);
this.btnTopla.TabIndex = 4;
this.btnTopla.Text = "+";
this.btnTopla.Click += new System.EventHandler(this.btnTopla_Click);
//
// button2
//
this.btnCikar.ForeColor = System.Drawing.Color.DarkRed;
this.btnCikar.Location = new System.Drawing.Point(96, 59);
this.btnCikar.Name = "button2";
this.btnCikar.Size = new System.Drawing.Size(32, 23);
this.btnCikar.TabIndex = 5;
this.btnCikar.Text = "-";
this.btnCikar.Click += new System.EventHandler(this.BtnCikar_Click);
//
// button3
//
this.btnCarp.ForeColor = System.Drawing.Color.DarkRed;
this.btnCarp.Location = new System.Drawing.Point(144, 59);
this.btnCarp.Name = "button3";
this.btnCarp.Size = new System.Drawing.Size(32, 23);
this.btnCarp.TabIndex = 6;
this.btnCarp.Text = "*";
this.btnCarp.Click += new System.EventHandler(this.btnCarp_Click);
//
// button4
//
this.btnBol.ForeColor = System.Drawing.Color.DarkRed;
this.btnBol.Location = new System.Drawing.Point(192, 59);
this.btnBol.Name = "button4";
this.btnBol.Size = new System.Drawing.Size(32, 23);
this.btnBol.TabIndex = 7;
this.btnBol.Text = "/";
this.btnBol.Click += new System.EventHandler(this.btnBol_Click);
//
// label3
//
this.lblSonucText.AutoSize = true;
this.lblSonucText.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
this.lblSonucText.ForeColor = System.Drawing.Color.Maroon;
this.lblSonucText.Location = new System.Drawing.Point(96, 107);
this.lblSonucText.Name = "label3";
this.lblSonucText.Size = new System.Drawing.Size(51, 15);
this.lblSonucText.TabIndex = 8;
this.lblSonucText.Text = "Sonuç : ";
this.lblSonucText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label4
//
this.lblSonuc.AutoSize = true;
this.lblSonuc.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
this.lblSonuc.ForeColor = System.Drawing.Color.Maroon;
this.lblSonuc.Location = new System.Drawing.Point(144, 107);
this.lblSonuc.Name = "label4";
this.lblSonuc.Size = new System.Drawing.Size(14, 15);
this.lblSonuc.TabIndex = 9;
this.lblSonuc.Text = "0";
this.lblSonuc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(292, 147);
this.Controls.Add(this.lblSonuc);
this.Controls.Add(this.lblSonucText);
this.Controls.Add(this.btnBol);
this.Controls.Add(this.btnCarp);
this.Controls.Add(this.btnCikar);
this.Controls.Add(this.btnTopla);
this.Controls.Add(this.lblOperatör);
this.Controls.Add(this.txtIkinciSayi);
this.Controls.Add(this.txtBirinciSayi);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
this.Text = "Hesap Makinesi";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
double sayi1, sayi2;
private void btnTopla_Click(object sender, System.EventArgs e)
{
if (txtBirinciSayi.Text != "" &&
txtIkinciSayi.Text != "")
{
sayi1 = Convert.ToDouble(txtBirinciSayi.Text);
sayi2 = Convert.ToDouble(txtIkinciSayi.Text);
lblSonuc.Text = Convert.ToString(sayi1 + sayi2);
lblOperatör.Text = "+";
}
else lblSonuc.Text = "Hatalı Giriş";
}
private void BtnCikar_Click(object sender, System.EventArgs e)
{
if (txtBirinciSayi.Text != "" &&
txtIkinciSayi.Text != "")
{
sayi1 = Convert.ToDouble(txtBirinciSayi.Text);
sayi2 = Convert.ToDouble(txtIkinciSayi.Text);
lblSonuc.Text = Convert.ToString(sayi1 - sayi2);
lblOperatör.Text = "-";
}
else lblSonuc.Text = "Hatalı Giriş";
}
private void btnCarp_Click(object sender, System.EventArgs e)
{
if (txtBirinciSayi.Text != "" && txtIkinciSayi.Text != "")
{
sayi1 = Convert.ToDouble(txtBirinciSayi.Text);
sayi2 = Convert.ToDouble(txtIkinciSayi.Text);
lblSonuc.Text = Convert.ToString(sayi1 * sayi2);
lblOperatör.Text = "*";
}
else lblSonuc.Text = "Hatalı Giriş";
}
private void btnBol_Click(object sender, System.EventArgs e)
{
if (txtBirinciSayi.Text != "" &&
txtIkinciSayi.Text != "" &&
Convert.ToDouble(txtIkinciSayi.Text) != 0)
{
sayi1 = Convert.ToDouble(txtBirinciSayi.Text);
sayi2 = Convert.ToDouble(txtIkinciSayi.Text);
lblSonuc.Text = Convert.ToString(sayi1 / sayi2);
lblOperatör.Text = "/";
}
else lblSonuc.Text = "Hatalı Giriş";
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
DİĞER C SHARP UYGULAMALARI |
||
---|---|---|
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