This commit is contained in:
parent
3bae38ab21
commit
416eb91ed4
@ -57,12 +57,12 @@ namespace Volian.Controls.Library
|
|||||||
set { _MyStepPanel.SelectedItemInfo = value; }
|
set { _MyStepPanel.SelectedItemInfo = value; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Currently Selected StepItem
|
/// Currently Selected RTBItem
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public StepItem SelectedStepItem
|
public RTBItem SelectedRTBItem
|
||||||
{
|
{
|
||||||
//get { return _MyStepPanel._LookupStepItems[_MyStepPanel.SelectedItemInfo.ItemID]; }
|
//get { return _MyStepPanel._LookupRTBItems[_MyStepPanel.SelectedItemInfo.ItemID]; }
|
||||||
get { return _MyStepPanel.SelectedStepItem; }
|
get { return _MyStepPanel.SelectedRTBItem; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Procedure ItemInfo
|
/// Procedure ItemInfo
|
||||||
@ -81,7 +81,7 @@ namespace Volian.Controls.Library
|
|||||||
public void FindSearchString()
|
public void FindSearchString()
|
||||||
{
|
{
|
||||||
// convert the '-' to the unicode non-breaking dash (\u8209? or \u2011 hex)
|
// convert the '-' to the unicode non-breaking dash (\u8209? or \u2011 hex)
|
||||||
SelectedStepItem.MyStepRTB.Find(SearchString.Replace('-','\u2011'));
|
SelectedRTBItem.MyStepRTB.Find(SearchString.Replace('-','\u2011'));
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Contructors
|
#region Contructors
|
||||||
@ -105,7 +105,7 @@ namespace Volian.Controls.Library
|
|||||||
_MyStepTabRibbon.Location = new System.Drawing.Point(0, 0);
|
_MyStepTabRibbon.Location = new System.Drawing.Point(0, 0);
|
||||||
_MyStepTabRibbon.Name = "displayTabRibbon1";
|
_MyStepTabRibbon.Name = "displayTabRibbon1";
|
||||||
//_MyTabRibbon.MyDisplayRTB = null;
|
//_MyTabRibbon.MyDisplayRTB = null;
|
||||||
_MyStepTabRibbon.MyStepItem = null;
|
_MyStepTabRibbon.MyRTBItem = null;
|
||||||
this.Controls.Add(_MyStepTabRibbon);
|
this.Controls.Add(_MyStepTabRibbon);
|
||||||
_MyStepTabRibbon.Expanded = _MyDisplayTabControl.RibbonExpanded;
|
_MyStepTabRibbon.Expanded = _MyDisplayTabControl.RibbonExpanded;
|
||||||
}
|
}
|
||||||
@ -223,7 +223,7 @@ namespace Volian.Controls.Library
|
|||||||
void _MyStepPanel_ItemSelectedChanged(object sender, ItemSelectedChangedEventArgs args)
|
void _MyStepPanel_ItemSelectedChanged(object sender, ItemSelectedChangedEventArgs args)
|
||||||
{
|
{
|
||||||
//_MyTabRibbon.MyDisplayRTB = args.MyDisplayItem.MyDisplayRTB;
|
//_MyTabRibbon.MyDisplayRTB = args.MyDisplayItem.MyDisplayRTB;
|
||||||
_MyStepTabRibbon.MyStepItem = args.MyStepItem;
|
_MyStepTabRibbon.MyRTBItem = args.MyRTBItem;
|
||||||
_MyDisplayTabControl.OnItemSelectedChanged(sender, args);
|
_MyDisplayTabControl.OnItemSelectedChanged(sender, args);
|
||||||
}
|
}
|
||||||
// Occurs when the Mode Changes
|
// Occurs when the Mode Changes
|
||||||
@ -241,8 +241,8 @@ namespace Volian.Controls.Library
|
|||||||
void _MyStepPanel_AttachmentClicked(object sender, StepPanelAttachmentEventArgs args)
|
void _MyStepPanel_AttachmentClicked(object sender, StepPanelAttachmentEventArgs args)
|
||||||
{
|
{
|
||||||
if (curDSOItem != null) return;
|
if (curDSOItem != null) return;
|
||||||
curDSOItem = args.MyStepItem.MyItemInfo;
|
curDSOItem = args.MyRTBItem.MyItemInfo;
|
||||||
_MyDisplayTabControl.OpenItem(args.MyStepItem.MyItemInfo);
|
_MyDisplayTabControl.OpenItem(args.MyRTBItem.MyItemInfo);
|
||||||
curDSOItem = null;
|
curDSOItem = null;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -14,13 +14,13 @@ namespace Volian.Controls.Library
|
|||||||
public partial class StepTabRibbon : UserControl
|
public partial class StepTabRibbon : UserControl
|
||||||
{
|
{
|
||||||
#region Properties
|
#region Properties
|
||||||
private StepItem _MyStepItem;
|
private RTBItem _MyRTBItem;
|
||||||
public StepItem MyStepItem
|
public RTBItem MyRTBItem
|
||||||
{
|
{
|
||||||
get { return _MyStepItem; }
|
get { return _MyRTBItem; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_MyStepItem = value;
|
_MyRTBItem = value;
|
||||||
if (value != null)
|
if (value != null)
|
||||||
{
|
{
|
||||||
MyStepRTB = value.MyStepRTB;
|
MyStepRTB = value.MyStepRTB;
|
||||||
@ -33,9 +33,9 @@ namespace Volian.Controls.Library
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_MyDVI != null) return _MyDVI;
|
if (_MyDVI != null) return _MyDVI;
|
||||||
if (_MyStepItem != null)
|
if (_MyRTBItem != null)
|
||||||
{
|
{
|
||||||
ItemInfo procInfo = _MyStepItem.MyItemInfo.MyProcedure as ItemInfo;
|
ItemInfo procInfo = _MyRTBItem.MyItemInfo.MyProcedure as ItemInfo;
|
||||||
if (procInfo == null) return null;
|
if (procInfo == null) return null;
|
||||||
_MyDVI = procInfo.ActiveParent as DocVersionInfo;
|
_MyDVI = procInfo.ActiveParent as DocVersionInfo;
|
||||||
return _MyDVI;
|
return _MyDVI;
|
||||||
@ -233,12 +233,12 @@ namespace Volian.Controls.Library
|
|||||||
// if from type == 0, we've inserted a hls.
|
// if from type == 0, we've inserted a hls.
|
||||||
// if inserting from section, insert first child
|
// if inserting from section, insert first child
|
||||||
// else do a after from current HLS - if not at HLS, go up parents until find it.
|
// else do a after from current HLS - if not at HLS, go up parents until find it.
|
||||||
if (fromtype == 0 && !_MyStepItem.MyItemInfo.IsStepSection)
|
if (fromtype == 0 && !_MyRTBItem.MyItemInfo.IsStepSection)
|
||||||
{
|
{
|
||||||
StepItem hlsStepItem = _MyStepItem;
|
RTBItem hlsRTBItem = _MyRTBItem;
|
||||||
while (!hlsStepItem.MyItemInfo.IsHigh)
|
while (!hlsRTBItem.MyItemInfo.IsHigh)
|
||||||
hlsStepItem = hlsStepItem.ActiveParent;
|
hlsRTBItem = hlsRTBItem.ActiveParent;
|
||||||
hlsStepItem.AddSiblingAfter((int ?)contenttype,true);
|
hlsRTBItem.AddSiblingAfter((int ?)contenttype,true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -251,7 +251,7 @@ namespace Volian.Controls.Library
|
|||||||
// addchild = false;
|
// addchild = false;
|
||||||
//}
|
//}
|
||||||
//if (addchild)
|
//if (addchild)
|
||||||
_MyStepItem.AddChild((E_FromType)fromtype, contenttype);
|
_MyRTBItem.AddChild((E_FromType)fromtype, contenttype);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Future Table Grid?
|
// Future Table Grid?
|
||||||
@ -271,12 +271,12 @@ namespace Volian.Controls.Library
|
|||||||
//}
|
//}
|
||||||
private void btnInsBefore_Click(object sender, EventArgs e)
|
private void btnInsBefore_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_MyStepItem.AddSiblingBefore();
|
_MyRTBItem.AddSiblingBefore();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnInsAfter_Click(object sender, EventArgs e)
|
private void btnInsAfter_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_MyStepItem.AddSiblingAfter();
|
_MyRTBItem.AddSiblingAfter();
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Using style for step type, enable/disable formatting buttons
|
/// Using style for step type, enable/disable formatting buttons
|
||||||
@ -321,9 +321,9 @@ namespace Volian.Controls.Library
|
|||||||
if (_MyStepRTB.FieldToEdit != E_FieldToEdit.StepText)
|
if (_MyStepRTB.FieldToEdit != E_FieldToEdit.StepText)
|
||||||
return; // No need to change menu that does not get used
|
return; // No need to change menu that does not get used
|
||||||
if (_MyStepRTB == null) return;
|
if (_MyStepRTB == null) return;
|
||||||
DocVersionInfo dvi = MyStepItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
DocVersionInfo dvi = MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
||||||
if (dvi == null) return;
|
if (dvi == null) return;
|
||||||
if (dvi.VersionType > 127 || MyStepItem.MyStepPanel.PanelViewEditMode == E_ViewMode.View)
|
if (dvi.VersionType > 127 || MyRTBItem.MyStepPanel.PanelViewEditMode == E_ViewMode.View)
|
||||||
{
|
{
|
||||||
SetButtonMenuEnabledDisabledOnSelection(false);
|
SetButtonMenuEnabledDisabledOnSelection(false);
|
||||||
}
|
}
|
||||||
@ -402,12 +402,12 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
private void SetStepButtonAndMenuEnabling(bool docontextmenus)
|
private void SetStepButtonAndMenuEnabling(bool docontextmenus)
|
||||||
{
|
{
|
||||||
if (MyStepItem == null) return;
|
if (MyRTBItem == null) return;
|
||||||
DocVersionInfo dvi = MyStepItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
DocVersionInfo dvi = MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
||||||
if (dvi == null) return;
|
if (dvi == null) return;
|
||||||
if (dvi.VersionType > 127)
|
if (dvi.VersionType > 127)
|
||||||
btnCMEditMode1.Enabled = btnEditMode.Enabled = false; // in approved
|
btnCMEditMode1.Enabled = btnEditMode.Enabled = false; // in approved
|
||||||
if (dvi.VersionType > 127 || MyStepItem.MyStepPanel.PanelViewEditMode == E_ViewMode.View)
|
if (dvi.VersionType > 127 || MyRTBItem.MyStepPanel.PanelViewEditMode == E_ViewMode.View)
|
||||||
{
|
{
|
||||||
SetButtonMenuEnabledDisabledOnStepType(false);
|
SetButtonMenuEnabledDisabledOnStepType(false);
|
||||||
return;
|
return;
|
||||||
@ -420,7 +420,7 @@ namespace Volian.Controls.Library
|
|||||||
btnInsPgBrk.Checked = cfg == null ? false : cfg.Step_ManualPagebreak;
|
btnInsPgBrk.Checked = cfg == null ? false : cfg.Step_ManualPagebreak;
|
||||||
}
|
}
|
||||||
btnInsPgBrk.Enabled = MyItemInfo.IsHigh;
|
btnInsPgBrk.Enabled = MyItemInfo.IsHigh;
|
||||||
btnEditMode.Checked = btnCMEditMode1.Checked = MyStepItem.MyStepPanel.PanelViewEditMode != E_ViewMode.View;
|
btnEditMode.Checked = btnCMEditMode1.Checked = MyRTBItem.MyStepPanel.PanelViewEditMode != E_ViewMode.View;
|
||||||
// if on procedure, 'Delete' buttons should be disabled.
|
// if on procedure, 'Delete' buttons should be disabled.
|
||||||
btnDelelete.Enabled = btnDelStep.Enabled = ! MyItemInfo.IsProcedure;
|
btnDelelete.Enabled = btnDelStep.Enabled = ! MyItemInfo.IsProcedure;
|
||||||
btnCpyStp.Enabled = !MyItemInfo.IsProcedure;
|
btnCpyStp.Enabled = !MyItemInfo.IsProcedure;
|
||||||
@ -485,7 +485,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
// if (rno is enabled, set the tag:
|
// if (rno is enabled, set the tag:
|
||||||
if (btnInsRNO.Enabled)
|
if (btnInsRNO.Enabled)
|
||||||
btnInsRNO.Tag = string.Format("{0} {1}", (int)E_FromTypes.RNOs, MyStepItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.GetIndexFromType("RNOType"));
|
btnInsRNO.Tag = string.Format("{0} {1}", (int)E_FromTypes.RNOs, MyRTBItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.GetIndexFromType("RNOType"));
|
||||||
|
|
||||||
// add subitems depending on whether parent type is enabled:
|
// add subitems depending on whether parent type is enabled:
|
||||||
if (btnInsHLS.Enabled) GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.HLS, sd, btnInsHLS, 0, btnCMInsHLS, docontextmenus);
|
if (btnInsHLS.Enabled) GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.HLS, sd, btnInsHLS, 0, btnCMInsHLS, docontextmenus);
|
||||||
@ -717,7 +717,7 @@ namespace Volian.Controls.Library
|
|||||||
// see if user is positioned 'on' a transition within the rtb, if so do a modify, otherwise,
|
// see if user is positioned 'on' a transition within the rtb, if so do a modify, otherwise,
|
||||||
// insert transition.
|
// insert transition.
|
||||||
StepTabPanel tmp = Parent as StepTabPanel;
|
StepTabPanel tmp = Parent as StepTabPanel;
|
||||||
tmp.MyDisplayTabControl.OnLinkModifyTran(this, new StepPanelLinkEventArgs(_MyStepItem, MyStepRTB.MyLinkText));
|
tmp.MyDisplayTabControl.OnLinkModifyTran(this, new StepPanelLinkEventArgs(_MyRTBItem, MyStepRTB.MyLinkText));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnInsHrdSpc_Click(object sender, EventArgs e)
|
private void btnInsHrdSpc_Click(object sender, EventArgs e)
|
||||||
@ -730,7 +730,7 @@ namespace Volian.Controls.Library
|
|||||||
// see if user is positioned 'on' an ReferencedObject within the rtb, if so do a modify, otherwise,
|
// see if user is positioned 'on' an ReferencedObject within the rtb, if so do a modify, otherwise,
|
||||||
// insert transition.
|
// insert transition.
|
||||||
StepTabPanel tmp = Parent as StepTabPanel;
|
StepTabPanel tmp = Parent as StepTabPanel;
|
||||||
tmp.MyDisplayTabControl.OnLinkModifyRO(this, new StepPanelLinkEventArgs(_MyStepItem, MyStepRTB.MyLinkText));
|
tmp.MyDisplayTabControl.OnLinkModifyRO(this, new StepPanelLinkEventArgs(_MyRTBItem, MyStepRTB.MyLinkText));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnRedo_Click(object sender, EventArgs e)
|
private void btnRedo_Click(object sender, EventArgs e)
|
||||||
@ -761,7 +761,7 @@ namespace Volian.Controls.Library
|
|||||||
// a referenced object, bring up ReferencedObject Editor (for now, just put up a message box.
|
// a referenced object, bring up ReferencedObject Editor (for now, just put up a message box.
|
||||||
if (_MyStepRTB.MyLinkText.IndexOf("Transition") > -1)
|
if (_MyStepRTB.MyLinkText.IndexOf("Transition") > -1)
|
||||||
{
|
{
|
||||||
_MyStepItem.MyStepPanel.OnLinkClicked(sender, new StepPanelLinkEventArgs(_MyStepItem, _MyStepRTB.MyLinkText));
|
_MyRTBItem.MyStepPanel.OnLinkClicked(sender, new StepPanelLinkEventArgs(_MyRTBItem, _MyStepRTB.MyLinkText));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -779,7 +779,7 @@ namespace Volian.Controls.Library
|
|||||||
private void btnChgTyp_Click(object sender, EventArgs e)
|
private void btnChgTyp_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Change Step Type");
|
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Change Step Type");
|
||||||
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
|
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region RHM debug
|
#region RHM debug
|
||||||
@ -788,37 +788,37 @@ namespace Volian.Controls.Library
|
|||||||
// private void btnPageBreak_Click(object sender, EventArgs e)
|
// private void btnPageBreak_Click(object sender, EventArgs e)
|
||||||
// {
|
// {
|
||||||
// // This is here temporarily to get a node and all of it's children for print testing.
|
// // This is here temporarily to get a node and all of it's children for print testing.
|
||||||
// OutputAllChildren(MyStepItem);
|
// OutputAllChildren(MyRTBItem);
|
||||||
// }
|
// }
|
||||||
// private void OutputAllChildren(StepItem myStepItem)
|
// private void OutputAllChildren(RTBItem myRTBItem)
|
||||||
// {
|
// {
|
||||||
// OutputAllChildren(myStepItem.MyBeforeStepItems);
|
// OutputAllChildren(myRTBItem.MyBeforeRTBItems);
|
||||||
// OutputStepInfo(myStepItem);
|
// OutputStepInfo(myRTBItem);
|
||||||
// OutputAllChildren(myStepItem.MyAfterStepItems);
|
// OutputAllChildren(myRTBItem.MyAfterRTBItems);
|
||||||
// OutputAllChildren(myStepItem.MyRNOStepItems);
|
// OutputAllChildren(myRTBItem.MyRNORTBItems);
|
||||||
// }
|
// }
|
||||||
// private void OutputStepInfo(StepItem myStepItem)
|
// private void OutputStepInfo(RTBItem myRTBItem)
|
||||||
// {
|
// {
|
||||||
// Label lbl = myStepItem.MyLabel;
|
// Label lbl = myRTBItem.MyLabel;
|
||||||
// if (lbl.Text.Trim() != "")
|
// if (lbl.Text.Trim() != "")
|
||||||
// Console.WriteLine("<text x='{0}In' y='{1}In' font-family='{2}' font-size='{3}Pt'>{4}</text>",
|
// Console.WriteLine("<text x='{0}In' y='{1}In' font-family='{2}' font-size='{3}Pt'>{4}</text>",
|
||||||
// ToInches(myStepItem.Left + lbl.Left), ToInches(myStepItem.Top + lbl.Top),
|
// ToInches(myRTBItem.Left + lbl.Left), ToInches(myRTBItem.Top + lbl.Top),
|
||||||
// lbl.Font.FontFamily.Name,lbl.Font.SizeInPoints,lbl.Text);
|
// lbl.Font.FontFamily.Name,lbl.Font.SizeInPoints,lbl.Text);
|
||||||
// StepRTB rtb = myStepItem.MyStepRTB;
|
// StepRTB rtb = myRTBItem.MyStepRTB;
|
||||||
// Console.WriteLine("<foreignObject x='{0}In' y='{1}In' width='{2}In' " +
|
// Console.WriteLine("<foreignObject x='{0}In' y='{1}In' width='{2}In' " +
|
||||||
// "requiredExtensions='http://Volian.Com/EmbeddedRTF'>{3}</foreignObject>",
|
// "requiredExtensions='http://Volian.Com/EmbeddedRTF'>{3}</foreignObject>",
|
||||||
// ToInches(myStepItem.Left + rtb.Left), ToInches(myStepItem.Top + rtb.Top), ToInches(rtb.Width), myStepItem.MyItemInfo.MyContent.Text);
|
// ToInches(myRTBItem.Left + rtb.Left), ToInches(myRTBItem.Top + rtb.Top), ToInches(rtb.Width), myRTBItem.MyItemInfo.MyContent.Text);
|
||||||
//// ToInches(myStepItem.Left + rtb.Left), ToInches(myStepItem.Top + rtb.Top), ToInches(rtb.Width), rtb.Rtf);
|
//// ToInches(myRTBItem.Left + rtb.Left), ToInches(myRTBItem.Top + rtb.Top), ToInches(rtb.Width), rtb.Rtf);
|
||||||
// }
|
// }
|
||||||
// private float ToInches(int val)
|
// private float ToInches(int val)
|
||||||
// {
|
// {
|
||||||
// return Convert.ToSingle(val)/96F;
|
// return Convert.ToSingle(val)/96F;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// private void OutputAllChildren(List<StepItem> list)
|
// private void OutputAllChildren(List<RTBItem> list)
|
||||||
// {
|
// {
|
||||||
// if(list != null)
|
// if(list != null)
|
||||||
// foreach (StepItem itm in list)
|
// foreach (RTBItem itm in list)
|
||||||
// OutputAllChildren(itm);
|
// OutputAllChildren(itm);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@ -887,7 +887,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
ROFst newrofst = ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv.DocVersionAssociations[0], dv, roFstInfo);
|
ROFst newrofst = ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv.DocVersionAssociations[0], dv, roFstInfo);
|
||||||
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST");
|
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST");
|
||||||
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
|
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
|
||||||
btnUpdROVal.Enabled = false;
|
btnUpdROVal.Enabled = false;
|
||||||
}
|
}
|
||||||
Cursor = Cursors.Default;
|
Cursor = Cursors.Default;
|
||||||
@ -919,31 +919,31 @@ namespace Volian.Controls.Library
|
|||||||
private void btnBookmarks_Click(object sender, EventArgs e)
|
private void btnBookmarks_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Bookmarks");
|
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Bookmarks");
|
||||||
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
|
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnSearch_Click(object sender, EventArgs e)
|
private void btnSearch_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Global Search");
|
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Global Search");
|
||||||
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
|
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnLibDocs_Click(object sender, EventArgs e)
|
private void btnLibDocs_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("LibDocs");
|
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("LibDocs");
|
||||||
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
|
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void btnAnnots_Click(object sender, EventArgs e)
|
public void btnAnnots_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Annots");
|
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Annots");
|
||||||
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
|
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void btnDelStep_Click(object sender, EventArgs e)
|
public void btnDelStep_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
bool surpressMessageBox = (e == null);
|
bool surpressMessageBox = (e == null);
|
||||||
SectionInfo si = MyStepItem.MyItemInfo as SectionInfo;
|
SectionInfo si = MyRTBItem.MyItemInfo as SectionInfo;
|
||||||
if (si != null)
|
if (si != null)
|
||||||
{
|
{
|
||||||
string msg = si.HasChildren ? "Are you sure you want to delete this section and its steps?" : "Are you sure you want to delete this section?";
|
string msg = si.HasChildren ? "Are you sure you want to delete this section and its steps?" : "Are you sure you want to delete this section?";
|
||||||
@ -954,18 +954,18 @@ namespace Volian.Controls.Library
|
|||||||
if (!si.IsStepSection)
|
if (!si.IsStepSection)
|
||||||
{
|
{
|
||||||
WordSectionEventArgs args = new WordSectionEventArgs(si);
|
WordSectionEventArgs args = new WordSectionEventArgs(si);
|
||||||
MyStepItem.MyStepPanel.OnWordSectionClose(sender, args);
|
MyRTBItem.MyStepPanel.OnWordSectionClose(sender, args);
|
||||||
}
|
}
|
||||||
MyStepItem.RemoveItem();
|
MyRTBItem.RemoveItem();
|
||||||
if (!si.IsStepSection)
|
if (!si.IsStepSection)
|
||||||
{
|
{
|
||||||
WordSectionEventArgs args = new WordSectionEventArgs(si);
|
WordSectionEventArgs args = new WordSectionEventArgs(si);
|
||||||
MyStepItem.MyStepPanel.OnWordSectionDeleted(sender, args);
|
MyRTBItem.MyStepPanel.OnWordSectionDeleted(sender, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
StepInfo stpi = MyStepItem.MyItemInfo as StepInfo;
|
StepInfo stpi = MyRTBItem.MyItemInfo as StepInfo;
|
||||||
if (stpi == null) // not sure that it will every get here!
|
if (stpi == null) // not sure that it will every get here!
|
||||||
{
|
{
|
||||||
MessageBox.Show("Unknown type, cannot delete!");
|
MessageBox.Show("Unknown type, cannot delete!");
|
||||||
@ -976,10 +976,10 @@ namespace Volian.Controls.Library
|
|||||||
string msgs = stpi.HasChildren ? "Are you sure you want to delete this step and its substeps?" : "Are you sure you want to delete this step?";
|
string msgs = stpi.HasChildren ? "Are you sure you want to delete this step and its substeps?" : "Are you sure you want to delete this step?";
|
||||||
DialogResult results = MessageBox.Show(msgs, "Verify Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
DialogResult results = MessageBox.Show(msgs, "Verify Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||||
if (results == DialogResult.Yes)
|
if (results == DialogResult.Yes)
|
||||||
MyStepItem.RemoveItem();
|
MyRTBItem.RemoveItem();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MyStepItem.RemoveItem();
|
MyRTBItem.RemoveItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnCMIns_PopupClose(object sender, EventArgs e)
|
private void btnCMIns_PopupClose(object sender, EventArgs e)
|
||||||
@ -1043,13 +1043,13 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
//MessageBox.Show("Functionality not available.", "Spell Check");
|
//MessageBox.Show("Functionality not available.", "Spell Check");
|
||||||
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("SpellChecker");
|
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("SpellChecker");
|
||||||
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
|
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
|
||||||
}
|
}
|
||||||
//private FindReplace dlgFindReplace = null;
|
//private FindReplace dlgFindReplace = null;
|
||||||
private void btnFindRplDlg_Click(object sender, EventArgs e)
|
private void btnFindRplDlg_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("FndRpl");
|
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("FndRpl");
|
||||||
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
|
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InsertSiblingBeforeOrAfter(string b4aftr)
|
private void InsertSiblingBeforeOrAfter(string b4aftr)
|
||||||
@ -1062,11 +1062,11 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
case "after":
|
case "after":
|
||||||
if ((actable & E_AccStep.AddingNext) > 0)
|
if ((actable & E_AccStep.AddingNext) > 0)
|
||||||
MyStepItem.AddSiblingAfter();
|
MyRTBItem.AddSiblingAfter();
|
||||||
break;
|
break;
|
||||||
case "before":
|
case "before":
|
||||||
if ((actable & E_AccStep.AddingPrev) > 0)
|
if ((actable & E_AccStep.AddingPrev) > 0)
|
||||||
MyStepItem.AddSiblingBefore();
|
MyRTBItem.AddSiblingBefore();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1096,7 +1096,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
if (deletedSubStep)
|
if (deletedSubStep)
|
||||||
ShortCutContextMenu("InsHLS");
|
ShortCutContextMenu("InsHLS");
|
||||||
else if (MyStepItem.MyRNOStepItems != null && MyStepItem.MyRNOStepItems.Count > 0)
|
else if (MyRTBItem.MyRNORTBItems != null && MyRTBItem.MyRNORTBItems.Count > 0)
|
||||||
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlRight); // jump to RNO
|
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlRight); // jump to RNO
|
||||||
else if (deletedRNO)
|
else if (deletedRNO)
|
||||||
{
|
{
|
||||||
@ -1116,8 +1116,8 @@ namespace Volian.Controls.Library
|
|||||||
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlLeft);
|
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlLeft);
|
||||||
if (MyItemInfo.IsHigh)
|
if (MyItemInfo.IsHigh)
|
||||||
{
|
{
|
||||||
if (MyStepItem != null && MyStepItem.NextDownStepItem != null &&MyStepItem.NextDownStepItem.MyItemInfo.MyParent.Equals(MyStepItem.MyItemInfo))
|
if (MyRTBItem != null && MyRTBItem.NextDownRTBItem != null &&MyRTBItem.NextDownRTBItem.MyItemInfo.MyParent.Equals(MyRTBItem.MyItemInfo))
|
||||||
//if (MyStepItem.NextDownStepItem.MyItemInfo.MyParent.ItemID == MyStepItem.MyItemInfo.ItemID) //.Equals(MyStepItem.MyItemInfo))
|
//if (MyRTBItem.NextDownRTBItem.MyItemInfo.MyParent.ItemID == MyRTBItem.MyItemInfo.ItemID) //.Equals(MyRTBItem.MyItemInfo))
|
||||||
{
|
{
|
||||||
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlDown);
|
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlDown);
|
||||||
InsertSiblingBeforeOrAfter("before");
|
InsertSiblingBeforeOrAfter("before");
|
||||||
@ -1147,7 +1147,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
else if (deletedRNO || MyItemInfo.IsEquipmentList)
|
else if (deletedRNO || MyItemInfo.IsEquipmentList)
|
||||||
InsertSiblingBeforeOrAfter("after");
|
InsertSiblingBeforeOrAfter("after");
|
||||||
else if (MyStepItem.MyRNOStepItems != null && MyStepItem.MyRNOStepItems.Count > 0)
|
else if (MyRTBItem.MyRNORTBItems != null && MyRTBItem.MyRNORTBItems.Count > 0)
|
||||||
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlRight); // jump to RNO
|
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlRight); // jump to RNO
|
||||||
else
|
else
|
||||||
if (MyItemInfo.ColumnMode > 0)
|
if (MyItemInfo.ColumnMode > 0)
|
||||||
@ -1185,16 +1185,16 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
private void AddSubStep()
|
private void AddSubStep()
|
||||||
{
|
{
|
||||||
StepItem nextDownStepItem = MyStepItem.NextDownStepItem;
|
RTBItem nextDownRTBItem = MyRTBItem.NextDownRTBItem;
|
||||||
bool skipTable = false;
|
bool skipTable = false;
|
||||||
// If the step has a table, move past it before adding a substep
|
// If the step has a table, move past it before adding a substep
|
||||||
if (nextDownStepItem != null && nextDownStepItem.MyItemInfo.MyParent.ItemID == MyStepItem.MyID &&
|
if (nextDownRTBItem != null && nextDownRTBItem.MyItemInfo.MyParent.ItemID == MyRTBItem.MyID &&
|
||||||
nextDownStepItem.MyItemInfo.IsTablePart)
|
nextDownRTBItem.MyItemInfo.IsTablePart)
|
||||||
{
|
{
|
||||||
nextDownStepItem = nextDownStepItem.NextDownStepItem;
|
nextDownRTBItem = nextDownRTBItem.NextDownRTBItem;
|
||||||
skipTable = true;
|
skipTable = true;
|
||||||
}
|
}
|
||||||
if (nextDownStepItem != null && nextDownStepItem.MyItemInfo.MyParent.ItemID == MyStepItem.MyID)
|
if (nextDownRTBItem != null && nextDownRTBItem.MyItemInfo.MyParent.ItemID == MyRTBItem.MyID)
|
||||||
{
|
{
|
||||||
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlDown);
|
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlDown);
|
||||||
if(skipTable) MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlDown);
|
if(skipTable) MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlDown);
|
||||||
@ -1223,13 +1223,13 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
StepTabPanel tmp = Parent as StepTabPanel;
|
StepTabPanel tmp = Parent as StepTabPanel;
|
||||||
if (tmp.MyDisplayTabControl.MyCopyStep == null) return;
|
if (tmp.MyDisplayTabControl.MyCopyStep == null) return;
|
||||||
MyStepItem.PasteSiblingAfter(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
|
MyRTBItem.PasteSiblingAfter(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
|
||||||
}
|
}
|
||||||
private void btnPasteBefore_Click(object sender, EventArgs e)
|
private void btnPasteBefore_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
StepTabPanel tmp = Parent as StepTabPanel;
|
StepTabPanel tmp = Parent as StepTabPanel;
|
||||||
if (tmp.MyDisplayTabControl.MyCopyStep == null) return;
|
if (tmp.MyDisplayTabControl.MyCopyStep == null) return;
|
||||||
MyStepItem.PasteSiblingBefore(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
|
MyRTBItem.PasteSiblingBefore(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
|
||||||
}
|
}
|
||||||
private void btnStepPaste_Click(object sender, EventArgs e)
|
private void btnStepPaste_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -1244,7 +1244,7 @@ namespace Volian.Controls.Library
|
|||||||
public void DoCopyStep()
|
public void DoCopyStep()
|
||||||
{
|
{
|
||||||
// highlight selected step(s) and prompt to see if selection is what user wants:
|
// highlight selected step(s) and prompt to see if selection is what user wants:
|
||||||
MyStepItem.HighlightBackColor();
|
MyRTBItem.HighlightBackColor();
|
||||||
DialogResult dr = MessageBox.Show("Step as Marked?", "Identify Step To Be Copied", MessageBoxButtons.YesNo);
|
DialogResult dr = MessageBox.Show("Step as Marked?", "Identify Step To Be Copied", MessageBoxButtons.YesNo);
|
||||||
if (dr == DialogResult.Yes)
|
if (dr == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
@ -1253,16 +1253,16 @@ namespace Volian.Controls.Library
|
|||||||
btnStepPaste.Enabled = true;
|
btnStepPaste.Enabled = true;
|
||||||
SetPasteButtonEnabled();
|
SetPasteButtonEnabled();
|
||||||
}
|
}
|
||||||
MyStepItem.SetBackColor();
|
MyRTBItem.SetBackColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnPasteReplace_Click(object sender, EventArgs e)
|
private void btnPasteReplace_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
StepTabPanel tmp = Parent as StepTabPanel;
|
StepTabPanel tmp = Parent as StepTabPanel;
|
||||||
if (tmp.MyDisplayTabControl.MyCopyStep==null) return;
|
if (tmp.MyDisplayTabControl.MyCopyStep==null) return;
|
||||||
StepItem oldStepItem = MyStepItem;
|
RTBItem oldRTBItem = MyRTBItem;
|
||||||
MyStepItem = MyStepItem.PasteReplace(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
|
MyRTBItem = MyRTBItem.PasteReplace(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
|
||||||
if (MyStepItem.MyItemInfo.ItemID != oldStepItem.MyItemInfo.ItemID) oldStepItem.Dispose();
|
if (MyRTBItem.MyItemInfo.ItemID != oldRTBItem.MyItemInfo.ItemID) oldRTBItem.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnPdfCreate_Click(object sender, EventArgs e)
|
private void btnPdfCreate_Click(object sender, EventArgs e)
|
||||||
|
@ -7,13 +7,13 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
public class VlnSpellCheck
|
public class VlnSpellCheck
|
||||||
{
|
{
|
||||||
private StepItem _MyStepItem;
|
private RTBItem _MyRTBItem;
|
||||||
public StepItem MyStepItem
|
public RTBItem MyRTBItem
|
||||||
{
|
{
|
||||||
get { return _MyStepItem; }
|
get { return _MyRTBItem; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_MyStepItem = value;
|
_MyRTBItem = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,14 +24,14 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
public void DoSpellCheck()
|
public void DoSpellCheck()
|
||||||
{
|
{
|
||||||
while (MyStepItem.MyStepRTB.SpellCheckNext())
|
while (MyRTBItem.MyStepRTB.SpellCheckNext())
|
||||||
{
|
{
|
||||||
ItemInfo next = MyStepItem.MyItemInfo.SearchNext;
|
ItemInfo next = MyRTBItem.MyItemInfo.SearchNext;
|
||||||
if (next.IsSection)
|
if (next.IsSection)
|
||||||
return; // spell check only current section
|
return; // spell check only current section
|
||||||
MyStepItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next);
|
MyRTBItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next);
|
||||||
}
|
}
|
||||||
MyStepItem.MyStepRTB.Focus();
|
MyRTBItem.MyStepRTB.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user