private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (MainSelection.SelectedItems.Count > 4) { MainSelection.UnselectAll(); } else { ModuleData.Selected = new int[] { -1, -1, -1, -1 }; int i = 0; foreach (ListBoxItem item in MainSelection.SelectedItems) { ModuleData.Selected[i] = (int)item.Tag; i++; } ModuleSolver.SolveKeypads(ref ModuleData); } }
private void Reset_Click(object sender, RoutedEventArgs e) { MainSelection.UnselectAll(); ModuleData.OtherOptions.Clear(); ModuleData.SetSolution(null); }