Advertisement
Guest User

Untitled

a guest
Apr 13th, 2020
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.01 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15.  
  16.  
  17.  
  18. namespace Lommeregner
  19. {
  20. /// <summary>
  21. /// Interaction logic for MainWindow.xaml
  22. /// </summary>
  23. public partial class MainWindow : Window
  24. {
  25. public int TextBox { get; private set; }
  26.  
  27. public MainWindow()
  28. {
  29.  
  30.  
  31. }
  32.  
  33. // here i chose what the buttons will do
  34.  
  35. private void Reset(object sender, RoutedEventArgs e)
  36. {
  37. MyLabel.Content = "";
  38. }
  39.  
  40.  
  41.  
  42. private void FindSvar(object sender, RoutedEventArgs e)
  43. {
  44.  
  45.  
  46.  
  47. }
  48.  
  49.  
  50. private void Add9(object sender, RoutedEventArgs e)
  51. {
  52.  
  53. MyLabel.Content = MyLabel.Content + "9";
  54. }
  55.  
  56. private void Add8(object sender, RoutedEventArgs e)
  57. {
  58. MyLabel.Content =MyLabel.Content + "8";
  59. }
  60.  
  61. private void Add7(object sender, RoutedEventArgs e)
  62. {
  63. MyLabel.Content = MyLabel.Content + "7";
  64. }
  65.  
  66. private void Add6(object sender, RoutedEventArgs e)
  67. {
  68. MyLabel.Content = MyLabel.Content + "6";
  69. }
  70.  
  71. private void Add5(object sender, RoutedEventArgs e)
  72. {
  73. MyLabel.Content = MyLabel.Content + "5";
  74. }
  75.  
  76. private void Add4(object sender, RoutedEventArgs e)
  77. {
  78. MyLabel.Content = MyLabel.Content + "4";
  79. }
  80.  
  81. private void Add3(object sender, RoutedEventArgs e)
  82. {
  83. MyLabel.Content = MyLabel.Content + "3";
  84. }
  85.  
  86. private void Add2(object sender, RoutedEventArgs e)
  87. {
  88. MyLabel.Content = MyLabel.Content + "2";
  89. }
  90.  
  91. private void Add1(object sender, RoutedEventArgs e)
  92. {
  93. MyLabel.Content = MyLabel.Content + "1";
  94. }
  95.  
  96. private void Add0(object sender, RoutedEventArgs e)
  97. {
  98. MyLabel.Content = MyLabel.Content + "0";
  99. }
  100.  
  101. private void AddMinusTegn(object sender, RoutedEventArgs e)
  102. {
  103. MyLabel.Content = MyLabel.Content + "-";
  104.  
  105. }
  106.  
  107. private void AddKomma(object sender, RoutedEventArgs e)
  108. {
  109. MyLabel.Content = MyLabel.Content + ".";
  110. }
  111.  
  112. private void AddPlus(object sender, RoutedEventArgs e)
  113. {
  114. MyLabel.Content = MyLabel.Content + "+";
  115.  
  116. }
  117.  
  118. private void AddMinus(object sender, RoutedEventArgs e)
  119. {
  120. MyLabel.Content = MyLabel.Content + "-";
  121. }
  122.  
  123. private void AddGange(object sender, RoutedEventArgs e)
  124. {
  125. MyLabel.Content = MyLabel.Content + "*";
  126. }
  127.  
  128. private void AddDividere(object sender, RoutedEventArgs e)
  129. {
  130. MyLabel.Content = MyLabel.Content + "/";
  131. }
  132.  
  133. private void AddParentesStart(object sender, RoutedEventArgs e)
  134. {
  135. MyLabel.Content = MyLabel.Content + "(";
  136. }
  137.  
  138. private void AddParentesSlut(object sender, RoutedEventArgs e)
  139. {
  140. MyLabel.Content = MyLabel.Content + ")";
  141. }
  142.  
  143. private void AddPi(object sender, RoutedEventArgs e)
  144. {
  145. MyLabel.Content = MyLabel.Content + "π";
  146. }
  147.  
  148. private void IX(object sender, RoutedEventArgs e)
  149. {
  150. MyLabel.Content = MyLabel.Content + "^";
  151. }
  152.  
  153. private void IAnden(object sender, RoutedEventArgs e)
  154. {
  155. MyLabel.Content = MyLabel.Content + "^2";
  156.  
  157. }
  158.  
  159. private void NewWindow(object sender, RoutedEventArgs e)
  160. {
  161.  
  162. }
  163. }
  164. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement