private void setButton_Click(object sender, RoutedEventArgs e) { if (SizeBox.Text == null || typeBox.SelectedIndex < 1) { return; } set = true; size = Convert.ToInt32(SizeBox.Text); length = (int)plane.ActualHeight / size; if (length == 0) { length++; } height = (int)plane.ActualHeight / length; init(); visual = new Visualize(plane, arr, size, length, length); switch (typeBox.Text) { case "Selection Sort": sort = new Selection_Sort(visual, arr, size); break; case "Insertion Sort": sort = new Insertion_Sort(visual, arr, size); break; } }
public Insertion_Sort(Visualize visual, int[] arr, int size) : base(visual, arr, size) { }
public Selection_Sort(Visualize visual, int[] arr, int size) : base(visual, arr, size) { }
public Sorts(Visualize visual, int[] arr, int size) { this.visual = visual; this.size = size; this.arr = arr; }