📄 basicinfocontrol.cs
字号:
namespace Imps.Client.Pc
{
using Imps.Client;
using Imps.Client.Core;
using Imps.Client.Pc.Controls;
using Imps.Client.Pc.Utils;
using Imps.Client.Resource;
using Imps.Client.Utils;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
public class BasicInfoControl : GroupOptionsControlBase
{
private IFrameworkWindow _framework;
public Image _newImage;
private IContainer components;
private GroupBox gbBasicInfo;
private GroupBox gbNickname;
private XButton xbtnGroupPortrait;
private XLabel xlblCreateDate;
private XLabel xlblGroupBulletin;
private XLabel xlblGroupID;
private XLabel xlblGroupName;
private XLabel xlblSuperManager;
private PictureBox xpbProtrait;
private XTextBox xtbGroupBulletin;
private XTextBox xtbGroupID;
private XTextBox xtbGroupName;
private XTextBox xtbGroupNickName;
private XTextBox xtbSuperManager;
public BasicInfoControl(IFrameworkWindow wnd)
{
this._framework = wnd;
this.InitializeComponent();
base.Disposed += new EventHandler(this.BasicInfoControl_Disposed);
}
private void _personalGroup_MemberLoadStatusChanged(object sender, GroupLoadStatusChangedEventArgs e)
{
if ((e.NewStatus == PersonalGroupLoadStatus.Loaded) && (base._personalGroup.SuperManger != null))
{
this.xtbSuperManager.Text = base._personalGroup.SuperManger.DisplayName;
}
}
private void BasicInfoControl_Disposed(object sender, EventArgs e)
{
try
{
base._personalGroup.MemberLoadStatusChanged -= new EventHandler<GroupLoadStatusChangedEventArgs>(this, (IntPtr) this._personalGroup_MemberLoadStatusChanged);
}
catch (Exception)
{
}
}
public override bool CheckUserInput()
{
string text = this.xtbGroupName.Text.Trim();
if (text.Length <= 0)
{
BalloonHelper.ShowInputErrorBallon(this.xtbGroupName, StringTable.CreatePersonalGroup.MsgGroupNameNotEmpty, StringTable.Options.TitleInvalidInput);
return false;
}
int num = 0x40;
if (text.Length > num)
{
BalloonHelper.ShowInputErrorBallon(this.xtbGroupName, string.Format(StringTable.CreatePersonalGroup.MsgGroupNameTooLong, num), StringTable.Options.TitleInvalidInput);
return false;
}
return true;
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.components != null))
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private void handleUiEvent()
{
this.xtbGroupID.TextChanged += new EventHandler(this.uiData_GroupInfo_Changed);
this.xtbGroupBulletin.TextChanged += new EventHandler(this.uiData_GroupInfo_Changed);
this.xtbGroupName.TextChanged += new EventHandler(this.uiData_GroupInfo_Changed);
this.xtbGroupNickName.TextChanged += new EventHandler(this.uiData_UserInfo_Changed);
}
private void InitializeComponent()
{
ComponentResourceManager manager = new ComponentResourceManager(typeof(BasicInfoControl));
this.gbBasicInfo = new GroupBox();
this.xbtnGroupPortrait = new XButton();
this.xtbGroupBulletin = new XTextBox();
this.xlblGroupBulletin = new XLabel();
this.xlblCreateDate = new XLabel();
this.xtbGroupName = new XTextBox();
this.xtbSuperManager = new XTextBox();
this.xtbGroupID = new XTextBox();
this.xlblGroupName = new XLabel();
this.xlblSuperManager = new XLabel();
this.xlblGroupID = new XLabel();
this.xpbProtrait = new PictureBox();
this.gbNickname = new GroupBox();
this.xtbGroupNickName = new XTextBox();
this.gbBasicInfo.SuspendLayout();
this.xpbProtrait.BeginInit();
this.gbNickname.SuspendLayout();
base.SuspendLayout();
this.gbBasicInfo.Controls.Add(this.xbtnGroupPortrait);
this.gbBasicInfo.Controls.Add(this.xtbGroupBulletin);
this.gbBasicInfo.Controls.Add(this.xlblGroupBulletin);
this.gbBasicInfo.Controls.Add(this.xlblCreateDate);
this.gbBasicInfo.Controls.Add(this.xtbGroupName);
this.gbBasicInfo.Controls.Add(this.xtbSuperManager);
this.gbBasicInfo.Controls.Add(this.xtbGroupID);
this.gbBasicInfo.Controls.Add(this.xlblGroupName);
this.gbBasicInfo.Controls.Add(this.xlblSuperManager);
this.gbBasicInfo.Controls.Add(this.xlblGroupID);
this.gbBasicInfo.Controls.Add(this.xpbProtrait);
this.gbBasicInfo.Location = new System.Drawing.Point(3, 3);
this.gbBasicInfo.Name = "gbBasicInfo";
this.gbBasicInfo.Size = new Size(0x133, 230);
this.gbBasicInfo.TabIndex = 0;
this.gbBasicInfo.TabStop = false;
this.gbBasicInfo.Text = "基本资料";
this.xbtnGroupPortrait.AutoArrangementX = true;
this.xbtnGroupPortrait.AutoSizeToImage = false;
this.xbtnGroupPortrait.BackColor = Color.Transparent;
this.xbtnGroupPortrait.BackgroundImage = (Image) manager.GetObject("xbtnGroupPortrait.BackgroundImage");
this.xbtnGroupPortrait.BackgroundImageDisable = (Image) manager.GetObject("xbtnGroupPortrait.BackgroundImageDisable");
this.xbtnGroupPortrait.BackgroundImageDown = (Image) manager.GetObject("xbtnGroupPortrait.BackgroundImageDown");
this.xbtnGroupPortrait.BackgroundImageHover = (Image) manager.GetObject("xbtnGroupPortrait.BackgroundImageHover");
this.xbtnGroupPortrait.ChangeSkin = false;
this.xbtnGroupPortrait.Location = new System.Drawing.Point(0xcc, 0x59);
this.xbtnGroupPortrait.Name = "xbtnGroupPortrait";
this.xbtnGroupPortrait.Size = new Size(0x61, 0x15);
this.xbtnGroupPortrait.TabIndex = 15;
this.xbtnGroupPortrait.Text = "设置群形象...";
this.xbtnGroupPortrait.set_UseVisualStyleBackColor(false);
this.xbtnGroupPortrait.Click += new EventHandler(this.xbtnGroupPortrait_Click);
this.xtbGroupBulletin.BackColor = Color.White;
this.xtbGroupBulletin.BorderStyle = BorderStyle.FixedSingle;
this.xtbGroupBulletin.EmptyTextTip = "";
this.xtbGroupBulletin.EmptyTextTipColor = Color.DarkGray;
this.xtbGroupBulletin.Location = new System.Drawing.Point(0x15, 0x97);
this.xtbGroupBulletin.MaxLength = 0x40;
this.xtbGroupBulletin.Multiline = true;
this.xtbGroupBulletin.Name = "xtbGroupBulletin";
this.xtbGroupBulletin.ScrollBars = ScrollBars.Vertical;
this.xtbGroupBulletin.Size = new Size(0x109, 70);
this.xtbGroupBulletin.TabIndex = 0x13;
this.xlblGroupBulletin.set_AutoSize(true);
this.xlblGroupBulletin.BorderColor = Color.Empty;
this.xlblGroupBulletin.ButtonBorderStyle = ButtonBorderStyle.None;
this.xlblGroupBulletin.Location = new System.Drawing.Point(0x1a, 0x84);
this.xlblGroupBulletin.Name = "xlblGroupBulletin";
this.xlblGroupBulletin.Size = new Size(0xf7, 13);
this.xlblGroupBulletin.TabIndex = 0x12;
this.xlblGroupBulletin.Text = "群公告:(仅群内成员可见,限制64字以内)";
this.xlblCreateDate.set_AutoSize(true);
this.xlblCreateDate.BorderColor = Color.Empty;
this.xlblCreateDate.ButtonBorderStyle = ButtonBorderStyle.None;
this.xlblCreateDate.ForeColor = Color.ForestGreen;
this.xlblCreateDate.Location = new System.Drawing.Point(9, 0x6f);
this.xlblCreateDate.Name = "xlblCreateDate";
this.xlblCreateDate.Size = new Size(0x73, 13);
this.xlblCreateDate.TabIndex = 0x11;
this.xlblCreateDate.Text = "创建于,生命期为天";
this.xtbGroupName.BackColor = Color.White;
this.xtbGroupName.BorderStyle = BorderStyle.FixedSingle;
this.xtbGroupName.EmptyTextTip = "";
this.xtbGroupName.EmptyTextTipColor = Color.DarkGray;
this.xtbGroupName.Location = new System.Drawing.Point(0x57, 0x51);
this.xtbGroupName.MaxLength = 0x40;
this.xtbGroupName.Name = "xtbGroupName";
this.xtbGroupName.Size = new Size(100, 20);
this.xtbGroupName.TabIndex = 5;
this.xtbSuperManager.BackColor = Color.White;
this.xtbSuperManager.BorderStyle = BorderStyle.FixedSingle;
this.xtbSuperManager.EmptyTextTip = "";
this.xtbSuperManager.EmptyTextTipColor = Color.DarkGray;
this.xtbSuperManager.Location = new System.Drawing.Point(0x57, 0x31);
this.xtbSuperManager.Name = "xtbSuperManager";
this.xtbSuperManager.Size = new Size(100, 20);
this.xtbSuperManager.TabIndex = 4;
this.xtbGroupID.BackColor = Color.White;
this.xtbGroupID.BorderStyle = BorderStyle.FixedSingle;
this.xtbGroupID.EmptyTextTip = "";
this.xtbGroupID.EmptyTextTipColor = Color.DarkGray;
this.xtbGroupID.Location = new System.Drawing.Point(0x57, 0x13);
this.xtbGroupID.Name = "xtbGroupID";
this.xtbGroupID.Size = new Size(100, 20);
this.xtbGroupID.TabIndex = 3;
this.xlblGroupName.set_AutoSize(true);
this.xlblGroupName.BorderColor = Color.Empty;
this.xlblGroupName.ButtonBorderStyle = ButtonBorderStyle.None;
this.xlblGroupName.Location = new System.Drawing.Point(0x1a, 0x53);
this.xlblGroupName.Name = "xlblGroupName";
this.xlblGroupName.Size = new Size(0x37, 13);
this.xlblGroupName.TabIndex = 2;
this.xlblGroupName.Text = "群名称:";
this.xlblSuperManager.set_AutoSize(true);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -