Ejemplo n.º 1
0
        private void Save()
        {
            // 2番目
            Account a = new Account {
                SetName = "既定", AccountName = scAccountBox.Text, Domain = scDomainBox.Text, Password = Password.Encrypt(scPassBox.Text, scAccountBox.Text)
            };

            cd.Accounts.Add(a);
            // 3番目
            cd.MailCheckInterval = (int)thIntervalBox.Value * 60 * 1000;
            // 4番目
            cd.NewMailBalloonOrPopupNotify = true;
            cd.NewMailNotifyOperation      = foBalloonCheck.Checked ? ConfigData.NewMailNotification.Balloon : ConfigData.NewMailNotification.Popup;
            // 5番目
            cd.PlayNewMailSound        = fiSoundUseCheck.Checked;
            cd.PlayDefaultNewMailSound = fiDefaultSoundCheck.Checked;
            cd.PlayNewMailSoundPath    = fiSelectSoundPathBox.Text;

            ReadSetting.Setting = cd;
            ReadSetting.Save();
        }
Ejemplo n.º 2
0
        private void okButton_Click(object sender, EventArgs e)
        {
            // アカウント設定がなければ警告する
            if (accountListBox.Items.Count == 0)
            {
                MessageBox.Show(Properties.Resources.SettingNoAccountError, Properties.Resources.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            // 設定を格納
            // メールチェック
            s_config.MailCheckInterval     = (int)mailMailCheckNumeric.Value * 1000 * 60;
            s_config.PowerResumedDelayTime = (int)mailPowerResumedDelayNumeric.Value * 1000;

            // プロキシ
            s_config.UseProxy      = proxyUseProxyCheck.Checked;
            s_config.UseIeProxy    = proxyUseIeProxyCheck.Checked;
            s_config.UseIeProxy    = proxyUseSelectProxyCheck.Checked ? false : true;
            s_config.ProxyHostName = proxySelectProxyBox.Text;
            s_config.ProxyPort     = (int)proxySelectPortNumeric.Value;

            // アクセス
            s_config.NoUseSsl = accessNoSslCheck.Checked;

            // サウンド
            s_config.PlayNewMailSound        = soundUseNewMailSoundCheck.Checked;
            s_config.PlayDefaultNewMailSound = soundUseDefaultNewMailSoundCheck.Checked;
            s_config.PlayDefaultNewMailSound = soundUseSelectNewMailSoundCheck.Checked ? false : true;
            s_config.PlayNewMailSoundPath    = soundSelectSoundFileBox.Text;

            // 新着通知
            s_config.NewMailBalloonOrPopupNotify      = newNotifyBalloonCheck.Checked;
            s_config.NewMailBalloonOrPopupNotify      = newRunApplicationCheck.Checked ? false : true;
            s_config.NewMailNotifyOperation           = (ConfigData.NewMailNotification)newNotifySelectBox.SelectedIndex;
            s_config.BalloonClickOperation            = (ConfigData.BalloonClick)newNotifyClickBox.SelectedIndex;
            s_config.NotificationRunExecutiveFilePath = notifyClickApplicationBox.Text;
            s_config.RunApplicationPath               = newSelectRunApplicationFileBox.Text;
            s_config.RunApplicationOption             = newSelectRunApplicationOptionBox.Text;
            s_config.PopupViewTime                    = (int)popupViewTimeBox.Value * 1000;
            s_config.NotificationRunExecutiveFilePath = notifyClickApplicationBox.Text;

            // 表示
            s_config.BalloonInvisibleError = balloonInvisibleErrorCheck.Checked;

            // ブラウザ
            s_config.UseDefaultBrowser = browserUseDefaultBrowserCheck.Checked;
            s_config.UseDefaultBrowser = browserUseSelectBrowserCheck.Checked ? false : true;
            s_config.UseBrowserPath    = browserSelectFileBox.Text;

            // メッセージ一覧
            s_config.MessageListTitleColor        = titleColorPick.BackColor;
            s_config.MessageListSenderColor       = senderColorPick.BackColor;
            s_config.MessageListSummaryColor      = summaryColorPick.BackColor;
            s_config.MessageListNonSelectColor    = nonSelectColorPick.BackColor;
            s_config.MessageListNonSelectOddColor = nonSelectOddColorPick.BackColor;
            s_config.MessageListSelectColor       = selectColorPick.BackColor;
            s_config.MessageListSenderFontSize    = (float)messageListSenderFontSizeBox.Value;
            s_config.MessageListRightList         = messageListRightCheck.Checked;

            // メインコンソール
            s_config.HideConsole = hideConsoleCheck.Checked;

            // 通知領域
            s_config.NotifyDoubleClickOperation = (ConfigData.NotifyDoubleClick)notifyDoubleClickBox.SelectedIndex;
            s_config.DisableNotifyAnimation     = disableAnimationCheck.Checked;

            ReadSetting.Setting = s_config;

            // 設定を保存
            ReadSetting.Save();

            this.DialogResult = DialogResult.OK;
            this.Close();
        }