Пример #1
0
        private void mnuLoad_Click(object sender, EventArgs e)
        {
            try
            {
                var loadDialog = new FrmLoadSaveFile
                {
                    IsSaveFileForm = false
                };
                loadDialog.ShowDialog();
                if (loadDialog.CurrentLoadedState != null)
                {
                    QraStateContainer.Instance = loadDialog.CurrentLoadedState;
                }

                loadDialog.Dispose();
            }
            catch (Exception ex)
            {
                MessageBox.Show(@"Could not open input file. Error: " + ex.Message);
            }

            QraStateContainer.Instance.UndoStateDamageCausedByLoad();

            GotoAppStartDefaultLocation();
        }
Пример #2
0
 private void mnuSave_Click(object sender, EventArgs e)
 {
     try
     {
         var saveDialog = new FrmLoadSaveFile
         {
             IsSaveFileForm     = true,
             CurrentLoadedState = QraStateContainer.Instance
         };
         saveDialog.ShowDialog();
         saveDialog.Hide();
     }
     catch (Exception ex)
     {
         MessageBox.Show(@"Could not save input file. Error: " + ex.Message);
     }
 }