Ejemplo n.º 1
0
 /* добавление маршрута */
 private void AddRouteBtn_Click(object sender, RoutedEventArgs e)
 {
     var editRouteForm = new editRoute(null, routesWindow);
     editRouteForm.Owner = this;
     editRouteForm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
     editRouteForm.ShowDialog();
 }
Ejemplo n.º 2
0
        /* редактирование маршрута */
        private void EditRouteBtn_Click(object sender, RoutedEventArgs e)
        {
            if (routesList.SelectedItem != null)
            {
                var id = (routesList.SelectedItem as Route).Id;

                var editRouteForm = new editRoute(id, routesWindow);
                editRouteForm.Owner = this;
                editRouteForm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                editRouteForm.ShowDialog();
            }
            else
            {
                MessageBox.Show("Маршрут не выбран!", "Предупреждение", MessageBoxButton.OK);
            }
        }