コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            SaveSettings writeSettings = new SaveSettings();

            writeSettings.SetSettings(comboBoxSmtpServer.Text, textBoxSmtpPort.Text, textBoxSmtpFrom.Text, textBoxSmtpTo.Text, checkBoxSmtpAuth.Checked, textBoxSmtpUser.Text);
            labelSmtpInfo.Text = "The settings were saved to HKCU\\Software\\ArchwayHelper";
        }
コード例 #2
0
        private void buttonSmtpReadSet_Click(object sender, EventArgs e)
        {
            SaveSettings readSettings = new SaveSettings();

            string [] result = readSettings.GetSettings();
            if (result != null)
            {
                labelSmtpInfo.Text       = result[0];
                comboBoxSmtpServer.Text  = result[1];
                textBoxSmtpPort.Text     = result[2];
                textBoxSmtpFrom.Text     = result[3];
                textBoxSmtpTo.Text       = result[4];
                checkBoxSmtpAuth.Checked = result[5].Length < 5;
                textBoxSmtpUser.Text     = result[6];
            }
            else
            {
                labelSmtpInfo.Text = "No settings were detected";
            }
        }
コード例 #3
0
        private void buttonSmtpRemove_Click(object sender, EventArgs e)
        {
            SaveSettings deleteSettings = new SaveSettings();

            labelSmtpInfo.Text = deleteSettings.RemoveSettings();
        }