This commit is contained in:
parent
edfc3d71b0
commit
ce3b1b4be9
@ -176,7 +176,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
public class RtfLine : List<RtfPiece>
|
||||
{
|
||||
private static Regex _RegRtfText = new Regex(@"((\\[^'u ]*)+( |$))?(<START\]|#Link.*?\[END>|\\'[0-9a-fA-F]{2}|\\u[0-9]*\?|[^\\]{1}|$|)");
|
||||
private static Regex _RegRtfText = new Regex(@"((\\[^'u ]*|\\up[0-9]|\\ul0?)+( |$))?(<START\]|#Link.*?\[END>|\\'[0-9a-fA-F]{2}|\\u[0-9]*\?|[^\\]{1}|$|)");
|
||||
public RtfLine(string text)
|
||||
{
|
||||
MatchCollection matches = _RegRtfText.Matches(text);
|
||||
@ -190,8 +190,11 @@ namespace Volian.Controls.Library
|
||||
//Console.WriteLine(text.Substring(nextIndex));
|
||||
}
|
||||
nextIndex = match.Index + match.Length;
|
||||
if (match.Groups[2].ToString().Length + match.Groups[4].ToString().Length > 0)
|
||||
this.Add(new RtfPiece(match.Groups[2].ToString(), match.Groups[4].ToString()));
|
||||
string rtfPart = match.Groups[1].ToString();
|
||||
if (match.Groups[1].ToString().TrimEnd(" ".ToCharArray()).Length + match.Groups[4].ToString().Length > 0)
|
||||
this.Add(new RtfPiece(match.Groups[1].ToString().TrimEnd(" ".ToCharArray()), match.Groups[4].ToString()));
|
||||
//if (match.Groups[1].ToString().Length + match.Groups[4].ToString().Length > 0)
|
||||
// this.Add(new RtfPiece(match.Groups[1].ToString(), match.Groups[4].ToString()));
|
||||
}
|
||||
}
|
||||
public RtfLine(int width, string left, string fill, string right)
|
||||
|
@ -212,6 +212,7 @@ namespace Volian.Controls.Library
|
||||
Font = formatFont;
|
||||
else
|
||||
Font = new Font(_MyFontFamily == null ? formatFont.FontFamily : _MyFontFamily, formatFont.Size, formatFont.Style);
|
||||
//Font = new Font("Bookman Old Style", formatFont.Size, formatFont.Style);
|
||||
#elif(RELEASE)
|
||||
Font = _origDisplayText.TextFont.WindowsFont; // font defined in plant's format
|
||||
#else //DEMO
|
||||
@ -273,6 +274,8 @@ namespace Volian.Controls.Library
|
||||
// }
|
||||
//}
|
||||
_origRTF = Rtf;
|
||||
if (_MyItemInfo.ItemID == 74)
|
||||
Console.WriteLine("'{0}'", Rtf);
|
||||
_InitializingRTB = false;
|
||||
_MyItemInfo.MyConfig.PropertyChanged += new PropertyChangedEventHandler(MyConfig_PropertyChanged);
|
||||
AdjustSizeForContents(!edit); // TODO: this is not quite right yet.
|
||||
@ -416,17 +419,22 @@ namespace Volian.Controls.Library
|
||||
void StepRTB_ContextMenuStripChanged(object sender, EventArgs e)
|
||||
{
|
||||
//Console.WriteLine("********** StepRTB_ContextMenuStripChanged");
|
||||
int sublocation = 0;
|
||||
try
|
||||
{
|
||||
Console.WriteLine("{0}", ContextMenuStrip.GetType().FullName);
|
||||
//Console.WriteLine("{0}", ContextMenuStrip.GetType().FullName);
|
||||
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ClearContextMenu();
|
||||
sublocation = 1;
|
||||
_ContextMenuStripChanged = true;
|
||||
sublocation = 2;
|
||||
_ContextMenuStepRTB = this;
|
||||
sublocation = 3;
|
||||
_ContextMenuStrip = ContextMenuStrip;
|
||||
sublocation = 4;
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Console.WriteLine("{0} - {1}", ex.GetType().Name, ex.Message);
|
||||
Console.WriteLine("StepRTB_ContextMenuStripChanged {0} - {1} [{2}]", ex.GetType().Name, ex.Message, sublocation);
|
||||
}
|
||||
}
|
||||
private void SetUpStepRTB()
|
||||
@ -1681,10 +1689,13 @@ namespace Volian.Controls.Library
|
||||
break;
|
||||
case Keys.Enter:
|
||||
if (!e.Control && !e.Shift && !e.Alt)
|
||||
{
|
||||
if (!MyStepItem.MyItemInfo.IsTablePart)
|
||||
{
|
||||
e.Handled = true;
|
||||
MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ProcessEnterKey();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user