Toggle() private method

private Toggle ( bool on ) : void
on bool
return void
Beispiel #1
0
        private void btnFilterSave_Click(object sender, EventArgs e)
        {
            mUI.Toggle(false);

            Stream         myStream;
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();

            saveFileDialog1.Filter           = "All files (*.*)|*.*";
            saveFileDialog1.RestoreDirectory = true;

            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                myStream = saveFileDialog1.OpenFile();
                StreamWriter wText = new StreamWriter(myStream);

                wText.Write(FiltersText);

                wText.Flush();
                wText.Close();
                myStream.Close();
            }

            mUI.Toggle(true);
        }