📄 receiverequestbysidform.cs
字号:
this.buttonCancel.BackColor = Color.Transparent;
this.buttonCancel.BackgroundImageDisable = null;
this.buttonCancel.BackgroundImageDown = null;
this.buttonCancel.BackgroundImageHover = null;
this.buttonCancel.ChangeSkin = true;
this.buttonCancel.DialogResult = DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(0x13e, 0x103);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new Size(0x4b, 0x17);
this.buttonCancel.TabIndex = 10;
this.buttonCancel.Text = "取消";
this.buttonCancel.set_UseVisualStyleBackColor(false);
this.buttonCancel.Click += new EventHandler(this.buttonCancel_Click);
this.buttonOK.AutoArrangementX = false;
this.buttonOK.AutoSizeToImage = false;
this.buttonOK.BackColor = Color.Transparent;
this.buttonOK.BackgroundImageDisable = null;
this.buttonOK.BackgroundImageDown = null;
this.buttonOK.BackgroundImageHover = null;
this.buttonOK.ChangeSkin = true;
this.buttonOK.DialogResult = DialogResult.OK;
this.buttonOK.Location = new System.Drawing.Point(0xed, 0x103);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new Size(0x4b, 0x17);
this.buttonOK.TabIndex = 9;
this.buttonOK.Text = "确定";
this.buttonOK.set_UseVisualStyleBackColor(false);
this.buttonOK.Click += new EventHandler(this.buttonOK_Click);
this.checkBoxBlock.set_AutoSize(true);
this.checkBoxBlock.BackColor = Color.Transparent;
this.checkBoxBlock.Location = new System.Drawing.Point(0x20, 0xcf);
this.checkBoxBlock.Name = "checkBoxBlock";
this.checkBoxBlock.Size = new Size(0x86, 0x11);
this.checkBoxBlock.TabIndex = 8;
this.checkBoxBlock.Text = "拒绝此人再和我联系";
this.checkBoxBlock.set_UseVisualStyleBackColor(false);
this.radioButtonReject.set_AutoSize(true);
this.radioButtonReject.BackColor = Color.Transparent;
this.radioButtonReject.Location = new System.Drawing.Point(13, 0xb5);
this.radioButtonReject.Name = "radioButtonReject";
this.radioButtonReject.Size = new Size(0x3d, 0x11);
this.radioButtonReject.TabIndex = 7;
this.radioButtonReject.TabStop = true;
this.radioButtonReject.Text = "不同意";
this.radioButtonReject.set_UseVisualStyleBackColor(false);
this.radioButtonReject.CheckedChanged += new EventHandler(this.radioButtonReject_CheckedChanged);
this.radioButtonAgree.set_AutoSize(true);
this.radioButtonAgree.BackColor = Color.Transparent;
this.radioButtonAgree.Location = new System.Drawing.Point(13, 0x6d);
this.radioButtonAgree.Name = "radioButtonAgree";
this.radioButtonAgree.Size = new Size(0x85, 0x11);
this.radioButtonAgree.TabIndex = 3;
this.radioButtonAgree.TabStop = true;
this.radioButtonAgree.Text = "同意,设置屏显名称";
this.radioButtonAgree.set_UseVisualStyleBackColor(false);
this.radioButtonAgree.CheckedChanged += new EventHandler(this.radioButtonAgree_CheckedChanged);
this.panel1.BackColor = Color.Transparent;
this.panel1.Controls.Add(this.linkLabelDetail);
this.panel1.Controls.Add(this.labelHello);
this.panel1.Dock = DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new Size(0x18f, 0x55);
this.panel1.TabIndex = 0;
this.panelMain.BackColor = Color.Transparent;
this.panelMain.Controls.Add(this.tbDisplayName);
this.panelMain.Controls.Add(this.label2);
this.panelMain.Controls.Add(this.label3);
this.panelMain.Controls.Add(this.uButton1);
this.panelMain.Controls.Add(this.panel1);
this.panelMain.Controls.Add(this.comboBoxGroup);
this.panelMain.Controls.Add(label);
this.panelMain.Controls.Add(label2);
this.panelMain.Controls.Add(this.checkBoxBlock);
this.panelMain.Controls.Add(this.radioButtonAgree);
this.panelMain.Controls.Add(this.radioButtonReject);
this.panelMain.Location = new System.Drawing.Point(8, 8);
this.panelMain.Name = "panelMain";
this.panelMain.Size = new Size(0x18f, 0xf5);
this.panelMain.TabIndex = 0x2b;
this.tbDisplayName.Location = new System.Drawing.Point(0x93, 0x6b);
this.tbDisplayName.Name = "tbDisplayName";
this.tbDisplayName.Size = new Size(0x8d, 20);
this.tbDisplayName.TabIndex = 4;
this.tbDisplayName.MaxLength = 20;
this.tbDisplayName.KeyPress += new KeyPressEventHandler(this.tbDisplayName_KeyPress);
this.label2.set_AutoSize(true);
this.label2.Location = new System.Drawing.Point(0x41, 0x90);
this.label2.Name = "label2";
this.label2.Size = new Size(0x4f, 13);
this.label2.TabIndex = 0x2f;
this.label2.Text = "添加到该分组";
this.label3.set_AutoSize(true);
this.label3.Location = new System.Drawing.Point(0x126, 0x72);
this.label3.Name = "label3";
this.label3.Size = new Size(0x37, 13);
this.label3.TabIndex = 0x2d;
this.label3.Text = "(可选)";
this.uButton1.BackgroundImage = (Image) manager.GetObject("uButton1.BackgroundImage");
this.uButton1.DisabledBackgroundImage = null;
this.uButton1.HoverBackgroundImage = (Image) manager.GetObject("uButton1.HoverBackgroundImage");
this.uButton1.Location = new System.Drawing.Point(0x130, 140);
this.uButton1.Name = "uButton1";
this.uButton1.NormalBackgroundImage = (Image) manager.GetObject("uButton1.NormalBackgroundImage");
this.uButton1.PushedBackgroundImage = (Image) manager.GetObject("uButton1.PushedBackgroundImage");
this.uButton1.Size = new Size(0x53, 0x15);
this.uButton1.TabIndex = 6;
this.uButton1.Text = "添加分组";
this.uButton1.TextAlign = ContentAlignment.MiddleRight;
this.uButton1.set_UseVisualStyleBackColor(true);
this.uButton1.Click += new EventHandler(this.uButton1_Click);
base.set_AutoScaleDimensions(new SizeF(6f, 13f));
base.set_AutoScaleMode(1);
base.BaseHeight = 0x16c;
base.BaseWidth = 430;
base.ClientSize = new Size(430, 0x16c);
base.Controls.Add(this.panelMain);
base.Controls.Add(this.buttonCancel);
base.Controls.Add(this.buttonOK);
base.DisplayLocation = new System.Drawing.Point(0x12, 0x26);
base.DisplaySize = new Size(430, 0x16c);
base.FormBorderStyle = FormBorderStyle.FixedSingle;
base.MinimizeBox = false;
base.Name = "ReceiveRequestBySIDForm";
base.set_Padding(new Padding(8));
base.StartPosition = FormStartPosition.CenterScreen;
base.Text = "邀请函";
base.Load += new EventHandler(this.ReceiveRequestBySIDForm_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panelMain.ResumeLayout(false);
this.panelMain.PerformLayout();
base.ResumeLayout(false);
}
private void InitializeWndlessControl()
{
this._controlCollection = new WndlessControlCollection(this.panel1);
this._pictureBoxPortrait = new WndlessPortrait();
this._pictureBoxPortrait.Cursor = Cursors.Hand;
this._pictureBoxPortrait.Location = new System.Drawing.Point(8, 8);
this._pictureBoxPortrait.Size = new Size(0x40, 0x40);
this._pictureBoxPortrait.PortraitSize = 0x30;
this._pictureBoxPortrait.ToolTipText = "";
this._pictureBoxPortrait.Click += new EventHandler(this.pictureBoxPortrait_Click);
this._controlCollection.Add(this._pictureBoxPortrait);
}
private void InitUi()
{
this.labelHello.Text = string.Empty;
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 linkLabelDetail_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
try
{
if (MouseButtons.Left == e.get_Button())
{
this._iFarmeworkWindow.ContactManager.ShowContactDetail(this._contact.Uri.Raw);
}
}
catch
{
}
}
protected override void OnClosed(EventArgs e)
{
try
{
this._user.StatusChanged -= new EventHandler<UserSatusChangedEventArgs>(this, (IntPtr) this._user_StatusChanged);
this._contact.PersonalInfo.PropertiesChanged -= new EventHandler<PropertiesChangedEventArgs>(this, (IntPtr) this.contactPersonalInfo_PropertiesChanged);
this._user.ContactList.ContactGroupChanged -= new EventHandler<ContactGroupChangedEventArgs>(this, (IntPtr) 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 pictureBoxPortrait_Click(object sender, EventArgs e)
{
if (this._contact != null)
{
this._iFarmeworkWindow.ContactManager.ShowContactDetail(this._contact.Uri.Raw);
}
}
private void radioButtonAgree_CheckedChanged(object sender, EventArgs e)
{
try
{
this.comboBoxGroup.Enabled = this.radioButtonAgree.Checked;
this.tbDisplayName.Enabled = this.radioButtonAgree.Checked;
this.uButton1.Enabled = this.radioButtonAgree.Checked;
}
catch
{
}
}
private void radioButtonReject_CheckedChanged(object sender, EventArgs e)
{
try
{
this.checkBoxBlock.Checked = false;
this.checkBoxBlock.Enabled = this.radioButtonReject.Checked;
this.uButton1.Enabled = false;
}
catch
{
}
}
private void ReceiveRequestBySIDForm_Load(object sender, EventArgs e)
{
try
{
this.InitUi();
base.Text = string.Format(StringTable.FormAddBuddy.RequestReceivedFormText, this._contact.PersonalInfo.DisplayName);
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);
}
else
{
this.labelHello.Text = string.Format(StringTable.FormAddBuddy.RequestReceivedLetterContentSID, this._desc, this._contact.PersonalInfo.Nickname.Value);
}
this.InitGroup();
}
catch
{
base.Close();
}
}
private void tbDisplayName_KeyPress(object sender, KeyPressEventArgs e)
{
try
{
if (e.KeyChar < ' ')
{
}
}
catch
{
}
}
private void uButton1_Click(object sender, EventArgs e)
{
try
{
this._iFarmeworkWindow.ContactManager.ShowGroupCreateWindow(this);
}
catch
{
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -