Beispiel #1
0
 private void ResetBtn_Click(object sender, EventArgs e)
 {
     Xs.Clear();
     Ys.Clear();
     YTxtB.Clear();
     XTxtB.Clear();
     Resultlbl.Text = "";
 }
Beispiel #2
0
        private void AddBtn_Click(object sender, EventArgs e)
        {
            try
            {
                if (YTxtB.Text != string.Empty && XTxtB.Text != string.Empty)
                {
                    Ys.Add(Convert.ToDouble(YTxtB.Text));
                    Xs.Add(Convert.ToDouble(XTxtB.Text));
                }
                else
                {
                    MessageBox.Show("In order to save please add cordinate in X textbox also in Y textbox ");
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Error adding the cordinates, please insert in correct format.         Example 1.2 => 1,2");
            }

            YTxtB.Clear();
            XTxtB.Clear();
        }