private void NewTimetable(object sender, RoutedEventArgs e)
        {
            string fpath = SaveFileDialogHelper("Create New File");

            if (fpath != null)
            {
                TimetableStructureDialog structureDialog = new TimetableStructureDialog(this, false);
                if (!structureDialog.ShowDialog() ?? false)
                {
                    return;
                }
                SaveData(fpath);
                RegisterOpenFile(fpath);
                new MainWindow(true).Show();
                Close();
            }
        }
 public void NewFile(object sender, ExecutedRoutedEventArgs e)
 {
     if (DoUnsavedDialog())
     {
         string fpath = SaveFileDialogHelper("Create New File");
         if (fpath != null)
         {
             TimetableStructureDialog structureDialog = new TimetableStructureDialog(ParentWindow, false);
             if (!structureDialog.ShowDialog() ?? false)
             {
                 return;
             }
             ClearData();
             SaveData(fpath);
             RegisterOpenFile(fpath);
         }
     }
 }