This commit is contained in:
@@ -45,6 +45,13 @@ namespace Volian.Controls.Library
|
||||
tabItem.MyStepTabPanel.MyStepTabRibbon.Expanded = _RibbonExpanded;
|
||||
}
|
||||
}
|
||||
private ItemInfo _MyCopyStep;
|
||||
|
||||
public ItemInfo MyCopyStep
|
||||
{
|
||||
get { return _MyCopyStep; }
|
||||
set { _MyCopyStep = value; }
|
||||
}
|
||||
#endregion
|
||||
#region Events
|
||||
/// <summary>
|
||||
@@ -180,6 +187,12 @@ namespace Volian.Controls.Library
|
||||
if (WordSectionDeleted != null) WordSectionDeleted(sender, args);
|
||||
else MessageBox.Show("Cannot delete associated Word section");
|
||||
}
|
||||
public event StepPanelItemPastedEvent ItemPaste;
|
||||
internal void OnItemPaste(object sender, vlnTreeItemInfoPasteEventArgs args)
|
||||
{
|
||||
if (ItemPaste != null) ItemPaste(sender, args);
|
||||
else MessageBox.Show("Cannot adjust panels for pasted item");
|
||||
}
|
||||
#endregion
|
||||
#region Contructor & Setup
|
||||
public DisplayTabControl()
|
||||
@@ -288,6 +301,38 @@ namespace Volian.Controls.Library
|
||||
else // Otherwise open it in the Word editor
|
||||
return OpenDSOTabPage(myItemInfo);
|
||||
}
|
||||
public bool PasteStepItem(ItemInfo myItemInfo, int copyStartID, ItemInfo.EAddpingPart pasteType, int type)
|
||||
{
|
||||
CleanUpClosedItems();
|
||||
ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item
|
||||
string key = "Item - " + proc.ItemID.ToString();
|
||||
|
||||
if (_MyDisplayTabItems.ContainsKey(key)) // If procedure page open use it
|
||||
{
|
||||
DisplayTabItem pg = _MyDisplayTabItems[key];
|
||||
if (pg.MyStepTabPanel.MyStepPanel._LookupStepItems.ContainsKey(myItemInfo.ItemID))
|
||||
{
|
||||
StepItem stpitm = pg.MyStepTabPanel.MyStepPanel._LookupStepItems[myItemInfo.ItemID];
|
||||
switch (pasteType)
|
||||
{
|
||||
case ItemInfo.EAddpingPart.Before:
|
||||
stpitm.PasteSiblingBefore(copyStartID);
|
||||
break;
|
||||
case ItemInfo.EAddpingPart.After:
|
||||
stpitm.PasteSiblingAfter(copyStartID);
|
||||
break;
|
||||
case ItemInfo.EAddpingPart.Replace:
|
||||
stpitm.PasteReplace(copyStartID);
|
||||
stpitm.Dispose();
|
||||
break;
|
||||
default:
|
||||
return false; ;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public bool DeleteStepItem(ItemInfo myItemInfo)
|
||||
{
|
||||
CleanUpClosedItems();
|
||||
|
Reference in New Issue
Block a user