From a3ca919a571540300bfb4f04692c6f483efc23f8 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 22 Jan 2015 22:25:50 +0000 Subject: [PATCH] Add right click menu item for a procedure and a folder with a working draft to process transition report. changed how enter button was handled on the item id and content id search textbox on bottom debug bar to eliminate beep --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 60 ++++++++++++++++++---- 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index aee6a21d..6115ddb8 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -282,6 +282,7 @@ namespace VEPROMS tv.ViewPDF += new vlnTreeViewPdfEvent(tv_ViewPDF); displayApplicability.ApplicabilityViewModeChanged += new DisplayApplicability.DisplayApplicabilityEvent(displayApplicability_ApplicabilityViewModeChanged); tv.ExportImportProcedureSets += new vlnTreeViewEvent(tv_ExportImportProcedureSets); + tv.PrintTransitionReport += new vlnTreeViewEvent(tv_PrintTransitionReport); } string tv_GetChangeId(object sender, vlnTreeItemInfoEventArgs args) @@ -299,7 +300,30 @@ namespace VEPROMS ItemInfo ii = tn.VEObject as ItemInfo; tc.MyCopyStep = ii; } - void tv_ExportImportProcedureSets(object sender, vlnTreeEventArgs args) + void tv_PrintTransitionReport(object sender, vlnTreeEventArgs args) + { + FolderInfo fi = null; + ProcedureInfo pi = null; + if ((args.Node as VETreeNode).VEObject is FolderInfo) + fi = (args.Node as VETreeNode).VEObject as FolderInfo; + if ((args.Node as VETreeNode).VEObject is ProcedureInfo) + pi = (args.Node as VETreeNode).VEObject as ProcedureInfo; + if (fi != null) //working with folder + { + dlgTransitionReport dlg = new dlgTransitionReport(fi); + dlg.ShowDialog(this); + } + if (pi != null) //working with procedure + { + this.Cursor = Cursors.WaitCursor; + Application.DoEvents(); + dlgTransitionReport dlg = new dlgTransitionReport(pi); + dlg.ShowDialog(this); + this.Cursor = Cursors.Default; + } + } + + void tv_ExportImportProcedureSets(object sender, vlnTreeEventArgs args) { FolderInfo fi = null; DocVersionInfo dvi = null; @@ -800,6 +824,17 @@ namespace VEPROMS return ((FolderConfig)jj_vetn.VEObject.MyConfig).Title; // get the panel heading } + //private void btnStepRTF_Click(object sender, System.EventArgs e) + //{ + // if (tc.MyStepRTB != null) + // { + // frmStepRTF frm = new frmStepRTF(); + + // frm.MyStepRTB = tc.MyStepRTB; + // frm.Show(); + // } + //} + private SessionInfo MySessionInfo; private System.Threading.Timer MyActivityTimer; private DevComponents.DotNetBar.ButtonItem btnManageSecurity; @@ -885,7 +920,7 @@ namespace VEPROMS //string debugMode = ConfigurationManager.AppSettings["Debug"]; //VlnSettings.DebugMode = bool.Parse(debugMode); // set debug for the Volian.Controls.Library // get the saved location and size of the VE-PROMS appication for this user - this.txtSearch.KeyDown += new KeyEventHandler(txtSearch_KeyDown); + this.txtSearch.KeyPress += new KeyPressEventHandler(txtSearch_KeyPress); if (Settings.Default["Location"] != null) this.Location = Settings.Default.Location; if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size; if (Settings.Default["WindowState"] != null) this.WindowState = Settings.Default.WindowState; @@ -956,18 +991,14 @@ namespace VEPROMS //} } - //void btnBatchRefresh_Click(object sender, EventArgs e) - //{ - // MessageBox.Show("The method or operation is not implemented."); - //} - - void txtSearch_KeyDown(object sender, KeyEventArgs e) + void txtSearch_KeyPress(object sender, KeyPressEventArgs e) { - if(e.KeyCode == Keys.Enter) + if (e.KeyChar == '\r') { + e.Handled = true; ItemInfo ii = null; ContentInfo ci = null; - if(txtSearch.Text.Length > 0) + if (txtSearch.Text.Length > 0) { int id = 0; if (txtSearch.Text.ToUpper().StartsWith("C=")) @@ -979,7 +1010,7 @@ namespace VEPROMS } else { - if(int.TryParse(txtSearch.Text,out id)) + if (int.TryParse(txtSearch.Text, out id)) ii = ItemInfo.Get(id); } if (ii != null) @@ -993,6 +1024,13 @@ namespace VEPROMS } } + //void btnBatchRefresh_Click(object sender, EventArgs e) + //{ + // frmBatchRefresh frm = new frmBatchRefresh(); + // frm.MySessionInfo = MySessionInfo; + // frm.Show(this); + //} + void tmrCloseTabItems_Tick(object sender, EventArgs e) { while (MyCloseTabList.CountDTI > 0)