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

📄 buserinfocontrol.cs

📁 飞信的收发使用csharp进行开发
💻 CS
📖 第 1 页 / 共 2 页
字号:
            this.ctlMoodPhrase.EmptyPersonalMessageTextForeColor = Color.Silver;
            this.ctlMoodPhrase.Font = new Font("Arial", 9f);
            this.ctlMoodPhrase.ForeColor = Color.FromArgb(100, 100, 100);
            this.ctlMoodPhrase.Location = new Point(0x51, 0x1d);
            this.ctlMoodPhrase.MaxLength = 0x7fffffff;
            this.ctlMoodPhrase.MouseDownBackColor = Color.White;
            this.ctlMoodPhrase.MouseDownBackgroundImage = (Image) manager.GetObject("ctlMoodPhrase.MouseDownBackgroundImage");
            this.ctlMoodPhrase.MouseDownBorderColor = Color.FromArgb(0x98, 200, 0xe8);
            this.ctlMoodPhrase.MouseOverBackColor = Color.White;
            this.ctlMoodPhrase.MouseOverBackgroundImage = (Image) manager.GetObject("ctlMoodPhrase.MouseOverBackgroundImage");
            this.ctlMoodPhrase.MouseOverBorderColor = Color.FromArgb(0x48, 0x90, 200);
            this.ctlMoodPhrase.Name = "ctlMoodPhrase";
            this.ctlMoodPhrase.PersonalMessageText = "";
            this.ctlMoodPhrase.Size = new Size(270, 0x16);
            this.ctlMoodPhrase.TabIndex = 4;
            this.ctlMoodPhrase.TextboxBorderColor = Color.FromArgb(0x98, 0x97, 0x8b);
            this.ctlMoodPhrase.TextBoxAccepted += new EventHandler(this.displayPersonalMessage_TextBoxAccepted);
            this.cmMoodPhrases.Name = "cmMoodPhrases";
            this.cmMoodPhrases.Size = new Size(0x3d, 4);
            this.cmMoodPhrases.Opening += new CancelEventHandler(this.cmMoodPhrases_Opening);
            this.ctlNickname.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.ctlNickname.BackColor = Color.White;
            this.ctlNickname.DisplayName = "游客";
            this.ctlNickname.DisplayNameFont = new Font("SimSun", 9f, FontStyle.Bold);
            this.ctlNickname.DisplayNameForeColor = Color.FromArgb(100, 100, 100);
            this.ctlNickname.DropDownButtonImage = (Image) manager.GetObject("ctlNickname.DropDownButtonImage");
            this.ctlNickname.DropDownMenu = this.cmStatus;
            this.ctlNickname.Location = new Point(0x51, 7);
            this.ctlNickname.MouseDownBackColor = Color.White;
            this.ctlNickname.MouseDownBackgroundImage = (Image) manager.GetObject("ctlNickname.MouseDownBackgroundImage");
            this.ctlNickname.MouseDownBorderColor = Color.FromArgb(0x98, 200, 0xe8);
            this.ctlNickname.MouseOverBackColor = Color.White;
            this.ctlNickname.MouseOverBackgroundImage = (Image) manager.GetObject("ctlNickname.MouseOverBackgroundImage");
            this.ctlNickname.MouseOverBorderColor = Color.FromArgb(0x48, 0x90, 200);
            this.ctlNickname.Name = "ctlNickname";
            this.ctlNickname.OnlineStatusText = "(在线)";
            this.ctlNickname.OnlineStatusTextFont = new Font("SimSun", 9f);
            this.ctlNickname.OnlineStatusTextForeColor = Color.FromArgb(100, 100, 100);
            this.ctlNickname.Size = new Size(270, 0x16);
            this.ctlNickname.TabIndex = 4;
            this.cmStatus.Name = "cmStatus";
            this.cmStatus.Size = new Size(0x3d, 4);
            this.cmStatus.Opening += new CancelEventHandler(this.cmStatus_Opening);
            this.tsMain.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.tsMain.AutoSize = false;
            this.tsMain.BackColor = Color.Transparent;
            this.tsMain.BackgroundImageLayout = ImageLayout.None;
            this.tsMain.Dock = DockStyle.None;
            this.tsMain.GripStyle = ToolStripGripStyle.Hidden;
            this.tsMain.ImageScalingSize = new Size(30, 0x16);
            this.tsMain.Items.AddRange(new ToolStripItem[] { this.toolIM, this.toolSms, this.toolIVR, this.toolShareContent, this.toolColorRing, this.toolMatch });
            this.tsMain.Location = new Point(0x4e, 0x33);
            this.tsMain.Name = "tsMain";
            this.tsMain.Padding = new Padding(0);
            this.tsMain.ShowBackGroundImage = false;
            this.tsMain.Size = new Size(0x116, 0x1a);
            this.tsMain.TabIndex = 3;
            this.toolIM.AutoSize = false;
            this.toolIM.DisplayStyle = ToolStripItemDisplayStyle.Image;
            this.toolIM.Image = (Image) manager.GetObject("toolIM.Image");
            this.toolIM.ImageScaling = ToolStripItemImageScaling.None;
            this.toolIM.ImageTransparentColor = Color.Transparent;
            this.toolIM.Margin = new Padding(3, 2, 3, 2);
            this.toolIM.Name = "toolIM";
            this.toolIM.Size = new Size(0x1a, 0x16);
            this.toolIM.Click += new EventHandler(this.toolIm_Click);
            this.toolSms.AutoSize = false;
            this.toolSms.DisplayStyle = ToolStripItemDisplayStyle.Image;
            this.toolSms.Image = (Image) manager.GetObject("toolSms.Image");
            this.toolSms.ImageScaling = ToolStripItemImageScaling.None;
            this.toolSms.ImageTransparentColor = Color.Magenta;
            this.toolSms.Margin = new Padding(3, 2, 3, 2);
            this.toolSms.Name = "toolSms";
            this.toolSms.Size = new Size(0x1a, 0x16);
            this.toolSms.Click += new EventHandler(this.toolSms_Click);
            this.toolIVR.AutoSize = false;
            this.toolIVR.DisplayStyle = ToolStripItemDisplayStyle.Image;
            this.toolIVR.Image = (Image) manager.GetObject("toolIVR.Image");
            this.toolIVR.ImageScaling = ToolStripItemImageScaling.None;
            this.toolIVR.ImageTransparentColor = Color.Magenta;
            this.toolIVR.Margin = new Padding(3, 2, 3, 2);
            this.toolIVR.Name = "toolIVR";
            this.toolIVR.Size = new Size(0x1a, 0x16);
            this.toolIVR.Click += new EventHandler(this.toolIVR_Click);
            this.toolShareContent.AutoSize = false;
            this.toolShareContent.DisplayStyle = ToolStripItemDisplayStyle.Image;
            this.toolShareContent.Image = (Image) manager.GetObject("toolShareContent.Image");
            this.toolShareContent.ImageScaling = ToolStripItemImageScaling.None;
            this.toolShareContent.ImageTransparentColor = Color.Magenta;
            this.toolShareContent.Margin = new Padding(3, 2, 3, 2);
            this.toolShareContent.Name = "toolShareContent";
            this.toolShareContent.Size = new Size(0x1a, 0x16);
            this.toolShareContent.Click += new EventHandler(this.toolShareContent_Click);
            this.toolColorRing.AutoSize = false;
            this.toolColorRing.DisplayStyle = ToolStripItemDisplayStyle.Image;
            this.toolColorRing.Image = (Image) manager.GetObject("toolColorRing.Image");
            this.toolColorRing.ImageScaling = ToolStripItemImageScaling.None;
            this.toolColorRing.ImageTransparentColor = Color.Magenta;
            this.toolColorRing.Margin = new Padding(3, 2, 3, 2);
            this.toolColorRing.Name = "toolColorRing";
            this.toolColorRing.Size = new Size(0x1a, 0x16);
            this.toolColorRing.Click += new EventHandler(this.toolColorRing_Click);
            this.toolMatch.AutoSize = false;
            this.toolMatch.DisplayStyle = ToolStripItemDisplayStyle.Image;
            this.toolMatch.Image = (Image) manager.GetObject("toolMatch.Image");
            this.toolMatch.ImageScaling = ToolStripItemImageScaling.None;
            this.toolMatch.ImageTransparentColor = Color.Magenta;
            this.toolMatch.Margin = new Padding(3, 2, 3, 2);
            this.toolMatch.Name = "toolMatch";
            this.toolMatch.Size = new Size(0x1a, 0x16);
            this.toolMatch.Click += new EventHandler(this.toolMatch_Click);
            this.ctlPortrait.Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.ctlPortrait.BackColor = Color.White;
            this.ctlPortrait.BorderColor = Color.FromArgb(0xc4, 0xc4, 0xc4);
            this.ctlPortrait.Location = new Point(6, 7);
            this.ctlPortrait.Name = "ctlPortrait";
            this.ctlPortrait.Size = new Size(70, 70);
            this.ctlPortrait.SizeMode = PortraitSizeMode.Size_64;
            this.ctlPortrait.TabIndex = 2;
            this.ctlPortrait.Click += new EventHandler(this.dpContact_Click);
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.pnlTop);
            base.Name = "BUserInfoControl";
            base.Size = new Size(0x162, 0x52);
            this.pnlTop.ResumeLayout(false);
            this.tsMain.ResumeLayout(false);
            this.tsMain.PerformLayout();
            base.ResumeLayout(false);
        }

        private void SetMoodPhrase(string text)
        {
            this.ctlMoodPhrase.Text = text;
        }

        private void tiMoodPhrase_Click(object sender, EventArgs e)
        {
            if (sender is ToolStripItem)
            {
                this.TryChangeMoodPhrase(((ToolStripItem) sender).ToolTipText);
            }
        }

        private void toolColorRing_Click(object sender, EventArgs e)
        {
            UiErrorHelper.HandEventSafely(this._manager.FrameworkWnd, delegate {
                this._manager.FrameworkWnd.NavigateToTab("ColorRbt", string.Empty);
            });
        }

        private void toolIm_Click(object sender, EventArgs e)
        {
            UiErrorHelper.HandEventSafely(this._manager.FrameworkWnd, delegate {
                this._manager.FrameworkWnd.ConversationManager.StartConversation(this._manager.FrameworkWnd as IWin32Window, ConversationOperation.ImChat, null);
            });
        }

        private void toolIVR_Click(object sender, EventArgs e)
        {
            UiErrorHelper.HandEventSafely(this._manager.FrameworkWnd, delegate {
                this._manager.FrameworkWnd.IVRManager.StartIVR(this._manager.FrameworkWnd as IWin32Window, null);
            });
        }

        private void toolMatch_Click(object sender, EventArgs e)
        {
            UiErrorHelper.HandEventSafely(this._manager.FrameworkWnd, delegate {
                this._manager.FrameworkWnd.NavigateToTab("BuddyMatch", string.Empty);
            });
        }

        private void toolShareContent_Click(object sender, EventArgs e)
        {
            UiErrorHelper.HandEventSafely(this._manager.FrameworkWnd, delegate {
                this._manager.FrameworkWnd.ConversationManager.StartConversation(this._manager.FrameworkWnd as IWin32Window, ConversationOperation.SendFile, null);
            });
        }

        private void toolSms_Click(object sender, EventArgs e)
        {
            UiErrorHelper.HandEventSafely(this._manager.FrameworkWnd, delegate {
                this._manager.FrameworkWnd.ConversationManager.StartConversation(this._manager.FrameworkWnd as IWin32Window, ConversationOperation.SmsChat, null);
            });
        }

        private void TryChangeMoodPhrase(string phrase)
        {
            try
            {
                phrase = phrase.Trim();
                AsyncBizOperation op = new AsyncBizOperation();
                op.ImpsError += new EventHandler<ImpsErrorEventArgs>(this.ChangeMoodPhrase_ImpsError);
                this.SetMoodPhrase(phrase);
                this._manager.CurrentUser.Presence.AsyncChangeMoodPhrase(phrase, op);
            }
            catch
            {
                this.ChangeMoodPhrase_ImpsError(this, null);
            }
        }
    }
}

⌨️ 快捷键说明

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