Last active
November 19, 2015 15:55
-
-
Save localdevm/1f04a1bb6d97f99f9bd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Documents; | |
using System.Windows.Input; | |
using System.Windows.Media; | |
using System.Windows.Media.Imaging; | |
using System.Windows.Navigation; | |
using System.Windows.Shapes; | |
namespace Opgave7._7 | |
{ | |
/// <summary> | |
/// Interaction logic for MainWindow.xaml | |
/// </summary> | |
public partial class MainWindow : Window | |
{ | |
public MainWindow() | |
{ | |
InitializeComponent(); | |
} | |
string click = string.Empty; | |
string operand1 = string.Empty; | |
string operand2 = string.Empty; | |
char operation; | |
int resultaat = 0; | |
private void btnNumber(object sender, RoutedEventArgs e) | |
{ | |
var button = (Button)sender; | |
this.click += (string)button.Content; | |
txbInput.Text= click; | |
} | |
private void btnPlus(object sender, RoutedEventArgs e) | |
{ | |
var button = (Button)sender; | |
this.operation = (Convert.ToChar("+")); | |
} | |
private void btnMinus(object sender, RoutedEventArgs e) | |
{ | |
var button = (Button)sender; | |
this.operation = (Convert.ToChar("-")); | |
} | |
private void btnEquals(object sender, RoutedEventArgs e) | |
{ | |
var button = (Button)sender; | |
this.operation = (Convert.ToChar("=")); | |
//if statement char | |
} | |
private void btnClear(object sender, RoutedEventArgs e) | |
{ | |
click = ""; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment