⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pshistroycontrol.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 2 页
字号:
            this.btnClearHistory.Location = new System.Drawing.Point(0x10a, 0x3f);
            this.btnClearHistory.Name = "btnClearHistory";
            this.btnClearHistory.Size = new Size(0x7b, 0x15);
            this.btnClearHistory.TabIndex = 2;
            this.btnClearHistory.Text = "删除所有消息历史";
            this.btnClearHistory.set_UseVisualStyleBackColor(false);
            this.btnClearHistory.Click += new EventHandler(this.btnClearHistory_Click);
            this.txtDir.BackColor = Color.FromArgb(240, 240, 240);
            this.txtDir.BorderStyle = BorderStyle.FixedSingle;
            this.txtDir.EmptyTextTip = "";
            this.txtDir.EmptyTextTipColor = Color.DarkGray;
            this.txtDir.Location = new System.Drawing.Point(20, 0xa1);
            this.txtDir.Name = "txtDir";
            this.txtDir.ReadOnly = true;
            this.txtDir.Size = new Size(0xdb, 0x15);
            this.txtDir.TabIndex = 9;
            this.txtDir.Visible = false;
            this.lbMsgHistoryDirTip.set_AutoSize(true);
            this.lbMsgHistoryDirTip.BorderColor = Color.Empty;
            this.lbMsgHistoryDirTip.ButtonBorderStyle = ButtonBorderStyle.None;
            this.lbMsgHistoryDirTip.Location = new System.Drawing.Point(6, 0x88);
            this.lbMsgHistoryDirTip.Name = "lbMsgHistoryDirTip";
            this.lbMsgHistoryDirTip.Size = new Size(0xa1, 12);
            this.lbMsgHistoryDirTip.TabIndex = 10;
            this.lbMsgHistoryDirTip.Text = "将消息历史保存到如下目录:";
            this.lbMsgHistoryDirTip.UseMnemonic = false;
            this.lbMsgHistoryDirTip.Visible = false;
            this.xbtnBrowse.AutoSizeToImage = false;
            this.xbtnBrowse.BackColor = Color.Transparent;
            this.xbtnBrowse.BackgroundImageDisable = null;
            this.xbtnBrowse.BackgroundImageDown = null;
            this.xbtnBrowse.BackgroundImageHover = null;
            this.xbtnBrowse.ChangeSkin = true;
            this.xbtnBrowse.Location = new System.Drawing.Point(0xf5, 160);
            this.xbtnBrowse.Name = "xbtnBrowse";
            this.xbtnBrowse.Size = new Size(0x4b, 0x17);
            this.xbtnBrowse.TabIndex = 11;
            this.xbtnBrowse.Text = "修改……";
            this.xbtnBrowse.set_UseVisualStyleBackColor(false);
            this.xbtnBrowse.Visible = false;
            this.xbtnBrowse.Click += new EventHandler(this.xbtnBrowse_Click);
            this.fbMsgHistoryDir.Description = "将消息历史保存到如下目录:";
            this.chkKeepOldDir.set_AutoSize(true);
            this.chkKeepOldDir.Location = new System.Drawing.Point(20, 0xc2);
            this.chkKeepOldDir.Name = "chkKeepOldDir";
            this.chkKeepOldDir.Size = new Size(0xe4, 0x10);
            this.chkKeepOldDir.TabIndex = 12;
            this.chkKeepOldDir.Text = "更改目录的同时保留原有消息历史目录";
            this.chkKeepOldDir.set_UseVisualStyleBackColor(true);
            this.chkKeepOldDir.Visible = false;
            this.lbTip.BorderColor = Color.Empty;
            this.lbTip.ButtonBorderStyle = ButtonBorderStyle.None;
            this.lbTip.Location = new System.Drawing.Point(0x13, 0xdb);
            this.lbTip.Name = "lbTip";
            this.lbTip.Size = new Size(0x12d, 0x4c);
            this.lbTip.TabIndex = 13;
            this.lbTip.Text = "* 为了您的隐私安全,修改消息历史保存目录会将原有消息历史文件拷贝到新目录下,同时删除旧目录及该目录下的所有文件。如果您确信需要保留旧目录,请选中上面的复选框。\r\n* 如果您需要备份您的消息历史,请直接备份上面的目录即可。";
            this.lbTip.UseMnemonic = false;
            this.lbTip.Visible = false;
            this.groupBox1.Controls.Add(this.lbQuestion);
            this.groupBox1.Controls.Add(this.lbTip);
            this.groupBox1.Controls.Add(this.chkSaveHistory);
            this.groupBox1.Controls.Add(this.chkKeepOldDir);
            this.groupBox1.Controls.Add(this.chkRecentHistory);
            this.groupBox1.Controls.Add(this.xbtnBrowse);
            this.groupBox1.Controls.Add(this.btnViewHistory);
            this.groupBox1.Controls.Add(this.lbMsgHistoryDirTip);
            this.groupBox1.Controls.Add(this.btnClearHistory);
            this.groupBox1.Controls.Add(this.txtDir);
            this.groupBox1.Location = new System.Drawing.Point(3, 3);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new Size(0x19e, 0x5d);
            this.groupBox1.TabIndex = 0;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "消息历史保存设置";
            this.xtbPath.BackColor = Color.FromArgb(240, 240, 240);
            this.xtbPath.BorderStyle = BorderStyle.FixedSingle;
            this.xtbPath.EmptyTextTip = "";
            this.xtbPath.EmptyTextTipColor = Color.DarkGray;
            this.xtbPath.Location = new System.Drawing.Point(20, 0x25);
            this.xtbPath.Name = "xtbPath";
            this.xtbPath.ReadOnly = true;
            this.xtbPath.Size = new Size(0x132, 0x15);
            this.xtbPath.TabIndex = 0;
            this.btnModify.AutoSizeToImage = false;
            this.btnModify.BackColor = Color.Transparent;
            this.btnModify.BackgroundImage = (Image) manager.GetObject("btnModify.BackgroundImage");
            this.btnModify.BackgroundImageDisable = (Image) manager.GetObject("btnModify.BackgroundImageDisable");
            this.btnModify.BackgroundImageDown = (Image) manager.GetObject("btnModify.BackgroundImageDown");
            this.btnModify.BackgroundImageHover = (Image) manager.GetObject("btnModify.BackgroundImageHover");
            this.btnModify.ChangeSkin = false;
            this.btnModify.Location = new System.Drawing.Point(0x14c, 0x25);
            this.btnModify.Name = "btnModify";
            this.btnModify.Size = new Size(0x35, 0x15);
            this.btnModify.TabIndex = 1;
            this.btnModify.Text = "浏览...";
            this.btnModify.set_UseVisualStyleBackColor(false);
            this.btnModify.Click += new EventHandler(this.btnModify_Click);
            this.groupBox2.Controls.Add(this.label1);
            this.groupBox2.Controls.Add(this.xtbPath);
            this.groupBox2.Controls.Add(this.btnModify);
            this.groupBox2.Location = new System.Drawing.Point(4, 0x66);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new Size(0x19d, 0x49);
            this.groupBox2.TabIndex = 1;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "文件传输设置";
            this.groupBox2.Enter += new EventHandler(this.groupBox2_Enter);
            this.label1.set_AutoSize(true);
            this.label1.Location = new System.Drawing.Point(0x12, 0x11);
            this.label1.Name = "label1";
            this.label1.Size = new Size(0x7d, 12);
            this.label1.TabIndex = 0x11;
            this.label1.Text = "将文件传输到如下目录";
            this.lbMessage.BorderColor = Color.Empty;
            this.lbMessage.ButtonBorderStyle = ButtonBorderStyle.None;
            this.lbMessage.Location = new System.Drawing.Point(0x20, 0x67);
            this.lbMessage.Name = "lbMessage";
            this.lbMessage.Size = new Size(0x16b, 0x84);
            this.lbMessage.TabIndex = 0x15;
            this.lbMessage.UseMnemonic = false;
            this.rbLong.set_AutoSize(true);
            this.rbLong.Location = new System.Drawing.Point(0x13, 0x3f);
            this.rbLong.Name = "rbLong";
            this.rbLong.Size = new Size(0x83, 0x10);
            this.rbLong.TabIndex = 1;
            this.rbLong.TabStop = true;
            this.rbLong.Text = "使用长短信发送信息";
            this.rbLong.set_UseVisualStyleBackColor(true);
            this.rbNormal.set_AutoSize(true);
            this.rbNormal.Location = new System.Drawing.Point(0x13, 30);
            this.rbNormal.Name = "rbNormal";
            this.rbNormal.Size = new Size(0x8f, 0x10);
            this.rbNormal.TabIndex = 0;
            this.rbNormal.TabStop = true;
            this.rbNormal.Text = "使用普通短信发送信息";
            this.rbNormal.set_UseVisualStyleBackColor(true);
            this.groupBox3.Controls.Add(this.rbNormal);
            this.groupBox3.Controls.Add(this.lbMessage);
            this.groupBox3.Controls.Add(this.rbLong);
            this.groupBox3.Location = new System.Drawing.Point(4, 0xb5);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new Size(0x19d, 0xfc);
            this.groupBox3.TabIndex = 2;
            this.groupBox3.TabStop = false;
            this.groupBox3.Text = "长短信";
            base.set_AutoScaleDimensions(new SizeF(6f, 12f));
            base.set_AutoScaleMode(1);
            base.Controls.Add(this.groupBox3);
            base.Controls.Add(this.groupBox2);
            base.Controls.Add(this.groupBox1);
            base.Name = "PsHistroyControl";
            base.Size = new Size(420, 480);
            base.Load += new EventHandler(this.PsHistroyControl_Load);
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.groupBox2.ResumeLayout(false);
            this.groupBox2.PerformLayout();
            this.groupBox3.ResumeLayout(false);
            this.groupBox3.PerformLayout();
            base.ResumeLayout(false);
        }

        private void InitUiEventHandler()
        {
            this.chkRecentHistory.CheckedChanged += new EventHandler(this.c_Click);
            this.chkSaveHistory.CheckedChanged += new EventHandler(this.c_Click);
            this.rbLong.CheckedChanged += new EventHandler(this.c_Click);
            this.rbNormal.CheckedChanged += new EventHandler(this.c_Click);
            this.xtbPath.TextChanged += new EventHandler(this.c_Click);
        }

        private void PsHistroyControl_Load(object sender, EventArgs e)
        {
        }

        public override bool UpdateData(bool update)
        {
            Imps.Client.Core.ConversationSetting conversationSetting = this._user.Configuration.UserSetting.ConversationSetting;
            try
            {
                if (update)
                {
                    if (this._frameworkWindow.AccountManager.CurrentUser.Configuration.UserSetting.SaveMyInfo)
                    {
                        conversationSetting.SaveMessages = this.chkSaveHistory.Checked;
                        conversationSetting.ShowLatestMessages.ProposedValue = this.chkRecentHistory.Checked;
                    }
                    else
                    {
                        conversationSetting.SaveMessages = false;
                        conversationSetting.ShowLatestMessages.ProposedValue = false;
                    }
                    Suspender suspender = new Suspender(this._user.Configuration.UserSetting);
                    try
                    {
                        this._user.Configuration.UserSetting.ConversationSetting.DefaultShareContentSavePath = this.xtbPath.Text;
                    }
                    finally
                    {
                        suspender.Dispose();
                    }
                    if (this.rbLong.Checked)
                    {
                        this._frameworkWindow.AccountManager.CurrentUser.Configuration.UserSetting.LongSmsSetting = LongSMSSetting.Enable;
                    }
                    if (this.rbNormal.Checked)
                    {
                        this._frameworkWindow.AccountManager.CurrentUser.Configuration.UserSetting.LongSmsSetting = LongSMSSetting.Disable;
                    }
                }
                else
                {
                    if (this._frameworkWindow.AccountManager.CurrentUser.Configuration.UserSetting.SaveMyInfo)
                    {
                        this.chkSaveHistory.Checked = conversationSetting.SaveMessages;
                        this.chkRecentHistory.Checked = conversationSetting.ShowLatestMessages.Value;
                        this.chkSaveHistory.Enabled = true;
                        this.btnClearHistory.Enabled = true;
                        this.chkRecentHistory.Enabled = this.chkSaveHistory.Checked;
                    }
                    else
                    {
                        this.chkSaveHistory.Checked = false;
                        this.chkRecentHistory.Checked = false;
                        this.chkSaveHistory.Enabled = false;
                        this.chkRecentHistory.Enabled = false;
                        this.btnClearHistory.Enabled = false;
                    }
                    this.txtDir.Text = this._frameworkWindow.PersistentManager.BaseDirForHistory;
                    this.xtbPath.Text = this._user.Configuration.UserSetting.ConversationSetting.DefaultShareContentSavePath;
                    if (this._frameworkWindow.AccountManager.CurrentUser.Configuration.UserSetting.LongSmsSetting == LongSMSSetting.Disable)
                    {
                        this.rbNormal.Checked = true;
                    }
                    if (this._frameworkWindow.AccountManager.CurrentUser.Configuration.UserSetting.LongSmsSetting == LongSMSSetting.Enable)
                    {
                        this.rbLong.Checked = true;
                    }
                }
                base.Modified = false;
                return true;
            }
            catch (Exception exception)
            {
                ClientLogger.WriteException(exception);
                return false;
            }
        }

        private void xbtnBrowse_Click(object sender, EventArgs e)
        {
            if (this.fbMsgHistoryDir.ShowDialog() == DialogResult.OK)
            {
                this.txtDir.Text = this.fbMsgHistoryDir.SelectedPath;
            }
        }

        private Imps.Client.Core.User _user
        {
            get
            {
                return this._frameworkWindow.AccountManager.CurrentUser;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -