Beispiel #1
0
        private void NewTestButton_Click(object sender, RoutedEventArgs e)
        {
            var editTestWindow = new EditTest(new Test(), GetEligibleTests(_saveObject.Tests));

            var result = editTestWindow.ShowDialog();

            if (result == true)
            {
                _saveObject.Tests.Add(editTestWindow.Test);
                SaveCurrentSaveObject();
            }
        }
Beispiel #2
0
        private void TestsList_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            var selected       = ((ListBox)sender).SelectedValue.ToString();
            var selectedTest   = _saveObject.Tests.First(x => x.TestName == selected);
            var eligibleTests  = GetEligibleTests(_saveObject.Tests, selectedTest);
            var editTestWindow = new EditTest(selectedTest, eligibleTests);

            var result = editTestWindow.ShowDialog();

            if (result == true)
            {
                SaveCurrentSaveObject();
            }
        }