Пример #1
0
        private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
        {
            // Remember that the window is closing,
            // so that all events from the Searcher are ignored from now on:
            m_closing = true;

            // Stop the search thread if it is running:
            File_Searcher.Stop();

            // Save config values:
            if (this.WindowState == FormWindowState.Normal)
            {
                File_UserConfig.Data.LocationX = this.Location.X;
                File_UserConfig.Data.LocationY = this.Location.Y;
                File_UserConfig.Data.Width     = this.Size.Width;
                File_UserConfig.Data.Height    = this.Size.Height;
            }
            if (this.WindowState != FormWindowState.Minimized)
            {
                File_UserConfig.Data.WindowState = (Int32)this.WindowState;
            }

            File_UserConfig.Data.SearchDir             = searchDirTextBox.Text;
            File_UserConfig.Data.IncludeSubDirsChecked = includeSubDirsCheckBox.Checked;
            File_UserConfig.Data.FileName          = fileNameTextBox.Text;
            File_UserConfig.Data.NewerThanChecked  = newerThanCheckBox.Checked;
            File_UserConfig.Data.NewerThanDateTime = newerThanDateTimePicker.Value;
            File_UserConfig.Data.OlderThanChecked  = olderThanCheckBox.Checked;
            File_UserConfig.Data.OlderThanDateTime = olderThanDateTimePicker.Value;
            File_UserConfig.Data.ContainingChecked = containingCheckBox.Checked;
            File_UserConfig.Data.ContainingText    = containingTextBox.Text;
            File_UserConfig.Data.AsciiChecked      = asciiRadioButton.Checked;
            File_UserConfig.Data.UnicodeChecked    = unicodeRadioButton.Checked;
            File_UserConfig.Data.Delimeter         = delimeterTextBox.Text;

            File_UserConfig.Save();
        }
Пример #2
0
 private void stopButton_Click_1(object sender, EventArgs e)
 {
     // Stop the search thread if it is running:
     File_Searcher.Stop();
 }