Supporting logic to handle the use of the backslash character
Supporting logic to handle the use of the backslash character, and question marks Supporting logic to handle the use of the backslash character, dashes, and symbols Supporting logic to handle the use of the backslash character and dashes
This commit is contained in:
@@ -1235,6 +1235,7 @@ namespace Volian.Controls.Library
|
||||
int position = SelectionStart;
|
||||
SelectionLength = 0;
|
||||
linkValue = linkValue.Replace("\\u8209?", "\\f1\\u8209?\\f0 ");
|
||||
linkValue = linkValue.Replace("\\u9586?", "\\f1\\u9586?\\f0 "); // backslash symbol
|
||||
linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 ");
|
||||
linkValue = linkValue.Replace(@"{", @"\{");
|
||||
linkValue = linkValue.Replace(@"}", @"\}");
|
||||
@@ -1939,6 +1940,7 @@ namespace Volian.Controls.Library
|
||||
using (StepRTB srtb = new StepRTB())
|
||||
{
|
||||
srtb.Rtf = this.SelectedRtf.Replace(@"\u8209?", "-");
|
||||
srtb.Rtf = srtb.Rtf.Replace(@"\u9586?", @"\\");
|
||||
string rtnstr = "";
|
||||
string ctxt = srtb.Text;//this.SelectedText;
|
||||
if (ctxt.EndsWith("<START]"))
|
||||
@@ -2416,6 +2418,8 @@ namespace Volian.Controls.Library
|
||||
string strpressed = null;
|
||||
if (e.KeyChar == '-')
|
||||
strpressed = GetAddSymbolText(@"\u8209?");
|
||||
else if (e.KeyChar == '\\')
|
||||
strpressed = GetAddSymbolText(@"\u9586?");
|
||||
else
|
||||
strpressed = e.KeyChar.ToString();
|
||||
if (e.KeyChar >= ' ')
|
||||
@@ -2445,7 +2449,8 @@ namespace Volian.Controls.Library
|
||||
else if (e.KeyChar == '}')
|
||||
AddRtf(@"\}");
|
||||
else if (e.KeyChar == '\\')
|
||||
AddRtf(@"\\");
|
||||
AddSymbol(@"\u9586?"); // unicode hex 2572
|
||||
//AddRtf(@"\\");
|
||||
else
|
||||
return;
|
||||
e.Handled = true; // flag that it's been handled, otherwise, will get 2 chars.
|
||||
@@ -2504,6 +2509,7 @@ namespace Volian.Controls.Library
|
||||
ptext = ptext.Replace("\u2013", "-"); // Replace EN Dash with hyphen
|
||||
ptext = ptext.Replace("\u2014", "-"); // Replace EM Dash with hyphen
|
||||
ptext = ptext.Replace("\u2011", "-"); // Replace non-breaking hyphen with hyphen
|
||||
ptext = ptext.Replace("\u2572", "\\"); // Replace backslash symbol with backslash character
|
||||
if (didCharReplace)
|
||||
MessageBox.Show("Replacing pasted characters that are not supported by Proms with a '?'.");
|
||||
return ptext;
|
||||
@@ -2750,6 +2756,7 @@ namespace Volian.Controls.Library
|
||||
bool keepgoing = true;
|
||||
while (keepgoing)
|
||||
{
|
||||
str = str.Replace("\\", "\u2572").Replace("-","\u2011");
|
||||
int pos = savRTF.Find(str, startpos, _FindOptions);
|
||||
keepgoing = false;
|
||||
if (pos >= 0)
|
||||
|
Reference in New Issue
Block a user