private void CodeRefresh() { //RichTextBox rtb = new RichTextBox(); int sel = rtb_Code.SelectionIndent; int ss = rtb_Code.SelectionStart; if (tscb_EditorStyle.SelectedIndex < 2) { RichTextBox rtb = rtb_Code; MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, MRLTools.StartSignTag, MRLTools.EndSignTag, Color.Black); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, MRLTools.StartSignAttributeTag, MRLTools.EndSignAttributeTag, Color.Gray); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, MRLTools.StartSignAttachTag, MRLTools.EndSignAttachTag, Color.ForestGreen); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, MRLTools.StartSignAutoTag, MRLTools.EndSignAutoTag, Color.SlateBlue); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, MRLTools.StartSignFieldTag, MRLTools.EndSignFieldTag, Color.Red); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "HEADER", ">", Color.Crimson); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "CONTENT", ">", Color.Crimson); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "FOOTER", ">", Color.Crimson); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, MRLTools.StartSignCommandTag[0].ToString(), MRLTools.EndSignCommandTag, Color.DarkViolet); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, MRLTools.StartSignCommandTag, MRLTools.EndSignCommandTag, Color.DarkViolet); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, MRLTools.StartSignParenthesis, MRLTools.EndSignParenthesis, Color.DarkCyan); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "'", "'", Color.DarkRed); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, MRLTools.StartSignString, MRLTools.EndSignString, Color.DarkRed); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, MRLTools.StartSignStrongString, MRLTools.EndSignStrongString, Color.DarkRed); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, MRLTools.StartSignComment, MRLTools.EndSignComment, Color.LightGreen); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, MRLTools.StartSignDepletableTag, MRLTools.EndSignDepletableTag, Color.DarkGray); //rtb_Code = rtb; } rtb_Code.SelectionStart = ss; rtb_Code.SelectionIndent = sel; ReportStyle.MRLCode = rtb_Code.Text; }
private void CssRefresh() { //RichTextBox rtb = new RichTextBox(); int sel = rtb_Template.SelectionIndent; int ss = rtb_Template.SelectionStart; if (tscb_EditorStyle.SelectedIndex < 3) { RichTextBox rtb = rtb_Template; MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, ".", "{", Color.Firebrick); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "{", "}", Color.OrangeRed); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, ":", ";", Color.Blue); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "<!-", "->", Color.LightGreen); //rtb_Template = rtb; } rtb_Template.SelectionStart = ss; rtb_Template.SelectionIndent = sel; ReportStyle.Css = rtb_Template.Text; }
private void HTMLRefresh() { Restart(false); rtb_HTML.Text = GetVeiwHTML(); //RichTextBox rtb = new RichTextBox(); int sel = rtb_HTML.SelectionIndent; int ss = rtb_HTML.SelectionStart; if (tscb_EditorStyle.SelectedIndex < 5) { RichTextBox rtb = rtb_HTML; MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "\"", "\"", Color.DarkRed); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "'", "'", Color.DarkRed); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "<", ">", Color.Maroon); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "<!--", "-->", Color.LightGreen); //rtb_HTML = rtb; } rtb_HTML.SelectionStart = ss; rtb_HTML.SelectionIndent = sel; }
private void ScriptRefresh() { //RichTextBox rtb = new RichTextBox(); int sel = rtb_Script.SelectionIndent; int ss = rtb_Script.SelectionStart; if (tscb_EditorStyle.SelectedIndex < 4) { RichTextBox rtb = rtb_Script; MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "}", "{", Color.Black); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "(", ")", Color.DarkCyan); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "{", "}", Color.Black); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, ";", ";", Color.Maroon); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "/*", "*/", Color.LightGreen); MiMFa_ControlService.RichTextBoxChangeWordColor(ref rtb, "//", Environment.NewLine, Color.LightGreen); //rtb_Script = rtb; } rtb_Script.SelectionStart = ss; rtb_Script.SelectionIndent = sel; ReportStyle.Script = rtb_Script.Text; }