This commit is contained in:
parent
e9d5b08504
commit
b1669a3a95
@ -37,7 +37,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
//Console.WriteLine(string.Format("StepTabRibbon: In set of MyStepRTB, Selected Text = {0}", MyStepRTB.SelectedText));
|
||||
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfEdit);
|
||||
//_MyStepRTB.SelectionChanged += new EventHandler(MyStepRTB_SelectionChanged);
|
||||
_MyStepRTB.KeyDown += new KeyEventHandler(MyStepRTB_SelectionChanged);
|
||||
_MyStepRTB.MouseUp += new MouseEventHandler(MyStepRTB_SelectionChanged);
|
||||
_MyStepRTB.Leave += new EventHandler(MyStepRTB_Leave);
|
||||
_MyStepRTB.LinkChanged += new StepRTBLinkEvent(_MyStepRTB_LinkChanged);
|
||||
@ -96,7 +96,7 @@ namespace Volian.Controls.Library
|
||||
void _MyStepRTB_LinkChanged(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
// do all Transition and ReferencedObject menu items/buttons based on whether a 'link is selected' and the link type.
|
||||
btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.SelectionProtected;
|
||||
btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.IsSelectionLinked(_MyStepRTB.SelectionStart, _MyStepRTB.SelectionLength);
|
||||
if (btnCMGoTo.Enabled == true && _MyStepRTB.MyLinkText != null) // must have some link test, use it to set edit of transition or ro...
|
||||
{
|
||||
btnCMEditTran.Enabled = _MyStepRTB.MyLinkText.IndexOf("Transition") > -1; // selected link must be a transition
|
||||
@ -110,7 +110,6 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
void MyStepRTB_Leave(object sender, EventArgs e)
|
||||
{
|
||||
//_MyStepRTB.SelectionChanged -= new EventHandler(MyStepRTB_SelectionChanged);
|
||||
_MyStepRTB.MouseUp -= new MouseEventHandler(MyStepRTB_SelectionChanged);
|
||||
_MyStepRTB.Leave -= new EventHandler(MyStepRTB_Leave);
|
||||
_MyStepRTB.LinkChanged -= new StepRTBLinkEvent(_MyStepRTB_LinkChanged);
|
||||
@ -174,7 +173,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
//if (_MyStepItem.MyItemInfo.MyContent.Type == 20006 || _MyStepItem.MyItemInfo.MyContent.Type == 20007)
|
||||
// Console.WriteLine("debug");
|
||||
//SetButtonForStyle();
|
||||
SetButtonForStyle();
|
||||
btnCMCut.Enabled = btnCMCopy.Enabled = btnCut.Enabled = btnCopy.Enabled = _MyStepRTB.SelectionLength > 0;
|
||||
btnCMUndo.Enabled = btnUndo.Enabled = _MyStepRTB.CanUndo;
|
||||
btnCMRedo.Enabled = btnRedo.Enabled = _MyStepRTB.CanRedo;
|
||||
@ -184,7 +183,7 @@ namespace Volian.Controls.Library
|
||||
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.SelectionProtected; //(_MyStepRTB.MyLinkText != null);
|
||||
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...
|
||||
{
|
||||
btnCMEditTran.Enabled = _MyStepRTB.MyLinkText.IndexOf("Transition")>-1; // selected link must be a transition
|
||||
|
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user