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

📄 formmain.cs

📁 kuiMsg是一款用.net C# 开发的即时消息开源软件,适合.net即时消息软件开发者用。 主要功能: 支持文件传输(p2p); 支持GIF动画表情( 彻底消除闪屏 :) );
💻 CS
📖 第 1 页 / 共 2 页
字号:
            this.toolStripButton3.Text = "toolStripButton3";
            // 
            // statusStrip1
            // 
            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripSplitButton1,
            this.toolStripStatusLabel1});
            this.statusStrip1.Location = new System.Drawing.Point(0, 371);
            this.statusStrip1.Name = "statusStrip1";
            this.statusStrip1.Size = new System.Drawing.Size(632, 22);
            this.statusStrip1.TabIndex = 4;
            this.statusStrip1.Text = "statusStrip1";
            // 
            // toolStripSplitButton1
            // 
            this.toolStripSplitButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripSplitButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripSplitButton1.Image")));
            this.toolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripSplitButton1.Name = "toolStripSplitButton1";
            this.toolStripSplitButton1.Size = new System.Drawing.Size(32, 20);
            this.toolStripSplitButton1.Text = "toolStripSplitButton1";
            // 
            // toolStripStatusLabel1
            // 
            this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
            this.toolStripStatusLabel1.Size = new System.Drawing.Size(67, 17);
            this.toolStripStatusLabel1.Text = "帮助请按F1";
            // 
            // splitContainer1
            // 
            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer1.Location = new System.Drawing.Point(0, 49);
            this.splitContainer1.Name = "splitContainer1";
            // 
            // splitContainer1.Panel1
            // 
            this.splitContainer1.Panel1.Controls.Add(this.treeView1);
            // 
            // splitContainer1.Panel2
            // 
            this.splitContainer1.Panel2.AutoScroll = true;
            this.splitContainer1.Panel2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.splitContainer1.Panel2.Controls.Add(this.panelMain);
            this.splitContainer1.Size = new System.Drawing.Size(632, 322);
            this.splitContainer1.SplitterDistance = 138;
            this.splitContainer1.TabIndex = 6;
            // 
            // treeView1
            // 
            this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.treeView1.Location = new System.Drawing.Point(0, 0);
            this.treeView1.Name = "treeView1";
            treeNode1.Name = "NodeServerUDP";
            treeNode1.Text = "UDP服务";
            treeNode2.Name = "NodeServerRoot";
            treeNode2.Text = "服务设置";
            treeNode3.Name = "NodeGroups";
            treeNode3.Text = "组织机构";
            treeNode4.ImageIndex = -2;
            treeNode4.Name = "NodeLanMsg";
            treeNode4.Text = "LanMsg";
            treeNode4.ToolTipText = "LanMsg";
            this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
            treeNode4});
            this.treeView1.Size = new System.Drawing.Size(138, 322);
            this.treeView1.TabIndex = 6;
            this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
            // 
            // panelMain
            // 
            this.panelMain.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.panelMain.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panelMain.Location = new System.Drawing.Point(0, 0);
            this.panelMain.Name = "panelMain";
            this.panelMain.Size = new System.Drawing.Size(490, 322);
            this.panelMain.TabIndex = 0;
            // 
            // sockUDP1
            // 
            this.sockUDP1.Server = ((System.Net.IPEndPoint)(resources.GetObject("sockUDP1.Server")));
            // 
            // FormMain
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
            this.ClientSize = new System.Drawing.Size(632, 393);
            this.Controls.Add(this.splitContainer1);
            this.Controls.Add(this.statusStrip1);
            this.Controls.Add(this.toolStrip1);
            this.Controls.Add(this.menuStrip1);
            this.Name = "FormMain";
            this.Text = "LanMsg服务控制台";
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.Resize += new System.EventHandler(this.FormMain_Resize);
            this.Load += new System.EventHandler(this.FormMain_Load);
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            this.toolStrip1.ResumeLayout(false);
            this.toolStrip1.PerformLayout();
            this.statusStrip1.ResumeLayout(false);
            this.statusStrip1.PerformLayout();
            this.splitContainer1.Panel1.ResumeLayout(false);
            this.splitContainer1.Panel2.ResumeLayout(false);
            this.splitContainer1.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

		}
		#endregion

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new FormMain());
		}
         

        //private void GetAllUserInfo() //读取数据库中所有用户数据到列表中
        //{ 
        //    try
        //    {
        //        System.Data.OleDb.OleDbDataReader dr;
        //        string  SQLstr= "select Sys_Users.UserName as computer,Mp_EmpLoyee.DepID as Dept,Mp_EmpLoyee.EmpName as UserName from Sys_Users,Mp_EmpLoyee where Mp_EmpLoyee.EmpID=Sys_Users.EmpID and (Sys_Users.IsWork is null or Sys_Users.IsWork>0)";
        //        dr=new ClassOptionData().ExSQLReDr(SQLstr);
        //        while(dr.Read())
        //        {
        //            AllOneUserInfoToLV(LV_SysUser, Convert.ToString(dr["computer"]), "127.0.0.1", "0", "0",Convert.ToString(dr["dept"]), Convert.ToString(dr["UserName"]));
        //        }
        //        dr.Close();

        //    }
        //    catch{}

        //}

        //private void AllOneUserInfoToLV( System.Windows.Forms.ListView LV, string  Computer, string  IpAddress,string  port, string  OnlineSta, string  Dept, string  UserName )//'处理新登录用户的信息数据)
        //{
        //    try
        //    {
        //        System.Windows.Forms.ListViewItem   NewItem =new  ListViewItem();
        //        NewItem.Text  = Computer.Trim().ToLower(); //      '添加用户计算机名与端口号信息
        //        NewItem.SubItems.Add(IpAddress); //'添加用户IP地址信息
        //        NewItem.SubItems.Add(port); //  '添加用户端口信息
        //        NewItem.SubItems.Add(OnlineSta);// '在线状态
        //        NewItem.SubItems.Add(getDept(Dept));//'设置用户部门为未知
        //        NewItem.SubItems.Add(UserName.Trim());//'添加用户姓名信息
        //        NewItem.SubItems.Add("");//'添加用户姓名信息
        //        LV.Items.Add(NewItem);// '添加此登录用户的所有信息到系统列表中 
        //    }
        //    catch{}
        //}

    
		private void menuItemControl_Click(object sender, System.EventArgs e)
		{
		
		}

		private void notifyIcon1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
		{
		
		}

		private void notifyIcon1_DoubleClick(object sender, System.EventArgs e)
		{
            this.Show();
			this.WindowState=System.Windows.Forms.FormWindowState.Normal;
			this.Activate();
		}

		private void FormMain_Resize(object sender, System.EventArgs e)
		{
			if(this.WindowState==System.Windows.Forms.FormWindowState.Minimized)
				this.Hide();
		}

		private void timerGetCurrVersion_Tick(object sender, System.EventArgs e)
		{
		//	showCurrVersion();
		}

        private void FormMain_Load(object sender, EventArgs e)
        {

        }

        private void treeView1_MouseClick(object sender, MouseEventArgs e)
        {
        }

        private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            this.panelMain.Controls.Clear();
            switch ( e.Node.Name )
            {
                case "NodeServerUDP":
                    LanMsgServer.Controls.tabServerProperties tabs = new LanMsgServer.Controls.tabServerProperties();
                    tabs.Disposed += new EventHandler(tabs_Disposed);
                    tabs.Dock=DockStyle.Fill;
                    this.panelMain.Controls.Add(tabs);
                    break;
                case "NodeLanMsg":
                    IMLibrary.MyExtRichTextBox richbox=new IMLibrary.MyExtRichTextBox();
                    richbox.BorderStyle = BorderStyle.None ;
                    richbox.BackColor = Control.DefaultBackColor;
                    richbox.Dock = DockStyle.Fill;
                    ResourceManager rm = new ResourceManager("LanMsgServer.Properties.Resources", Assembly.GetExecutingAssembly());
                    richbox.AppendRtf(rm.GetString("StringIn"));
                    this.panelMain.Controls.Add(richbox);
                    break;
                default:
                    
                    break;
            }

        }

        void tabs_Disposed(object sender, EventArgs e)
        {
            this.Text ="delete";
        }

        private void MenuControlServer_Click(object sender, EventArgs e)
        {
            FormConnectionServer fcs = new FormConnectionServer();
            fcs.ShowDialog(this);
            if (fcs.IsDispose  ==  true ) return;
            try
            {
                System.Net.IPAddress serverIp = System.Net.IPAddress.Parse(fcs.TextBoxIp.Text);
            }
            catch 
            {
                MessageBox.Show("无效的IP地址!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information );
                return;
            }
             

        }

         
	}
}	

⌨️ 快捷键说明

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