Example #1
0
        private void Konsola_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (e.CloseReason == CloseReason.UserClosing)
            {
                if (MessageBox.Show("Czy na pewno chcesz zamknac konsole?", "SkyMin-Konsola", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    Konsola.Instance.Visible          = false;
                    Form1.Instance.console_no.Checked = true;
                    Form1.Instance.consola_tray.Text  = "Pokarz konsole";
                }
                else
                {
                    e.Cancel = true;
                }
            }

            instance = null;
        }
Example #2
0
 private void Console_Load(object sender, EventArgs e)
 {
     instance = this;
     _writer  = new TextStreamWriter();
     Console.SetOut(_writer);
 }