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

📄 pgconversationtopcontrol.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 2 页
字号:
        private void lblBulletin_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                if (this._group.UserInfo.IsManagerOrSuperManager)
                {
                    string caption;
                    this.lblBulletin.Visible = false;
                    if (this._xtxtBulletin == null)
                    {
                        this._xtxtBulletin = new XTextBox();
                        this.pnlContainer.Controls.Add(this._xtxtBulletin);
                        this._xtxtBulletin.BackColor = Color.White;
                        this._xtxtBulletin.ForeColor = Color.Black;
                        this._xtxtBulletin.Location = new System.Drawing.Point(this.lblBulletin.Left, this.lblBulletin.Top + this.lblBulletin.get_Padding().get_Top());
                        this._xtxtBulletin.Size = new Size((this.lblBulletin.Width - this.lblBulletin.get_Padding().get_Left()) - this.lblBulletin.get_Padding().get_Right(), (this.lblBulletin.Height - this.lblBulletin.get_Padding().get_Top()) - this.lblBulletin.get_Padding().get_Bottom());
                        this._xtxtBulletin.Multiline = true;
                        this._xtxtBulletin.ScrollBars = ScrollBars.Vertical;
                        this._xtxtBulletin.BorderStyle = BorderStyle.FixedSingle;
                        this._xtxtBulletin.Name = "xtxtBulletin";
                        this._xtxtBulletin.MaxLength = 0x40;
                        this._xtxtBulletin.LostFocus += new EventHandler(this._xtxtBulletin_LostFocus);
                        this._xtxtBulletin.KeyPress += new KeyPressEventHandler(this._xtxtBulletin_KeyPress);
                    }
                    else if (!this._xtxtBulletin.Visible)
                    {
                        this._xtxtBulletin.Visible = true;
                    }
                    this._xtxtBulletin.Focus();
                    this._xtxtBulletin.Text = this._group.GroupInfo.Bulletin.Value;
                    if (this._framework.AccountManager.CurrentUser.Configuration.UserSetting.ConversationSetting.SendMessageByEnterKey.Value)
                    {
                        caption = "Ctrl+Enter键换行,Enter键提交修改。";
                    }
                    else
                    {
                        caption = "Enter键换行,Ctrl+Enter键提交修改。";
                    }
                    this.myToolTip.SetToolTip(this._xtxtBulletin, caption);
                }
            }
            catch (Exception exception)
            {
                ClientLogger.WriteException(exception);
            }
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            using (Pen pen = new Pen(this.borderColor, 1f))
            {
                pen.DashStyle = DashStyle.Dot;
                e.Graphics.DrawLine(pen, new System.Drawing.Point(2, base.Height - 2), new System.Drawing.Point(base.Width - 2, base.Height - 2));
            }
        }

        private void op_ImpsError(object sender, ImpsErrorEventArgs e)
        {
            try
            {
                this.lblBulletin.Text = StringHelper.EncodString(this._group.GroupInfo.Bulletin.Value);
                this._framework.UnifiedMessageBox.ShowError(e.Summary);
            }
            catch (Exception exception)
            {
                ClientLogger.WriteException(exception);
            }
        }

        private void PGConversationTopControl_Disposed(object sender, EventArgs e)
        {
            this._group.UserInfo.PropertiesChanged -= new EventHandler<PropertiesChangedEventArgs>(this, (IntPtr) this.UserInfo_PropertiesChanged);
            this._group.GroupInfo.PropertiesChanged -= new EventHandler<PropertiesChangedEventArgs>(this, (IntPtr) this.GroupInfo_PropertiesChanged);
        }

        private void picGroupSetting_MouseClick(object sender, MouseEventArgs e)
        {
            try
            {
                if (e.Button == MouseButtons.Left)
                {
                    this._framework.PersonalGroupManager.ShowGroupSetting(base.FindForm(), this._group, GroupOption.Normal);
                }
            }
            catch (Exception exception)
            {
                ClientLogger.WriteException(exception);
            }
        }

        private void picGroupSetting_MouseDown(object sender, MouseEventArgs e)
        {
            this.picGroupSetting.Image = Resources.PG_Setup_Down;
        }

        private void picGroupSetting_MouseHover(object sender, EventArgs e)
        {
            if (this.picGroupSetting.Enabled)
            {
                this.myToolTip.SetToolTip(this.picGroupSetting, "群设置");
                this.picGroupSetting.Image = Resources.PG_Setup_Hover;
            }
        }

        private void picGroupSetting_MouseLeave(object sender, EventArgs e)
        {
            this.picGroupSetting.Image = Resources.PG_Setup;
        }

        private void picGroupSetting_MouseUp(object sender, MouseEventArgs e)
        {
            if (this.picGroupSetting.Enabled)
            {
                this.picGroupSetting.Image = Resources.PG_Setup_Hover;
            }
        }

        private void picInviteFriend_MouseClick(object sender, MouseEventArgs e)
        {
            try
            {
                if (this.picInviteFriend.Enabled && (e.Button == MouseButtons.Left))
                {
                    this._framework.PersonalGroupManager.ShowInviteForm(base.FindForm(), null, this._group);
                }
            }
            catch (Exception exception)
            {
                ClientLogger.WriteException(exception);
            }
        }

        private void picInviteFriend_MouseDown(object sender, MouseEventArgs e)
        {
            if (this.picInviteFriend.Enabled)
            {
                this.picInviteFriend.Image = Resources.PG_Invite_Down;
            }
        }

        private void picInviteFriend_MouseHover(object sender, EventArgs e)
        {
            if (this.picInviteFriend.Enabled)
            {
                this.myToolTip.SetToolTip(this.picInviteFriend, "邀请飞信好友加入群");
                this.picInviteFriend.Image = Resources.PG_Invite_Hover;
            }
        }

        private void picInviteFriend_MouseLeave(object sender, EventArgs e)
        {
            if (this.picInviteFriend.Enabled)
            {
                this.picInviteFriend.Image = Resources.PG_Invite;
            }
        }

        private void picInviteFriend_MouseUp(object sender, MouseEventArgs e)
        {
            if (this.picInviteFriend.Enabled)
            {
                this.picInviteFriend.Image = Resources.PG_Invite_Hover;
            }
        }

        private void picSendSMS_MouseClick(object sender, MouseEventArgs e)
        {
            try
            {
                if (e.Button == MouseButtons.Left)
                {
                    this.SendSMS = !this.SendSMS;
                }
            }
            catch (Exception exception)
            {
                ClientLogger.WriteException(exception);
            }
        }

        private void picSendSMS_MouseDown(object sender, MouseEventArgs e)
        {
            if (this.picSendSMS.Enabled)
            {
                this.picSendSMS.Image = Resources.PG_SMS_Down;
            }
        }

        private void picSendSMS_MouseHover(object sender, EventArgs e)
        {
            if (this.picSendSMS.Enabled)
            {
                this.myToolTip.SetToolTip(this.picSendSMS, "发送群短信");
                this.picSendSMS.Image = Resources.PG_SMS_Hover;
            }
        }

        private void picSendSMS_MouseLeave(object sender, EventArgs e)
        {
            this.InitSMSButton();
        }

        private void picSendSMS_MouseUp(object sender, MouseEventArgs e)
        {
            if (this.picSendSMS.Enabled)
            {
                this.InitSMSButton();
            }
        }

        private void picVisitGroupWebsite_MouseClick(object sender, MouseEventArgs e)
        {
            try
            {
                if (this.picVisitGroupWebsite.Enabled && (e.Button == MouseButtons.Left))
                {
                    this._framework.PersonalGroupManager.VisitGroupWebSite(this._group);
                }
            }
            catch (Exception exception)
            {
                ClientLogger.WriteException(exception);
            }
        }

        private void picVisitGroupWebsite_MouseDown(object sender, MouseEventArgs e)
        {
            if (this.picVisitGroupWebsite.Enabled)
            {
                this.picVisitGroupWebsite.Image = Resources.PG_Website_Down;
            }
        }

        private void picVisitGroupWebsite_MouseHover(object sender, EventArgs e)
        {
            if (this.picVisitGroupWebsite.Enabled)
            {
                this.myToolTip.SetToolTip(this.picVisitGroupWebsite, "访问群主页");
                this.picVisitGroupWebsite.Image = Resources.PG_Website_Hover;
            }
        }

        private void picVisitGroupWebsite_MouseLeave(object sender, EventArgs e)
        {
            if (this.picVisitGroupWebsite.Enabled)
            {
                this.picVisitGroupWebsite.Image = Resources.PG_Website;
            }
        }

        private void picVisitGroupWebsite_MouseUp(object sender, MouseEventArgs e)
        {
            if (this.picVisitGroupWebsite.Enabled)
            {
                this.picVisitGroupWebsite.Image = Resources.PG_Website_Hover;
            }
        }

        private void pnlOperate_Paint(object sender, PaintEventArgs e)
        {
            using (Pen pen = new Pen(Color.FromArgb(0x69, 0x76, 0x89)))
            {
                e.Graphics.DrawLine(pen, 2, 4, 2, this.pnlOperate.Height - 4);
            }
            using (Pen pen2 = new Pen(Color.FromArgb(0xb6, 0xbf, 0xce)))
            {
                e.Graphics.DrawLine(pen2, 3, 4, 3, this.pnlOperate.Height - 4);
            }
        }

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

        private void tsGroupSetup_Click(object sender, EventArgs e)
        {
            this._framework.PersonalGroupManager.ShowGroupSetting(base.FindForm(), this._group, GroupOption.Normal);
        }

        private void tsGroupWebSite_Click(object sender, EventArgs e)
        {
            this._framework.PersonalGroupManager.VisitGroupWebSite(this._group);
        }

        private void tsHistory_Click(object sender, EventArgs e)
        {
            this._framework.PersonalGroupManager.ShowGroupMessageHistory(this._group);
        }

        private void tsInviteFriends_Click(object sender, EventArgs e)
        {
            this._framework.PersonalGroupManager.ShowInviteForm(base.FindForm(), null, this._group);
        }

        private void UpdateBulletin()
        {
            this._xtxtBulletin.Visible = false;
            this.lblBulletin.Visible = true;
            if (this._group.GroupInfo.Bulletin.Value != this._xtxtBulletin.Text)
            {
                this._group.GroupInfo.Bulletin.Value = this._xtxtBulletin.Text;
                this.lblBulletin.Text = StringHelper.EncodString(this._xtxtBulletin.Text);
                AsyncBizOperation op = new AsyncBizOperation();
                op.ImpsError += new EventHandler<ImpsErrorEventArgs>(this, (IntPtr) this.op_ImpsError);
                this._framework.AccountManager.CurrentUser.PersonalGroupManager.AsyncUpdateGroupInfo(this._group, op);
            }
        }

        private void UserInfo_PropertiesChanged(object sender, PropertiesChangedEventArgs e)
        {
            if (e.ContainsProperty("GroupUserIdentity"))
            {
                this.InitPopedom();
            }
        }

        public bool SendSMS
        {
            get
            {
                return this._sendSMS;
            }
            set
            {
                if (this._sendSMS != value)
                {
                    this._sendSMS = value;
                    if (this.SendSMSChanged != null)
                    {
                        this.SendSMSChanged(this, EventArgs.Empty);
                    }
                    this.InitSMSButton();
                }
            }
        }
    }
}

⌨️ 快捷键说明

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