Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 Lommeregner
- {
- /// <summary>
- /// Interaction logic for MainWindow.xaml
- /// </summary>
- public partial class MainWindow : Window
- {
- public int TextBox { get; private set; }
- public MainWindow()
- {
- }
- // here i chose what the buttons will do
- private void Reset(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = "";
- }
- private void FindSvar(object sender, RoutedEventArgs e)
- {
- }
- private void Add9(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "9";
- }
- private void Add8(object sender, RoutedEventArgs e)
- {
- MyLabel.Content =MyLabel.Content + "8";
- }
- private void Add7(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "7";
- }
- private void Add6(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "6";
- }
- private void Add5(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "5";
- }
- private void Add4(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "4";
- }
- private void Add3(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "3";
- }
- private void Add2(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "2";
- }
- private void Add1(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "1";
- }
- private void Add0(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "0";
- }
- private void AddMinusTegn(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "-";
- }
- private void AddKomma(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + ".";
- }
- private void AddPlus(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "+";
- }
- private void AddMinus(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "-";
- }
- private void AddGange(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "*";
- }
- private void AddDividere(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "/";
- }
- private void AddParentesStart(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "(";
- }
- private void AddParentesSlut(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + ")";
- }
- private void AddPi(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "π";
- }
- private void IX(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "^";
- }
- private void IAnden(object sender, RoutedEventArgs e)
- {
- MyLabel.Content = MyLabel.Content + "^2";
- }
- private void NewWindow(object sender, RoutedEventArgs e)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement