Correct cursor position after RO Insert
Correct dispose logic for transition destination ITEMs Correct cursor position after Transition Insert Correct logic to parse Transition Link Token Correct Save Config to dispose of ITEM Removed debug vlnStackTrace
This commit is contained in:
@@ -17,6 +17,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
public partial class DisplayRO : UserControl
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Properties
|
||||
private DisplayTabControl _TabControl;
|
||||
|
||||
@@ -494,15 +495,16 @@ namespace Volian.Controls.Library
|
||||
string linktxt = string.Format(@"#Link:ReferencedObject:<NewID> {0} {1}", padroid, _MyROFST.MyRODb.RODbID);
|
||||
// Resolve symbols and scientific notation in the RO return value
|
||||
string valtxt = ConvertSymbolsAndStuff(selectedChld.value);
|
||||
_MyRTB.InsertRO(valtxt, linktxt);
|
||||
//_MyRTB.Select(_MyRTB.SelectionStart + valtxt.Length + linktxt.Length, 0);
|
||||
int ss = _MyRTB.SelectionStart;
|
||||
_MyRTB.SaveText();
|
||||
//_MyRTB.Select(_MyRTB.SelectionStart + valtxt.Length + linktxt.Length, 0);
|
||||
//_MyRTB.Select(_MyRTB.SelectionStart + valtxt.Length, 0);
|
||||
//_MyRTB.Select(_MyRTB.SelectionStart + 1, 0);
|
||||
_MyRTB.Select(ss + valtxt.Length + linktxt.Length+1, 0);
|
||||
//_MyRTB.Select(ss, 0);
|
||||
int ss = _MyRTB.SelectionStart; // Remember where the link is being added
|
||||
_MyRTB.InsertRO(valtxt, linktxt); // Insert the LINK
|
||||
_MyRTB.SaveText(); // Save the text with the LINK - This also moves the cursor to the end of the text
|
||||
// By selecting a starting position within a link, StepRTB (HandleSelectionChange) will select the link
|
||||
_MyRTB.Select(ss + 7 + valtxt.Length , 0);// Select the link, Try 7 for "<Start]" plus the length of the value
|
||||
//Console.WriteLine("'{0}'",_MyRTB.Text.Substring(_MyRTB.SelectionStart,_MyRTB.SelectionLength));
|
||||
string linkText = _MyRTB.Text.Substring(_MyRTB.SelectionStart, _MyRTB.SelectionLength);
|
||||
if (_MyLog.IsInfoEnabled && (linkText.Contains("NewID") || linkText.Contains("CROUSGID")))
|
||||
_MyLog.InfoFormat("ItemID {0}, LinkText '{1}'", _MyRTB.MyItemInfo.ItemID, linkText);
|
||||
_MyRTB.Select(_MyRTB.SelectionStart + _MyRTB.SelectionLength, 0);// Move cursor to end of LINK
|
||||
_MyRTB.Focus();
|
||||
}
|
||||
_MyRTB.inRoAdd = false;
|
||||
|
Reference in New Issue
Block a user