Beispiel #1
0
        /// <summary>
        ///     Display the application's Options dialog box
        /// </summary>
        private void ShowOptionsDialog()
        {
            if (_optionsForm == null)
            {
                Extractor extractor = Extractor.GetInstance(); //get a reference to the main Extractor engine
                mnuCtxExit.Enabled = false;                    //disable the Exit action on the system tray icon's menu
                //Stop();

                //display the application's Options form to the user
                _optionsForm = new frmOptions();
                _optionsForm.ShowDialog(this);

                extractor.LoadSettings();
                //ask the Extractor engine to refresh its settings from the application's user-config file

                //re-enable the Exit action on the system tray icon's menu
                mnuCtxExit.Enabled = true;

                //free the memory used by the reference to the Options form
                _optionsForm = null;
            }
            else
            {
                //if the Options form is already being displayed, just bring it to the front
                _optionsForm.BringToFront();
            }
        }