Beispiel #1
0
 private void ClearButton_Click(object sender, EventArgs e)
 {
     SortDatarichTextBox.Text = "";
     Collection.Clear();
     foreach (var item in PrefubCollection)
     {
         item.Text = "";
     }
     PrefubCollection.Clear();
     Count               = 0;
     PosX                = 0;
     PosY                = -DeltaPosY;
     BubbleLabel.Text    = "Time: ";
     SelectionLabel.Text = "Time: ";
     CocktailLabel.Text  = "Time: ";
     GnomeLabel.Text     = "Time: ";
     HeapLabel.Text      = "Time: ";
     InsertionLabel.Text = "Time: ";
     LSDLabel.Text       = "Time: ";
     MSDLabel.Text       = "Time: ";
     MergeLabel.Text     = "Time: ";
     QuickLabel.Text     = "Time: ";
     ShellLabel.Text     = "Time: ";
     TreeLabel.Text      = "Time: ";
 }
Beispiel #2
0
        private void AddItems(int result)
        {
            var rnd = new Random();
            int value;
            var newCollection = new List <int>();

            for (int i = 0; i < result; i++)
            {
                value = rnd.Next(10, 99);
                newCollection.Add(value);
            }
            Collection.AddRange(newCollection);
            var newPrefubs = AddLabels(newCollection);

            PrefubCollection.AddRange(newPrefubs);
        }