This commit is contained in:
parent
6dada0aa06
commit
3248a411b2
@ -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();
|
||||
|
@ -68,7 +68,7 @@ namespace Volian.Controls.Library
|
||||
private bool StepOverRide()
|
||||
{
|
||||
ItemInfo myparent = _CurItemInfo.MyActiveParent as ItemInfo;
|
||||
if (_CurItemInfo.IsRNO && myparent !=null && myparent.IsHigh)
|
||||
if (_CurItemInfo.IsRNOPart && myparent !=null && myparent.IsHigh)
|
||||
{
|
||||
// does the high level step of an RNO have a checkoff, if so it
|
||||
// can be overridden?
|
||||
@ -103,7 +103,7 @@ namespace Volian.Controls.Library
|
||||
cmbCheckoff.Enabled = true;
|
||||
if ((_CurItemInfo.IsCaution || _CurItemInfo.IsNote) & !fmtdata.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
|
||||
cmbCheckoff.Enabled = false;
|
||||
if (_CurItemInfo.IsRNO && sc != null && sc.Step_CheckOffIndex != -1 && !fmtdata.StepDataList[formatSteptype].CheckOffSameAsParent)
|
||||
if (_CurItemInfo.IsRNOPart && sc != null && sc.Step_CheckOffIndex != -1 && !fmtdata.StepDataList[formatSteptype].CheckOffSameAsParent)
|
||||
cmbCheckoff.Enabled = false; // Checkoffs already assigned to RNO.
|
||||
if (StepOverRide()) cmbCheckoff.Enabled = false; // Checkoffs already assigned to AER
|
||||
|
||||
@ -184,7 +184,7 @@ namespace Volian.Controls.Library
|
||||
//int tmpi = formatSteptype;
|
||||
// RNO is a special case in that it has a parent type of high, for formatting, but does not walk
|
||||
// up tree to define types that it can be changed into....
|
||||
if (!_CurItemInfo.IsRNO) top = fmtdata.StepTopUnderBase(top, formatSteptype);
|
||||
if (!_CurItemInfo.IsRNOPart) top = fmtdata.StepTopUnderBase(top, formatSteptype);
|
||||
listBoxStepTypes.Items.Clear();
|
||||
listBoxStepTypes.SelectedIndex = DoListStepTypes(fmtdata, top, fmtdata.StepDataList[formatSteptype].Type);
|
||||
lblNoTypeChgReason.Visible = !(listBoxStepTypes.Items.Count>0);
|
||||
|
@ -429,7 +429,7 @@ namespace Volian.Controls.Library
|
||||
Item itm2 = null;
|
||||
if (dte.Type == E_TextElementType.TransitionRange)
|
||||
{
|
||||
itm2 = Item.Get(System.Convert.ToInt32(tparts[2]));
|
||||
itm2 = Item.Get(System.Convert.ToInt32(tparts[3]));
|
||||
}
|
||||
else
|
||||
itm2 = itm1;
|
||||
@ -711,7 +711,13 @@ namespace Volian.Controls.Library
|
||||
if (link.IndexOf("<NewID>") != -1) return text;
|
||||
int transitionID = Convert.ToInt32(link.Split(" ".ToCharArray())[1]);
|
||||
// Find the transition
|
||||
if (_MyItemInfo.MyContent.ContentTransitionCount <= 0) return "*Resolved Transition Text*";
|
||||
if (_MyItemInfo.MyContent.ContentTransitionCount <= 0)
|
||||
{
|
||||
// TODO: RHM 20100310
|
||||
_MyItemInfo.MyContent.RefreshContentTransitions();
|
||||
if (_MyItemInfo.MyContent.ContentTransitionCount <= 0)
|
||||
return "*Resolved Transition Text*";
|
||||
}
|
||||
foreach (TransitionInfo ti in _MyItemInfo.MyContent.ContentTransitions)
|
||||
{
|
||||
if (ti.TransitionID == transitionID)
|
||||
@ -771,7 +777,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (vte.TextAndLink.Contains("(Resolved Transition Text)"))
|
||||
vte.TextAndLink = vte.TextAndLink.Replace("(Resolved Transition Text)", tmptxt);
|
||||
else
|
||||
else
|
||||
if (vte.Text != tmptxt)
|
||||
vte.Text = tmptxt;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user