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

📄 groupsmsform.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 3 页
字号:
namespace Imps.Client.Pc
{
    using Imps.Client;
    using Imps.Client.Core;
    using Imps.Client.Pc.BizControls;
    using Imps.Client.Pc.Controls;
    using Imps.Client.Pc.Properties;
    using Imps.Client.Pc.Utils;
    using Imps.Client.Resource;
    using Imps.Client.Utils;
    using Imps.Common;
    using Imps.Utils;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;

    public class GroupSMSForm : XIMDialog
    {
        private int _alreadySendCount;
        private SendSMSItem _currentSendingItem;
        private IFrameworkWindow _frameworkWin;
        private GroupSMSFailedForm _groupSMSFailedForm;
        private ChatEditCtrlManager _historyChatManager;
        private bool _sendFrequent;
        private Queue<SendSMSItem> _stackSMSItems;
        private DateTime _time;
        private XButton btnSend;
        private XButton btnTimingManager;
        private CheckBox chkTimingSMS;
        private IContainer components;
        private InviteControl inviteControl;
        private Label lblDay;
        private HtmlLabel lblInputInfo;
        private Label lblMonth;
        private Label lblYear;
        private bool m_fIsProcessKey;
        private menu_widget menuSendType;
        private AsyncBizOperation op;
        private AsyncBizOperation opTriming;
        private Panel panel1;
        private Panel panel2;
        private NumericUpDown pickHour;
        private NumericUpDown pickMinute;
        private DateTimePicker pickYear;
        private Panel plInviteContacts;
        private Panel pnlMain;
        private bool sending;
        private ToolStripMenuItem tsSendCtrlEnter;
        private ToolStripMenuItem tsSendEnter;
        private ChatRichTextBox txtHistory;
        private XTextBox txtSendContent;

        public GroupSMSForm(IFrameworkWindow frameworkWin) : this(frameworkWin, null)
        {
        }

        public GroupSMSForm(IFrameworkWindow frameworkWin, List<Imps.Client.Core.Contact> list)
        {
            EventHandler<SplitterEventArgs> handler = null;
            EventHandler handler2 = null;
            EventHandler handler3 = null;
            this._stackSMSItems = new Queue<SendSMSItem>();
            this.InitializeComponent();
            this._frameworkWin = frameworkWin;
            try
            {
                base.HemlineStyle = HemlineStyle.None;
                this.InitTimingDate();
                this.inviteControl = new InviteControl(frameworkWin, list);
                this.inviteControl.SelectType = SelectContactsType.GroupSms;
                int maxFriendsNumBatchSms = this.CurrentUser.Configuration.SystemSetting.SysSmsSetting.MaxFriendsNumBatchSms;
                this.inviteControl.Message = string.Format(StringTable.Conversation.MsgSelectSMSContacts, maxFriendsNumBatchSms);
                this.inviteControl.MaxSelectedCount = maxFriendsNumBatchSms;
                this.inviteControl.OnlyShowOnline = false;
                this.inviteControl.ShowSMSOnline = true;
                this.inviteControl.ShowGroup = true;
                this.inviteControl.ShowSelf = true;
                this.inviteControl.ShowMobileBuddy = true;
                this.inviteControl.ShowSMSOffline = false;
                this.inviteControl.Dock = DockStyle.Fill;
                this.inviteControl.MessageLabelHeight = 20;
                this.plInviteContacts.Controls.Add(this.inviteControl);
                if (handler == null)
                {
                    handler = new EventHandler<SplitterEventArgs>(this, (IntPtr) this.<.ctor>b__0);
                }
                this.inviteControl.SplitterMoved += handler;
                if (handler2 == null)
                {
                    handler2 = delegate {
                        this.txtSendContent.Focus();
                    };
                }
                base.add_Shown(handler2);
                if (handler3 == null)
                {
                    handler3 = delegate {
                        this.txtSendContent.Focus();
                    };
                }
                base.Activated += handler3;
                this.lblInputInfo.Text = string.Format(StringTable.Conversation.MsgSMSInputInfo, this.MaxInputLength.ToString());
                base.set_ShowIcon(true);
                base.Icon = ImpsIcons.Logo;
                this.CurrentUser.StatusChanged += new EventHandler<UserSatusChangedEventArgs>(this, (IntPtr) this.CurrentUser_StatusChanged);
            }
            catch (Exception exception)
            {
                ClientLogger.WriteException(exception);
            }
            this._historyChatManager = new ChatEditCtrlManager(this.txtHistory, true);
            this._historyChatManager.LinkButtonClick += new ChatEditClickEventHandler(this._historyChatManager_LinkButtonClick);
            this._historyChatManager.DefaultTextFont = new Font("宋体", 10.5f, FontStyle.Regular);
            this._historyChatManager.SelectionFont = new Font("宋体", 10.5f, FontStyle.Regular);
            this._historyChatManager.ForeColor = SystemColors.ControlText;
            this.btnTimingManager.SizeChanged += new EventHandler(this.btnTimingManager_SizeChanged);
        }

        private int _historyChatManager_LinkButtonClick(object sender, ChatEditClickEventArgs e)
        {
            try
            {
                if ((e.EventType == ChatEditEventType.LinkButton) && (e.Command == "frequent"))
                {
                    if (this._groupSMSFailedForm == null)
                    {
                        if (this._currentSendingItem != null)
                        {
                            this._stackSMSItems.Enqueue(this._currentSendingItem);
                        }
                        this._groupSMSFailedForm = new GroupSMSFailedForm(this._stackSMSItems);
                    }
                    this._groupSMSFailedForm.Location = base.Location;
                    this._groupSMSFailedForm.Show();
                }
            }
            catch
            {
            }
            return 1;
        }

        private void btnAddMyMobileNo_Click(object sender, EventArgs e)
        {
            if (((this.txtSendContent.Text.Length + 11) + 2) > this.MaxInputLength)
            {
                this._frameworkWin.UnifiedMessageBox.ShowInfo(string.Format("您一条信息最多只能输入{0}个字符!", this.MaxInputLength));
            }
            else
            {
                this.txtSendContent.SelectionStart = this.txtSendContent.Text.Length;
                if (string.IsNullOrEmpty(this.CurrentUser.MobileNo))
                {
                    ClientLogger.WriteGeneral("群发短信的时候,尝试加入手机号失败,MobileNo属性为空!");
                }
                if (this.txtSendContent.Text != "")
                {
                    this.txtSendContent.AppendText("\r\n" + this.CurrentUser.MobileNo);
                }
                else
                {
                    this.txtSendContent.AppendText(this.CurrentUser.MobileNo);
                }
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            base.Close();
        }

        private void btnSend_Click(object sender, EventArgs e)
        {
            this.Send();
        }

        private void btnTimingManager_Click(object sender, EventArgs e)
        {
            try
            {
                this._frameworkWin.ConversationManager.ShowScheduleSmsForm(this);
            }
            catch (Exception exception)
            {
                ClientLogger.WriteException(exception);
            }
        }

        private void btnTimingManager_SizeChanged(object sender, EventArgs e)
        {
            try
            {
                int num = this.btnTimingManager.Top - this.panel1.Bottom;
                int y = this.btnTimingManager.Bottom + num;
                int height = this.panel2.Bottom - y;
                this.panel2.SetBounds(0, y, 0, height, BoundsSpecified.Height | BoundsSpecified.Y);
            }
            catch
            {
            }
        }

        private void chkTimingSMS_CheckedChanged(object sender, EventArgs e)
        {
            bool flag = this.chkTimingSMS.Checked;
            this.pickHour.Visible = this.pickMinute.Visible = this.pickYear.Visible = flag;
            this.lblDay.Visible = this.lblMonth.Visible = this.lblYear.Visible = flag;
        }

        private void CurrentUser_StatusChanged(object sender, UserSatusChangedEventArgs e)
        {
            if ((e.NewStatus == UserAccountStatus.Logoff) || (e.NewStatus == UserAccountStatus.Disconnected))
            {
                base.Close();
            }
        }

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

        private void FormatSendInfo()
        {
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(GroupSMSForm));
            this.plInviteContacts = new Panel();
            this.txtHistory = new ChatRichTextBox();
            this.lblInputInfo = new HtmlLabel();
            this.txtSendContent = new XTextBox();
            this.menuSendType = new menu_widget(this.components);
            this.tsSendEnter = new ToolStripMenuItem();
            this.tsSendCtrlEnter = new ToolStripMenuItem();
            this.pnlMain = new Panel();
            this.btnSend = new XButton();
            this.btnTimingManager = new XButton();
            this.pickMinute = new NumericUpDown();
            this.pickHour = new NumericUpDown();
            this.lblDay = new Label();
            this.lblMonth = new Label();
            this.lblYear = new Label();
            this.pickYear = new DateTimePicker();
            this.chkTimingSMS = new CheckBox();
            this.panel2 = new Panel();
            this.panel1 = new Panel();
            this.menuSendType.SuspendLayout();
            this.pnlMain.SuspendLayout();
            this.pickMinute.BeginInit();
            this.pickHour.BeginInit();
            this.panel2.SuspendLayout();
            this.panel1.SuspendLayout();
            base.SuspendLayout();
            this.plInviteContacts.Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.plInviteContacts.Location = new System.Drawing.Point(4, 10);
            this.plInviteContacts.Name = "plInviteContacts";
            this.plInviteContacts.Size = new Size(0xf3, 0x1ee);
            this.plInviteContacts.TabIndex = 0;
            this.txtHistory.BackColor = Color.White;
            this.txtHistory.BorderColor = Color.Empty;
            this.txtHistory.BorderStyle = BorderStyle.None;
            this.txtHistory.Dock = DockStyle.Fill;
            this.txtHistory.Location = new System.Drawing.Point(1, 1);
            this.txtHistory.set_MinimumSize(new Size(4, 100));
            this.txtHistory.Name = "txtHistory";
            this.txtHistory.ReadOnly = true;
            this.txtHistory.RightToLeft = RightToLeft.No;
            this.txtHistory.ScrollBars = RichTextBoxScrollBars.Vertical;
            this.txtHistory.Size = new Size(0x169, 0x15b);
            this.txtHistory.TabIndex = 4;
            this.txtHistory.TabStop = false;
            this.txtHistory.Text = "";
            this.txtHistory.KeyDown += new KeyEventHandler(this.txtHistory_KeyDown);
            this.lblInputInfo.ForeColor = Color.MediumBlue;
            this.lblInputInfo.LinkColor = Color.Blue;
            this.lblInputInfo.Location = new System.Drawing.Point(0x1d8, 0x16e);
            this.lblInputInfo.Name = "lblInputInfo";
            this.lblInputInfo.ShowBackgroundImage = false;
            this.lblInputInfo.Size = new Size(0x8b, 0x12);
            this.lblInputInfo.TabIndex = 8;
            this.lblInputInfo.Text = "123";
            this.txtSendContent.BackColor = Color.White;

⌨️ 快捷键说明

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