Exemplo n.º 1
0
        public async static void IsGelijkAan(double eersteGetal, TextBox textBox1, TextBox textBox2, ListBox listbox1, string teken)
        {
            if (eersteGetal == 0)
            {
                textBox1.Text = textBox1.Text;
                listbox1.Items.Add(textBox1.Text);

                Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
                Windows.Storage.StorageFile   sampleFile    = await storageFolder.GetFileAsync("sample.txt");

                await Windows.Storage.FileIO.AppendTextAsync(sampleFile, "\n" + textBox2.Text);
            }
            else if (textBox1.Text != "")
            {
                textBox1.Text = Convert.ToString(Clas.Berekenen(eersteGetal, double.Parse(textBox1.Text), teken));
                eersteGetal   = 0;
                teken         = "";
                textBox2.Text = textBox1.Text;

                listbox1.Items.Add(textBox1.Text);

                Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
                Windows.Storage.StorageFile   sampleFile    = await storageFolder.GetFileAsync("sample.txt");

                await Windows.Storage.FileIO.AppendTextAsync(sampleFile, "\n" + textBox2.Text);
            }
        }
Exemplo n.º 2
0
 public static void Vermenigvuldigen(TextBox textBox1, TextBox textBox2, ref string teken, ref double eersteGetal)
 {
     if (textBox1.Text != "")
     {
         if (teken == "")
         {
             eersteGetal    = double.Parse(textBox1.Text);
             textBox1.Text  = "";
             teken          = "*";
             textBox2.Text += "*";
         }
         else
         {
             eersteGetal   = Clas.Berekenen(eersteGetal, double.Parse(textBox1.Text), teken);
             textBox1.Text = "";
             teken         = "*";
             textBox2.Text = eersteGetal + "*";
         }
     }
 }
Exemplo n.º 3
0
 public static void Aftrekken(TextBox textBox1, TextBox textBox2, ref string teken, ref double eersteGetal)
 {
     if (textBox1.Text != "")
     {
         if (teken == "")
         {
             eersteGetal    = double.Parse(textBox1.Text);
             textBox1.Text  = "";
             teken          = "-";
             textBox2.Text += "-";
         }
         else
         {
             eersteGetal   = Clas.Berekenen(eersteGetal, double.Parse(textBox1.Text), teken);
             textBox1.Text = "";
             teken         = "-";
             textBox2.Text = textBox2.Text + "-";
         }
     }
 }