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

📄 receiverequestbysidform.cs

📁 飞信的收发使用csharp进行开发
💻 CS
📖 第 1 页 / 共 2 页
字号:
            this.labelNickname.Size = new Size(0x8a, 13);
            this.labelNickname.TabIndex = 0;
            this.labelNickname.Text = "Nickname";
            this.labelNickname.TextAlign = ContentAlignment.TopLeft;
            this.labelNickname.UseMnemonic = false;
            this.comboBoxGroup.BackColor = Color.White;
            this.comboBoxGroup.DropDownStyle = ComboBoxStyle.DropDownList;
            this.comboBoxGroup.FormattingEnabled = true;
            this.comboBoxGroup.Location = new Point(0x9e, 0xa4);
            this.comboBoxGroup.Name = "comboBoxGroup";
            this.comboBoxGroup.Size = new Size(0xae, 0x15);
            this.comboBoxGroup.TabIndex = 4;
            this.labelHello.AutoEllipsis = true;
            this.labelHello.BorderColor = Color.Black;
            this.labelHello.BorderStyle = BorderStyle.None;
            this.labelHello.ButtonBorderStyle = ButtonBorderStyle.Solid;
            this.labelHello.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0x86);
            this.labelHello.Location = new Point(0x3d, 0x1f);
            this.labelHello.Name = "labelHello";
            this.labelHello.Size = new Size(0x14d, 0x23);
            this.labelHello.TabIndex = 2;
            this.labelHello.Text = "我的自我介绍:";
            this.labelHello.TextAlign = ContentAlignment.TopLeft;
            this.labelHello.UseMnemonic = false;
            this.buttonCancel.DialogResult = DialogResult.Cancel;
            this.buttonCancel.Location = new Point(0x13a, 0xef);
            this.buttonCancel.Name = "buttonCancel";
            this.buttonCancel.Size = new Size(0x4b, 0x17);
            this.buttonCancel.TabIndex = 8;
            this.buttonCancel.Text = "取消";
            this.buttonCancel.UseVisualStyleBackColor = true;
            this.buttonCancel.Click += new EventHandler(this.buttonCancel_Click);
            this.buttonOK.DialogResult = DialogResult.OK;
            this.buttonOK.Location = new Point(0xe9, 0xef);
            this.buttonOK.Name = "buttonOK";
            this.buttonOK.Size = new Size(0x4b, 0x17);
            this.buttonOK.TabIndex = 7;
            this.buttonOK.Text = "确定";
            this.buttonOK.UseVisualStyleBackColor = true;
            this.buttonOK.Click += new EventHandler(this.buttonOK_Click);
            this.checkBoxBlock.AutoSize = true;
            this.checkBoxBlock.BackColor = Color.Transparent;
            this.checkBoxBlock.Location = new Point(0x41, 0xd4);
            this.checkBoxBlock.Name = "checkBoxBlock";
            this.checkBoxBlock.Size = new Size(0x86, 0x11);
            this.checkBoxBlock.TabIndex = 6;
            this.checkBoxBlock.Text = "拒绝此人再和我联系";
            this.checkBoxBlock.UseVisualStyleBackColor = false;
            this.radioButtonReject.AutoSize = true;
            this.radioButtonReject.BackColor = Color.Transparent;
            this.radioButtonReject.Location = new Point(0x22, 0xbc);
            this.radioButtonReject.Name = "radioButtonReject";
            this.radioButtonReject.Size = new Size(0x3d, 0x11);
            this.radioButtonReject.TabIndex = 5;
            this.radioButtonReject.TabStop = true;
            this.radioButtonReject.Text = "不同意";
            this.radioButtonReject.UseVisualStyleBackColor = false;
            this.radioButtonReject.CheckedChanged += new EventHandler(this.radioButtonReject_CheckedChanged);
            this.radioButtonAgree.AutoSize = true;
            this.radioButtonAgree.BackColor = Color.Transparent;
            this.radioButtonAgree.Location = new Point(0x22, 0xa5);
            this.radioButtonAgree.Name = "radioButtonAgree";
            this.radioButtonAgree.Size = new Size(0x79, 0x11);
            this.radioButtonAgree.TabIndex = 3;
            this.radioButtonAgree.TabStop = true;
            this.radioButtonAgree.Text = "同意,添加到该组";
            this.radioButtonAgree.UseVisualStyleBackColor = false;
            this.radioButtonAgree.CheckedChanged += new EventHandler(this.radioButtonAgree_CheckedChanged);
            this.panel1.BackColor = Color.Transparent;
            this.panel1.Controls.Add(this.label1);
            this.panel1.Controls.Add(this.panel2);
            this.panel1.Controls.Add(this.labelHello);
            this.panel1.Dock = DockStyle.Top;
            this.panel1.Location = new Point(0, 0);
            this.panel1.Name = "panel1";
            this.panel1.Size = new Size(0x1a1, 0x91);
            this.panel1.TabIndex = 0;
            this.label1.AutoEllipsis = false;
            this.label1.AutoSize = true;
            this.label1.BorderColor = Color.Black;
            this.label1.BorderStyle = BorderStyle.None;
            this.label1.ButtonBorderStyle = ButtonBorderStyle.Solid;
            this.label1.Location = new Point(0x3d, 12);
            this.label1.Name = "label1";
            this.label1.Size = new Size(0x2b, 14);
            this.label1.TabIndex = 0;
            this.label1.Text = "您好:";
            this.label1.TextAlign = ContentAlignment.TopLeft;
            this.label1.UseMnemonic = false;
            this.label1.Click += new EventHandler(this.label1_Click);
            this.panel3.BackColor = Color.Transparent;
            this.panel3.Controls.Add(this.linkLabelNewGroup);
            this.panel3.Controls.Add(this.panel1);
            this.panel3.Controls.Add(this.buttonCancel);
            this.panel3.Controls.Add(this.comboBoxGroup);
            this.panel3.Controls.Add(this.buttonOK);
            this.panel3.Controls.Add(label);
            this.panel3.Controls.Add(label2);
            this.panel3.Controls.Add(this.checkBoxBlock);
            this.panel3.Controls.Add(this.radioButtonAgree);
            this.panel3.Controls.Add(this.radioButtonReject);
            this.panel3.Dock = DockStyle.Fill;
            this.panel3.Location = new Point(8, 8);
            this.panel3.Name = "panel3";
            this.panel3.Size = new Size(0x1a1, 310);
            this.panel3.TabIndex = 0x2b;
            this.linkLabelNewGroup.AutoSize = true;
            this.linkLabelNewGroup.BackColor = Color.Transparent;
            this.linkLabelNewGroup.Location = new Point(0x152, 0xa8);
            this.linkLabelNewGroup.Name = "linkLabelNewGroup";
            this.linkLabelNewGroup.Size = new Size(0x37, 13);
            this.linkLabelNewGroup.TabIndex = 0x13;
            this.linkLabelNewGroup.TabStop = true;
            this.linkLabelNewGroup.Text = "添加新组";
            this.linkLabelNewGroup.LinkClicked += new LinkLabelLinkClickedEventHandler(this.linkLabelNewGroup_LinkClicked);
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.ClientSize = new Size(0x1b1, 0x146);
            base.Controls.Add(this.panel3);
            base.FormBorderStyle = FormBorderStyle.FixedSingle;
            base.Icon = (Icon) manager.GetObject("$this.Icon");
            base.MinimizeBox = false;
            base.Name = "ReceiveRequestBySIDForm";
            base.Padding = new Padding(8);
            base.StartPosition = FormStartPosition.CenterScreen;
            base.Text = "邀请函";
            base.Load += new EventHandler(this.ReceiveRequestBySIDForm_Load);
            base.Controls.SetChildIndex(this.panel3, 0);
            base.Controls.SetChildIndex(base.menubar, 0);
            this.panel2.ResumeLayout(false);
            this.panel2.PerformLayout();
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            this.panel3.ResumeLayout(false);
            this.panel3.PerformLayout();
            base.ResumeLayout(false);
        }

        private void InitUi()
        {
            this.labelHello.Text = "";
            this.labelNickname.Text = "";
            base.Text = StringTable.FormAddBuddy.RequestReceivedFormTextInit;
            this.radioButtonAgree.Text = StringTable.FormAddBuddy.Agree;
            this.radioButtonReject.Text = StringTable.FormAddBuddy.Reject;
            this.checkBoxBlock.Text = StringTable.FormAddBuddy.Block;
            this.comboBoxGroup.Enabled = false;
            this.checkBoxBlock.Enabled = false;
            this.radioButtonAgree.Checked = true;
            try
            {
                this.pictureBoxPortrait.Image = this._contact.PersonalInfo.PortraitMedium;
            }
            catch
            {
                if (this._contact.PersonalInfo.Gender == Gender.Female)
                {
                    this.pictureBoxPortrait.Image = ImpsPortrait.GetGirlPortrait(0x40, 0x40);
                }
                else
                {
                    this.pictureBoxPortrait.Image = ImpsPortrait.GetBoyPortrait(0x40, 0x40);
                }
            }
        }

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

        private void linkLabelDetail_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                if (MouseButtons.Left == e.Button)
                {
                    this._iFarmeworkWindow.ContactManager.ShowContactDetail(this._contact.Uri.Raw);
                }
            }
            catch
            {
            }
        }

        private void linkLabelNewGroup_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                this._iFarmeworkWindow.ContactManager.ShowGroupCreateWindow(this);
            }
            catch
            {
            }
        }

        protected override void OnClosed(EventArgs e)
        {
            try
            {
                this._user.StatusChanged -= new EventHandler<UserSatusChangedEventArgs>(this._user_StatusChanged);
                this._contact.PersonalInfo.PropertiesChanged -= new EventHandler<PropertiesChangedEventArgs>(this.contactPersonalInfo_PropertiesChanged);
                this._user.ContactList.ContactGroupChanged -= new EventHandler<ContactGroupChangedEventArgs>(this.ContactList_ContactGroupChanged);
                if ((!this._hasHandleRequest && (this._user.Status != UserAccountStatus.Disconnected)) && ((this._user.Status != UserAccountStatus.Logoff) && (this._user.Status != UserAccountStatus.Logouting)))
                {
                    this._user.ContactList.AsyncHandleContactRequest(this._contact.Uri.ToString(), 2, null, null, false, string.Empty, null);
                    this._hasHandleRequest = true;
                }
            }
            catch
            {
            }
            base.OnClosed(e);
        }

        private void radioButtonAgree_CheckedChanged(object sender, EventArgs e)
        {
            try
            {
                this.comboBoxGroup.Enabled = this.radioButtonAgree.Checked;
            }
            catch
            {
            }
        }

        private void radioButtonReject_CheckedChanged(object sender, EventArgs e)
        {
            try
            {
                this.checkBoxBlock.Checked = false;
                this.checkBoxBlock.Enabled = this.radioButtonReject.Checked;
            }
            catch
            {
            }
        }

        private void ReceiveRequestBySIDForm_Load(object sender, EventArgs e)
        {
            try
            {
                this.InitUi();
                if (this._contact.PersonalInfo.Nickname.Value.Length != 0)
                {
                    base.Text = string.Format(StringTable.FormAddBuddy.RequestReceivedFormText, this._contact.PersonalInfo.Nickname.Value);
                    this.labelNickname.Text = this._contact.PersonalInfo.Nickname.Value.Replace("&", "&&");
                }
                if ((this._desc == this._contact.PersonalInfo.Nickname.Value) || (this._contact.PersonalInfo.Nickname.Value.Length == 0))
                {
                    this.labelHello.Text = string.Format(StringTable.FormAddBuddy.RequestReceivedLetterContentSID_NoNickname, this._desc.Replace("&", "&&"));
                }
                else
                {
                    this.labelHello.Text = string.Format(StringTable.FormAddBuddy.RequestReceivedLetterContentSID, this._desc.Replace("&", "&&"), this._contact.PersonalInfo.Nickname.Value.Replace("&", "&&"));
                }
                this.InitGroup();
            }
            catch
            {
                base.Close();
            }
        }
    }
}

⌨️ 快捷键说明

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