added tool tips reflecting the step type to each step item

This commit is contained in:
John Jenko 2009-12-14 15:43:56 +00:00
parent d284c74eaf
commit 5e6c39ed26
3 changed files with 24 additions and 3 deletions

View File

@ -115,15 +115,33 @@ namespace Volian.Controls.Library
{
_MyItemInfo = value;
int typ = (int)value.MyContent.Type;
if (typ >= 20000)
int subType = typ % 10000;
if (MyItemInfo.IsStep)
{
int stepType = typ % 10000;
_MyStepData = value.ActiveFormat.PlantFormat.FormatData.StepDataList[stepType];
_MyStepData = value.ActiveFormat.PlantFormat.FormatData.StepDataList[subType];
SetToolTip(_MyStepData.Type);
}
else if (MyItemInfo.IsSection)
{
SetToolTip(value.ActiveFormat.PlantFormat.DocStyles.DocStyleList[subType].Name);
}
else if (MyItemInfo.IsProcedure)
{
SetToolTip("Procedure Title");
}
ChangeBar = _MyItemInfo.HasChangeBar();
value.MyContent.Changed += new ContentInfoEvent(MyContent_Changed);
}
}
private void SetToolTip(string tip)
{
DevComponents.DotNetBar.SuperTooltipInfo tpi = new DevComponents.DotNetBar.SuperTooltipInfo("", "", tip, null, null, DevComponents.DotNetBar.eTooltipColor.Lemon);
_MyToolTip.MinimumTooltipSize = new Size(0, 24);
_MyToolTip.TooltipDuration = 3;
_MyToolTip.SetSuperTooltip(MyStepRTB, tpi);
}
public StepItem ActiveParent
{
get { return _MyParentStepItem!=null ? _MyParentStepItem : _MyPreviousStepItem.ActiveParent; }

Binary file not shown.

View File

@ -120,6 +120,9 @@
<metadata name="lblTab.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="_MyToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>148, 17</value>
</metadata>
<metadata name="_MyStepRTB.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>