《 校友聊详细设计说明书》
《 校友聊详细设计说明书》
1引言
1.1编写目的
本文档为"石家庄铁道大学校友聊详细设计说明",主要是为了实现软件的功能而进行的软件详细设计说明,详细软件各个模块的实现流程、功能、接口、编译测试要点等内容,便于对软件的编码进行指导和约束,本文档供全体组员和测试人员阅读。
2系统功能实现
校友聊系统内容
理解需求是在问题及其最终解决方案之间架设桥梁的第一步。开发者只有和客户充分理解了需求之后才能开始设计系统,否则,对需求定义的任何改进,设计上都必须大量的返工。下面是我们对用户经过调研后得到的需求规格说明:
(1) 系统为客户提供群聊功能:用户可以先通过登录界面进入聊天室主界面,点击搜索栏,输入群组号可直接搜索到基于这个聊天软件下的群组,点击添加即可申请加入群或组,成功申请之后就可以群聊了。
(2) 系统为客户提供语音和视频聊天功能:用户可以在聊天窗口中点击视频图标或语音图标按钮,即可以和好友进行视频或语音聊天;
(3) 系统为客户提供文件传输功能:用户点击文件传输图标后,即可选择相应的文件传输给好友或群组;
(4) 在系统中,界面显示:将在线好友显示在好友列表中;
(5) 系统为客户提供改变字体颜色和样式和表情库。
(6) 系统中,可以显示登陆用户的头像和昵称。
(7) 系统中,服务器端实现监听功能:监听所有本地连接到服务器上的客户端;
(8) 系统中,服务器端接受来自客户端的各种信息并分别处理;
(9) 系统中,检查登陆信息是否正确,并向客户端返回登陆信息,如信息正确。就将在线用户发给该用户,并将该用户的状态发给各在线用户。同时在服务器端和客户端显示出来;
(10) 系统的客户端在Windows平台下运行,服务器端可在Windows平台下运行。系统需要有较好的安全性和可扩展性,并提供简洁方便的图形用户界面。
3.1系统控制台模块
功能:各个子功能之间的调用;统一的登录界面实现到数据库服务器的登陆设计:
3.1.1登陆数据库
输入用户账号(id),密码(pwd),以账号ManagerPerson_id和密码ManagerPerson_pwd登陆的用户拥有对普通用户管理的权限,以账号Manager_id和密码Manager_pwd登陆的用户拥有对所由用户进行管理的权限.检索系统权限表,根据权限设置相应的功能模块,
3.1.2程序组、程序项的原理组织各执行模块
可执行功能模块的调用执行,通过程序项名称获取可执行目标代码文件名,界面如下:
部分程序代码如下:
namespace 校友聊
{
partial class LoginForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginForm));
this.toolShow = new System.Windows.Forms.ToolTip(this.components);
this.menuStripId = new CCWin.SkinControl.SkinContextMenuStrip();
this.buttonLogin = new CCWin.SkinControl.SkinButton();
this.textBoxId = new CCWin.SkinControl.SkinTextBox();
this.imgLoadding = new System.Windows.Forms.PictureBox();
this.checkBoxRememberPwd = new CCWin.SkinControl.SkinCheckBox();
this.checkBoxAutoLogin = new CCWin.SkinControl.SkinCheckBox();
this.skinLabel_SoftName = new CCWin.SkinControl.SkinLabel();
this.btnRegister = new CCWin.SkinControl.SkinButton();
this.pnlTx = new CCWin.SkinControl.SkinPanel();
this.panelHeadImage = new CCWin.SkinControl.SkinPanel();
this.skinButton_State = new CCWin.SkinControl.SkinButton();
this.textBoxPwd = new CCWin.SkinControl.SkinTextBox();
this.imageList_state = new System.Windows.Forms.ImageList(this.components);
this.ItemImonline = new System.Windows.Forms.ToolStripMenuItem();
this.ItemAway = new System.Windows.Forms.ToolStripMenuItem();
this.ItemBusy = new System.Windows.Forms.ToolStripMenuItem();
this.ItemMute = new System.Windows.Forms.ToolStripMenuItem();
this.ItemInVisble = new System.Windows.Forms.ToolStripMenuItem();
this.menuStripState = new CCWin.SkinControl.SkinContextMenuStrip();
this.skinButtom1 = new CCWin.SkinControl.SkinButton();
this.skinLabel1 = new CCWin.SkinControl.SkinLabel();
this.textBoxId.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.imgLoadding)).BeginInit();
this.pnlTx.SuspendLayout();
this.panelHeadImage.SuspendLayout();
this.textBoxPwd.SuspendLayout();
this.menuStripState.SuspendLayout();
this.SuspendLayout();
//
// toolShow
//
this.toolShow.IsBalloon = true;
//
// menuStripId
//
this.menuStripId.Arrow = System.Drawing.Color.Black;
this.menuStripId.AutoSize = false;
this.menuStripId.Back = System.Drawing.Color.White;
this.menuStripId.BackColor = System.Drawing.Color.White;
this.menuStripId.BackRadius = 4;
this.menuStripId.Base = System.Drawing.Color.FromArgb(((int)(((byte)(105)))), ((int)(((byte)(200)))), ((int)(((byte)(254)))));
this.menuStripId.DropDownImageSeparator = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(147)))), ((int)(((byte)(209)))));
this.menuStripId.Fore = System.Drawing.Color.Black;
this.menuStripId.HoverFore = System.Drawing.Color.White;
this.menuStripId.ImageScalingSize = new System.Drawing.Size(40, 40);
this.menuStripId.ItemAnamorphosis = false;
this.menuStripId.ItemBorder = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212)))));
this.menuStripId.ItemBorderShow = false;
this.menuStripId.ItemHover = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212)))));
this.menuStripId.ItemPressed = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212)))));
this.menuStripId.ItemRadius = 4;
this.menuStripId.ItemRadiusStyle = CCWin.SkinClass.RoundStyle.None;
this.menuStripId.ItemSplitter = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(197)))), ((int)(((byte)(197)))));
this.menuStripId.Name = "MenuId";
this.menuStripId.RadiusStyle = CCWin.SkinClass.RoundStyle.None;
this.menuStripId.Size = new System.Drawing.Size(183, 4);
this.menuStripId.SkinAllColor = true;
this.menuStripId.TitleAnamorphosis = false;
this.menuStripId.TitleColor = System.Drawing.Color.White;
this.menuStripId.TitleRadius = 4;
this.menuStripId.TitleRadiusStyle = CCWin.SkinClass.RoundStyle.None;
//
// buttonLogin
//
this.buttonLogin.BackColor = System.Drawing.Color.Transparent;
this.buttonLogin.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.buttonLogin.BackRectangle = new System.Drawing.Rectangle(50, 23, 50, 23);
this.buttonLogin.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(118)))), ((int)(((byte)(156)))));
this.buttonLogin.ControlState = CCWin.SkinClass.ControlState.Normal;
this.buttonLogin.Create = true;
this.buttonLogin.DownBack = global::校友聊.Properties.Resources.button_login_down;
this.buttonLogin.DrawType = CCWin.SkinControl.DrawStyle.Img;
this.buttonLogin.Font = new System.Drawing.Font("微软雅黑", 9F);
this.buttonLogin.ForeColor = System.Drawing.Color.Black;
this.buttonLogin.Location = new System.Drawing.Point(99, 244);
this.buttonLogin.Margin = new System.Windows.Forms.Padding(0);
this.buttonLogin.MouseBack = global::校友聊.Properties.Resources.button_login_hover;
this.buttonLogin.Name = "buttonLogin";
this.buttonLogin.NormlBack = global::校友聊.Properties.Resources.button_login_normal;
this.buttonLogin.Palace = true;
this.buttonLogin.Size = new System.Drawing.Size(185, 49);
this.buttonLogin.TabIndex = 5;
this.buttonLogin.Text = "登 录";
this.buttonLogin.UseVisualStyleBackColor = false;
this.buttonLogin.Click += new System.EventHandler(this.buttonLogin_Click);
//
// textBoxId
//
this.textBoxId.BackColor = System.Drawing.Color.Transparent;
this.textBoxId.Icon = null;
this.textBoxId.IconIsButton = false;
this.textBoxId.IconMouseState = CCWin.SkinClass.ControlState.Normal;
this.textBoxId.Location = new System.Drawing.Point(112, 138);
this.textBoxId.Margin = new System.Windows.Forms.Padding(0);
this.textBoxId.MinimumSize = new System.Drawing.Size(28, 28);
this.textBoxId.MouseBack = null;
this.textBoxId.MouseState = CCWin.SkinClass.ControlState.Normal;
this.textBoxId.Name = "textBoxId";
this.textBoxId.NormlBack = null;
this.textBoxId.Padding = new System.Windows.Forms.Padding(5, 5, 28, 5);
this.textBoxId.Size = new System.Drawing.Size(250, 28);
//
// textBoxId.BaseText
//
this.textBoxId.SkinTxt.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBoxId.SkinTxt.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBoxId.SkinTxt.Font = new System.Drawing.Font("微软雅黑", 9.75F);
this.textBoxId.SkinTxt.Location = new System.Drawing.Point(5, 5);
this.textBoxId.SkinTxt.Name = "BaseText";
this.textBoxId.SkinTxt.Size = new System.Drawing.Size(217, 18);
this.textBoxId.SkinTxt.TabIndex = 0;
this.textBoxId.SkinTxt.WaterColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.textBoxId.SkinTxt.WaterText = "帐号";
this.textBoxId.SkinTxt.TextChanged += new System.EventHandler(this.textBoxId_SkinTxt_TextChanged);
this.textBoxId.TabIndex = 35;
//
// imgLoadding
//
this.imgLoadding.Image = ((System.Drawing.Image)(resources.GetObject("imgLoadding.Image")));
this.imgLoadding.Location = new System.Drawing.Point(1, 242);
this.imgLoadding.Margin = new System.Windows.Forms.Padding(0);
this.imgLoadding.Name = "imgLoadding";
this.imgLoadding.Size = new System.Drawing.Size(377, 2);
this.imgLoadding.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.imgLoadding.TabIndex = 17;
this.imgLoadding.TabStop = false;
this.imgLoadding.Visible = false;
//
// checkBoxRememberPwd
//
this.checkBoxRememberPwd.AutoSize = true;
this.checkBoxRememberPwd.BackColor = System.Drawing.Color.Transparent;
this.checkBoxRememberPwd.ControlState = CCWin.SkinClass.ControlState.Normal;
this.checkBoxRememberPwd.DefaultCheckButtonWidth = 15;
this.checkBoxRememberPwd.DownBack = global::校友聊.Properties.Resources.checkbox_pushed;
this.checkBoxRememberPwd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.checkBoxRememberPwd.ForeColor = System.Drawing.Color.Black;
this.checkBoxRememberPwd.LightEffect = false;
this.checkBoxRememberPwd.Location = new System.Drawing.Point(113, 206);
this.checkBoxRememberPwd.MouseBack = global::校友聊.Properties.Resources.checkbox_hightlight;
this.checkBoxRememberPwd.Name = "checkBoxRememberPwd";
this.checkBoxRememberPwd.NormlBack = ((System.Drawing.Image)(resources.GetObject("checkBoxRememberPwd.NormlBack")));
this.checkBoxRememberPwd.SelectedDownBack = global::校友聊.Properties.Resources.checkbox_tick_pushed;
this.checkBoxRememberPwd.SelectedMouseBack = global::校友聊.Properties.Resources.checkbox_tick_highlight;
this.checkBoxRememberPwd.SelectedNormlBack = global::校友聊.Properties.Resources.checkbox_tick_normal;
this.checkBoxRememberPwd.Size = new System.Drawing.Size(75, 21);
this.checkBoxRememberPwd.TabIndex = 3;
this.checkBoxRememberPwd.Text = "记住密码";
this.checkBoxRememberPwd.UseVisualStyleBackColor = false;
//
// checkBoxAutoLogin
//
this.checkBoxAutoLogin.AutoSize = true;
this.checkBoxAutoLogin.BackColor = System.Drawing.Color.Transparent;
this.checkBoxAutoLogin.ControlState = CCWin.SkinClass.ControlState.Normal;
this.checkBoxAutoLogin.DefaultCheckButtonWidth = 15;
this.checkBoxAutoLogin.DownBack = global::校友聊.Properties.Resources.checkbox_pushed;
this.checkBoxAutoLogin.Font = new System.Drawing.Font("微软雅黑", 9F);
this.checkBoxAutoLogin.ForeColor = System.Drawing.Color.Black;
this.checkBoxAutoLogin.LightEffect = false;
this.checkBoxAutoLogin.Location = new System.Drawing.Point(194, 206);
this.checkBoxAutoLogin.MouseBack = global::校友聊.Properties.Resources.checkbox_hightlight;
this.checkBoxAutoLogin.Name = "checkBoxAutoLogin";
this.checkBoxAutoLogin.NormlBack = ((System.Drawing.Image)(resources.GetObject("checkBoxAutoLogin.NormlBack")));
this.checkBoxAutoLogin.SelectedDownBack = global::校友聊.Properties.Resources.checkbox_tick_pushed;
this.checkBoxAutoLogin.SelectedMouseBack = global::校友聊.Properties.Resources.checkbox_tick_highlight;
this.checkBoxAutoLogin.SelectedNormlBack = global::校友聊.Properties.Resources.checkbox_tick_normal;
this.checkBoxAutoLogin.Size = new System.Drawing.Size(75, 21);
this.checkBoxAutoLogin.TabIndex = 4;
this.checkBoxAutoLogin.Text = "自动登录";
this.checkBoxAutoLogin.UseVisualStyleBackColor = false;
this.checkBoxAutoLogin.CheckedChanged += new System.EventHandler(this.checkBoxAutoLogin_CheckedChanged);
//
// skinLabel_SoftName
//
this.skinLabel_SoftName.ArtTextStyle = CCWin.SkinControl.ArtTextStyle.None;
this.skinLabel_SoftName.AutoSize = true;
this.skinLabel_SoftName.BackColor = System.Drawing.Color.Transparent;
this.skinLabel_SoftName.BorderColor = System.Drawing.Color.White;
this.skinLabel_SoftName.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.skinLabel_SoftName.ForeColor = System.Drawing.Color.Black;
this.skinLabel_SoftName.Location = new System.Drawing.Point(7, 9);
this.skinLabel_SoftName.Name = "skinLabel_SoftName";
this.skinLabel_SoftName.Size = new System.Drawing.Size(51, 20);
this.skinLabel_SoftName.TabIndex = 18;
this.skinLabel_SoftName.Text = "校友聊";
//
// btnRegister
//
this.btnRegister.BackColor = System.Drawing.Color.Transparent;
this.btnRegister.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(118)))), ((int)(((byte)(156)))));
this.btnRegister.ControlState = CCWin.SkinClass.ControlState.Normal;
this.btnRegister.Create = true;
this.btnRegister.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRegister.DownBack = global::校友聊.Properties.Resources.zhuce_press;
this.btnRegister.DrawType = CCWin.SkinControl.DrawStyle.Img;
this.btnRegister.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRegister.Location = new System.Drawing.Point(311, 208);
this.btnRegister.Margin = new System.Windows.Forms.Padding(0);
this.btnRegister.MouseBack = global::校友聊.Properties.Resources.zhuce_hover;
this.btnRegister.Name = "btnRegister";
this.btnRegister.NormlBack = global::校友聊.Properties.Resources.zhuce;
this.btnRegister.Size = new System.Drawing.Size(51, 16);
this.btnRegister.TabIndex = 8;
this.btnRegister.UseVisualStyleBackColor = false;
this.btnRegister.Click += new System.EventHandler(this.btnRegister_Click);
//
// pnlTx
//
this.pnlTx.BackColor = System.Drawing.Color.Transparent;
this.pnlTx.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pnlTx.BackgroundImage")));
this.pnlTx.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.pnlTx.Controls.Add(this.panelHeadImage);
this.pnlTx.ControlState = CCWin.SkinClass.ControlState.Normal;
this.pnlTx.DownBack = null;
this.pnlTx.Location = new System.Drawing.Point(16, 138);
this.pnlTx.Margin = new System.Windows.Forms.Padding(0);
this.pnlTx.MouseBack = null;
this.pnlTx.Name = "pnlTx";
this.pnlTx.NormlBack = null;
this.pnlTx.Size = new System.Drawing.Size(87, 87);
this.pnlTx.TabIndex = 12;
//
// panelHeadImage
//
this.panelHeadImage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.panelHeadImage.BackgroundImage = global::校友聊.Properties.Resources.GG64;
this.panelHeadImage.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.panelHeadImage.Controls.Add(this.skinButton_State);
this.panelHeadImage.ControlState = CCWin.SkinClass.ControlState.Normal;
this.panelHeadImage.DownBack = null;
this.panelHeadImage.Location = new System.Drawing.Point(1, 1);
this.panelHeadImage.Margin = new System.Windows.Forms.Padding(0);
this.panelHeadImage.MouseBack = null;
this.panelHeadImage.Name = "panelHeadImage";
this.panelHeadImage.NormlBack = null;
this.panelHeadImage.Radius = 4;
this.panelHeadImage.Size = new System.Drawing.Size(86, 85);
this.panelHeadImage.TabIndex = 11;
//
// skinButton_State
//
this.skinButton_State.BackColor = System.Drawing.Color.Transparent;
this.skinButton_State.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.skinButton_State.BackRectangle = new System.Drawing.Rectangle(4, 4, 4, 4);
this.skinButton_State.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(118)))), ((int)(((byte)(156)))));
this.skinButton_State.ControlState = CCWin.SkinClass.ControlState.Normal;
this.skinButton_State.DownBack = global::校友聊.Properties.Resources.allbtn_down;
this.skinButton_State.DrawType = CCWin.SkinControl.DrawStyle.Img;
this.skinButton_State.Image = global::校友聊.Properties.Resources.imonline__2_;
this.skinButton_State.ImageSize = new System.Drawing.Size(11, 11);
this.skinButton_State.Location = new System.Drawing.Point(67, 67);
this.skinButton_State.Margin = new System.Windows.Forms.Padding(0);
this.skinButton_State.MouseBack = global::校友聊.Properties.Resources.allbtn_highlight;
this.skinButton_State.Name = "skinButton_State";
this.skinButton_State.NormlBack = null;
this.skinButton_State.Size = new System.Drawing.Size(18, 18);
this.skinButton_State.TabIndex = 10;
this.skinButton_State.Tag = "2";
this.skinButton_State.UseVisualStyleBackColor = false;
this.skinButton_State.Click += new System.EventHandler(this.btnState_Click);
//
// textBoxPwd
//
this.textBoxPwd.BackColor = System.Drawing.Color.Transparent;
this.textBoxPwd.Font = new System.Drawing.Font("微软雅黑", 9.75F);
this.textBoxPwd.Icon = ((System.Drawing.Image)(resources.GetObject("textBoxPwd.Icon")));
this.textBoxPwd.IconIsButton = true;
this.textBoxPwd.IconMouseState = CCWin.SkinClass.ControlState.Normal;
this.textBoxPwd.Location = new System.Drawing.Point(112, 175);
this.textBoxPwd.Margin = new System.Windows.Forms.Padding(0);
this.textBoxPwd.MinimumSize = new System.Drawing.Size(0, 28);
this.textBoxPwd.MouseBack = null;
this.textBoxPwd.MouseState = CCWin.SkinClass.ControlState.Normal;
this.textBoxPwd.Name = "textBoxPwd";
this.textBoxPwd.NormlBack = null;
this.textBoxPwd.Padding = new System.Windows.Forms.Padding(5, 5, 60, 5);
this.textBoxPwd.Size = new System.Drawing.Size(250, 28);
//
// textBoxPwd.BaseText
//
this.textBoxPwd.SkinTxt.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBoxPwd.SkinTxt.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBoxPwd.SkinTxt.Font = new System.Drawing.Font("微软雅黑", 9.75F);
this.textBoxPwd.SkinTxt.Location = new System.Drawing.Point(5, 5);
this.textBoxPwd.SkinTxt.Name = "BaseText";
this.textBoxPwd.SkinTxt.PasswordChar = '●';
this.textBoxPwd.SkinTxt.Size = new System.Drawing.Size(185, 18);
this.textBoxPwd.SkinTxt.TabIndex = 0;
this.textBoxPwd.SkinTxt.WaterColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.textBoxPwd.SkinTxt.WaterText = "密码";
this.textBoxPwd.SkinTxt.KeyUp += new System.Windows.Forms.KeyEventHandler(this.textBoxPwd_SkinTxt_KeyUp);
this.textBoxPwd.TabIndex = 36;
this.textBoxPwd.IconClick += new System.EventHandler(this.textBoxPwd_IconClick);
//
// imageList_state
//
this.imageList_state.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList_state.ImageStream")));
this.imageList_state.TransparentColor = System.Drawing.Color.Transparent;
this.imageList_state.Images.SetKeyName(0, "0.png");
this.imageList_state.Images.SetKeyName(1, "1.png");
this.imageList_state.Images.SetKeyName(2, "2.png");
this.imageList_state.Images.SetKeyName(3, "3.png");
this.imageList_state.Images.SetKeyName(4, "4.png");
this.imageList_state.Images.SetKeyName(5, "5.png");
/
3.2用户子系统
总体功能设计: 用户子系统包含用户信息管理 用户之间数据的传递
下面给出设计方案和实现方法:
3.2.1用户子系统包含用户信息管理 超级管理员信息管理
输入:用户ID、初始密码
处理:将用户信息按相同的 格式导入数据库
输出:提示信息
数据表:将Manager表中存放超级管理员数据,表存放在数据库DB中 管理员信息和普通用户信息与超级管理员的信息管理方式基本相同,区别在于管理员信息存放在表personManager表中,而普通用户的信息存放在person表中。 功能: 用户能更改自己密码的功能
修改密码的界面如下:
代码如下:
namespace 校友聊
{
partial class ChangePasswordForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChangePasswordForm));
this.skinLabel1 = new CCWin.SkinControl.SkinLabel();
this.skinTextBox_old = new CCWin.SkinControl.SkinTextBox();
this.btnClose = new CCWin.SkinControl.SkinButton();
this.skinTextBox_new = new CCWin.SkinControl.SkinTextBox();
this.skinLabel2 = new CCWin.SkinControl.SkinLabel();
this.skinLabel3 = new CCWin.SkinControl.SkinLabel();
this.skinTextBox_new2 = new CCWin.SkinControl.SkinTextBox();
this.skinButton1 = new CCWin.SkinControl.SkinButton();
this.skinTextBox_old.SuspendLayout();
this.skinTextBox_new.SuspendLayout();
this.skinTextBox_new2.SuspendLayout();
this.SuspendLayout();
//
// skinLabel1
//
this.skinLabel1.ArtTextStyle = CCWin.SkinControl.ArtTextStyle.None;
this.skinLabel1.AutoSize = true;
this.skinLabel1.BackColor = System.Drawing.Color.Transparent;
this.skinLabel1.BorderColor = System.Drawing.Color.White;
this.skinLabel1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.skinLabel1.Location = new System.Drawing.Point(31, 51);
this.skinLabel1.Name = "skinLabel1";
this.skinLabel1.Size = new System.Drawing.Size(56, 17);
this.skinLabel1.TabIndex = 0;
this.skinLabel1.Text = "旧密码:";
//
// skinTextBox_old
//
this.skinTextBox_old.BackColor = System.Drawing.Color.Transparent;
this.skinTextBox_old.Icon = null;
this.skinTextBox_old.IconIsButton = false;
this.skinTextBox_old.IconMouseState = CCWin.SkinClass.ControlState.Normal;
this.skinTextBox_old.Location = new System.Drawing.Point(82, 46);
this.skinTextBox_old.Margin = new System.Windows.Forms.Padding(0);
this.skinTextBox_old.MinimumSize = new System.Drawing.Size(28, 28);
this.skinTextBox_old.MouseBack = null;
this.skinTextBox_old.MouseState = CCWin.SkinClass.ControlState.Normal;
this.skinTextBox_old.Name = "skinTextBox_old";
this.skinTextBox_old.NormlBack = null;
this.skinTextBox_old.Padding = new System.Windows.Forms.Padding(5);
this.skinTextBox_old.Size = new System.Drawing.Size(205, 28);
//
// skinTextBox_old.BaseText
//
this.skinTextBox_old.SkinTxt.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.skinTextBox_old.SkinTxt.Dock = System.Windows.Forms.DockStyle.Fill;
this.skinTextBox_old.SkinTxt.Font = new System.Drawing.Font("微软雅黑", 9.75F);
this.skinTextBox_old.SkinTxt.Location = new System.Drawing.Point(5, 5);
this.skinTextBox_old.SkinTxt.Name = "BaseText";
this.skinTextBox_old.SkinTxt.PasswordChar = '*';
this.skinTextBox_old.SkinTxt.Size = new System.Drawing.Size(195, 18);
this.skinTextBox_old.SkinTxt.TabIndex = 0;
this.skinTextBox_old.SkinTxt.WaterColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.skinTextBox_old.SkinTxt.WaterText = "";
this.skinTextBox_old.TabIndex = 129;
//
// btnClose
//
this.btnClose.BackColor = System.Drawing.Color.Transparent;
this.btnClose.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(97)))), ((int)(((byte)(159)))), ((int)(((byte)(215)))));
this.btnClose.ControlState = CCWin.SkinClass.ControlState.Normal;
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnClose.DownBack = ((System.Drawing.Image)(resources.GetObject("btnClose.DownBack")));
this.btnClose.DrawType = CCWin.SkinControl.DrawStyle.Img;
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClose.Location = new System.Drawing.Point(218, 159);
this.btnClose.MouseBack = ((System.Drawing.Image)(resources.GetObject("btnClose.MouseBack")));
this.btnClose.Name = "btnClose";
this.btnClose.NormlBack = ((System.Drawing.Image)(resources.GetObject("btnClose.NormlBack")));
this.btnClose.Size = new System.Drawing.Size(69, 24);
this.btnClose.TabIndex = 133;
this.btnClose.Text = "确定";
this.btnClose.UseVisualStyleBackColor = false;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// skinTextBox_new
//
this.skinTextBox_new.BackColor = System.Drawing.Color.Transparent;
this.skinTextBox_new.Icon = null;
this.skinTextBox_new.IconIsButton = false;
this.skinTextBox_new.IconMouseState = CCWin.SkinClass.ControlState.Normal;
this.skinTextBox_new.Location = new System.Drawing.Point(82, 83);
this.skinTextBox_new.Margin = new System.Windows.Forms.Padding(0);
this.skinTextBox_new.MinimumSize = new System.Drawing.Size(28, 28);
this.skinTextBox_new.MouseBack = null;
this.skinTextBox_new.MouseState = CCWin.SkinClass.ControlState.Normal;
this.skinTextBox_new.Name = "skinTextBox_new";
this.skinTextBox_new.NormlBack = null;
this.skinTextBox_new.Padding = new System.Windows.Forms.Padding(5);
this.skinTextBox_new.Size = new System.Drawing.Size(205, 28);
//
// skinTextBox_new.BaseText
//
this.skinTextBox_new.SkinTxt.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.skinTextBox_new.SkinTxt.Dock = System.Windows.Forms.DockStyle.Fill;
this.skinTextBox_new.SkinTxt.Font = new System.Drawing.Font("微软雅黑", 9.75F);
this.skinTextBox_new.SkinTxt.Location = new System.Drawing.Point(5, 5);
this.skinTextBox_new.SkinTxt.Name = "BaseText";
this.skinTextBox_new.SkinTxt.PasswordChar = '*';
this.skinTextBox_new.SkinTxt.Size = new System.Drawing.Size(195, 18);
this.skinTextBox_new.SkinTxt.TabIndex = 1;
this.skinTextBox_new.SkinTxt.WaterColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.skinTextBox_new.SkinTxt.WaterText = "";
this.skinTextBox_new.TabIndex = 135;
//
// skinLabel2
//
this.skinLabel2.ArtTextStyle = CCWin.SkinControl.ArtTextStyle.None;
this.skinLabel2.AutoSize = true;
this.skinLabel2.BackColor = System.Drawing.Color.Transparent;
this.skinLabel2.BorderColor = System.Drawing.Color.White;
this.skinLabel2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.skinLabel2.Location = new System.Drawing.Point(30, 88);
this.skinLabel2.Name = "skinLabel2";
this.skinLabel2.Size = new System.Drawing.Size(56, 17);
this.skinLabel2.TabIndex = 134;
this.skinLabel2.Text = "新密码:";
//
// skinLabel3
//
this.skinLabel3.ArtTextStyle = CCWin.SkinControl.ArtTextStyle.None;
this.skinLabel3.AutoSize = true;
this.skinLabel3.BackColor = System.Drawing.Color.Transparent;
this.skinLabel3.BorderColor = System.Drawing.Color.White;
this.skinLabel3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.skinLabel3.Location = new System.Drawing.Point(7, 123);
this.skinLabel3.Name = "skinLabel3";
this.skinLabel3.Size = new System.Drawing.Size(80, 17);
this.skinLabel3.TabIndex = 134;
this.skinLabel3.Text = "确认新密码:";
//
// skinTextBox_new2
//
this.skinTextBox_new2.BackColor = System.Drawing.Color.Transparent;
this.skinTextBox_new2.Icon = null;
this.skinTextBox_new2.IconIsButton = false;
this.skinTextBox_new2.IconMouseState = CCWin.SkinClass.ControlState.Normal;
this.skinTextBox_new2.Location = new System.Drawing.Point(82, 119);
this.skinTextBox_new2.Margin = new System.Windows.Forms.Padding(0);
this.skinTextBox_new2.MinimumSize = new System.Drawing.Size(28, 28);
this.skinTextBox_new2.MouseBack = null;
this.skinTextBox_new2.MouseState = CCWin.SkinClass.ControlState.Normal;
this.skinTextBox_new2.Name = "skinTextBox_new2";
this.skinTextBox_new2.NormlBack = null;
this.skinTextBox_new2.Padding = new System.Windows.Forms.Padding(5);
this.skinTextBox_new2.Size = new System.Drawing.Size(205, 28);
//
// skinTextBox_new2.BaseText
//
this.skinTextBox_new2.SkinTxt.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.skinTextBox_new2.SkinTxt.Dock = System.Windows.Forms.DockStyle.Fill;
this.skinTextBox_new2.SkinTxt.Font = new System.Drawing.Font("微软雅黑", 9.75F);
this.skinTextBox_new2.SkinTxt.Location = new System.Drawing.Point(5, 5);
this.skinTextBox_new2.SkinTxt.Name = "BaseText";
this.skinTextBox_new2.SkinTxt.PasswordChar = '*';
this.skinTextBox_new2.SkinTxt.Size = new System.Drawing.Size(195, 18);
this.skinTextBox_new2.SkinTxt.TabIndex = 2;
this.skinTextBox_new2.SkinTxt.WaterColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.skinTextBox_new2.SkinTxt.WaterText = "";
this.skinTextBox_new2.TabIndex = 135;
//
// skinButton1
//
this.skinButton1.BackColor = System.Drawing.Color.Transparent;
this.skinButton1.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(97)))), ((int)(((byte)(159)))), ((int)(((byte)(215)))));
this.skinButton1.ControlState = CCWin.SkinClass.ControlState.Normal;
this.skinButton1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.skinButton1.DownBack = ((System.Drawing.Image)(resources.GetObject("skinButton1.DownBack")));
this.skinButton1.DrawType = CCWin.SkinControl.DrawStyle.Img;
this.skinButton1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.skinButton1.Location = new System.Drawing.Point(143, 159);
this.skinButton1.MouseBack = ((System.Drawing.Image)(resources.GetObject("skinButton1.MouseBack")));
this.skinButton1.Name = "skinButton1";
this.skinButton1.NormlBack = ((System.Drawing.Image)(resources.GetObject("skinButton1.NormlBack")));
this.skinButton1.Size = new System.Drawing.Size(69, 24);
this.skinButton1.TabIndex = 136;
this.skinButton1.Text = "取消";
this.skinButton1.UseVisualStyleBackColor = false;
this.skinButton1.Click += new System.EventHandler(this.skinButton1_Click);
//
// ChangePasswordForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Back = ((System.Drawing.Image)(resources.GetObject("$this.Back")));
this.BorderPalace = ((System.Drawing.Image)(resources.GetObject("$this.BorderPalace")));
this.ClientSize = new System.Drawing.Size(307, 196);
this.CloseDownBack = global::校友聊.Properties.Resources.btn_close_down;
this.CloseMouseBack = global::校友聊.Properties.Resources.btn_close_highlight;
this.CloseNormlBack = global::校友聊.Properties.Resources.btn_close_disable;
this.Controls.Add(this.skinButton1);
this.Controls.Add(this.skinTextBox_new2);
this.Controls.Add(this.skinTextBox_new);
this.Controls.Add(this.skinLabel3);
this.Controls.Add(this.skinLabel2);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.skinTextBox_old);
this.Controls.Add(this.skinLabel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaxDownBack = global::校友聊.Properties.Resources.btn_max_down;
this.MaxMouseBack = global::校友聊.Properties.Resources.btn_max_highlight;
this.MaxNormlBack = global::校友聊.Properties.Resources.btn_max_normal;
this.MiniDownBack = global::校友聊.Properties.Resources.btn_mini_down;
this.MiniMouseBack = global::校友聊.Properties.Resources.btn_mini_highlight;
this.MiniNormlBack = global::校友聊.Properties.Resources.btn_mini_normal;
this.Name = "ChangePasswordForm";
this.RestoreDownBack = global::校友聊.Properties.Resources.btn_restore_down;
this.RestoreMouseBack = global::校友聊.Properties.Resources.btn_restore_highlight;
this.RestoreNormlBack = global::校友聊.Properties.Resources.btn_restore_normal;
this.Text = "修改密码";
this.Load += new System.EventHandler(this.ChangePasswordForm_Load);
this.skinTextBox_old.ResumeLayout(false);
this.skinTextBox_old.PerformLayout();
this.skinTextBox_new.ResumeLayout(false);
this.skinTextBox_new.PerformLayout();
this.skinTextBox_new2.ResumeLayout(false);
this.skinTextBox_new2.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private CCWin.SkinControl.SkinLabel skinLabel1;
private CCWin.SkinControl.SkinTextBox skinTextBox_old;
private CCWin.SkinControl.SkinButton btnClose;
private CCWin.SkinControl.SkinTextBox skinTextBox_new;
private CCWin.SkinControl.SkinLabel skinLabel2;
private CCWin.SkinControl.SkinLabel skinLabel3;
private CCWin.SkinControl.SkinTextBox skinTextBox_new2;
private CCWin.SkinControl.SkinButton skinButton1;
}
}
3.2.2用户之间数据的传递
数据传递间数据的管理
输入:发送用户ID、用户所 发送的信息以及信 息类型,目的用户的 ID
处理:将用户所发信息传递给服务器
输出:目的用户接收发送方发送的信息
功能: ①给群组发送信息以及接收在线用户给群组发送的信息;
②给某用户发送信息以及接受某个用户所给该用户发送的消息(其中包括视频,语音聊天功能) ;
③给某个发送文本文件 ;
部分代码如下:
using JustLib.Controls;
namespace 校友聊
{
partial class GroupChatForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
CCWin.SkinControl.ChatListItem chatListItem1 = new CCWin.SkinControl.ChatListItem();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GroupChatForm));
this.chatListBox1 = new CCWin.SkinControl.ChatListBox();
this.labelGroupName = new CCWin.SkinControl.SkinLabel();
this.label_announce = new CCWin.SkinControl.SkinLabel();
this.pnlTx = new CCWin.SkinControl.SkinPanel();
this.panelFriendHeadImage = new CCWin.SkinControl.SkinPanel();
this.toolShow = new System.Windows.Forms.ToolTip(this.components);
this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
this.fontDialog1 = new System.Windows.Forms.FontDialog();
this.linkLabel_softName = new System.Windows.Forms.LinkLabel();
this.btnClose = new CCWin.SkinControl.SkinButton();
this.skToolMenu = new CCWin.SkinControl.SkinToolStrip();
this.toolFont = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonEmotion = new System.Windows.Forms.ToolStripButton();
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton7 = new System.Windows.Forms.ToolStripButton();
this.skinButton_send = new CCWin.SkinControl.SkinButton();
this.chatBox_history = new JustLib.Controls.ChatBox();
this.chatBoxSend = new JustLib.Controls.ChatBox();
this.gifBox_wait = new JustLib.Controls.GifBox();
this.pnlTx.SuspendLayout();
this.skToolMenu.SuspendLayout();
this.SuspendLayout();
//
// chatListBox1
//
this.chatListBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.chatListBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.chatListBox1.DrawContentType = CCWin.SkinControl.DrawContentType.None;
this.chatListBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chatListBox1.ForeColor = System.Drawing.Color.Black;
this.chatListBox1.FriendsMobile = true;
this.chatListBox1.IconSizeMode = CCWin.SkinControl.ChatListItemIcon.Small;
chatListItem1.Bounds = new System.Drawing.Rectangle(0, 1, 200, 25);
chatListItem1.IsOpen = true;
chatListItem1.IsTwinkleHide = false;
chatListItem1.OwnerChatListBox = this.chatListBox1;
chatListItem1.Text = "群成员";
chatListItem1.TwinkleSubItemNumber = 0;
this.chatListBox1.Items.AddRange(new CCWin.SkinControl.ChatListItem[] {
chatListItem1});
this.chatListBox1.ListHadOpenGroup = null;
this.chatListBox1.ListSubItemMenu = null;
this.chatListBox1.Location = new System.Drawing.Point(466, 58);
this.chatListBox1.Name = "chatListBox1";
this.chatListBox1.SelectSubItem = null;
this.chatListBox1.ShowNicName = true;
this.chatListBox1.Size = new System.Drawing.Size(200, 503);
this.chatListBox1.SubItemMenu = null;
this.chatListBox1.TabIndex = 0;
this.chatListBox1.Text = "chatListBox1";
this.chatListBox1.DoubleClickSubItem += new CCWin.SkinControl.ChatListBox.ChatListEventHandler(this.chatListBox1_DoubleClickSubItem);
//
// labelGroupName
//
this.labelGroupName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.labelGroupName.ArtTextStyle = CCWin.SkinControl.ArtTextStyle.None;
this.labelGroupName.AutoSize = true;
this.labelGroupName.BackColor = System.Drawing.Color.Transparent;
this.labelGroupName.BorderColor = System.Drawing.Color.White;
this.labelGroupName.BorderSize = 4;
this.labelGroupName.Cursor = System.Windows.Forms.Cursors.Default;
this.labelGroupName.Font = new System.Drawing.Font("微软雅黑", 14F);
this.labelGroupName.ForeColor = System.Drawing.Color.Black;
this.labelGroupName.Location = new System.Drawing.Point(55, 7);
this.labelGroupName.Name = "labelGroupName";
this.labelGroupName.Size = new System.Drawing.Size(80, 25);
this.labelGroupName.TabIndex = 100;
this.labelGroupName.Text = "测试群1";
this.labelGroupName.MouseEnter += new System.EventHandler(this.labelFriendName_MouseEnter);
this.labelGroupName.MouseLeave += new System.EventHandler(this.labelFriendName_MouseLeave);
//
// label_announce
//
this.label_announce.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label_announce.ArtTextStyle = CCWin.SkinControl.ArtTextStyle.None;
this.label_announce.AutoSize = true;
this.label_announce.BackColor = System.Drawing.Color.Transparent;
this.label_announce.BorderColor = System.Drawing.Color.White;
this.label_announce.BorderSize = 4;
this.label_announce.Font = new System.Drawing.Font("微软雅黑", 9F);
this.label_announce.ForeColor = System.Drawing.Color.Black;
this.label_announce.Location = new System.Drawing.Point(57, 35);
this.label_announce.Name = "label_announce";
this.label_announce.Size = new System.Drawing.Size(226, 17);
this.label_announce.TabIndex = 103;
this.label_announce.Text = "2.10上午10点一号会议室全体员工大会!";
//
// pnlTx
//
this.pnlTx.BackColor = System.Drawing.Color.Transparent;
this.pnlTx.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.pnlTx.BackRectangle = new System.Drawing.Rectangle(5, 5, 5, 5);
this.pnlTx.Controls.Add(this.panelFriendHeadImage);
this.pnlTx.ControlState = CCWin.SkinClass.ControlState.Normal;
this.pnlTx.DownBack = global::校友聊.Properties.Resources.aio_head_normal;
this.pnlTx.Location = new System.Drawing.Point(6, 7);
this.pnlTx.Margin = new System.Windows.Forms.Padding(0);
this.pnlTx.MouseBack = global::校友聊.Properties.Resources.aio_head_normal;
this.pnlTx.Name = "pnlTx";
this.pnlTx.NormlBack = global::校友聊.Properties.Resources.aio_head_normal;
this.pnlTx.Palace = true;
this.pnlTx.Size = new System.Drawing.Size(46, 46);
this.pnlTx.TabIndex = 104;
//
// panelFriendHeadImage
//
this.panelFriendHeadImage.BackColor = System.Drawing.Color.Transparent;
this.panelFriendHeadImage.BackgroundImage = global::校友聊.Properties.Resources.Group2;
this.panelFriendHeadImage.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.panelFriendHeadImage.ControlState = CCWin.SkinClass.ControlState.Normal;
this.panelFriendHeadImage.DownBack = null;
this.panelFriendHeadImage.Location = new System.Drawing.Point(3, 3);
this.panelFriendHeadImage.Margin = new System.Windows.Forms.Padding(0);
this.panelFriendHeadImage.MouseBack = null;
this.panelFriendHeadImage.Name = "panelFriendHeadImage";
this.panelFriendHeadImage.NormlBack = null;
this.panelFriendHeadImage.Radius = 5;
this.panelFriendHeadImage.Size = new System.Drawing.Size(40, 40);
this.panelFriendHeadImage.TabIndex = 6;
//
// toolStripLabel2
//
this.toolStripLabel2.AutoSize = false;
this.toolStripLabel2.BackColor = System.Drawing.Color.Transparent;
this.toolStripLabel2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripLabel2.Image = global::校友聊.Properties.Resources.pictureBox1_Image;
this.toolStripLabel2.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripLabel2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripLabel2.Name = "toolStripLabel2";
this.toolStripLabel2.Size = new System.Drawing.Size(10, 24);
this.toolStripLabel2.Text = "toolStripButton6";
//
// fontDialog1
//
this.fontDialog1.Color = System.Drawing.SystemColors.ControlText;
this.fontDialog1.ShowColor = true;
//
// linkLabel_softName
//
this.linkLabel_softName.ActiveLinkColor = System.Drawing.Color.Black;
this.linkLabel_softName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.linkLabel_softName.AutoSize = true;
this.linkLabel_softName.BackColor = System.Drawing.Color.Transparent;
this.linkLabel_softName.DisabledLinkColor = System.Drawing.Color.Black;
this.linkLabel_softName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linkLabel_softName.ForeColor = System.Drawing.Color.Black;
this.linkLabel_softName.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.linkLabel_softName.LinkColor = System.Drawing.Color.Black;
this.linkLabel_softName.Location = new System.Drawing.Point(5, 537);
this.linkLabel_softName.Name = "linkLabel_softName";
this.linkLabel_softName.Size = new System.Drawing.Size(44, 17);
this.linkLabel_softName.TabIndex = 130;
this.linkLabel_softName.TabStop = true;
this.linkLabel_softName.Text = "校友聊";
this.linkLabel_softName.VisitedLinkColor = System.Drawing.SystemColors.HotTrack;
//
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.BackColor = System.Drawing.Color.Transparent;
this.btnClose.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(97)))), ((int)(((byte)(159)))), ((int)(((byte)(215)))));
this.btnClose.ControlState = CCWin.SkinClass.ControlState.Normal;
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnClose.DownBack = ((System.Drawing.Image)(resources.GetObject("btnClose.DownBack")));
this.btnClose.DrawType = CCWin.SkinControl.DrawStyle.Img;
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClose.Location = new System.Drawing.Point(305, 533);
this.btnClose.MouseBack = ((System.Drawing.Image)(resources.GetObject("btnClose.MouseBack")));
this.btnClose.Name = "btnClose";
this.btnClose.NormlBack = ((System.Drawing.Image)(resources.GetObject("btnClose.NormlBack")));
this.btnClose.Size = new System.Drawing.Size(69, 24);
this.btnClose.TabIndex = 127;
this.btnClose.Text = "关闭(&C)";
this.btnClose.UseVisualStyleBackColor = false;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// skToolMenu
//
this.skToolMenu.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.skToolMenu.Arrow = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.skToolMenu.AutoSize = false;
this.skToolMenu.Back = System.Drawing.Color.White;
this.skToolMenu.BackColor = System.Drawing.Color.Transparent;
this.skToolMenu.BackRadius = 4;
this.skToolMenu.BackRectangle = new System.Drawing.Rectangle(10, 10, 10, 10);
this.skToolMenu.Base = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.skToolMenu.BaseFore = System.Drawing.Color.Black;
this.skToolMenu.BaseForeAnamorphosis = false;
this.skToolMenu.BaseForeAnamorphosisBorder = 4;
this.skToolMenu.BaseForeAnamorphosisColor = System.Drawing.Color.White;
this.skToolMenu.BaseForeOffset = new System.Drawing.Point(0, 0);
this.skToolMenu.BaseHoverFore = System.Drawing.Color.Black;
this.skToolMenu.BaseItemAnamorphosis = true;
this.skToolMenu.BaseItemBorder = System.Drawing.Color.FromArgb(((int)(((byte)(123)))), ((int)(((byte)(123)))), ((int)(((byte)(123)))));
this.skToolMenu.BaseItemBorderShow = true;
this.skToolMenu.BaseItemDown = ((System.Drawing.Image)(resources.GetObject("skToolMenu.BaseItemDown")));
this.skToolMenu.BaseItemHover = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.skToolMenu.BaseItemMouse = ((System.Drawing.Image)(resources.GetObject("skToolMenu.BaseItemMouse")));
this.skToolMenu.BaseItemPressed = System.Drawing.Color.Transparent;
this.skToolMenu.BaseItemRadius = 2;
this.skToolMenu.BaseItemRadiusStyle = CCWin.SkinClass.RoundStyle.All;
this.skToolMenu.BaseItemSplitter = System.Drawing.Color.Transparent;
this.skToolMenu.Dock = System.Windows.Forms.DockStyle.None;
this.skToolMenu.DropDownImageSeparator = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(197)))), ((int)(((byte)(197)))));
this.skToolMenu.Fore = System.Drawing.Color.Black;
this.skToolMenu.GripMargin = new System.Windows.Forms.Padding(2, 2, 4, 2);
this.skToolMenu.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.skToolMenu.HoverFore = System.Drawing.Color.White;
this.skToolMenu.ItemAnamorphosis = false;
this.skToolMenu.ItemBorder = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212)))));
this.skToolMenu.ItemBorderShow = false;
this.skToolMenu.ItemHover = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212)))));
this.skToolMenu.ItemPressed = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212)))));
this.skToolMenu.ItemRadius = 3;
this.skToolMenu.ItemRadiusStyle = CCWin.SkinClass.RoundStyle.None;
this.skToolMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolFont,
this.toolStripButtonEmotion,
this.toolStripButton3,
this.toolStripButton2,
this.toolStripButton1,
this.toolStripButton7});
this.skToolMenu.Location = new System.Drawing.Point(1, 410);
this.skToolMenu.Name = "skToolMenu";
this.skToolMenu.RadiusStyle = CCWin.SkinClass.RoundStyle.All;
this.skToolMenu.Size = new System.Drawing.Size(462, 27);
this.skToolMenu.SkinAllColor = true;
this.skToolMenu.TabIndex = 132;
this.skToolMenu.Text = "skinToolStrip1";
this.skToolMenu.TitleAnamorphosis = false;
this.skToolMenu.TitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(209)))), ((int)(((byte)(228)))), ((int)(((byte)(236)))));
this.skToolMenu.TitleRadius = 4;
this.skToolMenu.TitleRadiusStyle = CCWin.SkinClass.RoundStyle.All;
//
// toolFont
//
this.toolFont.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolFont.Image = ((System.Drawing.Image)(resources.GetObject("toolFont.Image")));
this.toolFont.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolFont.Margin = new System.Windows.Forms.Padding(4, 1, 0, 2);
this.toolFont.Name = "toolFont";
this.toolFont.Size = new System.Drawing.Size(23, 24);
this.toolFont.Text = "toolStripButton1";
this.toolFont.ToolTipText = "字体选择工具栏";
this.toolFont.Click += new System.EventHandler(this.toolFont_Click);
//
// toolStripButtonEmotion
//
this.toolStripButtonEmotion.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonEmotion.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonEmotion.Image")));
this.toolStripButtonEmotion.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonEmotion.Margin = new System.Windows.Forms.Padding(3, 1, 0, 2);
this.toolStripButtonEmotion.Name = "toolStripButtonEmotion";
this.toolStripButtonEmotion.Size = new System.Drawing.Size(23, 24);
this.toolStripButtonEmotion.Text = "toolStripButton2";
this.toolStripButtonEmotion.ToolTipText = "选择表情";
this.toolStripButtonEmotion.MouseUp += new System.Windows.Forms.MouseEventHandler(this.toolStripButtonEmotion_MouseUp);
//
// toolStripButton2
//
this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
this.toolStripButton2.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(23, 24);
this.toolStripButton2.Text = "屏幕截图";
this.toolStripButton2.Click += new System.EventHandler(this.buttonCapture_Click);
//
// toolStripButton1
//
this.toolStripButton1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.toolStripButton1.Image = global::校友聊.Properties.Resources.Conversation;
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(76, 24);
this.toolStripButton1.Text = "消息记录";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
// toolStripButton7
//
this.toolStripButton7.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton7.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton7.Image")));
this.toolStripButton7.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton7.Name = "toolStripButton7";
this.toolStripButton7.Size = new System.Drawing.Size(23, 24);
this.toolStripButton7.Text = "发送图片(支持Gif)";
this.toolStripButton7.Click += new System.EventHandler(this.toolStripButton7_Click);
//
// skinButton_send
//
this.skinButton_send.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.skinButton_send.BackColor = System.Drawing.Color.Transparent;
this.skinButton_send.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(97)))), ((int)(((byte)(159)))), ((int)(((byte)(215)))));
this.skinButton_send.ControlState = CCWin.SkinClass.ControlState.Normal;
this.skinButton_send.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.skinButton_send.DownBack = ((System.Drawing.Image)(resources.GetObject("skinButton_send.DownBack")));
this.skinButton_send.DrawType = CCWin.SkinControl.DrawStyle.Img;
this.skinButton_send.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.skinButton_send.Location = new System.Drawing.Point(380, 533);
this.skinButton_send.MouseBack = ((System.Drawing.Image)(resources.GetObject("skinButton_send.MouseBack")));
this.skinButton_send.Name = "skinButton_send";
this.skinButton_send.NormlBack = ((System.Drawing.Image)(resources.GetObject("skinButton_send.NormlBack")));
this.skinButton_send.Size = new System.Drawing.Size(69, 24);
this.skinButton_send.TabIndex = 127;
this.skinButton_send.Text = "发送(&S)";
this.skinButton_send.UseVisualStyleBackColor = false;
this.skinButton_send.Click += new System.EventHandler(this.btnSend_Click);
部分程序代码如下:
using JustLib.Controls;
namespace 校友聊
{
partial class ChatForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
CCWin.SkinControl.Animation animation2 = new CCWin.SkinControl.Animation();
CCWin.SkinControl.Animation animation1 = new CCWin.SkinControl.Animation();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChatForm));
this.toolShow = new System.Windows.Forms.ToolTip(this.components);
this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
this.fontDialog1 = new System.Windows.Forms.FontDialog();
this.btnClose = new CCWin.SkinControl.SkinButton();
this.skToolMenu = new CCWin.SkinControl.SkinToolStrip();
this.toolFont = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonEmotion = new System.Windows.Forms.ToolStripButton();
this.toolVibration = new System.Windows.Forms.ToolStripButton();
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton7 = new System.Windows.Forms.ToolStripButton();
this.skinToolStrip2 = new CCWin.SkinControl.SkinToolStrip();
this.toolStripButton5 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton6 = new System.Windows.Forms.ToolStripButton();
this.ToolFile = new System.Windows.Forms.ToolStripSplitButton();
this.toolStripMenuItem32 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem33 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem34 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripButton4 = new System.Windows.Forms.ToolStripButton();
this.toolStripSplitButton2 = new System.Windows.Forms.ToolStripSplitButton();
this.skinLabel_p2PState = new CCWin.SkinControl.SkinLabel();
this.pictureBox_state = new System.Windows.Forms.PictureBox();
this.skinTabControl1 = new CCWin.SkinControl.SkinTabControl();
this.skinLabel_FriendName = new CCWin.SkinControl.SkinLabel();
this.skinLabel_FriendID = new CCWin.SkinControl.SkinLabel();
this.skinPanel3 = new CCWin.SkinControl.SkinPanel();
this.skinPanel_mine = new CCWin.SkinControl.SkinPanel();
this.skinPanel2 = new CCWin.SkinControl.SkinPanel();
this.skinPanel_friend = new CCWin.SkinControl.SkinPanel();
this.pnlTx = new CCWin.SkinControl.SkinPanel();
this.panelFriendHeadImage = new CCWin.SkinControl.SkinPanel();
this.skinPanel_status = new CCWin.SkinControl.SkinPanel();
this.labelFriendName = new CCWin.SkinControl.SkinLabel();
this.labelFriendSignature = new CCWin.SkinControl.SkinLabel();
this.skinPanel_right = new CCWin.SkinControl.SkinPanel();
this.skinLabel_friendDep = new CCWin.SkinControl.SkinLabel();
this.skinLabel_depTitle = new CCWin.SkinControl.SkinLabel();
this.skinLabel2 = new CCWin.SkinControl.SkinLabel();
this.skinLabel1 = new CCWin.SkinControl.SkinLabel();
this.skinButton_send = new CCWin.SkinControl.SkinButton();
this.skinLabel_inputing = new CCWin.SkinControl.SkinLabel();
this.chatBox_history = new JustLib.Controls.ChatBox();
this.chatBoxSend = new JustLib.Controls.ChatBox();
this.skinAnimator1 = new CCWin.SkinControl.SkinAnimator(this.components);
this.gifBox_wait = new JustLib.Controls.GifBox();
this.skToolMenu.SuspendLayout();
this.skinToolStrip2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox_state)).BeginInit();
this.skinPanel3.SuspendLayout();
this.skinPanel2.SuspendLayout();
this.pnlTx.SuspendLayout();
this.panelFriendHeadImage.SuspendLayout();
this.skinPanel_right.SuspendLayout();
this.SuspendLayout();
//
// toolStripLabel2
//
this.toolStripLabel2.AutoSize = false;
this.toolStripLabel2.BackColor = System.Drawing.Color.Transparent;
this.toolStripLabel2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripLabel2.Image = global::校友聊.Properties.Resources.pictureBox1_Image;
this.toolStripLabel2.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripLabel2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripLabel2.Name = "toolStripLabel2";
this.toolStripLabel2.Size = new System.Drawing.Size(10, 24);
this.toolStripLabel2.Text = "toolStripButton6";
//
// fontDialog1
//
this.fontDialog1.Color = System.Drawing.SystemColors.ControlText;
this.fontDialog1.ShowColor = true;
//
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.BackColor = System.Drawing.Color.Transparent;
this.btnClose.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(97)))), ((int)(((byte)(159)))), ((int)(((byte)(215)))));
this.btnClose.ControlState = CCWin.SkinClass.ControlState.Normal;
this.skinAnimator1.SetDecoration(this.btnClose, CCWin.SkinControl.DecorationType.None);
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnClose.DownBack = ((System.Drawing.Image)(resources.GetObject("btnClose.DownBack")));
this.btnClose.DrawType = CCWin.SkinControl.DrawStyle.Img;
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClose.Location = new System.Drawing.Point(265, 480);
this.btnClose.MouseBack = ((System.Drawing.Image)(resources.GetObject("btnClose.MouseBack")));
this.btnClose.Name = "btnClose";
this.btnClose.NormlBack = ((System.Drawing.Image)(resources.GetObject("btnClose.NormlBack")));
this.btnClose.Size = new System.Drawing.Size(69, 24);
this.btnClose.TabIndex = 127;
this.btnClose.Text = "关闭";
this.btnClose.UseVisualStyleBackColor = false;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// skToolMenu
//
this.skToolMenu.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.skToolMenu.Arrow = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.skToolMenu.AutoSize = false;
this.skToolMenu.Back = System.Drawing.Color.White;
this.skToolMenu.BackColor = System.Drawing.Color.Transparent;
this.skToolMenu.BackRadius = 4;
this.skToolMenu.BackRectangle = new System.Drawing.Rectangle(10, 10, 10, 10);
this.skToolMenu.Base = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.skToolMenu.BaseFore = System.Drawing.Color.Black;
this.skToolMenu.BaseForeAnamorphosis = false;
this.skToolMenu.BaseForeAnamorphosisBorder = 4;
this.skToolMenu.BaseForeAnamorphosisColor = System.Drawing.Color.White;
this.skToolMenu.BaseForeOffset = new System.Drawing.Point(0, 0);
this.skToolMenu.BaseHoverFore = System.Drawing.Color.Black;
this.skToolMenu.BaseItemAnamorphosis = true;
this.skToolMenu.BaseItemBorder = System.Drawing.Color.FromArgb(((int)(((byte)(123)))), ((int)(((byte)(123)))), ((int)(((byte)(123)))));
this.skToolMenu.BaseItemBorderShow = true;
this.skToolMenu.BaseItemDown = ((System.Drawing.Image)(resources.GetObject("skToolMenu.BaseItemDown")));
this.skToolMenu.BaseItemHover = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.skToolMenu.BaseItemMouse = ((System.Drawing.Image)(resources.GetObject("skToolMenu.BaseItemMouse")));
this.skToolMenu.BaseItemPressed = System.Drawing.Color.Transparent;
this.skToolMenu.BaseItemRadius = 2;
this.skToolMenu.BaseItemRadiusStyle = CCWin.SkinClass.RoundStyle.All;
this.skToolMenu.BaseItemSplitter = System.Drawing.Color.Transparent;
this.skinAnimator1.SetDecoration(this.skToolMenu, CCWin.SkinControl.DecorationType.None);
this.skToolMenu.Dock = System.Windows.Forms.DockStyle.None;
this.skToolMenu.DropDownImageSeparator = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(197)))), ((int)(((byte)(197)))));
this.skToolMenu.Fore = System.Drawing.Color.Black;
this.skToolMenu.GripMargin = new System.Windows.Forms.Padding(2, 2, 4, 2);
this.skToolMenu.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.skToolMenu.HoverFore = System.Drawing.Color.White;
this.skToolMenu.ItemAnamorphosis = false;
this.skToolMenu.ItemBorder = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212)))));
this.skToolMenu.ItemBorderShow = false;
this.skToolMenu.ItemHover = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212)))));
this.skToolMenu.ItemPressed = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212)))));
this.skToolMenu.ItemRadius = 3;
this.skToolMenu.ItemRadiusStyle = CCWin.SkinClass.RoundStyle.None;
this.skToolMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolFont,
this.toolStripButtonEmotion,
this.toolVibration,
this.toolStripButton3,
this.toolStripButton2,
this.toolStripButton1,
this.toolStripButton7});
this.skToolMenu.Location = new System.Drawing.Point(1, 351);
this.skToolMenu.Name = "skToolMenu";
this.skToolMenu.RadiusStyle = CCWin.SkinClass.RoundStyle.All;
this.skToolMenu.Size = new System.Drawing.Size(418, 27);
this.skToolMenu.SkinAllColor = true;
this.skToolMenu.TabIndex = 132;
this.skToolMenu.Text = "skinToolStrip1";
this.skToolMenu.TitleAnamorphosis = false;
this.skToolMenu.TitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(209)))), ((int)(((byte)(228)))), ((int)(((byte)(236)))));
this.skToolMenu.TitleRadius = 4;
this.skToolMenu.TitleRadiusStyle = CCWin.SkinClass.RoundStyle.All;
//
// toolFont
//
this.toolFont.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolFont.Image = ((System.Drawing.Image)(resources.GetObject("toolFont.Image")));
this.toolFont.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolFont.Margin = new System.Windows.Forms.Padding(4, 1, 0, 2);
this.toolFont.Name = "toolFont";
this.toolFont.Size = new System.Drawing.Size(23, 24);
this.toolFont.Text = "toolStripButton1";
this.toolFont.ToolTipText = "字体";
this.toolFont.Click += new System.EventHandler(this.toolFont_Click);
this.toolFont.MouseEnter += new System.EventHandler(this.FocusCurrent);
//
// toolStripButtonEmotion
//
this.toolStripButtonEmotion.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonEmotion.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonEmotion.Image")));
this.toolStripButtonEmotion.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonEmotion.Margin = new System.Windows.Forms.Padding(3, 1, 0, 2);
this.toolStripButtonEmotion.Name = "toolStripButtonEmotion";
this.toolStripButtonEmotion.Size = new System.Drawing.Size(23, 24);
this.toolStripButtonEmotion.Text = "toolStripButton2";
this.toolStripButtonEmotion.ToolTipText = "表情";
this.toolStripButtonEmotion.MouseEnter += new System.EventHandler(this.FocusCurrent);
this.toolStripButtonEmotion.MouseUp += new System.Windows.Forms.MouseEventHandler(this.toolStripButtonEmotion_MouseUp);
//
// toolVibration
//
this.toolVibration.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolVibration.Image = ((System.Drawing.Image)(resources.GetObject("toolVibration.Image")));
this.toolVibration.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolVibration.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolVibration.Margin = new System.Windows.Forms.Padding(3, 1, 0, 2);
this.toolVibration.Name = "toolVibration";
this.toolVibration.Size = new System.Drawing.Size(23, 24);
this.toolVibration.Text = "toolStripButton4";
this.toolVibration.ToolTipText = "抖动提醒";
this.toolVibration.Click += new System.EventHandler(this.toolVibration_Click);
this.toolVibration.MouseEnter += new System.EventHandler(this.FocusCurrent);
//
// toolStripButton3
//
this.toolStripButton3.Name = "toolStripButton3";
this.toolStripButton3.Size = new System.Drawing.Size(23, 24);
//
// toolStripButton2
//
this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
this.toolStripButton2.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(23, 24);
this.toolStripButton2.Text = "屏幕截图";
this.toolStripButton2.Click += new System.EventHandler(this.buttonCapture_Click);
this.toolStripButton2.MouseEnter += new System.EventHandler(this.FocusCurrent);
//
// toolStripButton1
//
this.toolStripButton1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.toolStripButton1.Image = global::校友聊.Properties.Resources.Conversation1;
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(76, 24);
this.toolStripButton1.Text = "消息记录";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
this.toolStripButton1.MouseEnter += new System.EventHandler(this.FocusCurrent);
//
// toolStripButton7
//
this.toolStripButton7.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton7.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton7.Image")));
this.toolStripButton7.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton7.Name = "toolStripButton7";
this.toolStripButton7.Size = new System.Drawing.Size(23, 24);
this.toolStripButton7.Text = "发送图片(支持Gif)";
this.toolStripButton7.Click += new System.EventHandler(this.toolStripButton7_Click);
//
// skinToolStrip2
//
this.skinToolStrip2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.skinToolStrip2.Arrow = System.Drawing.Color.White;
this.skinToolStrip2.AutoSize = false;
this.skinToolStrip2.Back = System.Drawing.Color.White;
this.skinToolStrip2.BackColor = System.Drawing.Color.Transparent;
this.skinToolStrip2.BackRadius = 4;
this.skinToolStrip2.BackRectangle = new System.Drawing.Rectangle(10, 10, 10, 10);
this.skinToolStrip2.Base = System.Drawing.Color.Transparent;
this.skinToolStrip2.BaseFore = System.Drawing.Color.Black;
this.skinToolStrip2.BaseForeAnamorphosis = false;
this.skinToolStrip2.BaseForeAnamorphosisBorder = 4;
this.skinToolStrip2.BaseForeAnamorphosisColor = System.Drawing.Color.White;
this.skinToolStrip2.BaseForeOffset = new System.Drawing.Point(0, 0);
this.skinToolStrip2.BaseHoverFore = System.Drawing.Color.White;
this.skinToolStrip2.BaseItemAnamorphosis = true;
this.skinToolStrip2.BaseItemBorder = System.Drawing.Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(93)))), ((int)(((byte)(93)))));
this.skinToolStrip2.BaseItemBorderShow = true;
this.skinToolStrip2.BaseItemDown = ((System.Drawing.Image)(resources.GetObject("skinToolStrip2.BaseItemDown")));
this.skinToolStrip2.BaseItemHover = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.skinToolStrip2.BaseItemMouse = ((System.Drawing.Image)(resources.GetObject("skinToolStrip2.BaseItemMouse")));
this.skinToolStrip2.BaseItemPressed = System.Drawing.Color.Transparent;
this.skinToolStrip2.BaseItemRadius = 2;
this.skinToolStrip2.BaseItemRadiusStyle = CCWin.SkinClass.RoundStyle.All;
this.skinToolStrip2.BaseItemSplitter = System.Drawing.Color.Transparent;
this.skinAnimator1.SetDecoration(this.skinToolStrip2, CCWin.SkinControl.DecorationType.None);
this.skinToolStrip2.Dock = System.Windows.Forms.DockStyle.None;
this.skinToolStrip2.DropDownImageSeparator = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(197)))), ((int)(((byte)(197)))));
this.skinToolStrip2.Fore = System.Drawing.Color.Black;
this.skinToolStrip2.GripMargin = new System.Windows.Forms.Padding(2, 2, 4, 2);
this.skinToolStrip2.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.skinToolStrip2.HoverFore = System.Drawing.Color.White;
this.skinToolStrip2.ItemAnamorphosis = false;
this.skinToolStrip2.ItemBorder = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212)))));
this.skinToolStrip2.ItemBorderShow = false;
this.skinToolStrip2.ItemHover = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212)))));
this.skinToolStrip2.ItemPressed = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212)))));
this.skinToolStrip2.ItemRadius = 1;
this.skinToolStrip2.ItemRadiusStyle = CCWin.SkinClass.RoundStyle.None;
this.skinToolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton5,
this.toolStripButton6,
this.ToolFile,
this.toolStripButton4,
this.toolStripSplitButton2});
this.skinToolStrip2.Location = new System.Drawing.Point(1, 56);
this.skinToolStrip2.Name = "skinToolStrip2";
this.skinToolStrip2.RadiusStyle = CCWin.SkinClass.RoundStyle.All;
this.skinToolStrip2.Size = new System.Drawing.Size(621, 33);
this.skinToolStrip2.SkinAllColor = true;
this.skinToolStrip2.TabIndex = 133;
this.skinToolStrip2.Text = "skinToolStrip2";
this.skinToolStrip2.TitleAnamorphosis = false;
this.skinToolStrip2.TitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(209)))), ((int)(((byte)(228)))), ((int)(((byte)(236)))));
this.skinToolStrip2.TitleRadius = 4;
this.skinToolStrip2.TitleRadiusStyle = CCWin.SkinClass.RoundStyle.All;
this.skinToolStrip2.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.skinToolStrip2_ItemClicked);
语音功能的界面如下:
部分代码如下:
this.skinButton_State.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.skinButton_State.BackColor = System.Drawing.Color.Transparent;
this.skinButton_State.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.skinButton_State.BackRectangle = new System.Drawing.Rectangle(4, 4, 4, 4);
this.skinButton_State.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(97)))), ((int)(((byte)(159)))), ((int)(((byte)(215)))));
this.skinButton_State.ControlState = CCWin.SkinClass.ControlState.Normal;
this.skinButton_State.DownBack = global::校友聊.Properties.Resources.allbtn_down;
this.skinButton_State.DrawType = CCWin.SkinControl.DrawStyle.Img;
this.skinButton_State.Image = global::校友聊.Properties.Resources.HDVideoHangs;
this.skinButton_State.ImageSize = new System.Drawing.Size(23, 20);
this.skinButton_State.Location = new System.Drawing.Point(430, 379);
this.skinButton_State.Margin = new System.Windows.Forms.Padding(0);
this.skinButton_State.MouseBack = global::校友聊.Properties.Resources.allbtn_highlight;
this.skinButton_State.Name = "skinButton_State";
this.skinButton_State.NormlBack = null;
this.skinButton_State.Palace = true;
this.skinButton_State.Size = new System.Drawing.Size(29, 23);
this.skinButton_State.TabIndex = 129;
this.skinButton_State.Tag = "1";
this.toolTip1.SetToolTip(this.skinButton_State, "挂断");
this.skinButton_State.UseVisualStyleBackColor = false;
this.skinButton_State.Click += new System.EventHandler(this.skinButton_State_Click);
this.skinButton_State.MouseEnter += new System.EventHandler(this.FocusCurrent);
//
// pictureBox_disMic
//
this.pictureBox_disMic.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox_disMic.BackgroundImage")));
this.pictureBox_disMic.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.pictureBox_disMic.Location = new System.Drawing.Point(3, 3);
this.pictureBox_disMic.Name = "pictureBox_disMic";
this.pictureBox_disMic.Size = new System.Drawing.Size(32, 32);
this.pictureBox_disMic.TabIndex = 1;
this.pictureBox_disMic.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox_disMic, "对方禁用了麦克风");
this.pictureBox_disMic.Visible = false;
this.pictureBox_disMic.MouseEnter += new System.EventHandler(this.FocusCurrent);
视频功能的界面如下:
部分代码如下:
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
this.imageList1.Images.SetKeyName(0, "GVideoTurnOnVideo.png");
this.imageList1.Images.SetKeyName(1, "GVideoTurnOffVideo.png");
this.imageList1.Images.SetKeyName(2, "remind_highlight.png");
this.imageList1.Images.SetKeyName(3, "GVShareVideoCloseSpk_MouseOver.png");
this.imageList1.Images.SetKeyName(4, "AM_MenuICON.png");
this.imageList1.Images.SetKeyName(5, "AV_New_Mic_Style3.png");
//
// skinButton_State
//
this.skinButton_State.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.skinButton_State.BackColor = System.Drawing.Color.Transparent;
this.skinButton_State.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.skinButton_State.BackRectangle = new System.Drawing.Rectangle(4, 4, 4, 4);
this.skinButton_State.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(97)))), ((int)(((byte)(159)))), ((int)(((byte)(215)))));
this.skinButton_State.ControlState = CCWin.SkinClass.ControlState.Normal;
this.skinButton_State.DownBack = global::校友聊.Properties.Resources.allbtn_down;
this.skinButton_State.DrawType = CCWin.SkinControl.DrawStyle.Img;
this.skinButton_State.Image = global::校友聊.Properties.Resources.HDVideoHangs;
this.skinButton_State.ImageSize = new System.Drawing.Size(23, 20);
this.skinButton_State.Location = new System.Drawing.Point(430, 379);
this.skinButton_State.Margin = new System.Windows.Forms.Padding(0);
this.skinButton_State.MouseBack = global::校友聊.Properties.Resources.allbtn_highlight;
this.skinButton_State.Name = "skinButton_State";
this.skinButton_State.NormlBack = null;
this.skinButton_State.Palace = true;
this.skinButton_State.Size = new System.Drawing.Size(29, 23);
this.skinButton_State.TabIndex = 129;
this.skinButton_State.Tag = "1";
this.toolTip1.SetToolTip(this.skinButton_State, "挂断");
this.skinButton_State.UseVisualStyleBackColor = false;
this.skinButton_State.Click += new System.EventHandler(this.skinButton_State_Click);
this.skinButton_State.MouseEnter += new System.EventHandler(this.FocusCurrent);
//
// pictureBox_disMic
//
this.pictureBox_disMic.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox_disMic.BackgroundImage")));
this.pictureBox_disMic.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.pictureBox_disMic.Location = new System.Drawing.Point(3, 3);
this.pictureBox_disMic.Name = "pictureBox_disMic";
this.pictureBox_disMic.Size = new System.Drawing.Size(32, 32);
this.pictureBox_disMic.TabIndex = 1;
this.pictureBox_disMic.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox_disMic, "对方禁用了麦克风");
this.pictureBox_disMic.Visible = false;
this.pictureBox_disMic.MouseEnter += new System.EventHandler(this.FocusCurrent);
//
// pictureBox_disCamera
//
this.pictureBox_disCamera.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pictureBox_disCamera.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox_disCamera.Image")));
this.pictureBox_disCamera.Location = new System.Drawing.Point(195, 149);
this.pictureBox_disCamera.Name = "pictureBox_disCamera";
this.pictureBox_disCamera.Size = new System.Drawing.Size(32, 32);
this.pictureBox_disCamera.TabIndex = 1;
this.pictureBox_disCamera.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox_disCamera, "对方禁用了摄像头");
this.pictureBox_disCamera.Visible = false;
this.pictureBox_disCamera.MouseEnter += new System.EventHandler(this.FocusCurrent);
//
// skinCheckBox_HighR
//
this.skinCheckBox_HighR.AutoSize = true;
this.skinCheckBox_HighR.BackColor = System.Drawing.Color.Transparent;
this.skinCheckBox_HighR.ControlState = CCWin.SkinClass.ControlState.Normal;
this.skinCheckBox_HighR.DownBack = null;
this.skinCheckBox_HighR.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.skinCheckBox_HighR.Location = new System.Drawing.Point(174, 23);
this.skinCheckBox_HighR.MouseBack = null;
this.skinCheckBox_HighR.Name = "skinCheckBox_HighR";
this.skinCheckBox_HighR.NormlBack = null;
this.skinCheckBox_HighR.SelectedDownBack = null;
this.skinCheckBox_HighR.SelectedMouseBack = null;
this.skinCheckBox_HighR.SelectedNormlBack = null;
this.skinCheckBox_HighR.Size = new System.Drawing.Size(75, 21);
this.skinCheckBox_HighR.TabIndex = 8;
this.skinCheckBox_HighR.Text = "高分辨率";
this.toolTip1.SetToolTip(this.skinCheckBox_HighR, "高分辨视频需要更大的带宽支持");
this.skinCheckBox_HighR.UseVisualStyleBackColor = false;
this.skinCheckBox_HighR.CheckedChanged += new System.EventHandler(this.skinCheckBox_HighR_CheckedChanged);
//
// skinCheckBox_autoAdjustQulity
//
this.skinCheckBox_autoAdjustQulity.AutoSize = true;
this.skinCheckBox_autoAdjustQulity.BackColor = System.Drawing.Color.Transparent;
this.skinCheckBox_autoAdjustQulity.Checked = true;
this.skinCheckBox_autoAdjustQulity.CheckState = System.Windows.Forms.CheckState.Checked;
this.skinCheckBox_autoAdjustQulity.ControlState = CCWin.SkinClass.ControlState.Normal;
this.skinCheckBox_autoAdjustQulity.DownBack = null;
this.skinCheckBox_autoAdjustQulity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.skinCheckBox_autoAdjustQulity.Location = new System.Drawing.Point(175, 2);
this.skinCheckBox_autoAdjustQulity.MouseBack = null;
this.skinCheckBox_autoAdjustQulity.Name = "skinCheckBox_autoAdjustQulity";
this.skinCheckBox_autoAdjustQulity.NormlBack = null;
this.skinCheckBox_autoAdjustQulity.SelectedDownBack = null;
this.skinCheckBox_autoAdjustQulity.SelectedMouseBack = null;
this.skinCheckBox_autoAdjustQulity.SelectedNormlBack = null;
this.skinCheckBox_autoAdjustQulity.Size = new System.Drawing.Size(123, 21);
this.skinCheckBox_autoAdjustQulity.TabIndex = 9;
this.skinCheckBox_autoAdjustQulity.Text = "自动调整视频质量";
this.toolTip1.SetToolTip(this.skinCheckBox_autoAdjustQulity, "根据网络快慢自动调节好友视频的质量");
this.skinCheckBox_autoAdjustQulity.UseVisualStyleBackColor = false;
this.skinCheckBox_autoAdjustQulity.CheckedChanged += new System.EventHandler(this.skinCheckBox_autoAdjustQulity_CheckedChanged);
//
// skinComboBox_quality
//
this.skinComboBox_quality.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.skinComboBox_quality.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.skinComboBox_quality.FormattingEnabled = true;
this.skinComboBox_quality.Items.AddRange(new object[] {
"优",
"良",
"中",
"差"});
this.skinComboBox_quality.Location = new System.Drawing.Point(294, 1);
this.skinComboBox_quality.Name = "skinComboBox_quality";
this.skinComboBox_quality.Size = new System.Drawing.Size(46, 22);
this.skinComboBox_quality.TabIndex = 5;
this.toolTip1.SetToolTip(this.skinComboBox_quality, "手动控制好友视频的质量");
this.skinComboBox_quality.Visible = false;
this.skinComboBox_quality.WaterText = "";
this.skinComboBox_quality.SelectedIndexChanged += new System.EventHandler(this.skinComboBox_quality_SelectedIndexChanged);
//
// skinLabel_tip
//
this.skinLabel_tip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.skinLabel_tip.ArtTextStyle = CCWin.SkinControl.ArtTextStyle.None;
this.skinLabel_tip.AutoSize = true;
this.skinLabel_tip.BackColor = System.Drawing.Color.Transparent;
this.skinLabel_tip.BorderColor = System.Drawing.Color.White;
this.skinLabel_tip.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.skinLabel_tip.Location = new System.Drawing.Point(182, 9);
this.skinLabel_tip.Name = "skinLabel_tip";
this.skinLabel_tip.Size = new System.Drawing.Size(149, 17);
this.skinLabel_tip.TabIndex = 4;
this.skinLabel_tip.Text = "正在等待对方接收邀请 . . .";
//
// skinPanel_tool
//
this.skinPanel_tool.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.skinPanel_tool.BackColor = System.Drawing.Color.Transparent;
this.skinPanel_tool.Controls.Add(this.decibelDisplayer_speaker);
this.skinPanel_tool.Controls.Add(this.decibelDisplayer_mic);
this.skinPanel_tool.Controls.Add(this.skinCheckBox_camera);
this.skinPanel_tool.Controls.Add(this.skinCheckBox_HighR);
this.skinPanel_tool.Controls.Add(this.skinComboBox_quality);
this.skinPanel_tool.Controls.Add(this.skinCheckBox_my);
this.skinPanel_tool.Controls.Add(this.timerLabel1);
this.skinPanel_tool.Controls.Add(this.channelQualityDisplayer1);
this.skinPanel_tool.Controls.Add(this.skinCheckBox_mic);
this.skinPanel_tool.Controls.Add(this.skinCheckBox_autoAdjustQulity);
this.skinPanel_tool.Controls.Add(this.skinCheckBox_speaker);
this.skinPanel_tool.ControlState = CCWin.SkinClass.ControlState.Normal;
this.skinPanel_tool.DownBack = null;
this.skinPanel_tool.Location = new System.Drawing.Point(5, 369);
this.skinPanel_tool.MouseBack = null;
this.skinPanel_tool.Name = "skinPanel_tool";
this.skinPanel_tool.NormlBack = null;
this.skinPanel_tool.Size = new System.Drawing.Size(419, 45);
this.skinPanel_tool.TabIndex = 3;
this.skinPanel_tool.Visible = false;
//
// decibelDisplayer_speaker
//
this.decibelDisplayer_speaker.BackColor = System.Drawing.Color.White;
this.decibelDisplayer_speaker.Location = new System.Drawing.Point(3, 7);
this.decibelDisplayer_speaker.Name = "decibelDisplayer_speaker";
this.decibelDisplayer_speaker.Size = new System.Drawing.Size(20, 10);
this.decibelDisplayer_speaker.TabIndex = 10;
this.decibelDisplayer_speaker.ValueVisialbe = false;
this.decibelDisplayer_speaker.Working = true;
//
// decibelDisplayer_mic
//
this.decibelDisplayer_mic.BackColor = System.Drawing.Color.White;
this.decibelDisplayer_mic.Location = new System.Drawing.Point(3, 28);
this.decibelDisplayer_mic.Name = "decibelDisplayer_mic";
this.decibelDisplayer_mic.Size = new System.Drawing.Size(20, 10);
this.decibelDisplayer_mic.TabIndex = 10;
this.decibelDisplayer_mic.ValueVisialbe = false;
this.decibelDisplayer_mic.Working = true;
//
// skinCheckBox_camera
//
this.skinCheckBox_camera.AutoSize = true;
this.skinCheckBox_camera.BackColor = System.Drawing.Color.Transparent;
this.skinCheckBox_camera.Checked = true;
this.skinCheckBox_camera.CheckState = System.Windows.Forms.CheckState.Checked;
this.skinCheckBox_camera.ControlState = CCWin.SkinClass.ControlState.Normal;
this.skinCheckBox_camera.DownBack = null;
this.skinCheckBox_camera.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.skinCheckBox_camera.Location = new System.Drawing.Point(94, 23);
this.skinCheckBox_camera.MouseBack = null;
this.skinCheckBox_camera.Name = "skinCheckBox_camera";
this.skinCheckBox_camera.NormlBack = null;
this.skinCheckBox_camera.SelectedDownBack = null;
this.skinCheckBox_camera.SelectedMouseBack = null;
this.skinCheckBox_camera.SelectedNormlBack = null;
this.skinCheckBox_camera.Size = new System.Drawing.Size(63, 21);
this.skinCheckBox_camera.TabIndex = 2;
this.skinCheckBox_camera.Text = "摄像头";
this.skinCheckBox_camera.UseVisualStyleBackColor = false;
this.skinCheckBox_camera.CheckedChanged += new System.EventHandler(this.skinCheckBox_camera_CheckedChanged);
文件传输的界面如下:
部分代码如下:
using System;
using ESBasic;
using ESPlus.FileTransceiver;
namespace JustLib.Controls
{
/// <summary>
/// 文件传送查看器。用于查看与某个好友的所有文件传送的进度状态信息。
/// 注意,FileTransferingViewer的所有事件都是在UI线程中触发的。
/// </summary>
public interface IFileTransferingViewer
{
/// <summary>
/// 当某个文件开始续传时,触发该事件。参数为FileName - isSending
/// </summary>
event CbGeneric<string, bool> FileResumedTransStarted;
/// <summary>
/// 当某个文件传送完毕时,触发该事件。参数为FileName - isSending - comment - isFolder
/// </summary>
event CbGeneric<string, bool, string, bool> FileTransCompleted;
/// <summary>
/// 当某个文件传送中断时,触发该事件。参数为FileName - isSending - FileTransDisrupttedType
/// </summary>
event CbGeneric<string, bool, FileTransDisrupttedType> FileTransDisruptted;
/// <summary>
/// 当某个文件传送开始时,触发该事件。参数为FileName - isSending
/// </summary>
event CbGeneric<string, bool> FileTransStarted;
/// <summary>
/// 当所有文件都传送完成时,触发该事件。
/// </summary>
event CbSimple AllTaskFinished;
/// <summary>
/// 当前是否有文件正在传送中。
/// </summary>
bool IsFileTransfering { get; }
}
}
3.3服务器子系统
总体功能设计: 接收客户端客户所发送的信息,并将其转发给合适的目的用户 (为了便于测试,我们暂时给服务器增加了一个功能---查看所有用户 所发送的所有信息,在真正的生产中,应当将此功能去掉) 下面给出设计方案和设计方法 在这里有一个辅助的功能就是,当用户登陆是,用户会将自己的Socket和ID号发送给服务器,服务器会将该用户的信息存储在服务器中,同时服务器将该用户的id分发出去,使得所有用户直到此用户上线 。
处理来自客户端的请求的部分代码如下:
/// 处理来自客户端的消息。
/// </summary>
public void HandleInformation(string sourceUserID, int informationType, byte[] info)
{
if (informationType == InformationTypes.AddFriendCatalog)
{
string catalogName = System.Text.Encoding.UTF8.GetString(info) ;
this.globalCache.AddFriendCatalog(sourceUserID, catalogName);
return;
}
if (informationType == InformationTypes.RemoveFriendCatalog)
{
string catalogName = System.Text.Encoding.UTF8.GetString(info);
this.globalCache.RemoveFriendCatalog(sourceUserID, catalogName);
return;
}
if (informationType == InformationTypes.ChangeFriendCatalogName)
{
ChangeCatalogContract contract = CompactPropertySerializer.Default.Deserialize<ChangeCatalogContract>(info, 0);
this.globalCache.ChangeFriendCatalogName(sourceUserID, contract.OldName, contract.NewName);
return;
}
if (informationType == InformationTypes.MoveFriendToOtherCatalog)
{
MoveFriendToOtherCatalogContract contract = CompactPropertySerializer.Default.Deserialize<MoveFriendToOtherCatalogContract>(info, 0);
this.globalCache.MoveFriend(sourceUserID,contract.FriendID, contract.OldCatalog, contract.NewCatalog);
return;
}
if (informationType == InformationTypes.GetOfflineMessage)
{
this.SendOfflineMessage(sourceUserID);
return;
}
if (informationType == InformationTypes.GetOfflineFile)
{
this.offlineFileController.SendOfflineFile(sourceUserID);
return;
}
if (informationType == InformationTypes.QuitGroup)
{
string groupID = System.Text.Encoding.UTF8.GetString(info) ;
this.globalCache.QuitGroup(sourceUserID, groupID);
//通知其它组成员
this.rapidServerEngine.GroupController.Broadcast(groupID, BroadcastTypes.SomeoneQuitGroup, System.Text.Encoding.UTF8.GetBytes(sourceUserID), ESFramework.ActionTypeOnChannelIsBusy.Continue);
return;
}
if (informationType == InformationTypes.DeleteGroup)
{
string groupID = System.Text.Encoding.UTF8.GetString(info);
//通知其它组成员
this.rapidServerEngine.GroupController.Broadcast(groupID, BroadcastTypes.GroupDeleted, System.Text.Encoding.UTF8.GetBytes(sourceUserID), ESFramework.ActionTypeOnChannelIsBusy.Continue);
this.globalCache.DeleteGroup(groupID);
return;
}
if (informationType == InformationTypes.RemoveFriend)
{
string friendID = System.Text.Encoding.UTF8.GetString(info);
this.globalCache.RemoveFriend(sourceUserID, friendID);
//通知好友
this.rapidServerEngine.CustomizeController.Send(friendID, InformationTypes.FriendRemovedNotify, System.Text.Encoding.UTF8.GetBytes(sourceUserID));
return;
}
if (informationType == InformationTypes.ChangeStatus)
{
User user = this.globalCache.GetUser(sourceUserID);
int newStatus = BitConverter.ToInt32(info, 0);
user.UserStatus = (UserStatus)newStatus;
List<string> contacts = this.globalCache.GetAllContacts(sourceUserID);
UserStatusChangedContract contract = new UserStatusChangedContract(sourceUserID, newStatus);
byte[] msg = ESPlus.Serialization.CompactPropertySerializer.Default.Serialize(contract);
foreach (string friendID in contacts)
{
this.rapidServerEngine.CustomizeController.Send(friendID, InformationTypes.UserStatusChanged, msg);
}
return;
}
}
处理文件传输的部分代码如下:
internal class OfflineFileController
{
private IRapidServerEngine rapidServerEngine;
private GlobalCache globalCache;
public OfflineFileController(IRapidServerEngine engine, GlobalCache db)
{
this.rapidServerEngine = engine;
this.globalCache = db;
this.rapidServerEngine.FileController.FileRequestReceived += new ESPlus.Application.FileTransfering.CbFileRequestReceived(FileController_FileRequestReceived);
this.rapidServerEngine.FileController.FileReceivingEvents.FileTransCompleted += new ESBasic.CbGeneric<ESPlus.FileTransceiver.TransferingProject>(FileReceivingEvents_FileTransCompleted);
this.rapidServerEngine.FileController.FileSendingEvents.FileTransCompleted += new ESBasic.CbGeneric<ESPlus.FileTransceiver.TransferingProject>(FileSendingEvents_FileTransCompleted);
this.rapidServerEngine.FileController.FileResponseReceived += new ESBasic.CbGeneric<ESPlus.FileTransceiver.TransferingProject, bool>(FileController_FileResponseReceived);
}
void FileController_FileResponseReceived(ESPlus.FileTransceiver.TransferingProject project, bool agree)
{
string senderID = Comment4OfflineFile.ParseUserID(project.Comment);
if (senderID == null)
{
return;
}
if (!agree) //客户端拒绝接收离线文件
{
File.Delete(project.OriginPath); //删除在服务端保存的离线文件
//通知发送方
OfflineFileResultNotifyContract contract = new OfflineFileResultNotifyContract(project.AccepterID, project.ProjectName, false);
this.rapidServerEngine.CustomizeController.Send(senderID, InformationTypes.OfflineFileResultNotify, CompactPropertySerializer.Default.Serialize<OfflineFileResultNotifyContract>(contract));
}
}
//离线文件发送给接收者完成
void FileSendingEvents_FileTransCompleted(ESPlus.FileTransceiver.TransferingProject project)
{
string senderID = Comment4OfflineFile.ParseUserID(project.Comment);
if (senderID == null)
{
return;
}
File.Delete(project.OriginPath);
//通知发送方
OfflineFileResultNotifyContract contract = new OfflineFileResultNotifyContract(project.AccepterID, project.ProjectName, true);
this.rapidServerEngine.CustomizeController.Send(senderID, InformationTypes.OfflineFileResultNotify, CompactPropertySerializer.Default.Serialize<OfflineFileResultNotifyContract>(contract));
}
//发送者上传离线文件完成
void FileReceivingEvents_FileTransCompleted(ESPlus.FileTransceiver.TransferingProject project)
{
string accepterID = Comment4OfflineFile.ParseUserID(project.Comment);
if (accepterID == null)
{
return;
}
OfflineFileItem item = new OfflineFileItem();
item.AccepterID = accepterID;
item.FileLength = project.TotalSize;
item.FileName = project.ProjectName;
item.SenderID = project.SenderID;
item.RelayFilePath = project.LocalSavePath;
if (this.rapidServerEngine.UserManager.IsUserOnLine(accepterID)) //如果接收者在线,则直接转发离线文件
{
string newProjectID = null;
this.rapidServerEngine.FileController.BeginSendFile(item.AccepterID, item.RelayFilePath, Comment4OfflineFile.BuildComment(item.SenderID), out newProjectID);
}
else
{
this.globalCache.StoreOfflineFileItem(item);
}
}
//发送者请求上传离线文件
void FileController_FileRequestReceived(string projectID, string senderID, string fileName, ulong totalSize, ESPlus.FileTransceiver.ResumedProjectItem resumedFileItem, string comment)
{
string accepterID = Comment4OfflineFile.ParseUserID(comment);
if (accepterID == null)
{
return;
}