コード例 #1
0
        public frmMessageViewer()
        {
            InitializeComponent();

            ReadSetting.Read();
            this.Size     = ReadSetting.Setting.MessageBoxPositionSize.Size;
            this.Location = ReadSetting.Setting.MessageBoxPositionSize.Location;
            this.invisibleViewerButton.Checked    = ReadSetting.Setting.MessageListInvisibleViewer;
            this.splitContainer1.SplitterDistance = ReadSetting.Setting.MessageListLeftWidth;
            this.Opacity = ReadSetting.Setting.MessageListWindowOpacity;
            this.windowOpacityMenues(ReadSetting.Setting.MessageListWindowOpacity);

            messageViewerBox.StatusTextChanged += new EventHandler(messageViewerBox_StatusTextChanged);
        }
コード例 #2
0
        private void frmSetting_Load(object sender, EventArgs e)
        {
            // フォーム上に反映
            s_config = ReadSetting.Read();

            // アカウント
            foreach (Account a in s_config.Accounts)
            {
                accountListBox.Items.Add((string)a.SetName + " (" + a.AccountName + "@" + a.Domain + ")");
            }

            // メールチェック
            mailMailCheckNumeric.Value         = (decimal)s_config.MailCheckInterval / 1000 / 60;
            mailPowerResumedDelayNumeric.Value = (decimal)s_config.PowerResumedDelayTime / 1000;

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

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

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

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

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

            // ブラウザ
            browserUseDefaultBrowserCheck.Checked = s_config.UseDefaultBrowser;
            browserUseSelectBrowserCheck.Checked  = !s_config.UseDefaultBrowser;
            browserSelectFileBox.Text             = s_config.UseBrowserPath;

            // メッセージ一覧
            messageListFontSettingLabel.Text   = string.Format(Properties.Resources.SettingMessageListFontInfo, s_config.MessageListFont.Name, s_config.MessageListFont.Size.ToString());
            messageListFontDialog.Font         = s_config.MessageListFont;
            titleColorPick.BackColor           = s_config.MessageListTitleColor;
            senderColorPick.BackColor          = s_config.MessageListSenderColor;
            summaryColorPick.BackColor         = s_config.MessageListSummaryColor;
            nonSelectColorPick.BackColor       = s_config.MessageListNonSelectColor;
            nonSelectOddColorPick.BackColor    = s_config.MessageListNonSelectOddColor;
            selectColorPick.BackColor          = s_config.MessageListSelectColor;
            messageListSenderFontSizeBox.Value = (decimal)s_config.MessageListSenderFontSize;
            messageListRightCheck.Checked      = s_config.MessageListRightList;

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

            // 通知領域設定
            notifyDoubleClickBox.SelectedIndex = (int)s_config.NotifyDoubleClickOperation;
            disableAnimationCheck.Checked      = s_config.DisableNotifyAnimation;

            // スタートアップ
            shortcutButtonSetting();

            // チェックボックス関連の強制実行
            proxyUseProxyCheck_CheckedChanged(null, null);
            proxyUseIeProxyCheck_CheckedChanged(null, null);
            accountListBox_SelectedIndexChanged(null, null);
            newNotifyClickBox_SelectedIndexChanged(null, null);

            soundUseDefaultNewMailSoundCheck_CheckedChanged(null, null);
            soundUseNewMailSoundCheck_CheckedChanged(null, null);

            // メッセージ一覧表示プレビューで、2項目目を選択した状態にしておく
            messageListPreviewBox.SelectedIndex = 1;

            // アカウント設定が0だったら、閉じれないようにしておく
            formCloseAdmit();

            // フォーカスをタブに
            tabControl1.Focus();
        }