This commit is contained in:
Kathy Ruffing 2011-01-19 16:22:52 +00:00
parent 3bae38ab21
commit 416eb91ed4
3 changed files with 88 additions and 88 deletions

View File

@ -57,12 +57,12 @@ namespace Volian.Controls.Library
set { _MyStepPanel.SelectedItemInfo = value; }
}
/// <summary>
/// Currently Selected StepItem
/// Currently Selected RTBItem
/// </summary>
public StepItem SelectedStepItem
public RTBItem SelectedRTBItem
{
//get { return _MyStepPanel._LookupStepItems[_MyStepPanel.SelectedItemInfo.ItemID]; }
get { return _MyStepPanel.SelectedStepItem; }
//get { return _MyStepPanel._LookupRTBItems[_MyStepPanel.SelectedItemInfo.ItemID]; }
get { return _MyStepPanel.SelectedRTBItem; }
}
/// <summary>
/// Procedure ItemInfo
@ -81,7 +81,7 @@ namespace Volian.Controls.Library
public void FindSearchString()
{
// 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
#region Contructors
@ -105,7 +105,7 @@ namespace Volian.Controls.Library
_MyStepTabRibbon.Location = new System.Drawing.Point(0, 0);
_MyStepTabRibbon.Name = "displayTabRibbon1";
//_MyTabRibbon.MyDisplayRTB = null;
_MyStepTabRibbon.MyStepItem = null;
_MyStepTabRibbon.MyRTBItem = null;
this.Controls.Add(_MyStepTabRibbon);
_MyStepTabRibbon.Expanded = _MyDisplayTabControl.RibbonExpanded;
}
@ -223,7 +223,7 @@ namespace Volian.Controls.Library
void _MyStepPanel_ItemSelectedChanged(object sender, ItemSelectedChangedEventArgs args)
{
//_MyTabRibbon.MyDisplayRTB = args.MyDisplayItem.MyDisplayRTB;
_MyStepTabRibbon.MyStepItem = args.MyStepItem;
_MyStepTabRibbon.MyRTBItem = args.MyRTBItem;
_MyDisplayTabControl.OnItemSelectedChanged(sender, args);
}
// Occurs when the Mode Changes
@ -241,8 +241,8 @@ namespace Volian.Controls.Library
void _MyStepPanel_AttachmentClicked(object sender, StepPanelAttachmentEventArgs args)
{
if (curDSOItem != null) return;
curDSOItem = args.MyStepItem.MyItemInfo;
_MyDisplayTabControl.OpenItem(args.MyStepItem.MyItemInfo);
curDSOItem = args.MyRTBItem.MyItemInfo;
_MyDisplayTabControl.OpenItem(args.MyRTBItem.MyItemInfo);
curDSOItem = null;
}
/// <summary>

View File

@ -14,13 +14,13 @@ namespace Volian.Controls.Library
public partial class StepTabRibbon : UserControl
{
#region Properties
private StepItem _MyStepItem;
public StepItem MyStepItem
private RTBItem _MyRTBItem;
public RTBItem MyRTBItem
{
get { return _MyStepItem; }
get { return _MyRTBItem; }
set
{
_MyStepItem = value;
_MyRTBItem = value;
if (value != null)
{
MyStepRTB = value.MyStepRTB;
@ -33,9 +33,9 @@ namespace Volian.Controls.Library
get
{
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;
_MyDVI = procInfo.ActiveParent as DocVersionInfo;
return _MyDVI;
@ -233,12 +233,12 @@ namespace Volian.Controls.Library
// if from type == 0, we've inserted a hls.
// if inserting from section, insert first child
// 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;
while (!hlsStepItem.MyItemInfo.IsHigh)
hlsStepItem = hlsStepItem.ActiveParent;
hlsStepItem.AddSiblingAfter((int ?)contenttype,true);
RTBItem hlsRTBItem = _MyRTBItem;
while (!hlsRTBItem.MyItemInfo.IsHigh)
hlsRTBItem = hlsRTBItem.ActiveParent;
hlsRTBItem.AddSiblingAfter((int ?)contenttype,true);
}
else
{
@ -251,7 +251,7 @@ namespace Volian.Controls.Library
// addchild = false;
//}
//if (addchild)
_MyStepItem.AddChild((E_FromType)fromtype, contenttype);
_MyRTBItem.AddChild((E_FromType)fromtype, contenttype);
}
}
// Future Table Grid?
@ -271,12 +271,12 @@ namespace Volian.Controls.Library
//}
private void btnInsBefore_Click(object sender, EventArgs e)
{
_MyStepItem.AddSiblingBefore();
_MyRTBItem.AddSiblingBefore();
}
private void btnInsAfter_Click(object sender, EventArgs e)
{
_MyStepItem.AddSiblingAfter();
_MyRTBItem.AddSiblingAfter();
}
/// <summary>
/// Using style for step type, enable/disable formatting buttons
@ -321,9 +321,9 @@ namespace Volian.Controls.Library
if (_MyStepRTB.FieldToEdit != E_FieldToEdit.StepText)
return; // No need to change menu that does not get used
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.VersionType > 127 || MyStepItem.MyStepPanel.PanelViewEditMode == E_ViewMode.View)
if (dvi.VersionType > 127 || MyRTBItem.MyStepPanel.PanelViewEditMode == E_ViewMode.View)
{
SetButtonMenuEnabledDisabledOnSelection(false);
}
@ -402,12 +402,12 @@ namespace Volian.Controls.Library
}
private void SetStepButtonAndMenuEnabling(bool docontextmenus)
{
if (MyStepItem == null) return;
DocVersionInfo dvi = MyStepItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
if (MyRTBItem == null) return;
DocVersionInfo dvi = MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
if (dvi == null) return;
if (dvi.VersionType > 127)
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);
return;
@ -420,7 +420,7 @@ namespace Volian.Controls.Library
btnInsPgBrk.Checked = cfg == null ? false : cfg.Step_ManualPagebreak;
}
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.
btnDelelete.Enabled = btnDelStep.Enabled = ! MyItemInfo.IsProcedure;
btnCpyStp.Enabled = !MyItemInfo.IsProcedure;
@ -485,7 +485,7 @@ namespace Volian.Controls.Library
// if (rno is enabled, set the tag:
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:
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,
// insert transition.
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)
@ -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,
// insert transition.
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)
@ -761,7 +761,7 @@ namespace Volian.Controls.Library
// a referenced object, bring up ReferencedObject Editor (for now, just put up a message box.
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
{
@ -779,7 +779,7 @@ namespace Volian.Controls.Library
private void btnChgTyp_Click(object sender, EventArgs e)
{
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Change Step Type");
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
}
#endregion
#region RHM debug
@ -788,37 +788,37 @@ namespace Volian.Controls.Library
// 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.
// OutputAllChildren(MyStepItem);
// OutputAllChildren(MyRTBItem);
// }
// private void OutputAllChildren(StepItem myStepItem)
// private void OutputAllChildren(RTBItem myRTBItem)
// {
// OutputAllChildren(myStepItem.MyBeforeStepItems);
// OutputStepInfo(myStepItem);
// OutputAllChildren(myStepItem.MyAfterStepItems);
// OutputAllChildren(myStepItem.MyRNOStepItems);
// OutputAllChildren(myRTBItem.MyBeforeRTBItems);
// OutputStepInfo(myRTBItem);
// OutputAllChildren(myRTBItem.MyAfterRTBItems);
// 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() != "")
// 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);
// StepRTB rtb = myStepItem.MyStepRTB;
// StepRTB rtb = myRTBItem.MyStepRTB;
// Console.WriteLine("<foreignObject x='{0}In' y='{1}In' width='{2}In' " +
// "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(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), myRTBItem.MyItemInfo.MyContent.Text);
//// ToInches(myRTBItem.Left + rtb.Left), ToInches(myRTBItem.Top + rtb.Top), ToInches(rtb.Width), rtb.Rtf);
// }
// private float ToInches(int val)
// {
// return Convert.ToSingle(val)/96F;
// }
// private void OutputAllChildren(List<StepItem> list)
// private void OutputAllChildren(List<RTBItem> list)
// {
// if(list != null)
// foreach (StepItem itm in list)
// foreach (RTBItem itm in list)
// OutputAllChildren(itm);
// }
@ -887,7 +887,7 @@ namespace Volian.Controls.Library
{
ROFst newrofst = ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv.DocVersionAssociations[0], dv, roFstInfo);
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST");
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
btnUpdROVal.Enabled = false;
}
Cursor = Cursors.Default;
@ -919,31 +919,31 @@ namespace Volian.Controls.Library
private void btnBookmarks_Click(object sender, EventArgs e)
{
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Bookmarks");
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
}
private void btnSearch_Click(object sender, EventArgs e)
{
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Global Search");
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
}
private void btnLibDocs_Click(object sender, EventArgs e)
{
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("LibDocs");
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
}
public void btnAnnots_Click(object sender, EventArgs e)
{
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Annots");
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
}
public void btnDelStep_Click(object sender, EventArgs e)
{
bool surpressMessageBox = (e == null);
SectionInfo si = MyStepItem.MyItemInfo as SectionInfo;
SectionInfo si = MyRTBItem.MyItemInfo as SectionInfo;
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?";
@ -954,18 +954,18 @@ namespace Volian.Controls.Library
if (!si.IsStepSection)
{
WordSectionEventArgs args = new WordSectionEventArgs(si);
MyStepItem.MyStepPanel.OnWordSectionClose(sender, args);
MyRTBItem.MyStepPanel.OnWordSectionClose(sender, args);
}
MyStepItem.RemoveItem();
MyRTBItem.RemoveItem();
if (!si.IsStepSection)
{
WordSectionEventArgs args = new WordSectionEventArgs(si);
MyStepItem.MyStepPanel.OnWordSectionDeleted(sender, args);
MyRTBItem.MyStepPanel.OnWordSectionDeleted(sender, args);
}
}
return;
}
StepInfo stpi = MyStepItem.MyItemInfo as StepInfo;
StepInfo stpi = MyRTBItem.MyItemInfo as StepInfo;
if (stpi == null) // not sure that it will every get here!
{
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?";
DialogResult results = MessageBox.Show(msgs, "Verify Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (results == DialogResult.Yes)
MyStepItem.RemoveItem();
MyRTBItem.RemoveItem();
}
else
MyStepItem.RemoveItem();
MyRTBItem.RemoveItem();
}
private void btnCMIns_PopupClose(object sender, EventArgs e)
@ -1043,13 +1043,13 @@ namespace Volian.Controls.Library
{
//MessageBox.Show("Functionality not available.", "Spell Check");
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("SpellChecker");
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
}
//private FindReplace dlgFindReplace = null;
private void btnFindRplDlg_Click(object sender, EventArgs e)
{
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("FndRpl");
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
}
private void InsertSiblingBeforeOrAfter(string b4aftr)
@ -1062,11 +1062,11 @@ namespace Volian.Controls.Library
{
case "after":
if ((actable & E_AccStep.AddingNext) > 0)
MyStepItem.AddSiblingAfter();
MyRTBItem.AddSiblingAfter();
break;
case "before":
if ((actable & E_AccStep.AddingPrev) > 0)
MyStepItem.AddSiblingBefore();
MyRTBItem.AddSiblingBefore();
break;
}
}
@ -1096,7 +1096,7 @@ namespace Volian.Controls.Library
{
if (deletedSubStep)
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
else if (deletedRNO)
{
@ -1116,8 +1116,8 @@ namespace Volian.Controls.Library
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlLeft);
if (MyItemInfo.IsHigh)
{
if (MyStepItem != null && MyStepItem.NextDownStepItem != null &&MyStepItem.NextDownStepItem.MyItemInfo.MyParent.Equals(MyStepItem.MyItemInfo))
//if (MyStepItem.NextDownStepItem.MyItemInfo.MyParent.ItemID == MyStepItem.MyItemInfo.ItemID) //.Equals(MyStepItem.MyItemInfo))
if (MyRTBItem != null && MyRTBItem.NextDownRTBItem != null &&MyRTBItem.NextDownRTBItem.MyItemInfo.MyParent.Equals(MyRTBItem.MyItemInfo))
//if (MyRTBItem.NextDownRTBItem.MyItemInfo.MyParent.ItemID == MyRTBItem.MyItemInfo.ItemID) //.Equals(MyRTBItem.MyItemInfo))
{
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlDown);
InsertSiblingBeforeOrAfter("before");
@ -1147,7 +1147,7 @@ namespace Volian.Controls.Library
}
else if (deletedRNO || MyItemInfo.IsEquipmentList)
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
else
if (MyItemInfo.ColumnMode > 0)
@ -1185,16 +1185,16 @@ namespace Volian.Controls.Library
private void AddSubStep()
{
StepItem nextDownStepItem = MyStepItem.NextDownStepItem;
RTBItem nextDownRTBItem = MyRTBItem.NextDownRTBItem;
bool skipTable = false;
// If the step has a table, move past it before adding a substep
if (nextDownStepItem != null && nextDownStepItem.MyItemInfo.MyParent.ItemID == MyStepItem.MyID &&
nextDownStepItem.MyItemInfo.IsTablePart)
if (nextDownRTBItem != null && nextDownRTBItem.MyItemInfo.MyParent.ItemID == MyRTBItem.MyID &&
nextDownRTBItem.MyItemInfo.IsTablePart)
{
nextDownStepItem = nextDownStepItem.NextDownStepItem;
nextDownRTBItem = nextDownRTBItem.NextDownRTBItem;
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);
if(skipTable) MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlDown);
@ -1223,13 +1223,13 @@ namespace Volian.Controls.Library
{
StepTabPanel tmp = Parent as StepTabPanel;
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)
{
StepTabPanel tmp = Parent as StepTabPanel;
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)
{
@ -1244,7 +1244,7 @@ namespace Volian.Controls.Library
public void DoCopyStep()
{
// 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);
if (dr == DialogResult.Yes)
{
@ -1253,16 +1253,16 @@ namespace Volian.Controls.Library
btnStepPaste.Enabled = true;
SetPasteButtonEnabled();
}
MyStepItem.SetBackColor();
MyRTBItem.SetBackColor();
}
private void btnPasteReplace_Click(object sender, EventArgs e)
{
StepTabPanel tmp = Parent as StepTabPanel;
if (tmp.MyDisplayTabControl.MyCopyStep==null) return;
StepItem oldStepItem = MyStepItem;
MyStepItem = MyStepItem.PasteReplace(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
if (MyStepItem.MyItemInfo.ItemID != oldStepItem.MyItemInfo.ItemID) oldStepItem.Dispose();
RTBItem oldRTBItem = MyRTBItem;
MyRTBItem = MyRTBItem.PasteReplace(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
if (MyRTBItem.MyItemInfo.ItemID != oldRTBItem.MyItemInfo.ItemID) oldRTBItem.Dispose();
}
private void btnPdfCreate_Click(object sender, EventArgs e)

View File

@ -7,13 +7,13 @@ namespace Volian.Controls.Library
{
public class VlnSpellCheck
{
private StepItem _MyStepItem;
public StepItem MyStepItem
private RTBItem _MyRTBItem;
public RTBItem MyRTBItem
{
get { return _MyStepItem; }
get { return _MyRTBItem; }
set
{
_MyStepItem = value;
_MyRTBItem = value;
}
}
@ -24,14 +24,14 @@ namespace Volian.Controls.Library
public void DoSpellCheck()
{
while (MyStepItem.MyStepRTB.SpellCheckNext())
while (MyRTBItem.MyStepRTB.SpellCheckNext())
{
ItemInfo next = MyStepItem.MyItemInfo.SearchNext;
ItemInfo next = MyRTBItem.MyItemInfo.SearchNext;
if (next.IsSection)
return; // spell check only current section
MyStepItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next);
MyRTBItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next);
}
MyStepItem.MyStepRTB.Focus();
MyRTBItem.MyStepRTB.Focus();
}
}