📄 searchform.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>
/// SearchForm 的摘要说明。
/// </summary>
public class SearchForm : System.Windows.Forms.Form
{
#region
private System.Windows.Forms.TabControl tc;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.TabPage pcondition;
private System.Windows.Forms.TabPage presult;
private gowk.controls.GButton btnsearch;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.ColumnHeader cjid;
private System.Windows.Forms.ColumnHeader cnick;
private System.Windows.Forms.ColumnHeader cgender;
private System.Windows.Forms.ColumnHeader cage;
private System.Windows.Forms.ColumnHeader cfrom;
private System.Windows.Forms.ColumnHeader cvideo;
private gowk.controls.GImage gImage1;
private gowk.controls.GButton btnadd;
private gowk.controls.GButton btnshowprofile;
private gowk.controls.GButton btnclose;
private System.Windows.Forms.CheckBox cbonline;
private System.Windows.Forms.CheckBox cbcam;
private gowk.controls.GComboBox cmbprovince;
private gowk.controls.GComboBox cmbcity;
private gowk.controls.GComboBox cmbage;
private gowk.controls.GComboBox cmbgender;
private gowk.controls.GTextBox txtjid;
private gowk.controls.GTextBox txtnick;
private gowk.controls.GTextBox txtemail;
private System.Windows.Forms.ListView lstUsers;
private System.ComponentModel.Container components = null;
#endregion
JabberClient jc;
gowk.core.managers.SearchManager sm;
private gowk.controls.GTooltipEX gTooltipEX1;
FormCollection _fs=new FormCollection();
public SearchForm(JabberClient jc)
{
this.jc=jc;
sm=new SearchManager(jc);
InitializeComponent();
this.btnsearch.Text="查找";
this.btnshowprofile.Text="查看资料";
this.btnclose.Text="关闭";
this.btnadd.Text="加为好友";
}
#region
/// <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(SearchForm));
this.btnsearch = new gowk.controls.GButton();
this.gImage1 = new gowk.controls.GImage();
this.tc = new System.Windows.Forms.TabControl();
this.pcondition = new System.Windows.Forms.TabPage();
this.txtemail = new gowk.controls.GTextBox();
this.txtnick = new gowk.controls.GTextBox();
this.txtjid = new gowk.controls.GTextBox();
this.cmbgender = new gowk.controls.GComboBox();
this.cmbage = new gowk.controls.GComboBox();
this.cmbcity = new gowk.controls.GComboBox();
this.cmbprovince = new gowk.controls.GComboBox();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.cbcam = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.cbonline = new System.Windows.Forms.CheckBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.presult = new System.Windows.Forms.TabPage();
this.btnclose = new gowk.controls.GButton();
this.btnshowprofile = new gowk.controls.GButton();
this.btnadd = new gowk.controls.GButton();
this.lstUsers = new System.Windows.Forms.ListView();
this.cjid = new System.Windows.Forms.ColumnHeader();
this.cnick = new System.Windows.Forms.ColumnHeader();
this.cgender = new System.Windows.Forms.ColumnHeader();
this.cage = new System.Windows.Forms.ColumnHeader();
this.cfrom = new System.Windows.Forms.ColumnHeader();
this.cvideo = new System.Windows.Forms.ColumnHeader();
this.gTooltipEX1 = new gowk.controls.GTooltipEX();
this.tc.SuspendLayout();
this.pcondition.SuspendLayout();
this.presult.SuspendLayout();
this.SuspendLayout();
//
// btnsearch
//
this.btnsearch.GBorderStyle = gowk.controls.GBorderStyle.Null;
this.btnsearch.GImage = this.gImage1;
this.btnsearch.IsRound = true;
this.btnsearch.Location = new System.Drawing.Point(256, 152);
this.btnsearch.Name = "btnsearch";
this.btnsearch.Size = new System.Drawing.Size(56, 48);
this.btnsearch.TabIndex = 2;
this.btnsearch.Click += new System.EventHandler(this.btnsearch_Click);
//
// gImage1
//
this.gImage1.ActiveImage = ((System.Drawing.Image)(resources.GetObject("gImage1.ActiveImage")));
this.gImage1.Image = ((System.Drawing.Image)(resources.GetObject("gImage1.Image")));
this.gImage1.NormalImage = ((System.Drawing.Image)(resources.GetObject("gImage1.NormalImage")));
this.gImage1.PressedImage = ((System.Drawing.Image)(resources.GetObject("gImage1.PressedImage")));
//
// tc
//
this.tc.Controls.Add(this.pcondition);
this.tc.Controls.Add(this.presult);
this.tc.Dock = System.Windows.Forms.DockStyle.Fill;
this.tc.Location = new System.Drawing.Point(0, 0);
this.tc.Name = "tc";
this.tc.SelectedIndex = 0;
this.tc.Size = new System.Drawing.Size(352, 229);
this.tc.TabIndex = 3;
//
// pcondition
//
this.pcondition.Controls.Add(this.txtemail);
this.pcondition.Controls.Add(this.txtnick);
this.pcondition.Controls.Add(this.txtjid);
this.pcondition.Controls.Add(this.cmbgender);
this.pcondition.Controls.Add(this.cmbage);
this.pcondition.Controls.Add(this.cmbcity);
this.pcondition.Controls.Add(this.cmbprovince);
this.pcondition.Controls.Add(this.label8);
this.pcondition.Controls.Add(this.label7);
this.pcondition.Controls.Add(this.label6);
this.pcondition.Controls.Add(this.label5);
this.pcondition.Controls.Add(this.label4);
this.pcondition.Controls.Add(this.label3);
this.pcondition.Controls.Add(this.label2);
this.pcondition.Controls.Add(this.cbcam);
this.pcondition.Controls.Add(this.label1);
this.pcondition.Controls.Add(this.cbonline);
this.pcondition.Controls.Add(this.pictureBox2);
this.pcondition.Controls.Add(this.btnsearch);
this.pcondition.Location = new System.Drawing.Point(4, 21);
this.pcondition.Name = "pcondition";
this.pcondition.Size = new System.Drawing.Size(344, 204);
this.pcondition.TabIndex = 0;
this.pcondition.Text = "基本查找";
this.pcondition.Click += new System.EventHandler(this.tabPage1_Click);
//
// txtemail
//
this.txtemail.BackColor = System.Drawing.SystemColors.Window;
this.txtemail.DockPadding.All = 3;
this.txtemail.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.txtemail.IsRound = true;
this.txtemail.Location = new System.Drawing.Point(216, 128);
this.txtemail.Name = "txtemail";
this.txtemail.PasswordChar = '\0';
this.txtemail.Size = new System.Drawing.Size(96, 20);
this.txtemail.TabIndex = 23;
//
// txtnick
//
this.txtnick.BackColor = System.Drawing.SystemColors.Window;
this.txtnick.DockPadding.All = 3;
this.txtnick.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.txtnick.IsRound = true;
this.txtnick.Location = new System.Drawing.Point(216, 104);
this.txtnick.Name = "txtnick";
this.txtnick.PasswordChar = '\0';
this.txtnick.Size = new System.Drawing.Size(96, 20);
this.txtnick.TabIndex = 22;
//
// txtjid
//
this.txtjid.BackColor = System.Drawing.SystemColors.Window;
this.txtjid.DockPadding.All = 3;
this.txtjid.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.txtjid.IsRound = true;
this.txtjid.Location = new System.Drawing.Point(216, 80);
this.txtjid.Name = "txtjid";
this.txtjid.PasswordChar = '\0';
this.txtjid.Size = new System.Drawing.Size(96, 20);
this.txtjid.TabIndex = 21;
//
// cmbgender
//
this.cmbgender.BackColor = System.Drawing.SystemColors.Window;
this.cmbgender.DockPadding.All = 3;
this.cmbgender.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.cmbgender.IsRound = true;
this.cmbgender.Location = new System.Drawing.Point(80, 152);
this.cmbgender.MaxDropDownItems = 5;
this.cmbgender.Name = "cmbgender";
this.cmbgender.SelectedIndex = -1;
this.cmbgender.SelectedItem = null;
this.cmbgender.Size = new System.Drawing.Size(80, 20);
this.cmbgender.TabIndex = 20;
//
// cmbage
//
this.cmbage.BackColor = System.Drawing.SystemColors.Window;
this.cmbage.DockPadding.All = 3;
this.cmbage.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.cmbage.IsRound = true;
this.cmbage.Location = new System.Drawing.Point(80, 128);
this.cmbage.MaxDropDownItems = 5;
this.cmbage.Name = "cmbage";
this.cmbage.SelectedIndex = -1;
this.cmbage.SelectedItem = null;
this.cmbage.Size = new System.Drawing.Size(80, 20);
this.cmbage.TabIndex = 19;
//
// cmbcity
//
this.cmbcity.BackColor = System.Drawing.SystemColors.Window;
this.cmbcity.DockPadding.All = 3;
this.cmbcity.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.cmbcity.IsRound = true;
this.cmbcity.Location = new System.Drawing.Point(80, 104);
this.cmbcity.MaxDropDownItems = 5;
this.cmbcity.Name = "cmbcity";
this.cmbcity.SelectedIndex = -1;
this.cmbcity.SelectedItem = null;
this.cmbcity.Size = new System.Drawing.Size(80, 20);
this.cmbcity.TabIndex = 18;
//
// cmbprovince
//
this.cmbprovince.BackColor = System.Drawing.SystemColors.Window;
this.cmbprovince.DockPadding.All = 3;
this.cmbprovince.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.cmbprovince.IsRound = true;
this.cmbprovince.Location = new System.Drawing.Point(80, 80);
this.cmbprovince.MaxDropDownItems = 5;
this.cmbprovince.Name = "cmbprovince";
this.cmbprovince.SelectedIndex = -1;
this.cmbprovince.SelectedItem = null;
this.cmbprovince.Size = new System.Drawing.Size(80, 20);
this.cmbprovince.TabIndex = 10;
//
// label8
//
this.label8.Location = new System.Drawing.Point(176, 128);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(56, 23);
this.label8.TabIndex = 17;
this.label8.Text = "email";
//
// label7
//
this.label7.Location = new System.Drawing.Point(176, 104);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(56, 23);
this.label7.TabIndex = 16;
this.label7.Text = "昵称";
//
// label6
//
this.label6.Location = new System.Drawing.Point(176, 80);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(48, 23);
this.label6.TabIndex = 15;
this.label6.Text = "jid";
//
// label5
//
this.label5.Location = new System.Drawing.Point(40, 152);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(48, 23);
this.label5.TabIndex = 14;
this.label5.Text = "性别";
//
// label4
//
this.label4.Location = new System.Drawing.Point(40, 128);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(48, 23);
this.label4.TabIndex = 13;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -