Пример #1
0
 private void OKButton_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrWhiteSpace(ReportPath.Content.ToString()))
     {
         System.Windows.MessageBox.Show("Отчёт будет создаваться в папке с программой");
         SphereCraft.Properties.Settings.Default["UserFIO"]    = UserNameBox.Text;
         SphereCraft.Properties.Settings.Default["ReportPath"] = Directory.GetCurrentDirectory();
         StartWindow pg = new StartWindow();
         NavigationService.Navigate(pg);
     }
     else
     {
         SphereCraft.Properties.Settings.Default["UserFIO"]    = UserNameBox.Text;
         SphereCraft.Properties.Settings.Default["ReportPath"] = ReportPath.Content;
         StartWindow pg = new StartWindow();
         NavigationService.Navigate(pg);
     }
 }
Пример #2
0
        private void ReturnButton_Click(object sender, RoutedEventArgs e)
        {
            StartWindow hWnd = new StartWindow();

            NavigationService.Navigate(hWnd);
        }