diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 491596fb..7827da74 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -3286,10 +3286,12 @@ namespace Volian.Controls.Library break; case "InsRNO": displayMenu = ((actable & E_AccStep.AddingRNO) > 0) && btnCMInsRNO.Enabled; + LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingRNO,"RNO"); // B2018-014 Inform user that they cannot add the specified step type _ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsRNO); break; case "InsSubStps": displayMenu = ((actable & E_AccStep.AddingSub) > 0) && btnCMInsSubStps.Enabled; + LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingSub,"Sub-step"); // B2018-014 Inform user that they cannot add the specified step type _ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsSubStps); if (displayMenu) Cursor.Position = new Point(0, 0); // Enter Key hit, move mouse pointer out of way of context menu foreach (DevComponents.DotNetBar.ButtonItem bi in btnCMInsSubStps.SubItems) @@ -3304,22 +3306,27 @@ namespace Volian.Controls.Library break; case "InsCaution": displayMenu = ((actable & E_AccStep.AddingCaution) > 0) && btnCMInsCaution.Enabled; + LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingCaution,"Caution"); // B2018-014 Inform user that they cannot add the specified step type _ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsCaution); break; case "InsNote": displayMenu = ((actable & E_AccStep.AddingNote) > 0) && btnCMInsNote.Enabled; + LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingNote,"Note"); // B2018-014 Inform user that they cannot add the specified step type _ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsNote); break; case "InsTable": displayMenu = ((actable & E_AccStep.AddingTable) > 0) && btnCMInsTable.Enabled; + LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingTable,"Table"); // B2018-014 Inform user that they cannot add the specified step type _ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsTable); break; case "InsFigure": displayMenu = ((actable & E_AccStep.AddingTable) > 0) && btnCMInsFigure.Enabled; + LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingTable,"Figure"); // B2018-014 Inform user that they cannot add the specified step type _ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsFigure); break; case "InsEquation": displayMenu = ((actable & E_AccStep.AddingTable) > 0) && btnCMInsEquation.Enabled; + LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingTable,"Equation"); // B2018-014 Inform user that they cannot add the specified step type _ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsEquation); break; case "StepPaste": @@ -3340,7 +3347,13 @@ namespace Volian.Controls.Library } } } - + private void LetUserKnowIfTheyCannotAdd(E_AccStep? actable, E_AccStep e_AccStep, string stepType) // B2018-014 Inform user that they cannot add the specified step type + { + if ((actable & e_AccStep) > 0) return; + string msg = string.Format("Cannot add a {0} to this step type. If this is desired please contact Volian to change your format", stepType); + string cpt = string.Format("Cannot add {0}", stepType); + MessageBox.Show(msg, cpt, MessageBoxButtons.OK, MessageBoxIcon.Information); + } private void btnSpell_Click(object sender, EventArgs e) { //MessageBox.Show("Functionality not available.", "Spell Check");