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

📄 pslongsmssetting.cs

📁 飞信的收发使用csharp进行开发
💻 CS
字号:
namespace Imps.Client.Pc.Options
{
    using Imps.Client.Core;
    using Imps.Client.Pc;
    using Imps.Client.Pc.Controls;
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class PsLongSmsSetting : OptionsControlBase
    {
        private IFrameworkWindow _frameworkWindow;
        private IContainer components;
        private XLabel lbMessage;
        private XLabel lbMsgHistory;
        private RadioButton rbLong;
        private RadioButton rbNormal;
        private XLabel xLabel3;

        public PsLongSmsSetting(IFrameworkWindow iFrameworkWindow)
        {
            this._frameworkWindow = iFrameworkWindow;
            this.InitializeComponent();
            this.lbMessage.Text = "如果对方手机不支持长短信功能:\r\n1、发送内容有可能仍被拆分成多条短信\r\n2、接收短信中可能出现乱码\r\n3、少数接收方可能无法收到该条短信";
            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;
            }
        }

        private void CheckedChanged(object sender, EventArgs e)
        {
            base.Modified = true;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.lbMsgHistory = new XLabel();
            this.xLabel3 = new XLabel();
            this.rbNormal = new RadioButton();
            this.rbLong = new RadioButton();
            this.lbMessage = new XLabel();
            XLabel label = new XLabel();
            base.SuspendLayout();
            label.BorderColor = Color.Empty;
            label.BorderStyle = BorderStyle.Fixed3D;
            label.ButtonBorderStyle = ButtonBorderStyle.None;
            label.Location = new Point(80, 0x11);
            label.Name = "lbLine";
            label.Size = new Size(310, 1);
            label.TabIndex = 3;
            label.UseMnemonic = false;
            this.lbMsgHistory.AutoSize = true;
            this.lbMsgHistory.BorderColor = Color.Empty;
            this.lbMsgHistory.ButtonBorderStyle = ButtonBorderStyle.None;
            this.lbMsgHistory.Location = new Point(3, 11);
            this.lbMsgHistory.Name = "lbMsgHistory";
            this.lbMsgHistory.Size = new Size(0x4f, 13);
            this.lbMsgHistory.TabIndex = 2;
            this.lbMsgHistory.Text = "设置短信类型";
            this.lbMsgHistory.UseMnemonic = false;
            this.xLabel3.AutoSize = true;
            this.xLabel3.BorderColor = Color.Empty;
            this.xLabel3.ButtonBorderStyle = ButtonBorderStyle.None;
            this.xLabel3.Location = new Point(0x13, 0x22);
            this.xLabel3.Name = "xLabel3";
            this.xLabel3.Size = new Size(0x8d, 13);
            this.xLabel3.TabIndex = 6;
            this.xLabel3.Text = "使用PC客户端发送短信时";
            this.xLabel3.UseMnemonic = false;
            this.rbNormal.AutoSize = true;
            this.rbNormal.Location = new Point(0x16, 0x33);
            this.rbNormal.Name = "rbNormal";
            this.rbNormal.Size = new Size(0x79, 0x11);
            this.rbNormal.TabIndex = 7;
            this.rbNormal.TabStop = true;
            this.rbNormal.Text = "通过普通短信发送";
            this.rbNormal.UseVisualStyleBackColor = true;
            this.rbNormal.CheckedChanged += new EventHandler(this.CheckedChanged);
            this.rbLong.AutoSize = true;
            this.rbLong.Location = new Point(0x16, 0x4a);
            this.rbLong.Name = "rbLong";
            this.rbLong.Size = new Size(0x6d, 0x11);
            this.rbLong.TabIndex = 8;
            this.rbLong.TabStop = true;
            this.rbLong.Text = "通过长短信发送";
            this.rbLong.UseVisualStyleBackColor = true;
            this.rbLong.CheckedChanged += new EventHandler(this.CheckedChanged);
            this.lbMessage.BorderColor = Color.Empty;
            this.lbMessage.ButtonBorderStyle = ButtonBorderStyle.None;
            this.lbMessage.Location = new Point(0x27, 0x61);
            this.lbMessage.Name = "lbMessage";
            this.lbMessage.Size = new Size(0x14b, 0x8f);
            this.lbMessage.TabIndex = 9;
            this.lbMessage.UseMnemonic = false;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.lbMessage);
            base.Controls.Add(this.rbLong);
            base.Controls.Add(this.rbNormal);
            base.Controls.Add(this.xLabel3);
            base.Controls.Add(this.lbMsgHistory);
            base.Controls.Add(label);
            base.Name = "PsLongSmsSetting";
            base.Size = new Size(0x187, 0x1a0);
            base.ResumeLayout(false);
            base.PerformLayout();
        }

        public override bool UpdateData(bool update)
        {
            if (update)
            {
                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;
                }
            }
            base.Modified = false;
            return true;
        }
    }
}

⌨️ 快捷键说明

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