Changed tool tip to tell user the image size can be changed from the Step Properties panel

Added Change Image Size to context menu
This commit is contained in:
2017-01-19 18:06:50 +00:00
parent 993a22eb5a
commit 21434d576d
4 changed files with 280 additions and 266 deletions

View File

@@ -148,6 +148,8 @@ namespace Volian.Controls.Library
btnCMPasteImage.Enabled = isInBuff;
btnCMEditMode1.Enabled = false; //View mode (irrelevant for images)
btnCMGoTo.Enabled = MyItemInfo!=null && MyItemInfo.MyContent != null && MyItemInfo.MyContent.ContentRoUsageCount > 0;
// B2016-237 added context menu item to change image size
btnCMImgSz.Enabled = MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK"));
_ContextMenuBar.SetContextMenuEx(imgItem, btnCMRtfEdit);
}
private void AddEnhancedDocumentMenu(DevComponents.DotNetBar.ButtonItem myButtonItem, object sender)
@@ -1246,6 +1248,8 @@ namespace Volian.Controls.Library
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = setting && !MyItemInfo.IsInCalvertConditionResponse;
// B2016-237 added context menu item to change image size
btnCMImgSz.Enabled = MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK"));
}
public void SetButtonAndMenuEnabling(bool docontextmenus)
{
@@ -1408,6 +1412,8 @@ namespace Volian.Controls.Library
btnCASCreate.Enabled = false;
else
btnCASCreate.Enabled = (MyEditItem != null) ? (MyEditItem.MyStepPanel.ApplDisplayMode > 0) : false;
// B2016-237 added context menu item to change image size
btnCMImgSz.Enabled = MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK"));
}
// Made a public method so that it can be called when a step is deleted from the tree view.
@@ -1662,6 +1668,8 @@ namespace Volian.Controls.Library
btnInsHLS.SubItems.Clear();
GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.HLS, MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.HLS, btnInsHLS, (int)E_FromType.Step, btnCMInsHLS, docontextmenus);
}
// B2016-237 added context menu item to change image size
btnCMImgSz.Enabled = MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK"));
this.Refresh();
return;
}
@@ -3776,6 +3784,12 @@ namespace Volian.Controls.Library
fiwc.MyStepRTB = this.MyStepRTB;
fiwc.Show();
}
private void btnCMImgSz_Click(object sender, EventArgs e)
{
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Change Image Size");
MyEditItem.MyStepPanel.OnTabDisplay(sender, args);
}
}
public class StepTabRibbonEventArgs : EventArgs
{