Minor fix to RTB and logic to set font for Debug

Comment-out debug code
This commit is contained in:
Rich 2009-03-28 22:32:25 +00:00
parent 0288bddba7
commit c56e3f07ef
2 changed files with 9 additions and 3 deletions

View File

@ -76,7 +76,13 @@ namespace Volian.Controls.Library
//_InitializingRTB = true; //_InitializingRTB = true;
DisplayText vlntxt = new DisplayText(_MyItemInfo, EpMode, VwMode); DisplayText vlntxt = new DisplayText(_MyItemInfo, EpMode, VwMode);
_origDisplayText = vlntxt; _origDisplayText = vlntxt;
#if(DEBUG)
// Use Times New Roman for Debugging
Font = new Font("Times New Roman", 14, FontStyle.Regular);
//Font = _origDisplayText.TextFont.WindowsFont; //Font = _origDisplayText.TextFont.WindowsFont;
#else
Font = _origDisplayText.TextFont.WindowsFont;
#endif
Text = ""; // Initialize text before add text Text = ""; // Initialize text before add text
//if (_MyStepItem.MyID == 168) //if (_MyStepItem.MyID == 168)
@ -432,7 +438,7 @@ namespace Volian.Controls.Library
else else
{ {
AddLinkLocation(myDisplayLinkElement.Text, myDisplayLinkElement.Link); AddLinkLocation(myDisplayLinkElement.Text, myDisplayLinkElement.Link);
_SelectedRtfSB.Append(@"\f0\fs20 "); _SelectedRtfSB.Append(@"\f0 ");
_SelectedRtfSB.Append(myDisplayLinkElement.Text); _SelectedRtfSB.Append(myDisplayLinkElement.Text);
_SelectedRtfSB.Append(@"\v "); _SelectedRtfSB.Append(@"\v ");
_SelectedRtfSB.Append(myDisplayLinkElement.Link); _SelectedRtfSB.Append(myDisplayLinkElement.Link);

View File

@ -35,7 +35,7 @@ namespace Volian.Controls.Library
_MyStepRTB = value; _MyStepRTB = value;
if (value != null) if (value != null)
{ {
Console.WriteLine(string.Format("StepTabRibbon: In set of MyStepRTB, Selected Text = {0}", MyStepRTB.SelectedText)); //Console.WriteLine(string.Format("StepTabRibbon: In set of MyStepRTB, Selected Text = {0}", MyStepRTB.SelectedText));
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfEdit); _ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfEdit);
//_MyStepRTB.SelectionChanged += new EventHandler(MyStepRTB_SelectionChanged); //_MyStepRTB.SelectionChanged += new EventHandler(MyStepRTB_SelectionChanged);
_MyStepRTB.MouseUp += new MouseEventHandler(MyStepRTB_SelectionChanged); _MyStepRTB.MouseUp += new MouseEventHandler(MyStepRTB_SelectionChanged);
@ -117,7 +117,7 @@ namespace Volian.Controls.Library
} }
void MyStepRTB_SelectionChanged(object sender, EventArgs e) void MyStepRTB_SelectionChanged(object sender, EventArgs e)
{ {
Console.WriteLine(string.Format("StepTabRibbon: In MyStepRTB_SelectionChanged, Selected Text = {0}",MyStepRTB.SelectedText)); //Console.WriteLine(string.Format("StepTabRibbon: In MyStepRTB_SelectionChanged, Selected Text = {0}",MyStepRTB.SelectedText));
SetButtonAndMenuEnabling(); SetButtonAndMenuEnabling();
} }
void btnInsStep_Click(object sender, EventArgs e) void btnInsStep_Click(object sender, EventArgs e)