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

📄 formsendmsggroup.cs

📁 该即时通讯系统系统能够实现像QQ一样的通讯功能
💻 CS
📖 第 1 页 / 共 2 页
字号:
			this.panel2.Dock = System.Windows.Forms.DockStyle.Right;
			this.panel2.Location = new System.Drawing.Point(490, 24);
			this.panel2.Name = "panel2";
			this.panel2.Size = new System.Drawing.Size(8, 299);
			this.panel2.TabIndex = 50;
			// 
			// panel3
			// 
			this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
			this.panel3.Location = new System.Drawing.Point(10, 24);
			this.panel3.Name = "panel3";
			this.panel3.Size = new System.Drawing.Size(480, 8);
			this.panel3.TabIndex = 51;
			// 
			// panel4
			// 
			this.panel4.Dock = System.Windows.Forms.DockStyle.Bottom;
			this.panel4.Location = new System.Drawing.Point(10, 315);
			this.panel4.Name = "panel4";
			this.panel4.Size = new System.Drawing.Size(480, 8);
			this.panel4.TabIndex = 52;
			// 
			// RTBSendContent
			// 
			this.dotNetBarManager1.SetContextMenuEx(this.RTBSendContent, "ButtonItem1");
			this.RTBSendContent.Dock = System.Windows.Forms.DockStyle.Fill;
			this.RTBSendContent.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.RTBSendContent.HiglightColor = LanMsg.RtfColor.White;
			this.RTBSendContent.Location = new System.Drawing.Point(10, 32);
			this.RTBSendContent.MaxLength = 1000;
			this.RTBSendContent.Name = "RTBSendContent";
			this.RTBSendContent.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
			this.RTBSendContent.Size = new System.Drawing.Size(480, 283);
			this.RTBSendContent.TabIndex = 53;
			this.RTBSendContent.Text = "";
			this.RTBSendContent.TextColor = LanMsg.RtfColor.Black;
			this.RTBSendContent.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.RTBSendContent_LinkClicked);
			// 
			// dotNetBarManager1
			// 
			this.dotNetBarManager1.AutoDispatchShortcuts.Add(DevComponents.DotNetBar.eShortcut.F1);
			this.dotNetBarManager1.AutoDispatchShortcuts.Add(DevComponents.DotNetBar.eShortcut.CtrlC);
			this.dotNetBarManager1.AutoDispatchShortcuts.Add(DevComponents.DotNetBar.eShortcut.CtrlA);
			this.dotNetBarManager1.AutoDispatchShortcuts.Add(DevComponents.DotNetBar.eShortcut.CtrlV);
			this.dotNetBarManager1.AutoDispatchShortcuts.Add(DevComponents.DotNetBar.eShortcut.CtrlX);
			this.dotNetBarManager1.AutoDispatchShortcuts.Add(DevComponents.DotNetBar.eShortcut.CtrlZ);
			this.dotNetBarManager1.AutoDispatchShortcuts.Add(DevComponents.DotNetBar.eShortcut.CtrlY);
			this.dotNetBarManager1.AutoDispatchShortcuts.Add(DevComponents.DotNetBar.eShortcut.Del);
			this.dotNetBarManager1.AutoDispatchShortcuts.Add(DevComponents.DotNetBar.eShortcut.Ins);
			this.dotNetBarManager1.BottomDockSite = this.barBottomDockSite;
			this.dotNetBarManager1.DefinitionName = "FormSendMsgGroup.dotNetBarManager1.xml";
			this.dotNetBarManager1.EnableFullSizeDock = false;
			this.dotNetBarManager1.LeftDockSite = this.barLeftDockSite;
			this.dotNetBarManager1.ParentForm = this;
			this.dotNetBarManager1.RightDockSite = this.barRightDockSite;
			this.dotNetBarManager1.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
			this.dotNetBarManager1.ThemeAware = false;
			this.dotNetBarManager1.TopDockSite = this.barTopDockSite;
			this.dotNetBarManager1.ItemClick += new System.EventHandler(this.dotNetBarManager1_ItemClick);
			// 
			// barLeftDockSite
			// 
			this.barLeftDockSite.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
			this.barLeftDockSite.Dock = System.Windows.Forms.DockStyle.Left;
			this.barLeftDockSite.Location = new System.Drawing.Point(2, 2);
			this.barLeftDockSite.Name = "barLeftDockSite";
			this.barLeftDockSite.NeedsLayout = false;
			this.barLeftDockSite.Size = new System.Drawing.Size(0, 346);
			this.barLeftDockSite.TabIndex = 54;
			this.barLeftDockSite.TabStop = false;
			// 
			// barRightDockSite
			// 
			this.barRightDockSite.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
			this.barRightDockSite.Dock = System.Windows.Forms.DockStyle.Right;
			this.barRightDockSite.Location = new System.Drawing.Point(498, 2);
			this.barRightDockSite.Name = "barRightDockSite";
			this.barRightDockSite.NeedsLayout = false;
			this.barRightDockSite.Size = new System.Drawing.Size(0, 346);
			this.barRightDockSite.TabIndex = 55;
			this.barRightDockSite.TabStop = false;
			// 
			// barTopDockSite
			// 
			this.barTopDockSite.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
			this.barTopDockSite.Dock = System.Windows.Forms.DockStyle.Top;
			this.barTopDockSite.Location = new System.Drawing.Point(2, 2);
			this.barTopDockSite.Name = "barTopDockSite";
			this.barTopDockSite.NeedsLayout = false;
			this.barTopDockSite.Size = new System.Drawing.Size(496, 0);
			this.barTopDockSite.TabIndex = 56;
			this.barTopDockSite.TabStop = false;
			// 
			// barBottomDockSite
			// 
			this.barBottomDockSite.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
			this.barBottomDockSite.Dock = System.Windows.Forms.DockStyle.Bottom;
			this.barBottomDockSite.Location = new System.Drawing.Point(2, 348);
			this.barBottomDockSite.Name = "barBottomDockSite";
			this.barBottomDockSite.NeedsLayout = false;
			this.barBottomDockSite.Size = new System.Drawing.Size(496, 0);
			this.barBottomDockSite.TabIndex = 57;
			this.barBottomDockSite.TabStop = false;
			// 
			// FormSendMsgGroup
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(500, 350);
			this.Controls.Add(this.RTBSendContent);
			this.Controls.Add(this.panel4);
			this.Controls.Add(this.panel3);
			this.Controls.Add(this.panel2);
			this.Controls.Add(this.panel1);
			this.Controls.Add(this.bar1);
			this.Controls.Add(this.ribbonControl1);
			this.Controls.Add(this.barLeftDockSite);
			this.Controls.Add(this.barRightDockSite);
			this.Controls.Add(this.barTopDockSite);
			this.Controls.Add(this.barBottomDockSite);
			this.DockPadding.Bottom = 2;
			this.DockPadding.Left = 2;
			this.DockPadding.Right = 2;
			this.DockPadding.Top = 2;
			this.MinimumSize = new System.Drawing.Size(500, 350);
			this.Name = "FormSendMsgGroup";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "消息群发";
			this.TopMost = true;
			this.Closing += new System.ComponentModel.CancelEventHandler(this.FormSendMsgGroup_Closing);
			((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		private void butSendMsg_Click(object sender, System.EventArgs e)
		{
			if(this.RTBSendContent.Text.Trim()=="")
			{
					MessageBox.Show("不能发送空消息。","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
				    return;
			}
			this.FormMain.formMain.MsgAddToDB(this.RTBSendContent.Text.TrimEnd(),this.FormMain.formMain.selfInfo.ID,"",this.FormMain.formMain.selfInfo.AssemblyVersion ,System.DateTime.Now.ToString(),"",false);
            this.FormMain.formMain.sendNotice(new Controls.ClassMsg(7,"",System.Text.Encoding.Unicode.GetBytes(this.RTBSendContent.Text.TrimEnd())));
			MessageBox.Show("消息已经发送。","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
			this.RTBSendContent.Clear();
			this.Close();
			this.Dispose();
		}

		private void butSave_Click(object sender, System.EventArgs e)
		{
		   System.Windows.Forms.SaveFileDialog fd=new SaveFileDialog ();
			fd.Filter="写字板文档(*.rtf)|*.rtf";
			if(fd.ShowDialog()==System.Windows.Forms.DialogResult.OK)
			{
                this.RTBSendContent.SaveFile(fd.FileName,System.Windows.Forms.RichTextBoxStreamType.RichText );
			}
		}

		private void FormSendMsgGroup_Closing(object sender, System.ComponentModel.CancelEventArgs e)
		{
			FormMain.formMain.TvUsers.CheckBoxes=false;
		}

		private void RTBSendContent_LinkClicked(object sender, System.Windows.Forms.LinkClickedEventArgs e)
		{
			try
			{
				System.Diagnostics.Process.Start(e.LinkText);
			}
			catch 
			{
				MessageBox.Show("无法打开链接。","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
			}
		}

		private void dotNetBarManager1_ItemClick(object sender, System.EventArgs e)
		{
			switch((sender as DevComponents.DotNetBar.ButtonItem ).Name )
			{
				case "复制"	:
					if(this.RTBSendContent.Focus())
						this.RTBSendContent.Copy (); 
					break;
				case "粘贴"	:
					if(this.RTBSendContent.Focus())
						this.RTBSendContent.Paste (); 
					break;
				case "全选"	:
					if(this.RTBSendContent.Focus())
						this.RTBSendContent.SelectAll (); 
					break;
				case "剪切"	:
					if(this.RTBSendContent.Focus())
						this.RTBSendContent.Cut (); 
					break;

			}		
		}

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>


	}
}

⌨️ 快捷键说明

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