From 43c319633bcd601408437be631682471cd4a642e Mon Sep 17 00:00:00 2001 From: John Date: Fri, 1 Apr 2016 15:02:57 +0000 Subject: [PATCH] Hide the foldout maintenance tab on the step properties panel when a Word section is the currently active tab --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 31 +++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 27258e48..499dd1d9 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -2968,10 +2968,38 @@ namespace VEPROMS } private ItemInfo _CurrentItem = null; private StepRTB _LastStepRTB = null; + //private Timer _TmrRefreshItem = null; + //public Timer TmrRefreshItem + //{ + // get + // { + // if (_TmrRefreshItem == null) + // { + // _TmrRefreshItem = new Timer(); + // _TmrRefreshItem.Interval = 1000; // one second + // _TmrRefreshItem.Tick += _TmrRefreshItem_Tick; + // } + // return _TmrRefreshItem; + // } + //} + //private StepRTB _RefreshRTB = null; + //void _TmrRefreshItem_Tick(object sender, EventArgs e) + //{ + // _TmrRefreshItem.Enabled = false; + // if (_RefreshRTB != null) _RefreshRTB.Focus(); + //} private void tc_ItemSelectedChanged(object sender, ItemSelectedChangedEventArgs args) { tc.HideTheCaret(); + //if (args.MyEditItem != null) + //Volian.Base.Library.vlnStackTrace.ShowStackLocal(2,10,"Edit item {0}, Step Panel {1}",args.MyEditItem.MyStepRTB.ContainsFocus, args.MyEditItem.MyStepPanel.ContainsFocus); if (args != null && args.MyEditItem != null && !args.MyEditItem.MyStepPanel.ContainsFocus) return; + //if (args != null && args.MyEditItem != null && !args.MyEditItem.MyStepPanel.ContainsFocus) + //{ + // _RefreshRTB = args.MyEditItem.MyStepRTB; + // TmrRefreshItem.Enabled = true; + // return; + //} btnFixMSWord.Visible = (args != null && ( args.MyItemInfo != null && args.MyEditItem == null)); if (_LastStepRTB != null && !_LastStepRTB.Disposing && !_LastStepRTB.Closed) _LastStepRTB.EditModeChanged -= new StepRTBEvent(_LastStepRTB_EditModeChanged); @@ -3009,6 +3037,7 @@ namespace VEPROMS { ctrlAnnotationDetails.Enabled = false; epAnnotations.Enabled = false; + infotabFoldoutMaint.Visible = false; infotabTransition.Visible = false; infotabRO.Visible = false; if (args.MyItemInfo.MyDocVersion.DocVersionAssociations != null) @@ -3023,7 +3052,7 @@ namespace VEPROMS // you opened a procedure // and then created a word section // and then you selected the procedure "Tab" - //infotabHistory.Visible = false; + infotabHistory.Visible = false; displayBookMarks.MyEditItem = null; displayFoldoutMaint.Visible = false; //vlnStackTrace.ShowStack("enter tc_ItemSelectedChanged {0}", _CurrentItem);