This commit is contained in:
Kathy Ruffing 2009-05-21 13:30:48 +00:00
parent 1db9494a43
commit 20486ad90a

View File

@ -145,7 +145,7 @@ namespace Volian.Controls.Library
StepItem hlsStepItem = _MyStepItem;
while (!hlsStepItem.MyItemInfo.IsHigh)
hlsStepItem = hlsStepItem.ActiveParent;
hlsStepItem.AddSiblingAfter(); // (contenttype);
hlsStepItem.AddSiblingAfter((int ?)contenttype);
}
else
{
@ -166,9 +166,9 @@ namespace Volian.Controls.Library
/// </summary>
private void SetButtonForStyle()
{
btnBold.Enabled = !((_MyStepRTB.MyStyleFont.Style & E_Style.Bold) == E_Style.Bold || (_MyStepRTB.MyStyleFont.Style & E_Style.MmBold) == E_Style.MmBold);
btnUnderline.Enabled = !((_MyStepRTB.MyStyleFont.Style & E_Style.Underline) == E_Style.Underline);
btnItalics.Enabled = !((_MyStepRTB.MyStyleFont.Style & E_Style.Italics) == E_Style.Italics);
btnBold.Enabled = btnCMBold.Enabled = (!((_MyStepRTB.MyStyleFont.Style & E_Style.Bold) == E_Style.Bold || (_MyStepRTB.MyStyleFont.Style & E_Style.MmBold) == E_Style.MmBold));
btnUnderline.Enabled = btnCMUnderline.Enabled = (!((_MyStepRTB.MyStyleFont.Style & E_Style.Underline) == E_Style.Underline));
btnItalics.Enabled = btnCMItalics.Enabled = (!((_MyStepRTB.MyStyleFont.Style & E_Style.Italics) == E_Style.Italics));
}
private void SetButtonAndMenuEnabling()
{
@ -181,9 +181,8 @@ namespace Volian.Controls.Library
btnCMSubscript.Checked = btnSubscript.Checked = RTBAPI.IsSubScript(_MyStepRTB);
btnCMSuperscript.Checked = btnSuperscript.Checked = RTBAPI.IsSuperScript(_MyStepRTB);
}
//if (_MyStepItem.MyItemInfo.MyContent.Type == 20006 || _MyStepItem.MyItemInfo.MyContent.Type == 20007)
// Console.WriteLine("debug");
SetButtonForStyle();
btnCMCut.Enabled = btnCMCopy.Enabled = btnCut.Enabled = btnCopy.Enabled = _MyStepRTB.SelectionLength > 0;
btnCMUndo.Enabled = btnUndo.Enabled = _MyStepRTB.CanUndo;
btnCMRedo.Enabled = btnRedo.Enabled = _MyStepRTB.CanRedo;
@ -191,7 +190,8 @@ namespace Volian.Controls.Library
// for paste, see if there is clipboard data, & if so, of a type we can use.
IDataObject iData = Clipboard.GetDataObject();
btnCMPaste.Enabled = btnPaste.Enabled = (iData.GetDataPresent(DataFormats.Text) || iData.GetDataPresent(DataFormats.Rtf));
// do all Transition and ReferencedObject menu items/buttons based on whether a 'link is selected' and the link type.
btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.IsSelectionLinked(_MyStepRTB.SelectionStart, _MyStepRTB.SelectionLength); //(_MyStepRTB.MyLinkText != null);
if (btnCMGoTo.Enabled == true && _MyStepRTB.MyLinkText != null) // must have some link test, use it to set edit of transition or ro...