This commit is contained in:
Jsj
2008-08-22 18:48:51 +00:00
parent 4cc3c5f1f7
commit 938c5ab566
7 changed files with 476 additions and 4 deletions

View File

@@ -44,12 +44,17 @@ 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.MyLinkText != null);
if (btnCMGoTo.Enabled == true) // must have some link test, use it to set edit of transition or ro...
btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.SelectionProtected; //(_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
btnCMEditRO.Enabled = _MyStepRTB.MyLinkText.IndexOf("ReferencedObject") > -1; // selected link must be ro
}
else
{
btnCMEditTran.Enabled = false;
btnCMEditRO.Enabled = false;
}
}
void MyStepRTB_Leave(object sender, EventArgs e)
{
@@ -81,12 +86,17 @@ 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.MyLinkText != null);
if (btnCMGoTo.Enabled == true) // must have some link test, use it to set edit of transition or ro...
btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.SelectionProtected; //(_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
btnCMEditRO.Enabled = _MyStepRTB.MyLinkText.IndexOf("ReferencedObject") > -1; // selected link must be ro
}
else
{
btnCMEditTran.Enabled = false;
btnCMEditRO.Enabled = false;
}
}
public StepTabRibbon()
{