99 lines
2.0 KiB
C#
99 lines
2.0 KiB
C#
using System.Text;
|
|
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 Calculator
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for MainWindow.xaml
|
|
/// </summary>
|
|
public partial class MainWindow : Window
|
|
{
|
|
int num = 0;
|
|
int num2 = 0;
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
private void Button_2_Click_1(object sender, RoutedEventArgs e)
|
|
{
|
|
num = 2;
|
|
|
|
input.Text = $"{num}";
|
|
}
|
|
|
|
private void Button_1_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
num = 1;
|
|
|
|
input.Text = $"{num}";
|
|
}
|
|
|
|
private void Button_3_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
num = 3;
|
|
|
|
input.Text = $"{num}";
|
|
}
|
|
|
|
private void Button_4_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
num = 4;
|
|
|
|
input.Text = $"{num}";
|
|
}
|
|
|
|
private void Button_5_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
num = 5;
|
|
|
|
input.Text = $"{num}";
|
|
}
|
|
|
|
private void Button_6_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
num = 6;
|
|
|
|
input.Text = $"{num}";
|
|
}
|
|
|
|
private void Button_7_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
num = 7;
|
|
|
|
input.Text = $"{num}";
|
|
}
|
|
|
|
private void Button_8_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
num = 8;
|
|
|
|
input.Text = $"{num}";
|
|
}
|
|
|
|
private void Button_9_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
num = 9;
|
|
|
|
input.Text = $"{num}";
|
|
}
|
|
|
|
private void Button_0_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
num = 0;
|
|
|
|
input.Text = $"{num}";
|
|
}
|
|
}
|
|
} |