This commit is contained in:
Kathy Ruffing 2009-01-27 15:50:55 +00:00
parent 68998360df
commit c063a11a1a
2 changed files with 5 additions and 4 deletions

View File

@ -190,7 +190,7 @@ namespace Volian.Controls.Library
this.KeyUp += new KeyEventHandler(StepRTB_KeyUp); this.KeyUp += new KeyEventHandler(StepRTB_KeyUp);
this.KeyDown += new KeyEventHandler(StepRTB_KeyDown); this.KeyDown += new KeyEventHandler(StepRTB_KeyDown);
this.TextChanged += new EventHandler(StepRTB_TextChanged); this.TextChanged += new EventHandler(StepRTB_TextChanged);
//this.SelectionChanged += new EventHandler(DisplayRTB_SelectionChanged); this.SelectionChanged +=new EventHandler(StepRTB_SelectionChanged);
} }
void MyConfig_PropertyChanged(object sender, PropertyChangedEventArgs e) void MyConfig_PropertyChanged(object sender, PropertyChangedEventArgs e)
@ -207,9 +207,10 @@ namespace Volian.Controls.Library
MyLinkText = null; MyLinkText = null;
} }
} }
public bool inRoAdd = false;
void StepRTB_SelectionChanged(object sender, EventArgs e) void StepRTB_SelectionChanged(object sender, EventArgs e)
{ {
if (inRoAdd)
Console.WriteLine("SelectionStart {0}, SelectionLength {1}", SelectionStart, SelectionLength); Console.WriteLine("SelectionStart {0}, SelectionLength {1}", SelectionStart, SelectionLength);
if (!SelectionProtected && MyLinkText != null) MyLinkText = null; if (!SelectionProtected && MyLinkText != null) MyLinkText = null;
} }

View File

@ -44,7 +44,7 @@ namespace Volian.Controls.Library
void _MyStepRTB_LinkChanged(object sender, StepPanelLinkEventArgs args) 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. // 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.SelectionProtected;
if (btnCMGoTo.Enabled == true && _MyStepRTB.MyLinkText != null) // must have some link test, use it to set edit of transition or ro... 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 btnCMEditTran.Enabled = _MyStepRTB.MyLinkText.IndexOf("Transition") > -1; // selected link must be a transition