CALCULATOR APPLICATION

Similar documents
FDSc in ICT. Building a Program in C#

if (say==0) { k.commandtext = "Insert into kullanici(k_adi,sifre) values('" + textbox3.text + "','" + textbox4.text + "')"; k.

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output

CSIS 1624 CLASS TEST 6

Object oriented lab /second year / review/lecturer: yasmin maki

You can call the project anything you like I will be calling this one project slide show.

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox]

First start a new Windows Form Application from C# and name it Interest Calculator. We need 3 text boxes. 4 labels. 1 button

IBSDK Quick Start Tutorial for C# 2010

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() call. //

string spath; string sedifile = "277_005010X228.X12"; string sseffile = "277_005010X228.SemRef.EVAL0.SEF";

Visual Basic/C# Programming (330)

Form Properties Window

// Specify SEF file to load. edischema oschema = oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at:

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK.

Start Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock.

Click on the empty form and apply the following options to the properties Windows.

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project.

II. Programming Technologies

Start Visual Studio, create a new project called Helicopter Game and press OK

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer..

// Specify SEF file to load. oschema = (edischema) oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

} } public void getir() { DataTable dt = vt.dtgetir("select* from stok order by stokadi");

C:\homeworks\PenAttention_v13_src\PenAttention_v13_src\PenAttention4\PenAttention\PenAttention.cs 1 using System; 2 using System.Diagnostics; 3 using

Mainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below.

Tutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output

Classes in C# namespace classtest { public class myclass { public myclass() { } } }

LISTING PROGRAM. //Find the maximum and minimum values in the array int maxvalue = integers[0]; //start with first element int minvalue = integers[0];

Class Test 4. Question 1. Use notepad to create a console application that displays a stick figure. See figure 1. Question 2

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) )

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer

Answer on Question# Programming, C#

بسم هللا الرحمن الرحيم المحاضرة السابعة مستوى ثالث علوم حاسوب برمجة مرئية 2 )عملي ) جامعة الجزيرة محافظة اب الجمهورية اليمنية النافذة الرئيسية

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them.

User-Defined Controls

namespace csharp_gen277x214 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

C# winforms gridview

Chapter 12. Tool Strips, Status Strips, and Splitters

Visual Studio Windows Form Application #1 Basic Form Properties

Inheriting Windows Forms with Visual C#.NET

Representing Recursive Relationships Using REP++ TreeView

เว บแอพล เคช น. private void Back_Click(object sender, EventArgs e) { this.webbrowser2.goback(); }

Create your own Meme Maker in C#

Visual Basic/C# Programming (330)

Conventions in this tutorial

UNIT-3. Prepared by R.VINODINI 1

The Gracefulness of the Merging Graph N ** C 4 with Dotnet Framework

This is the start of the server code

Визуал програмчлал. Багш: Ж. Шинэбаяр /Маг/

Overview. Building a Web-Enabled Decision Support System. Integrating DSS in Business Curriculum. Introduction to DatabaseSupport Systems

Tutorial 5 Completing the Inventory Application Introducing Programming

Writing Your First Autodesk Revit Model Review Plug-In

// Precondition: None // Postcondition: The address' name has been set to the // specified value set;

Huw Talliss Data Structures and Variables. Variables

Savoy ActiveX Control User Guide

Chapter 2. Ans. C (p. 55) 2. Which is not a control you can find in the Toolbox? A. Label B. PictureBox C. Properties Window D.

pojedinačnom elementu niza se pristupa imeniza[indeks] indeks od 0 do n-1

LIGHT_P_TOGGLE, LIGHT_N_TOGGLE, BATTERY_TOGGLE, ALTERNATOR_TOGGLE, AVIONICS_TOGGLE, FLOAT_RETRACT, FLOAT_EXTEND }

namespace spojneice { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

عنوان مقاله : خواندن و نوشتن محتوای فایل های Excel بدون استفاده ازAutomation Excel تهیه وتنظیم کننده : مرجع تخصصی برنامه نویسان


Developing for Mobile Devices Lab (Part 1 of 2)

namespace Gen837X222A1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

Quick Guide for the ServoWorks.NET API 2010/7/13

NI USB-TC01 Thermocouple Measurement Device

Custom Control Tutorial

APARAT DE MASURA. Descrierea programului

Chapter 6 Dialogs. Creating a Dialog Style Form

APÉNDICE J. CÓDIGO DEL ARCHIVO FORM1.CS EN LENGUAJE C# Comprende:

Unit 1 Workbook ICS3U

namespace csharp_gen837x223a2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

// Program 2 - Extra Credit // CIS // Spring // Due: 3/11/2015. // By: Andrew L. Wright. //Edited by : Ben Spalding

Class Test 5. Create a simple paint program that conforms to the following requirements.

Model JI-4040 USB Multifunction Digital I/O Module - Isolated. Programmer s Interface Document

Web Services in.net (2)

Chapter 13 Working with Threads

Hands-On Lab (MBL04) Lab Manual Incorporating COM Objects into Your.NET Compact Framework 2.0 Application

EE 356 Assigned: Oct. 4, 2017 Project 4 Due: Oct. 16, 2017

ListBox. Class ListBoxTest. Allows users to add and remove items from ListBox Uses event handlers to add to, remove from, and clear list

Brian Kiser November Vigilant C# 2.5. Commonwealth of Kentucky Frankfort, Kentucky

XNA 4.0 RPG Tutorials. Part 11b. Game Editors

The first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear.

Sub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0.

Engr 123 April 25, 2018 Final Exam Review. 3. Write a method which will accept a string and return the number of three-letter words in the string.

private string sconnection = ConfigurationManager.ConnectionStrings["Development"].ConnectionString

Eyes of the Dragon - XNA Part 37 Map Editor Revisited

IOSR Journal of Engineering (IOSRJEN) e-issn: , p-issn: Vol. 3, Issue 8 (August. 2013), V3 PP 25-33

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime

PS2 Random Walk Simulator

Hands-On Lab. Lab: Client Object Model. Lab version: Last updated: 2/23/2011

Lecture 8 Building an MDI Application

Using Template Bookmarks for Automating Microsoft Word Reports

Lab - 1. Solution : 1. // Building a Simple Console Application. class HelloCsharp. static void Main() System.Console.WriteLine ("Hello from C#.

Campo Minato Nel Form1 sono presenti i seguenti componenti:

Tutorial 19 - Microwave Oven Application Building Your Own Classes and Objects

private void Form1_Load(object sender, EventArgs e) {

Teacher Training Solutions

Transcription:

CALCULATOR APPLICATION Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace CR public partial class Calculator : Form bool plus = false; bool minus = false; bool divide = false; bool multiply = false;

bool equal = false; public Calculator() InitializeComponent(); private void btn1_click(object sender, EventArgs e) checkwhetherequal(); abc(); txtresult.text = txtresult.text + "1"; private void abc() // throw new NotImplementedException(); private void checkwhetherequal() if (equal) equal = false; //throw new NotImplementedException(); private void CheckIfEqual() //throw new NotImplementedException(); if (equal) equal = false; private void btn0_click(object sender, EventArgs e)

txtresult.text = txtresult.text + "0"; private void btn2_click(object sender, EventArgs e) txtresult.text = txtresult.text + "2"; private void btn3_click(object sender, EventArgs e) txtresult.text = txtresult.text + "3"; private void btn4_click(object sender, EventArgs e) txtresult.text = txtresult.text + "4"; private void btn5_click(object sender, EventArgs e) txtresult.text = txtresult.text + "5"; private void btn6_click(object sender, EventArgs e) txtresult.text = txtresult.text + "6"; private void btn7_click(object sender, EventArgs e) txtresult.text = txtresult.text + "7"; private void btn8_click(object sender, EventArgs e) txtresult.text = txtresult.text + "8";

private void btn9_click(object sender, EventArgs e) txtresult.text = txtresult.text + "9"; private void btnpoint_click(object sender, EventArgs e) if (txtresult.text.contains(".")) txtresult.text = txtresult.text + "."; private void btnplus_click(object sender, EventArgs e) if (txtresult.text == "") plus = true; txtresult.tag = txtresult.text; private void btnequals_click(object sender, EventArgs e) //int i = 9; //double d; //d = Math.Sqrt(i); //MessageBox.Show(d.ToString()); equal = true;

if (plus) decimal dec = Convert.ToDecimal(txtResult.Tag) + Convert.ToDecimal(txtResult.Text); txtresult.text = dec.tostring(); if (minus) decimal dec = Convert.ToDecimal(txtResult.Tag) - Convert.ToDecimal(txtResult.Text); txtresult.text = dec.tostring(); if (divide) decimal dec = Convert.ToDecimal(txtResult.Tag) / Convert.ToDecimal(txtResult.Text); txtresult.text = dec.tostring(); if (multiply) decimal dec = Convert.ToDecimal(txtResult.Tag) * Convert.ToDecimal(txtResult.Text); txtresult.text = dec.tostring(); private void btnminus_click(object sender, EventArgs e) if (txtresult.text == "") minus = true; txtresult.tag = txtresult.text; private void btndiv_click(object sender, EventArgs e) if (txtresult.text == "")

divide = true; txtresult.tag = txtresult.text; private void btnmul_click(object sender, EventArgs e) if (txtresult.text == "") multiply = true; txtresult.tag = txtresult.text; private void btnclear_click(object sender, EventArgs e) plus = minus = divide = multiply = false; txtresult.tag = ""; private void Calculator_Load(object sender, EventArgs e) //private void button1_click(object sender, EventArgs e) // // System.String s; // System.Text.StringBuilder s1;

// MessageBox.Show(typeof(string).ToString()); // //private void button1_click(object sender, EventArgs e) // // string s = "ashish"; // bool i=s // MessageBox.Show(s.GetType()); //

PROGRAM.cs using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace CR static class Program /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Calculator());