Enhanced: Create new enhanced steps; unlink an enhanced step; link to existing

This commit is contained in:
Kathy Ruffing 2016-05-09 11:32:52 +00:00
parent 609ddb1962
commit be3fb618b6

View File

@ -1399,9 +1399,19 @@ namespace Volian.Controls.Library
} }
} }
} }
public void AddMissingEnhancedStep(ItemInfo ii, int EnhType) public void CreateLinksEnhancedSteps(ItemInfo srcII, ItemInfo enhII, int enhtype)
{ {
// if the missing enhanced step is a cuation or note, check that parent HLS has the needed srcII.DoCreateLinksEnhancedSteps(enhII, enhtype);
SetFocus();
}
public void UnlinkEnhanced(ItemInfo enhII)
{
enhII.DoUnlinkEnhanced(enhII);
SetFocus();
}
public ItemInfo AddMissingEnhancedStep(ItemInfo ii, int EnhType)
{
// if the missing enhanced step is a caution or note, check that parent HLS has the needed
// enhanced step to insert the caution/note from. If not, do a message. // enhanced step to insert the caution/note from. If not, do a message.
if (ii.IsCaution || ii.IsNote) if (ii.IsCaution || ii.IsNote)
{ {
@ -1418,13 +1428,14 @@ namespace Volian.Controls.Library
if (!canMakeMissingStep) if (!canMakeMissingStep)
{ {
MessageBox.Show("Cannot create the missing enhanced step, the Enhanced Step for the High Level step must be created first."); MessageBox.Show("Cannot create the missing enhanced step, the Enhanced Step for the High Level step must be created first.");
return; return null;
} }
} }
ItemInfo newEnh = ii.DoAddMissingEnhancedSteps(EnhType); ItemInfo newEnh = ii.DoAddMissingEnhancedItems(EnhType);
// if enhanced items were created, then see if they need displayed: // if enhanced items were created, then see if they need displayed:
if (newEnh != null) AddAllEnhancedItemsToDisplay(MyItemInfo); if (newEnh != null) AddAllEnhancedItemsToDisplay(MyItemInfo);
SetFocus(); SetFocus();
return newEnh;
} }
private string GetChangeId(ItemInfo iiDest) private string GetChangeId(ItemInfo iiDest)
{ {