diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index e1fc27a3..b391de18 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -166,6 +166,12 @@ namespace VEPROMS.CSLA.Library Save(); } } + // RHM Moving Change + //else + //{ + // MyPrevious = null; + // Save(); + //} // newPreviousInfo == null if moving into first child, and wasfirstchild == true if moving out of first child. // This will require adjusting the DocVersion to point to the correct first child if a procedure is moved. if (newPreviousInfo == null || wasfirstchild) @@ -2688,10 +2694,8 @@ namespace VEPROMS.CSLA.Library // 'bb', 'cc'. The Westinghouse work required this and 16bit was tested and it worked the // same way as the Westinghouse requirement. The original code to do 'aa', 'ab' was left here, // commented out, in case a future plant needs it and then should tie it to a format flag. - // And Westinghouse had so many steps, added in to do 'aaa' - if (number > 52) retval += Letter(1 + ((number - 1) % 52)); - if (number > 26) retval += Letter(1 + ((number - 1) % 26)); // Letter((number - 1) / 26); - retval += Letter(1 + ((number - 1) % 26)); + // Changed logic to support unlimited cases ('aa','aaa','aaaa', etc.) + retval = retval.PadRight(1 + ((number-1)/26), Letter(1 + ((number - 1) % 26))[0]); return retval; } private string Letter(int number) diff --git a/PROMS/Volian.Controls.Library/DisplayHistory.cs b/PROMS/Volian.Controls.Library/DisplayHistory.cs index c7f6177e..da188926 100644 --- a/PROMS/Volian.Controls.Library/DisplayHistory.cs +++ b/PROMS/Volian.Controls.Library/DisplayHistory.cs @@ -575,6 +575,7 @@ namespace Volian.Controls.Library } private void btnRestore_Click(object sender, EventArgs e) { + MyEditItem.SaveContents(); TreeNode tn = tvAudits.SelectedNode; if (tn.Tag is ContentAuditInfo) { diff --git a/PROMS/Volian.Controls.Library/RTBItem.cs b/PROMS/Volian.Controls.Library/RTBItem.cs index 2c9de3ee..c8452997 100644 --- a/PROMS/Volian.Controls.Library/RTBItem.cs +++ b/PROMS/Volian.Controls.Library/RTBItem.cs @@ -863,7 +863,7 @@ namespace Volian.Controls.Library if(MyStepPanel.AutoExpand) CanExpand = itemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && itemInfo.HasChildren; // TemporaryFormat.IsHigh(item); ; else - CanExpand = true; + CanExpand = itemInfo.HasChildren; break; default://Procedures cannot expand, because they automatically expand CanExpand = false; diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 3846cfed..d9863220 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -99,17 +99,23 @@ namespace Volian.Controls.Library private Dictionary MyAvailableROs; public void SetContextMenu() { - #region set up save ro menu jcb 20121221 + AddWROContext(btnCMRtfEdit); + _ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfEdit); + } + + #region set up save ro menu jcb 20121221 + private void AddWROContext(DevComponents.DotNetBar.ButtonItem myButtonItem) + { MyAvailableROs = new Dictionary(); DevComponents.DotNetBar.BaseItem btnSaveRO = null; - if (!btnCMRtfEdit.SubItems.Contains("btnSaveRO")) + if (!myButtonItem.SubItems.Contains("btnSaveRO")) { btnSaveRO = new DevComponents.DotNetBar.ButtonItem("btnSaveRO", "Save RO"); btnSaveRO.Visible = false; - btnCMRtfEdit.SubItems.Add(btnSaveRO); + myButtonItem.SubItems.Add(btnSaveRO); } else - btnSaveRO = btnCMRtfEdit.SubItems["btnSaveRO"]; + btnSaveRO = myButtonItem.SubItems["btnSaveRO"]; if (Clipboard.ContainsData(System.Windows.Forms.DataFormats.Text)) { MyLookupData = Clipboard.GetData(System.Windows.Forms.DataFormats.Text).ToString(); @@ -147,9 +153,8 @@ namespace Volian.Controls.Library } } } - #endregion - _ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfEdit); } + #endregion private bool IsValidRO(string data) { bool rv = false; @@ -320,6 +325,7 @@ namespace Volian.Controls.Library public void SetGridCellContextMenu() { + AddWROContext(btnCMRtfCellEdit); _ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfCellEdit); } public void SetGridContextMenu()