Inheritance: System.Windows.Forms.Form
Exemplo n.º 1
0
        void EditSettings()
        {
            if (Form != null && Form.Visible)
            {
                Form.Activate();
                return;
            }

            Form = new SettingsForm();

            Form.User.Text = Mail.Settings.User;
            Form.Password.Text = Mail.Settings.Password;
            Form.AutoStart.Checked = Mail.Settings.Present ? Mail.Settings.AutoStart : true;

            if (Form.ShowDialog() == DialogResult.OK)
            {
                Mail.Settings.User = Form.User.Text;
                Mail.Settings.Password = Form.Password.Text;
                Mail.Settings.AutoStart = Form.AutoStart.Checked;

                SaveSettings();
            }
        }
Exemplo n.º 2
0
        internal void ShowSettingsForm()
        {
            if (_settingsForm == null || _settingsForm.IsDisposed) _settingsForm = new SettingsForm(this);

            _settingsForm.Show();
            StealFocus(_settingsForm.Handle);
        }