Esempio n. 1
0
 /// <summary>
 ///     При выборе из контекстного меню, открывает нужное рассписание
 /// </summary>
 private void OpenTimetable_OnClick(object sender, RoutedEventArgs e)
 {
     try
     {
         var timetable = new TimetableWindow(_workFile.FilePath + TimetablesListBox.SelectedItem);
         timetable.Show();
         Close();
     }
     catch (FileLoadException exception)
     {
         MessageBox.Show(exception.Message);
     }
 }
Esempio n. 2
0
        /// <summary>
        ///     открывает окно создания расписания
        /// </summary>
        private void OpenCreateTimetableWindow_OnClick(object sender, RoutedEventArgs e)
        {
            var newTimetable = new NewTimetable();

            if (newTimetable.ShowDialog() == true)
            {
                try
                {
                    var timetable = new TimetableWindow(_workFile.FilePath +
                                                        newTimetable.NameTimetableTextBox.Text);
                    timetable.Show();
                    Close();
                }
                catch (FileLoadException exception)
                {
                    MessageBox.Show(exception.Message);
                }
            }
        }
        private void btnTimetable_Click(object sender, RoutedEventArgs e)
        {
            TimetableWindow timetableWindow = new TimetableWindow();

            timetableWindow.ShowDialog();
        }