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

📄 adduserform.cs

📁 语音视频功能 里面实现了基本的QQ与语音对话
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

using gowk.core;
using gowk.core.packets;
using gowk.core.packets.querys;
using gowk.core.managers;

namespace gowk.forms
{
	/// <summary>
	/// AddUserForm 的摘要说明。
	/// </summary>
	public class AddUserForm : System.Windows.Forms.Form
	{
		private gowk.controls.GTextBox gTextBox1;
		private System.Windows.Forms.Label label1;
		private gowk.controls.GButton gButton1;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		JabberClient jc;
		gowk.core.managers.SearchManager sm;
		public AddUserForm(JabberClient jc)
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			this.jc=jc;
			sm=new SearchManager(jc);

			this.gButton1.Text="添加";
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(AddUserForm));
			this.gTextBox1 = new gowk.controls.GTextBox();
			this.label1 = new System.Windows.Forms.Label();
			this.gButton1 = new gowk.controls.GButton();
			this.SuspendLayout();
			// 
			// gTextBox1
			// 
			this.gTextBox1.BackColor = System.Drawing.SystemColors.Window;
			this.gTextBox1.DockPadding.All = 3;
			this.gTextBox1.GBorderStyle = gowk.controls.GBorderStyle.Solid;
			this.gTextBox1.IsRound = true;
			this.gTextBox1.Location = new System.Drawing.Point(72, 24);
			this.gTextBox1.Name = "gTextBox1";
			this.gTextBox1.PasswordChar = '\0';
			this.gTextBox1.Size = new System.Drawing.Size(144, 25);
			this.gTextBox1.TabIndex = 0;
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(24, 24);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(40, 23);
			this.label1.TabIndex = 1;
			this.label1.Text = "jid";
			// 
			// gButton1
			// 
			this.gButton1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("gButton1.BackgroundImage")));
			this.gButton1.GBorderStyle = gowk.controls.GBorderStyle.Solid;
			this.gButton1.IsRound = true;
			this.gButton1.Location = new System.Drawing.Point(152, 64);
			this.gButton1.Name = "gButton1";
			this.gButton1.Size = new System.Drawing.Size(64, 20);
			this.gButton1.TabIndex = 2;
			this.gButton1.Click += new System.EventHandler(this.gButton1_Click);
			// 
			// AddUserForm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(240, 101);
			this.Controls.Add(this.gButton1);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.gTextBox1);
			this.Name = "AddUserForm";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			this.Text = "直接添加用户";
			this.ResumeLayout(false);

		}
		#endregion

		private void gButton1_Click(object sender, System.EventArgs e)
		{
			string jid=this.gTextBox1.Text.Trim();
			string nick=Jid.GetUsername(jid);

			PresenceForm2 f2=new PresenceForm2(this.jc,jid,nick);
			f2.ShowDialog(this);
		}
	}
}

⌨️ 快捷键说明

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