Exemple #1
0
        private void OptionsButton_Click(object sender, EventArgs e)
        {
            OptionsForm optionsForm = Application.OpenForms["OptionsForm"] as OptionsForm;

            if (optionsForm != null)
            {
                optionsForm.Focus();
                return;
            }

            optionsForm = new OptionsForm();
            optionsForm.Show(this);
        }
Exemple #2
0
        private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (OptionsForm options = new OptionsForm()) {
                if (options.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                Options.IpAddress = IPAddress.Parse(options.IpAddress);
                Options.Port      = int.Parse(options.Port);
                Options.Username  = options.Username.Trim();

                Settings.Default.IPAddress = options.IpAddress;
                Settings.Default.Port      = options.Port.ToString(CultureInfo.InvariantCulture);
                Settings.Default.Username  = options.Username.Trim();

                Settings.Default.Save();
            }
        }
Exemple #3
0
        private void button4_Click(object sender, EventArgs e)
        {
            OptionsForm form = new OptionsForm();

            form.Show();
        }