📄 formmsgmis.cs
字号:
//
// ButUp
//
this.ButUp.Enabled = false;
this.ButUp.ImageIndex = 15;
this.ButUp.ToolTipText = "上一页";
//
// ButDown
//
this.ButDown.Enabled = false;
this.ButDown.ImageIndex = 14;
this.ButDown.ToolTipText = "下一页";
//
// ButLast
//
this.ButLast.Enabled = false;
this.ButLast.ImageIndex = 15;
this.ButLast.ToolTipText = "最后一页";
//
// toolBarButton2
//
this.toolBarButton2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// ButDelRecord
//
this.ButDelRecord.Enabled = false;
this.ButDelRecord.ImageIndex = 19;
this.ButDelRecord.ToolTipText = "删除记录";
//
// imageList1
//
this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.White;
//
// statusBar1
//
this.statusBar1.Location = new System.Drawing.Point(0, 403);
this.statusBar1.Name = "statusBar1";
this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
this.statusBarPanel1,
this.statusBarPanel2});
this.statusBar1.ShowPanels = true;
this.statusBar1.Size = new System.Drawing.Size(632, 22);
this.statusBar1.TabIndex = 1;
//
// statusBarPanel1
//
this.statusBarPanel1.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
this.statusBarPanel1.MinWidth = 300;
this.statusBarPanel1.Width = 416;
//
// statusBarPanel2
//
this.statusBarPanel2.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Contents;
this.statusBarPanel2.MinWidth = 200;
this.statusBarPanel2.Width = 200;
//
// panel2
//
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(4, 28);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(628, 4);
this.panel2.TabIndex = 4;
//
// panel1
//
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
this.panel1.Location = new System.Drawing.Point(0, 28);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(4, 375);
this.panel1.TabIndex = 3;
//
// panel3
//
this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel3.Location = new System.Drawing.Point(4, 399);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(628, 4);
this.panel3.TabIndex = 5;
//
// panel4
//
this.panel4.Dock = System.Windows.Forms.DockStyle.Right;
this.panel4.Location = new System.Drawing.Point(628, 32);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(4, 367);
this.panel4.TabIndex = 6;
//
// TV_user
//
this.TV_user.Dock = System.Windows.Forms.DockStyle.Left;
this.TV_user.ImageIndex = -1;
this.TV_user.Location = new System.Drawing.Point(4, 32);
this.TV_user.Name = "TV_user";
this.TV_user.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
new System.Windows.Forms.TreeNode("所有人员 ", new System.Windows.Forms.TreeNode[] {
new System.Windows.Forms.TreeNode("部门"),
new System.Windows.Forms.TreeNode("部门"),
new System.Windows.Forms.TreeNode("部门"),
new System.Windows.Forms.TreeNode("部门"),
new System.Windows.Forms.TreeNode("部门"),
new System.Windows.Forms.TreeNode("部门"),
new System.Windows.Forms.TreeNode("部门"),
new System.Windows.Forms.TreeNode("部门"),
new System.Windows.Forms.TreeNode("部门"),
new System.Windows.Forms.TreeNode("部门"),
new System.Windows.Forms.TreeNode("未知")}),
new System.Windows.Forms.TreeNode("通知消息")});
this.TV_user.SelectedImageIndex = -1;
this.TV_user.Size = new System.Drawing.Size(148, 367);
this.TV_user.TabIndex = 7;
this.TV_user.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.TV_user_AfterSelect);
//
// splitter1
//
this.splitter1.Location = new System.Drawing.Point(152, 32);
this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(4, 367);
this.splitter1.TabIndex = 8;
this.splitter1.TabStop = false;
//
// panel5
//
this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel5.Controls.Add(this.tabControl1);
this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel5.Location = new System.Drawing.Point(156, 32);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(472, 367);
this.panel5.TabIndex = 9;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(468, 363);
this.tabControl1.TabIndex = 10;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.RTBRecord);
this.tabPage1.Location = new System.Drawing.Point(4, 21);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(460, 338);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "对话记录";
//
// RTBRecord
//
this.RTBRecord.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.RTBRecord.ContextMenu = this.contextMenu1;
this.RTBRecord.Dock = System.Windows.Forms.DockStyle.Fill;
this.RTBRecord.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.RTBRecord.HiglightColor = LanMsg.RtfColor.White;
this.RTBRecord.Location = new System.Drawing.Point(0, 0);
this.RTBRecord.Name = "RTBRecord";
this.RTBRecord.ReadOnly = true;
this.RTBRecord.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.RTBRecord.Size = new System.Drawing.Size(460, 338);
this.RTBRecord.TabIndex = 45;
this.RTBRecord.Text = "";
this.RTBRecord.TextColor = LanMsg.RtfColor.Black;
//
// contextMenu1
//
this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItemCopy,
this.menuItem2,
this.menuItemSelectAll});
//
// menuItemCopy
//
this.menuItemCopy.Index = 0;
this.menuItemCopy.Text = "复制(&C)";
this.menuItemCopy.Click += new System.EventHandler(this.menuItemCopy_Click);
//
// menuItem2
//
this.menuItem2.Index = 1;
this.menuItem2.Text = "-";
//
// menuItemSelectAll
//
this.menuItemSelectAll.Index = 2;
this.menuItemSelectAll.Text = "全选(&A)";
this.menuItemSelectAll.Click += new System.EventHandler(this.menuItemSelectAll_Click);
//
// tabPage2
//
this.tabPage2.Controls.Add(this.listView1);
this.tabPage2.Location = new System.Drawing.Point(4, 21);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(460, 338);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "基本资料";
this.tabPage2.Visible = false;
//
// listView1
//
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader2,
this.columnHeader3});
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listView1.Location = new System.Drawing.Point(0, 0);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(460, 338);
this.listView1.TabIndex = 11;
this.listView1.View = System.Windows.Forms.View.Details;
//
// columnHeader1
//
this.columnHeader1.Text = "项目";
this.columnHeader1.Width = 120;
//
// columnHeader2
//
this.columnHeader2.Text = "内容";
this.columnHeader2.Width = 120;
//
// columnHeader3
//
this.columnHeader3.Text = "备注";
this.columnHeader3.Width = 200;
//
// officeMenus1
//
this.officeMenus1.ImageList = null;
//
// FormMsgMis
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(632, 425);
this.Controls.Add(this.panel5);
this.Controls.Add(this.splitter1);
this.Controls.Add(this.TV_user);
this.Controls.Add(this.panel4);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.statusBar1);
this.Controls.Add(this.toolBar1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Menu = this.mainMenu1;
this.Name = "FormMsgMis";
this.Text = "信息管理器";
this.Load += new System.EventHandler(this.FormMsgMis_Load);
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).EndInit();
this.panel5.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void meuFileExit_Click(object sender, System.EventArgs e)
{
this.Close();
}
private void FormMsgMis_Load(object sender, System.EventArgs e)
{
this.officeMenus1.Start(this);
this.TV_user.ImageList=this.FormMain.formMain.imageList1;
TvRefresh();
}
private void TvRefresh()
{
foreach(LanMsg.ClassUserInfo userinfo in this.FormMain.formMain.MyUsers)
{
System.Windows.Forms.TreeNode Node=new TreeNode();
Node=(userinfo.Node.Clone() as TreeNode);
TV_user.Nodes[0].Nodes[userinfo.Dep].Nodes.Add(Node);
Node.Parent.Tag=userinfo.DepInfo;
Node.Parent.Text=userinfo.DepInfo +"("+Node.Parent.Nodes.Count+")";
}
}
private void TV_user_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
{
this.RTBRecord.Clear();
this.ButLast.Enabled=false;
this.ButDown.Enabled=false;
this.ButFirst.Enabled=false;
this.ButUp.Enabled=false;
this.ButDelRecord.Enabled=false;
this.menuItemEditFirst.Enabled=false;
this.menuItemEditFUp.Enabled=false;
this.menuItemEditDown.Enabled=false;
this.menuItemEditLast.Enabled=false;
this.menuItemEditDelRecord.Enabled=false;
this.PageCount=0;
this.CurrPage=0;
this.firstID =0;
this.LastID=2147483647;
this.statusBar1.Panels[0].Text="正在查看对话记录";
if(e.Node.Parent !=null && e.Node.Parent.Parent!=null)
{
LanMsg.ClassUserInfo userinfo=this.FormMain.formMain.findUser(e.Node.Tag.ToString());
CurrUser=userinfo.ID;
if(userinfo!=null)
this.statusBar1.Panels[0].Text="查看与"+userinfo.DepInfo +" "+ userinfo.UserName +"("+userinfo.ID+") 的对话记录";
else
this.statusBar1.Panels[0].Text="查看与("+e.Node.Tag.ToString()+")的对话记录";
this.PageCount =GetPageCount(e.Node.Tag.ToString(),this.FormMain.formMain.selfInfo.ID,true);
if(this.PageCount>0)
DBRecordToRichTextBox(CurrUser,this.FormMain.formMain.selfInfo.ID,true,false,true,false);
}
else if(e.Node.Parent ==null && e.Node.Nodes.Count==0)
{
CurrUser=this.FormMain.formMain.selfInfo.ID;
this.statusBar1.Panels[0].Text="查看所有通知消息记录";
this.PageCount =GetPageCount(this.FormMain.formMain.selfInfo.ID,this.FormMain.formMain.selfInfo.ID,false);
if(this.PageCount>0)
DBRecordToRichTextBox(CurrUser,CurrUser,false,false,true,false);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -