📄 applyjoingroupform.cs
字号:
this.xlblUserNameText.ButtonBorderStyle = ButtonBorderStyle.None;
this.xlblUserNameText.Cursor = Cursors.Hand;
this.xlblUserNameText.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Underline);
this.xlblUserNameText.ForeColor = Color.Blue;
this.xlblUserNameText.LinkBehavior = LinkBehavior.AlwaysUnderline;
this.xlblUserNameText.LinkColor = Color.Blue;
this.xlblUserNameText.Location = new System.Drawing.Point(0x8d, 0x36);
this.xlblUserNameText.Name = "xlblUserNameText";
this.xlblUserNameText.Size = new Size(0xa7, 13);
this.xlblUserNameText.TabIndex = 7;
this.xlblUserNameText.Text = "user";
this.xlblUserNameText.TextAlign = ContentAlignment.TopLeft;
this.xlblUserNameText.UseMnemonic = false;
this.xlblUserNameText.LinkClicked += new LinkLabelLinkClickedEventHandler(this.xlblUserNameText_LinkClicked);
this.xlblUserName.set_AutoSize(true);
this.xlblUserName.BorderColor = Color.Empty;
this.xlblUserName.ButtonBorderStyle = ButtonBorderStyle.None;
this.xlblUserName.Location = new System.Drawing.Point(0x69, 0x36);
this.xlblUserName.Name = "xlblUserName";
this.xlblUserName.Size = new Size(0x2b, 13);
this.xlblUserName.TabIndex = 6;
this.xlblUserName.Text = "昵称:";
this.pbPortrait.BackColor = Color.Silver;
this.pbPortrait.Location = new System.Drawing.Point(12, 0x36);
this.pbPortrait.Name = "pbPortrait";
this.pbPortrait.set_Padding(new Padding(1));
this.pbPortrait.Size = new Size(80, 0x4f);
this.pbPortrait.SizeMode = PictureBoxSizeMode.StretchImage;
this.pbPortrait.TabIndex = 5;
this.pbPortrait.TabStop = false;
base.set_AutoScaleDimensions(new SizeF(6f, 13f));
base.BaseHeight = 0x15b;
base.BaseWidth = 0x17b;
base.CancelButton = this.xbtnCancel;
base.ClientSize = new Size(0x17b, 0x15b);
base.Controls.Add(this.pnlContent);
base.Controls.Add(this.xbtnCancel);
base.Controls.Add(this.xbtnOK);
base.DisplayLocation = new System.Drawing.Point(0x12, 0x26);
base.DisplaySize = new Size(0x17b, 0x15b);
base.Name = "ApplyJoinGroupForm";
base.set_Padding(new Padding(1, 0x16, 13, 4));
base.Text = "申请加入群";
base.add_FormClosing(new FormClosingEventHandler(this, (IntPtr) this.ApplyJoinGroupForm_FormClosing));
base.Load += new EventHandler(this.ApplyJoinGroupForm_Load);
this.pnlContent.ResumeLayout(false);
this.pnlContent.PerformLayout();
this.gbReply.ResumeLayout(false);
this.gbReply.PerformLayout();
this.pbPortrait.EndInit();
base.ResumeLayout(false);
}
private void op_ImpsError(object sender, ImpsErrorEventArgs e)
{
try
{
if (e.ErrorCode != 0x199)
{
base.Close();
}
this._framework.UnifiedMessageBox.ShowInfo(e.Summary);
(sender as AsyncBizOperation).IsImpsErrorHandled = true;
this.op = null;
this.xbtnOK.Enabled = true;
this.xbtnCancel.Enabled = true;
}
catch (Exception exception)
{
ClientLogger.WriteException(exception);
}
}
private void op_Successed(object sender, EventArgs e)
{
base.Close();
}
private void PersonalInfo_PropertiesChanged(object sender, PropertiesChangedEventArgs e)
{
try
{
if (e.ContainsProperty("Portrait"))
{
this.pbPortrait.Image = this._contact.PersonalInfo.Portrait;
}
}
catch (Exception exception)
{
ClientLogger.WriteException(exception);
}
}
private void xbtnCancel_Click(object sender, EventArgs e)
{
base.Close();
}
private void xbtnOK_Click(object sender, EventArgs e)
{
try
{
if (this.op == null)
{
string approveAdvice;
if (this.rbAgree.Checked)
{
approveAdvice = "1";
}
else
{
approveAdvice = "2";
}
PersonalGroupMember member = new PersonalGroupMember(this.CurrentUser, this._contact.Uri.Raw, this._group);
this.op = new AsyncBizOperation();
this.op.Successed += new EventHandler(this.op_Successed);
this.op.ImpsError += new EventHandler<ImpsErrorEventArgs>(this, (IntPtr) this.op_ImpsError);
this.CurrentUser.PersonalGroupManager.AsyncHandleGroupJoin(member, approveAdvice, "", this.op);
this.xbtnOK.Enabled = false;
this.xbtnCancel.Enabled = false;
}
}
catch (Exception exception)
{
ClientLogger.WriteException(exception);
}
}
private void xlblAnouce_LabelLinkClick(object sender, LabelLinkClickEventArgs e)
{
try
{
if (!string.IsNullOrEmpty(e.Url))
{
IicUri uri = new IicUri(e.Url);
if (uri.IsContact)
{
this._framework.ContactManager.ShowContactDetail(this, uri.Raw);
}
else if (uri.Type == IicUriType.PersonalGroup)
{
PersonalGroup group = this.CurrentUser.PersonalGroups[uri];
if (group != null)
{
this._framework.PersonalGroupManager.ShowGroupSetting(this, group, GroupOption.Normal);
}
}
}
}
catch (Exception exception)
{
ClientLogger.WriteException(exception);
}
}
private void xlblUserNameText_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
try
{
this._framework.ContactManager.ShowContactDetail(this, this._contact.Uri.Raw);
}
catch (Exception exception)
{
ClientLogger.WriteException(exception);
}
}
private void xllSeeUserDetails_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
try
{
this._framework.ContactManager.ShowContactDetail(this, this._contact.Uri.Raw);
}
catch (Exception exception)
{
ClientLogger.WriteException(exception);
}
}
private User CurrentUser
{
get
{
return this._framework.AccountManager.CurrentUser;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -