Exemple #1
0
        public void ProfileSaveAsAction(object sender, EventArgs e)
        {
            SaveFileDialog dialog   = new SaveFileDialog();
            FileInfo       fileInfo = new FileInfo(m_options.coreOptionsFileName);

            if (fileInfo.Exists)
            {
                dialog.FileName         = m_options.coreOptionsFileName;
                dialog.InitialDirectory = fileInfo.Directory.ToString();
            }
            else
            {
                dialog.InitialDirectory = Resources.ProfilesPath;
            }
            dialog.OverwritePrompt = false;
            dialog.DefaultExt      = "xml";
            dialog.Filter          = "Antidupl profile files (*.xml)|*.xml";
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                /*if (string.Compare(dialog.FileName, m_options.coreOptionsFileName) != 0)
                 * {
                 *  m_coreOptions.Save(m_options.coreOptionsFileName);
                 *  ProgressForm saveProgressForm = new ProgressForm(ProgressForm.Type.SaveResults, m_core, m_options, m_coreOptions, m_mainSplitContainer);
                 *  saveProgressForm.Execute();
                 *  m_options.coreOptionsFileName = dialog.FileName;
                 * }*/
                m_options.coreOptionsFileName = dialog.FileName;
                m_coreOptions.Save(m_options.coreOptionsFileName);
                ProgressForm progressForm = new ProgressForm(ProgressForm.Type.SaveResults, m_core, m_options, m_coreOptions, m_mainSplitContainer);
                progressForm.Execute();
                m_mainForm.UpdateCaption();
            }
        }
Exemple #2
0
        private void OnFormClosed(object sender, FormClosedEventArgs e)
        {
            if (m_options.saveProfileOnClosing)
            {
                m_coreOptions.Save(m_options.coreOptionsFileName);
            }

            m_mainSplitContainer.ClearResults();
            GetSavedViewOptions();
            m_options.Save();

            StartFinishForm startFinishForm = new StartFinishForm(m_core, m_options);

            startFinishForm.ExecuteFinish();
            m_core.Dispose();
        }