private void neuTreeView1_MouseUp(object sender, MouseEventArgs e) { Neusoft.FrameWork.WinForms.Controls.NeuContextMenuStrip contextMenu1 = new Neusoft.FrameWork.WinForms.Controls.NeuContextMenuStrip(); contextMenu1.Items.Clear(); if (e.Button == MouseButtons.Right) { Neusoft.HISFC.Models.Registration.Register mnuSelectRegister = null; if (this.neuTreeView1.Visible == true && this.neuTreeView1.SelectedNode != null) { mnuSelectRegister = this.neuTreeView1.SelectedNode.Tag as Neusoft.HISFC.Models.Registration.Register; } if (this.neuTreeView2.Visible == true && this.neuTreeView2.SelectedNode != null) { mnuSelectRegister = this.neuTreeView2.SelectedNode.Tag as Neusoft.HISFC.Models.Registration.Register; } if (mnuSelectRegister != null) { ToolStripMenuItem mnuPatientInfo = new ToolStripMenuItem();//院注次数 mnuPatientInfo.Click += new EventHandler(mnuPatientInfo_Click); mnuPatientInfo.Text = "查看患者信息"; contextMenu1.Items.Add(mnuPatientInfo); } if (this.neuTreeView1.Visible == true) { contextMenu1.Show(this.neuTreeView1, e.X, e.Y); } if (this.neuTreeView2.Visible == true) { contextMenu1.Show(this.neuTreeView2, e.X, e.Y); } } }
/// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器 /// 修改此方法的内容。 /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); FarPoint.Win.Spread.TipAppearance tipAppearance1 = new FarPoint.Win.Spread.TipAppearance(); this.treeView = new System.Windows.Forms.TreeView(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.splitter1 = new System.Windows.Forms.Splitter(); this.panel1 = new System.Windows.Forms.Panel(); this.fpSpread1 = new Neusoft.FrameWork.WinForms.Controls.NeuSpread(); this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView(); this.menuItem1 = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.neuContextMenuStrip1 = new Neusoft.FrameWork.WinForms.Controls.NeuContextMenuStrip(); this.mnuShow = new System.Windows.Forms.ToolStripMenuItem(); this.sQL维护ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).BeginInit(); this.neuContextMenuStrip1.SuspendLayout(); this.SuspendLayout(); // // treeView // this.treeView.Dock = System.Windows.Forms.DockStyle.Left; this.treeView.HideSelection = false; this.treeView.ImageIndex = 0; this.treeView.ImageList = this.imageList1; this.treeView.Location = new System.Drawing.Point(0, 0); this.treeView.Name = "treeView"; this.treeView.SelectedImageIndex = 0; this.treeView.Size = new System.Drawing.Size(188, 416); this.treeView.TabIndex = 0; this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_AfterSelect); this.treeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.treeView_BeforeSelect); // // imageList1 // this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; this.imageList1.ImageSize = new System.Drawing.Size(16, 16); this.imageList1.TransparentColor = System.Drawing.Color.Transparent; // // splitter1 // this.splitter1.Location = new System.Drawing.Point(188, 0); this.splitter1.Name = "splitter1"; this.splitter1.Size = new System.Drawing.Size(4, 416); this.splitter1.TabIndex = 1; this.splitter1.TabStop = false; // // panel1 // this.panel1.Controls.Add(this.fpSpread1); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(192, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(780, 416); this.panel1.TabIndex = 3; // // fpSpread1 // this.fpSpread1.About = "2.5.2007.2005"; this.fpSpread1.AccessibleDescription = ""; this.fpSpread1.BackColor = System.Drawing.Color.White; this.fpSpread1.Dock = System.Windows.Forms.DockStyle.Fill; this.fpSpread1.FileName = ""; this.fpSpread1.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; this.fpSpread1.IsAutoSaveGridStatus = false; this.fpSpread1.IsCanCustomConfigColumn = true; this.fpSpread1.Location = new System.Drawing.Point(0, 0); this.fpSpread1.Name = "fpSpread1"; this.fpSpread1.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] { this.fpSpread1_Sheet1 }); this.fpSpread1.Size = new System.Drawing.Size(780, 416); this.fpSpread1.Style = Neusoft.FrameWork.WinForms.Controls.StyleType.Fixed3D; this.fpSpread1.TabIndex = 0; tipAppearance1.BackColor = System.Drawing.SystemColors.Info; tipAppearance1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); tipAppearance1.ForeColor = System.Drawing.SystemColors.InfoText; this.fpSpread1.TextTipAppearance = tipAppearance1; this.fpSpread1.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; this.fpSpread1.CellDoubleClick += new FarPoint.Win.Spread.CellClickEventHandler(this.fpSpread1_CellDoubleClick); // // fpSpread1_Sheet1 // this.fpSpread1_Sheet1.Reset(); this.fpSpread1_Sheet1.SheetName = "Sheet1"; // Formulas and custom names must be loaded with R1C1 reference style this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1; this.fpSpread1_Sheet1.RowHeader.Columns.Get(0).Width = 37F; this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1; // // menuItem1 // this.menuItem1.Index = -1; this.menuItem1.Text = ""; // // menuItem2 // this.menuItem2.Index = -1; this.menuItem2.Text = ""; // // neuContextMenuStrip1 // this.neuContextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mnuShow, this.sQL维护ToolStripMenuItem }); this.neuContextMenuStrip1.Name = "neuContextMenuStrip1"; this.neuContextMenuStrip1.Size = new System.Drawing.Size(153, 70); this.neuContextMenuStrip1.Style = Neusoft.FrameWork.WinForms.Controls.StyleType.Fixed3D; // // mnuShow // this.mnuShow.Name = "mnuShow"; this.mnuShow.Size = new System.Drawing.Size(152, 22); this.mnuShow.Text = "显示窗口"; this.mnuShow.Click += new System.EventHandler(this.mnuShow_Click_1); // // sQL维护ToolStripMenuItem // this.sQL维护ToolStripMenuItem.Name = "sQL维护ToolStripMenuItem"; this.sQL维护ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.sQL维护ToolStripMenuItem.Text = "SQL维护"; this.sQL维护ToolStripMenuItem.Click += new System.EventHandler(this.单表维护ToolStripMenuItem_Click); // // ucSysFunction // this.Controls.Add(this.panel1); this.Controls.Add(this.splitter1); this.Controls.Add(this.treeView); this.Name = "ucSysFunction"; this.Size = new System.Drawing.Size(972, 416); this.Load += new System.EventHandler(this.ucSysFunction_Load); this.panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).EndInit(); this.neuContextMenuStrip1.ResumeLayout(false); this.ResumeLayout(false); }