Example #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (RouteList.SelectedItem == null || ScenarioList.SelectedItem == null)
            {
                return;
            }
            var routeId    = ((Route)RouteList.SelectedItem).Id;
            var scenarioId = ((Scenario)ScenarioList.SelectedItem).Id;
            var editWindow = new ScenarioEditWindow(routeId, scenarioId);

            editWindow.Show();
        }
Example #2
0
        private void ScenarioList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var dataContext = ((FrameworkElement)e.OriginalSource).DataContext;

            if (dataContext is Scenario)
            {
                if (RouteList.SelectedItem == null)
                {
                    return;
                }
                var routeId    = ((Route)RouteList.SelectedItem).Id;
                var scenarioId = ((Scenario)dataContext).Id;
                var editWindow = new ScenarioEditWindow(routeId, scenarioId);
                editWindow.Show();
            }
        }