C2021-021 Set the Find/Replace button text, and tool tip based on whether the user has write privileges.

This commit is contained in:
John Jenko 2021-04-06 19:25:25 +00:00
parent 85a971482e
commit 67a29d4daa

View File

@ -3120,6 +3120,15 @@ namespace Volian.Controls.Library
//#endif //#endif
#endregion #endregion
// C2021-021 change the tool tip for the Find and Find/Replace button based on the user's accessibility to the procedure.
// also change the text on the buttons to read either Find or Find/Replace
public void ToggleFindReplaceToolTip(bool isReviewer)
{
string tipMsg = string.Format("Find {0} [Ctrl] [F]", isReviewer ? "" : "/ Replace");
superTooltipRibbon.SetSuperTooltip(btnReviewFind, new DevComponents.DotNetBar.SuperTooltipInfo(tipMsg, "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
superTooltipRibbon.SetSuperTooltip(btnFindRplDlg, new DevComponents.DotNetBar.SuperTooltipInfo(tipMsg, "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
btnFindRplDlg.Text = btnReviewFind.Text = (isReviewer)?"Find": "Find /\r\nReplace";
}
public void SetupReviewerMode() public void SetupReviewerMode()
{ {
if (MyEditItem != null && MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit) if (MyEditItem != null && MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit)