Exemple #1
0
 private void Append_Click(object sender, EventArgs e)
 {
     if (AppBox.Text != "")
     {
         LOIsD = false;
         floatBST.append(float.Parse(AppBox.Text), true);
         if (!floatList.Contains(float.Parse(AppBox.Text)))
         {
             floatList.Add(float.Parse(AppBox.Text));
             lastf = float.Parse(AppBox.Text);
         }
     }
 }
 private void Append_Click(object sender, EventArgs e)
 {
     if (AppBox.Text != "")
     {
         LOIsD = false;
         stringBST.append(AppBox.Text, true);
         if (!stringList.Contains(AppBox.Text))
         {
             stringList.Add(AppBox.Text);
             lasts = AppBox.Text;
         }
     }
 }
Exemple #3
0
 private void Append_Click(object sender, EventArgs e)
 {
     if (AppBox.Text != "")
     {
         LOIsD = false;
         intBST.append(int.Parse(AppBox.Text), true);
         if (!intList.Contains(int.Parse(AppBox.Text)))
         {
             intList.Add(int.Parse(AppBox.Text));
             lasti = int.Parse(AppBox.Text);
         }
     }
 }
Exemple #4
0
        private void Open_Click(object sender, EventArgs e)
        {
            StreamReader   reader = null;
            OpenFileDialog open   = new OpenFileDialog();

            open.Title            = "Open Text File";
            open.Filter           = "TXT files|*.txt";
            open.InitialDirectory = @"C:\";
            if (open.ShowDialog() == DialogResult.OK)
            {
                using (reader = new StreamReader(open.FileName))
                {
                    opendFromFile = true;
                    OpendFilePath = open.FileName;

                    this.Invalidate();
                    this.Refresh();
                    floatBST  = new BST <float>(this);
                    floatList = new List <float>();
                    string line;
                    while ((line = reader.ReadLine()) != null)
                    {
                        floatBST.append(float.Parse(line), false);
                        floatList.Add(float.Parse(line));
                    }
                    reader.Close();
                }
            }
        }
Exemple #5
0
 public void ReDraw()
 {
     this.Invalidate();
     this.Refresh();
     floatBST = new BST <float>(this);
     for (int i = 0; i < floatList.Count; i++)
     {
         floatBST.append(floatList[i], false);
     }
 }
 public void ReDraw()
 {
     this.Invalidate();
     this.Refresh();
     stringBST = new BST <string>(this);
     for (int i = 0; i < stringList.Count; i++)
     {
         stringBST.append(stringList[i], false);
     }
 }