Exemplo n.º 1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     array = new AnimationArray(this, 10);
     //attach a debug label
     array.Label = label_array;
     trackbar_animation_speed.Value = array.animation_step;
     label2.Text = "Anim Speed: " + array.animation_step.ToString();
 }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            AnimationArray int_sort_data = array;
            int            n             = array.Length;

            int min;

            for (int i = 0; i < n; i++)
            {
                min = i;
                for (int j = i; j < n - 1; j++)
                {
                    if (int_sort_data[j + 1] < int_sort_data[min])
                    {
                        min = j + 1;
                    }
                }
                array.swap(int_sort_data[i], int_sort_data[min]);
            }
        }