This commit is contained in:
parent
6dada0aa06
commit
3248a411b2
@ -45,6 +45,13 @@ namespace Volian.Controls.Library
|
|||||||
tabItem.MyStepTabPanel.MyStepTabRibbon.Expanded = _RibbonExpanded;
|
tabItem.MyStepTabPanel.MyStepTabRibbon.Expanded = _RibbonExpanded;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private ItemInfo _MyCopyStep;
|
||||||
|
|
||||||
|
public ItemInfo MyCopyStep
|
||||||
|
{
|
||||||
|
get { return _MyCopyStep; }
|
||||||
|
set { _MyCopyStep = value; }
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Events
|
#region Events
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -180,6 +187,12 @@ namespace Volian.Controls.Library
|
|||||||
if (WordSectionDeleted != null) WordSectionDeleted(sender, args);
|
if (WordSectionDeleted != null) WordSectionDeleted(sender, args);
|
||||||
else MessageBox.Show("Cannot delete associated Word section");
|
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
|
#endregion
|
||||||
#region Contructor & Setup
|
#region Contructor & Setup
|
||||||
public DisplayTabControl()
|
public DisplayTabControl()
|
||||||
@ -288,6 +301,38 @@ namespace Volian.Controls.Library
|
|||||||
else // Otherwise open it in the Word editor
|
else // Otherwise open it in the Word editor
|
||||||
return OpenDSOTabPage(myItemInfo);
|
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)
|
public bool DeleteStepItem(ItemInfo myItemInfo)
|
||||||
{
|
{
|
||||||
CleanUpClosedItems();
|
CleanUpClosedItems();
|
||||||
|
@ -68,7 +68,7 @@ namespace Volian.Controls.Library
|
|||||||
private bool StepOverRide()
|
private bool StepOverRide()
|
||||||
{
|
{
|
||||||
ItemInfo myparent = _CurItemInfo.MyActiveParent as ItemInfo;
|
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
|
// does the high level step of an RNO have a checkoff, if so it
|
||||||
// can be overridden?
|
// can be overridden?
|
||||||
@ -103,7 +103,7 @@ namespace Volian.Controls.Library
|
|||||||
cmbCheckoff.Enabled = true;
|
cmbCheckoff.Enabled = true;
|
||||||
if ((_CurItemInfo.IsCaution || _CurItemInfo.IsNote) & !fmtdata.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
|
if ((_CurItemInfo.IsCaution || _CurItemInfo.IsNote) & !fmtdata.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
|
||||||
cmbCheckoff.Enabled = false;
|
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.
|
cmbCheckoff.Enabled = false; // Checkoffs already assigned to RNO.
|
||||||
if (StepOverRide()) cmbCheckoff.Enabled = false; // Checkoffs already assigned to AER
|
if (StepOverRide()) cmbCheckoff.Enabled = false; // Checkoffs already assigned to AER
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ namespace Volian.Controls.Library
|
|||||||
//int tmpi = formatSteptype;
|
//int tmpi = formatSteptype;
|
||||||
// RNO is a special case in that it has a parent type of high, for formatting, but does not walk
|
// 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....
|
// 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.Items.Clear();
|
||||||
listBoxStepTypes.SelectedIndex = DoListStepTypes(fmtdata, top, fmtdata.StepDataList[formatSteptype].Type);
|
listBoxStepTypes.SelectedIndex = DoListStepTypes(fmtdata, top, fmtdata.StepDataList[formatSteptype].Type);
|
||||||
lblNoTypeChgReason.Visible = !(listBoxStepTypes.Items.Count>0);
|
lblNoTypeChgReason.Visible = !(listBoxStepTypes.Items.Count>0);
|
||||||
|
@ -429,7 +429,7 @@ namespace Volian.Controls.Library
|
|||||||
Item itm2 = null;
|
Item itm2 = null;
|
||||||
if (dte.Type == E_TextElementType.TransitionRange)
|
if (dte.Type == E_TextElementType.TransitionRange)
|
||||||
{
|
{
|
||||||
itm2 = Item.Get(System.Convert.ToInt32(tparts[2]));
|
itm2 = Item.Get(System.Convert.ToInt32(tparts[3]));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
itm2 = itm1;
|
itm2 = itm1;
|
||||||
@ -711,7 +711,13 @@ namespace Volian.Controls.Library
|
|||||||
if (link.IndexOf("<NewID>") != -1) return text;
|
if (link.IndexOf("<NewID>") != -1) return text;
|
||||||
int transitionID = Convert.ToInt32(link.Split(" ".ToCharArray())[1]);
|
int transitionID = Convert.ToInt32(link.Split(" ".ToCharArray())[1]);
|
||||||
// Find the transition
|
// 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)
|
foreach (TransitionInfo ti in _MyItemInfo.MyContent.ContentTransitions)
|
||||||
{
|
{
|
||||||
if (ti.TransitionID == transitionID)
|
if (ti.TransitionID == transitionID)
|
||||||
@ -771,7 +777,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
if (vte.TextAndLink.Contains("(Resolved Transition Text)"))
|
if (vte.TextAndLink.Contains("(Resolved Transition Text)"))
|
||||||
vte.TextAndLink = vte.TextAndLink.Replace("(Resolved Transition Text)", tmptxt);
|
vte.TextAndLink = vte.TextAndLink.Replace("(Resolved Transition Text)", tmptxt);
|
||||||
else
|
else
|
||||||
if (vte.Text != tmptxt)
|
if (vte.Text != tmptxt)
|
||||||
vte.Text = tmptxt;
|
vte.Text = tmptxt;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user