C2022-003-Change-Textboxes-to-RTF-3
This commit is contained in:
@@ -96,7 +96,7 @@ namespace ROEditor
|
|||||||
private System.Windows.Forms.Label lblW2;
|
private System.Windows.Forms.Label lblW2;
|
||||||
private System.Windows.Forms.Label lblW3;
|
private System.Windows.Forms.Label lblW3;
|
||||||
private System.Windows.Forms.Label lblW4;
|
private System.Windows.Forms.Label lblW4;
|
||||||
private System.Windows.Forms.RichTextBox tbSingleTxtWid; // RO Editor add symbols C2025 - 003
|
private System.Windows.Forms.RichTextBox tbSingleTxtWid; // RO Editor add symbols C2022 - 003
|
||||||
private System.Windows.Forms.RichTextBox tbVariableTxtWid;
|
private System.Windows.Forms.RichTextBox tbVariableTxtWid;
|
||||||
private System.Windows.Forms.RichTextBox tbTableWid;
|
private System.Windows.Forms.RichTextBox tbTableWid;
|
||||||
private System.Windows.Forms.RichTextBox tbXYPlotWid;
|
private System.Windows.Forms.RichTextBox tbXYPlotWid;
|
||||||
@@ -218,7 +218,7 @@ namespace ROEditor
|
|||||||
this.lblFieldName = new System.Windows.Forms.Label();
|
this.lblFieldName = new System.Windows.Forms.Label();
|
||||||
this.tbFieldName = new System.Windows.Forms.TextBox();
|
this.tbFieldName = new System.Windows.Forms.TextBox();
|
||||||
this.gbAlternatives = new System.Windows.Forms.GroupBox();
|
this.gbAlternatives = new System.Windows.Forms.GroupBox();
|
||||||
this.tbXYPlotWid = new System.Windows.Forms.RichTextBox(); // RO Editor add symbols C2025 - 003
|
this.tbXYPlotWid = new System.Windows.Forms.RichTextBox(); // RO Editor add symbols C2022 - 003
|
||||||
this.tbTableWid = new System.Windows.Forms.RichTextBox();
|
this.tbTableWid = new System.Windows.Forms.RichTextBox();
|
||||||
this.tbVariableTxtWid = new System.Windows.Forms.RichTextBox();
|
this.tbVariableTxtWid = new System.Windows.Forms.RichTextBox();
|
||||||
this.tbSingleTxtWid = new System.Windows.Forms.RichTextBox();
|
this.tbSingleTxtWid = new System.Windows.Forms.RichTextBox();
|
||||||
|
|||||||
@@ -302,7 +302,8 @@ using Org.Mentalis.Files;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Volian.Controls.Library;
|
//using Volian.Controls.Library;
|
||||||
|
using Volian.Base.Library;
|
||||||
using VEPROMS.CSLA.Library;
|
using VEPROMS.CSLA.Library;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Drawing.Text;
|
using System.Drawing.Text;
|
||||||
@@ -310,8 +311,6 @@ using System.Drawing.Drawing2D;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
//using IniFileIO;
|
//using IniFileIO;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace ROEditor
|
namespace ROEditor
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -361,7 +360,7 @@ namespace ROEditor
|
|||||||
private TreeNode LastSelectedNode;
|
private TreeNode LastSelectedNode;
|
||||||
private RichTextBox _CurrentTextBox; // currently selected TextBox field
|
private RichTextBox _CurrentTextBox; // currently selected TextBox field
|
||||||
public static string[] PCChildren; //C2021-026 list of Parent/Child Children
|
public static string[] PCChildren; //C2021-026 list of Parent/Child Children
|
||||||
private StepTabRibbon _MyStepTabRibbon;
|
//private StepTabRibbon _MyStepTabRibbon;
|
||||||
|
|
||||||
public RichTextBox CurrentTextBox
|
public RichTextBox CurrentTextBox
|
||||||
{
|
{
|
||||||
@@ -369,6 +368,19 @@ namespace ROEditor
|
|||||||
set { _CurrentTextBox = value; }
|
set { _CurrentTextBox = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string _RO_IDEN;
|
||||||
|
public static string RO_IDEN
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _RO_IDEN;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_RO_IDEN = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public List<TreeNode> ROsSelectedforMultiMove { get; set; } //to allow multiple RO nodes to be selected
|
public List<TreeNode> ROsSelectedforMultiMove { get; set; } //to allow multiple RO nodes to be selected
|
||||||
public bool ROCutWasSelected { get; set; } = false;
|
public bool ROCutWasSelected { get; set; } = false;
|
||||||
|
|
||||||
@@ -380,7 +392,6 @@ namespace ROEditor
|
|||||||
private System.Windows.Forms.ListView roListView;
|
private System.Windows.Forms.ListView roListView;
|
||||||
private System.Windows.Forms.ToolBar tbar;
|
private System.Windows.Forms.ToolBar tbar;
|
||||||
|
|
||||||
//this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl();
|
|
||||||
private bool _duplicate_active;
|
private bool _duplicate_active;
|
||||||
private bool duplicate_active
|
private bool duplicate_active
|
||||||
{
|
{
|
||||||
@@ -409,7 +420,7 @@ namespace ROEditor
|
|||||||
// Required for Windows Form Designer support
|
// Required for Windows Form Designer support
|
||||||
//
|
//
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
getSymbols();
|
getSymbols(); // RO Editor add symbols C2022 - 003
|
||||||
// B2019-082 set the date format on the VEPROMS.exe thread to U.S. for i/o of a date string
|
// B2019-082 set the date format on the VEPROMS.exe thread to U.S. for i/o of a date string
|
||||||
// this is to correct an issue for a UAE customer who could not open some procedures due to the desktop date setting using the "DD/MM/YYYY" instead of the "MM/DD/YYYY" format
|
// this is to correct an issue for a UAE customer who could not open some procedures due to the desktop date setting using the "DD/MM/YYYY" instead of the "MM/DD/YYYY" format
|
||||||
// NOTE: not doing the "Using System.Threading;" statement at beginning of file because it conflicts with the declaration of the "Timer" variable
|
// NOTE: not doing the "Using System.Threading;" statement at beginning of file because it conflicts with the declaration of the "Timer" variable
|
||||||
@@ -875,7 +886,7 @@ namespace ROEditor
|
|||||||
|
|
||||||
// Should the save option be available?
|
// Should the save option be available?
|
||||||
// Just reflect the Save button state.
|
// Just reflect the Save button state.
|
||||||
roTreeView.ContextMenu.MenuItems[6].Enabled = rbtnSave.Enabled; // RO Editor add symbols C2025 - 003
|
roTreeView.ContextMenu.MenuItems[6].Enabled = rbtnSave.Enabled; // RO Editor add symbols C2022 - 003
|
||||||
menuROSave.Enabled = rbtnSave.Enabled;
|
menuROSave.Enabled = rbtnSave.Enabled;
|
||||||
|
|
||||||
// Should the properties menu item be available?
|
// Should the properties menu item be available?
|
||||||
@@ -954,7 +965,7 @@ namespace ROEditor
|
|||||||
this.panel2.Controls.Remove(ctlXMLEdit2);
|
this.panel2.Controls.Remove(ctlXMLEdit2);
|
||||||
this.panel2.Visible = false;
|
this.panel2.Visible = false;
|
||||||
|
|
||||||
rbtnSave.Enabled = false; // RO Editor add symbols C2025 - 003
|
rbtnSave.Enabled = false; // RO Editor add symbols C2022 - 003
|
||||||
menuROSave.Enabled = rbtnSave.Enabled;
|
menuROSave.Enabled = rbtnSave.Enabled;
|
||||||
rbtnRestore.Enabled = false;
|
rbtnRestore.Enabled = false;
|
||||||
rbtnSaveAs.Enabled = false;
|
rbtnSaveAs.Enabled = false;
|
||||||
@@ -993,6 +1004,7 @@ namespace ROEditor
|
|||||||
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||||
ctlXMLEdit2.TabIndex = 4;
|
ctlXMLEdit2.TabIndex = 4;
|
||||||
ctlXMLEdit2.Tag = "";
|
ctlXMLEdit2.Tag = "";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Spin through all of the controls and assign an event handler
|
* Spin through all of the controls and assign an event handler
|
||||||
* for changed text so that when the user changes any of the RO Text,
|
* for changed text so that when the user changes any of the RO Text,
|
||||||
@@ -1018,8 +1030,10 @@ namespace ROEditor
|
|||||||
TmpInfo.Click += new EventHandler(ctlXMLEdit2_ClickControl);
|
TmpInfo.Click += new EventHandler(ctlXMLEdit2_ClickControl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ctlXMLEdit2.EnableDisableSymbolsBtn += new ctlXMLEditLib.ctlXMLEdit.ctlXMLEditEvent(EnableDisableSymbolsBtn);
|
||||||
|
RO_IDEN = curelem.GetAccPageIDTemplate();
|
||||||
this.panel2.Controls.Add(ctlXMLEdit2);
|
this.panel2.Controls.Add(ctlXMLEdit2);
|
||||||
rbtnCancel.Enabled = true; // RO Editor add symbols C2025 - 003
|
rbtnCancel.Enabled = true; // RO Editor add symbols C2022 - 003
|
||||||
rbtnSymbols.Enabled = true;
|
rbtnSymbols.Enabled = true;
|
||||||
}
|
}
|
||||||
// C2021-026 Get a list of fields that are P/C enabled
|
// C2021-026 Get a list of fields that are P/C enabled
|
||||||
@@ -1154,6 +1168,7 @@ namespace ROEditor
|
|||||||
this.menuEditCopy.Enabled = true;
|
this.menuEditCopy.Enabled = true;
|
||||||
this.menuEditCut.Enabled = true;
|
this.menuEditCut.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
object dataobj = System.Windows.Forms.Clipboard.GetDataObject();
|
object dataobj = System.Windows.Forms.Clipboard.GetDataObject();
|
||||||
if (dataobj != null)
|
if (dataobj != null)
|
||||||
this.menuEditPaste.Enabled = true;
|
this.menuEditPaste.Enabled = true;
|
||||||
@@ -1172,6 +1187,32 @@ namespace ROEditor
|
|||||||
menuROSave.Enabled = rbtnSave.Enabled;
|
menuROSave.Enabled = rbtnSave.Enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RTBSymbolsOnOff(string nm)
|
||||||
|
{
|
||||||
|
string RO_IDENDITY = RO_IDEN.Substring(1, RO_IDEN.Length - 2);
|
||||||
|
if (this.CurrentTextBox.Name == RO_IDENDITY)
|
||||||
|
{
|
||||||
|
rbtnSymbols.Enabled = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rbtnSymbols.Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void EnableDisableSymbolsBtn(object sender, ctlXMLEditEventArgs args)
|
||||||
|
{
|
||||||
|
if (args.DisplaySymBolBtn == false)
|
||||||
|
{
|
||||||
|
rbtnSymbols.Enabled = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rbtnSymbols.Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//EnableDisableSymbolsBtn(sender, new ctlXMLEditEventArgs(args.idName));
|
||||||
|
|
||||||
protected void ctlXMLEdit2_TextChanged(object sender, EventArgs e)
|
protected void ctlXMLEdit2_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -1293,8 +1334,8 @@ namespace ROEditor
|
|||||||
this.imageListRoTree = new System.Windows.Forms.ImageList(this.components);
|
this.imageListRoTree = new System.Windows.Forms.ImageList(this.components);
|
||||||
this.splitter1 = new System.Windows.Forms.Splitter();
|
this.splitter1 = new System.Windows.Forms.Splitter();
|
||||||
this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl();
|
this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl();
|
||||||
this.ribbonPanel1 = new DevComponents.DotNetBar.RibbonPanel(); // RO Editor add symbols C2025 - 003
|
this.ribbonPanel1 = new DevComponents.DotNetBar.RibbonPanel(); // RO Editor add symbols C2022 - 003
|
||||||
this.ribbonBar1 = new DevComponents.DotNetBar.RibbonBar(); // RO Editor add symbols C2025 - 003
|
this.ribbonBar1 = new DevComponents.DotNetBar.RibbonBar(); // RO Editor add symbols C2022 - 003
|
||||||
this.rbtnSave = new DevComponents.DotNetBar.ButtonItem();
|
this.rbtnSave = new DevComponents.DotNetBar.ButtonItem();
|
||||||
this.rbtnCancel = new DevComponents.DotNetBar.ButtonItem();
|
this.rbtnCancel = new DevComponents.DotNetBar.ButtonItem();
|
||||||
this.rbtnRestore = new DevComponents.DotNetBar.ButtonItem();
|
this.rbtnRestore = new DevComponents.DotNetBar.ButtonItem();
|
||||||
@@ -1367,7 +1408,7 @@ namespace ROEditor
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // RO Editor add symbols C2025 - 003
|
this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // RO Editor add symbols C2022 - 003
|
||||||
this.ribbonControl1.CaptionVisible = true;
|
this.ribbonControl1.CaptionVisible = true;
|
||||||
this.ribbonControl1.Controls.Add(this.ribbonPanel1);
|
this.ribbonControl1.Controls.Add(this.ribbonPanel1);
|
||||||
this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top;
|
this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
@@ -1407,7 +1448,7 @@ namespace ROEditor
|
|||||||
//
|
//
|
||||||
// ribbonPanel1
|
// ribbonPanel1
|
||||||
//
|
//
|
||||||
this.ribbonPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; // RO Editor add symbols C2025 - 003
|
this.ribbonPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; // RO Editor add symbols C2022 - 003
|
||||||
this.ribbonPanel1.Controls.Add(this.ribbonBar1);
|
this.ribbonPanel1.Controls.Add(this.ribbonBar1);
|
||||||
this.ribbonPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.ribbonPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.ribbonPanel1.Location = new System.Drawing.Point(0, 0);
|
this.ribbonPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
@@ -1927,104 +1968,7 @@ namespace ROEditor
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//private void BuildSymbolGallery(SymbolList sl, DevComponents.DotNetBar.GalleryContainer gc1, DevComponents.DotNetBar.GalleryContainer gc2, DevComponents.DotNetBar.GalleryContainer gc3, DevComponents.DotNetBar.GalleryContainer gc4)
|
|
||||||
//{
|
|
||||||
// foreach (Symbol sym in sl)
|
|
||||||
// {
|
|
||||||
// // get an image of the symbol character
|
|
||||||
// // found the we cannot change the font being used for the button text
|
|
||||||
// Bitmap symCharBtmp = createTextBitmap(
|
|
||||||
// (char)sym.Unicode);
|
|
||||||
// DevComponents.DotNetBar.ButtonItem btn = new DevComponents.DotNetBar.ButtonItem();
|
|
||||||
// btn.Image = symCharBtmp;
|
|
||||||
// //btn.Text = string.Format("{0}", (char)sym.Unicode);
|
|
||||||
|
|
||||||
// // to name button use unicode rather than desc, desc may have spaces or odd chars
|
|
||||||
// btn.Name = "btn" + sym.Unicode.ToString();
|
|
||||||
// btn.Tooltip = sym.Desc;
|
|
||||||
// btn.Tag = string.Format(@"{0}", sym.Unicode);
|
|
||||||
// //btn.FontBold = true;
|
|
||||||
// btn.Click += new System.EventHandler(btnSym_Click);
|
|
||||||
// galleryContainerSymbols.SubItems.Add(btn);
|
|
||||||
// DevComponents.DotNetBar.ButtonItem btnCM1 = GetCMButton(sym);
|
|
||||||
// btnCM1.Image = symCharBtmp;
|
|
||||||
// btnCM1.Click += new System.EventHandler(btnSym_Click);
|
|
||||||
// gc1.SubItems.Add(btnCM1);
|
|
||||||
// DevComponents.DotNetBar.ButtonItem btnCM2 = GetCMButton(sym);
|
|
||||||
// btnCM2.Image = symCharBtmp;
|
|
||||||
// btnCM2.Click += new System.EventHandler(btnSym_Click);
|
|
||||||
// gc2.SubItems.Add(btnCM2);
|
|
||||||
// DevComponents.DotNetBar.ButtonItem btnCM3 = GetCMButton(sym);
|
|
||||||
// btnCM3.Image = symCharBtmp;
|
|
||||||
// btnCM3.Click += new System.EventHandler(btnSym_Click);
|
|
||||||
// gc3.SubItems.Add(btnCM3);
|
|
||||||
// DevComponents.DotNetBar.ButtonItem btnCM4 = GetCMButton(sym);
|
|
||||||
// btnCM4.Image = symCharBtmp;
|
|
||||||
// btnCM4.Click += new System.EventHandler(btnSym_Click);
|
|
||||||
// gc4.SubItems.Add(btnCM4);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//private void btnSym_Click(object sender, EventArgs e)
|
|
||||||
//{
|
|
||||||
// DevComponents.DotNetBar.ButtonItem b = (DevComponents.DotNetBar.ButtonItem)sender;
|
|
||||||
// StartGridEditing(SelectionOption.Start); // If in a FlexGrid, start the editor for a cell
|
|
||||||
// _MyStepTabRibbon.MyStepRTB.InsertSymbol(Convert.ToInt32(b.Tag));
|
|
||||||
// //_MyStepTabRibbon.
|
|
||||||
//}
|
|
||||||
//private enum SelectionOption
|
|
||||||
//{
|
|
||||||
// Start,
|
|
||||||
// All,
|
|
||||||
// End
|
|
||||||
//}
|
|
||||||
|
|
||||||
//private void StartGridEditing(SelectionOption selOpt)
|
|
||||||
//{
|
|
||||||
// // Bug fix: B2012-203, B2012-204
|
|
||||||
// // Need to check if the selected table cell is in edit mode already.
|
|
||||||
// // if already in edit mode, we don't want to do the StartEditing code below, because it
|
|
||||||
// // will override the current cursor positioning and selection range.
|
|
||||||
// Control ctrl = FindActiveControl();
|
|
||||||
// if (ctrl == null) return; // B2018-008 If a null is returned, don't do anything
|
|
||||||
// if (ctrl is VlnFlexGrid)
|
|
||||||
// {
|
|
||||||
// // Selected table cell is not in edit mode. Go into edit mode and position acording
|
|
||||||
// // to the pass in selOpt.
|
|
||||||
// if (MyFlexGrid != null && MyFlexGrid.Editor == null)
|
|
||||||
// {
|
|
||||||
// MyFlexGrid.StartEditing();
|
|
||||||
// switch (selOpt)
|
|
||||||
// {
|
|
||||||
// case SelectionOption.Start:
|
|
||||||
// MyStepRTB.Select(0, 0);
|
|
||||||
// break;
|
|
||||||
// case SelectionOption.All:
|
|
||||||
// MyStepRTB.SelectAll();
|
|
||||||
// break;
|
|
||||||
// case SelectionOption.End:
|
|
||||||
// MyStepRTB.Select(MyStepRTB.TextLength, 0);
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// MyStepRTB.Select(0, 0);
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//private static DevComponents.DotNetBar.ButtonItem GetCMButton(Symbol sym)
|
|
||||||
//{
|
|
||||||
// DevComponents.DotNetBar.ButtonItem btnCM3 = new DevComponents.DotNetBar.ButtonItem();
|
|
||||||
// //btnCM3.Text = string.Format("{0}", (char)sym.Unicode);
|
|
||||||
// // to name button use unicode rather than desc, desc may have spaces or odd chars
|
|
||||||
// btnCM3.Name = "btnCM" + sym.Unicode.ToString();
|
|
||||||
// btnCM3.Tooltip = sym.Desc;
|
|
||||||
// btnCM3.Tag = string.Format(@"{0}", sym.Unicode);
|
|
||||||
// //btnCM3.FontBold = true;
|
|
||||||
// return btnCM3;
|
|
||||||
//}
|
|
||||||
//_MyStepTabRibbon.BuildSymbolGalleryForRO();
|
|
||||||
|
|
||||||
//part of CSM-C2024-027 / Part of 2024 PROMS Upgrades
|
//part of CSM-C2024-027 / Part of 2024 PROMS Upgrades
|
||||||
//Paste Selected - will move individual ROs
|
//Paste Selected - will move individual ROs
|
||||||
@@ -2067,7 +2011,7 @@ namespace ROEditor
|
|||||||
|
|
||||||
roTreeView_ClearAllMultiSelect();
|
roTreeView_ClearAllMultiSelect();
|
||||||
|
|
||||||
rbtnRestore.Enabled = false; // RO Editor add symbols C2025 - 003
|
rbtnRestore.Enabled = false; // RO Editor add symbols C2022 - 003
|
||||||
rbtnSave.Enabled = false;
|
rbtnSave.Enabled = false;
|
||||||
rbtnCancel.Enabled = true;
|
rbtnCancel.Enabled = true;
|
||||||
rbtnSaveAs.Enabled = false;
|
rbtnSaveAs.Enabled = false;
|
||||||
@@ -2925,29 +2869,6 @@ namespace ROEditor
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
// Tool Bar Support
|
|
||||||
*/
|
|
||||||
|
|
||||||
private void tbar_OnClick(object obj, ToolBarButtonClickEventArgs tbbcea)
|
|
||||||
{
|
|
||||||
ToolBarButton tbb = tbbcea.Button;
|
|
||||||
|
|
||||||
// see which event should be called.
|
|
||||||
if (tbb.Text == "Cancel")
|
|
||||||
tbar_CancelClick();
|
|
||||||
else if (tbb.Text == "Save")
|
|
||||||
tbar_SaveClick();
|
|
||||||
else if (tbb.Text == "Save As")
|
|
||||||
tbar_SaveAsClick();
|
|
||||||
else if (tbb.Text == "Duplicate")
|
|
||||||
tbar_DuplicateClick();
|
|
||||||
else if (tbb.Text == "Restore")
|
|
||||||
tbar_RestoreClick();
|
|
||||||
else if (tbb.Text == "Zoom" || tbb.Text == "View Image")
|
|
||||||
ctlXMLEdit2.btnZoom_click(null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void tbar_RestoreClick()
|
private void tbar_RestoreClick()
|
||||||
{
|
{
|
||||||
ctlXMLEdit2.RestoreData();
|
ctlXMLEdit2.RestoreData();
|
||||||
@@ -3038,6 +2959,7 @@ namespace ROEditor
|
|||||||
newt = new TreeNode(mnutitle, img, img);
|
newt = new TreeNode(mnutitle, img, img);
|
||||||
newt.Tag = myro;
|
newt.Tag = myro;
|
||||||
newt.Name = myro.GetAttribute("RecID");
|
newt.Name = myro.GetAttribute("RecID");
|
||||||
|
newt.Text = Regex.Replace(newt.Text, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003
|
||||||
TreeNewparent.Nodes.Add(newt);
|
TreeNewparent.Nodes.Add(newt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3294,16 +3216,16 @@ namespace ROEditor
|
|||||||
nd = curele.SelectSingleNode(nm);
|
nd = curele.SelectSingleNode(nm);
|
||||||
if (nd == null) nd = curele.SelectSingleNode("*/" + nm);
|
if (nd == null) nd = curele.SelectSingleNode("*/" + nm);
|
||||||
if (nd == null)
|
if (nd == null)
|
||||||
nd = curele.GetCurrentOfMultiFields(curele, nm);
|
nd = curele.GetCurrentOfMultiFields(curele, nm); // RO Editor add symbols C2022 - 003
|
||||||
// if (nd==null)nd = curele.SelectSingleNode(nm+"a");
|
|
||||||
// if (nd==null)nd = curele.SelectSingleNode(nm+"b");
|
|
||||||
// if (nd==null)nd = curele.SelectSingleNode(nm+"c");
|
|
||||||
// if (nd==null)nd = curele.SelectSingleNode(nm+"d");
|
|
||||||
string data;
|
string data;
|
||||||
if (nd == null)
|
if (nd == null)
|
||||||
data = " ";
|
data = " ";
|
||||||
else
|
else
|
||||||
|
{
|
||||||
data = nd.InnerText;
|
data = nd.InnerText;
|
||||||
|
data = Regex.Replace(data, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003
|
||||||
|
}
|
||||||
if (first == true)
|
if (first == true)
|
||||||
{
|
{
|
||||||
item = new ListViewItem(data, ROIMAGE);
|
item = new ListViewItem(data, ROIMAGE);
|
||||||
@@ -3380,12 +3302,7 @@ namespace ROEditor
|
|||||||
roListView.Sort();
|
roListView.Sort();
|
||||||
}
|
}
|
||||||
|
|
||||||
//private void roTreeView_AfterSelect_1(object sender, System.Windows.Forms.TreeViewEventArgs e)
|
public void getSymbols() // RO Editor add symbols C2022 - 003
|
||||||
//{
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
public void getSymbols() // RO Editor add symbols C2025 - 003
|
|
||||||
{
|
{
|
||||||
Dictionary<int, string> ROSymbols = buildsymbols();
|
Dictionary<int, string> ROSymbols = buildsymbols();
|
||||||
|
|
||||||
@@ -3410,7 +3327,7 @@ namespace ROEditor
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
private Dictionary<int, string> buildsymbols() // RO Editor add symbols C2025 - 003
|
private Dictionary<int, string> buildsymbols() // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
Dictionary<int, string> symbols1 = new Dictionary<int, string>()
|
Dictionary<int, string> symbols1 = new Dictionary<int, string>()
|
||||||
{
|
{
|
||||||
@@ -3613,7 +3530,7 @@ namespace ROEditor
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rbtnSave_Click(object sender, EventArgs e) // RO Editor add symbols C2025 - 003
|
private void rbtnSave_Click(object sender, EventArgs e) // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
tbar_SaveClick();
|
tbar_SaveClick();
|
||||||
}
|
}
|
||||||
@@ -3644,7 +3561,7 @@ namespace ROEditor
|
|||||||
ctlXMLEdit2.btnZoom_click(null, null);
|
ctlXMLEdit2.btnZoom_click(null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rbtnSymbols_Click(object sender, EventArgs e) // RO Editor add symbols C2025 - 003
|
private void rbtnSymbols_Click(object sender, EventArgs e) // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
DevComponents.DotNetBar.ButtonItem b = (DevComponents.DotNetBar.ButtonItem)sender;
|
DevComponents.DotNetBar.ButtonItem b = (DevComponents.DotNetBar.ButtonItem)sender;
|
||||||
ctlXMLEdit2.TextBoxFocus.InsertSymbol(Convert.ToInt32(b.Tag));
|
ctlXMLEdit2.TextBoxFocus.InsertSymbol(Convert.ToInt32(b.Tag));
|
||||||
|
|||||||
@@ -136,10 +136,6 @@
|
|||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\Volian.Base.Library\bin\Debug\Volian.Base.Library.dll</HintPath>
|
<HintPath>..\..\..\..\Volian.Base.Library\bin\Debug\Volian.Base.Library.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Volian.Controls.Library, Version=1.0.9399.43177, Culture=neutral, processorArchitecture=AMD64">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\..\..\..\Volian.Controls.Library\bin\Debug\Volian.Controls.Library.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AboutROEditor.cs">
|
<Compile Include="AboutROEditor.cs">
|
||||||
|
|||||||
@@ -1910,7 +1910,7 @@ namespace RODBInterface
|
|||||||
string Info = DBE.GetString(3);
|
string Info = DBE.GetString(3);
|
||||||
//B2022-043 &pos; was missing the ;
|
//B2022-043 &pos; was missing the ;
|
||||||
Info = Info.Replace("'", "\'"); // B2021-071: crash when getting/saving field names
|
Info = Info.Replace("'", "\'"); // B2021-071: crash when getting/saving field names
|
||||||
Info = Regex.Replace(Info, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2025 - 003
|
Info = Regex.Replace(Info, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003
|
||||||
|
|
||||||
node.SetAttribute("HasChild", "True");
|
node.SetAttribute("HasChild", "True");
|
||||||
|
|
||||||
@@ -1975,7 +1975,7 @@ namespace RODBInterface
|
|||||||
elem.SetAttribute("RecID", RecID);
|
elem.SetAttribute("RecID", RecID);
|
||||||
elem.SetAttribute("ParentID", node.GetAttribute("RecID"));
|
elem.SetAttribute("ParentID", node.GetAttribute("RecID"));
|
||||||
elem.SetAttribute("Table", node.GetAttribute("Table"));
|
elem.SetAttribute("Table", node.GetAttribute("Table"));
|
||||||
AccPageID = Regex.Replace(AccPageID, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2025 - 003
|
AccPageID = Regex.Replace(AccPageID, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003
|
||||||
elem.SetAttribute("AccPageID", AccPageID);
|
elem.SetAttribute("AccPageID", AccPageID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2186,7 +2186,7 @@ namespace RODBInterface
|
|||||||
parent.SetAttribute("ChildLoaded", "True");
|
parent.SetAttribute("ChildLoaded", "True");
|
||||||
}
|
}
|
||||||
string xmlstr = GenerateXmlString(ro, false);
|
string xmlstr = GenerateXmlString(ro, false);
|
||||||
string tmp2 = Regex.Replace(xmlstr, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2025 - 003
|
string tmp2 = Regex.Replace(xmlstr, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003
|
||||||
string wraccid = null;
|
string wraccid = null;
|
||||||
if (ro.HasAttribute("AccPageID"))
|
if (ro.HasAttribute("AccPageID"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
private System.Windows.Forms.Button btnSave;
|
private System.Windows.Forms.Button btnSave;
|
||||||
private System.Windows.Forms.Button btnCancel;
|
private System.Windows.Forms.Button btnCancel;
|
||||||
private System.Windows.Forms.RichTextBox tbZoom; // RO Editor add symbols C2025 - 003
|
private System.Windows.Forms.RichTextBox tbZoom; // RO Editor add symbols C2022 - 003
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -88,7 +88,7 @@ namespace ctlXMLEditLib
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.tbZoom = new System.Windows.Forms.RichTextBox(); // RO Editor add symbols C2025 - 003
|
this.tbZoom = new System.Windows.Forms.RichTextBox(); // RO Editor add symbols C2022 - 003
|
||||||
this.btnSave = new System.Windows.Forms.Button();
|
this.btnSave = new System.Windows.Forms.Button();
|
||||||
this.btnCancel = new System.Windows.Forms.Button();
|
this.btnCancel = new System.Windows.Forms.Button();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
@@ -99,7 +99,7 @@ namespace ctlXMLEditLib
|
|||||||
this.tbZoom.Location = new System.Drawing.Point(24, 16);
|
this.tbZoom.Location = new System.Drawing.Point(24, 16);
|
||||||
this.tbZoom.Multiline = true;
|
this.tbZoom.Multiline = true;
|
||||||
this.tbZoom.Name = "tbZoom";
|
this.tbZoom.Name = "tbZoom";
|
||||||
this.tbZoom.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; // RO Editor add symbols C2025 - 003
|
this.tbZoom.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; // RO Editor add symbols C2022 - 003
|
||||||
this.tbZoom.Size = new System.Drawing.Size(576, 392);
|
this.tbZoom.Size = new System.Drawing.Size(576, 392);
|
||||||
this.tbZoom.TabIndex = 0;
|
this.tbZoom.TabIndex = 0;
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ using System.Windows;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Volian.Base.Library;
|
using Volian.Base.Library;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
//using IniFileIO;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -225,6 +225,7 @@ namespace ctlXMLEditLib
|
|||||||
///
|
///
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public class ctlXMLEdit : System.Windows.Forms.UserControl
|
public class ctlXMLEdit : System.Windows.Forms.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -269,6 +270,19 @@ namespace ctlXMLEditLib
|
|||||||
private GroupBox pcGrpBox = null;
|
private GroupBox pcGrpBox = null;
|
||||||
/** end C2021-026 **/
|
/** end C2021-026 **/
|
||||||
|
|
||||||
|
public string _RO_IDEN;
|
||||||
|
public string RO_IDEN
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _RO_IDEN;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_RO_IDEN = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// use this struct to define attributes for the text box fields, storing
|
// use this struct to define attributes for the text box fields, storing
|
||||||
// the pattern, radio button association, required field flag, etc.
|
// the pattern, radio button association, required field flag, etc.
|
||||||
struct TextBoxAttrTag
|
struct TextBoxAttrTag
|
||||||
@@ -315,7 +329,7 @@ namespace ctlXMLEditLib
|
|||||||
public string GetParentHTId { get { return parenthtid; } }
|
public string GetParentHTId { get { return parenthtid; } }
|
||||||
public void SetParentHTId(string id) { this.parenthtid = id; }
|
public void SetParentHTId(string id) { this.parenthtid = id; }
|
||||||
}
|
}
|
||||||
private RichTextBox _TextBoxFocus; // RO Editor add symbols C2025 - 003
|
private RichTextBox _TextBoxFocus; // RO Editor add symbols C2022 - 003
|
||||||
public RichTextBox TextBoxFocus
|
public RichTextBox TextBoxFocus
|
||||||
{
|
{
|
||||||
get { return _TextBoxFocus; }
|
get { return _TextBoxFocus; }
|
||||||
@@ -329,6 +343,7 @@ namespace ctlXMLEditLib
|
|||||||
public ctlXMLEdit(VlnXmlElement myelem, XmlSchema myschema, ArrayList reqfields, ArrayList fldsWithApplic, string [] pckids)
|
public ctlXMLEdit(VlnXmlElement myelem, XmlSchema myschema, ArrayList reqfields, ArrayList fldsWithApplic, string [] pckids)
|
||||||
{
|
{
|
||||||
// This call is required by the Windows.Forms Form Designer.
|
// This call is required by the Windows.Forms Form Designer.
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
FieldsWithApplic = fldsWithApplic;
|
FieldsWithApplic = fldsWithApplic;
|
||||||
PCChildren = pckids; //C2021-026 list of Parent/Child children
|
PCChildren = pckids; //C2021-026 list of Parent/Child children
|
||||||
@@ -373,11 +388,12 @@ namespace ctlXMLEditLib
|
|||||||
// Set required fields based on list. (can add message later).
|
// Set required fields based on list. (can add message later).
|
||||||
SetRequiredFields(reqfields);
|
SetRequiredFields(reqfields);
|
||||||
dosaveflag=true;
|
dosaveflag=true;
|
||||||
|
RO_IDEN = myelem.GetAccPageIDTemplate();
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the required fields tag on those fields which are included in the passed
|
// set the required fields tag on those fields which are included in the passed
|
||||||
// in required fields list.
|
// in required fields list.
|
||||||
private void DoSet(RichTextBox hwnd, string msg) // RO Editor add symbols C2025 - 003
|
private void DoSet(RichTextBox hwnd, string msg) // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
if (hwnd == null) return;
|
if (hwnd == null) return;
|
||||||
if (hwnd.Tag != null)
|
if (hwnd.Tag != null)
|
||||||
@@ -680,6 +696,7 @@ namespace ctlXMLEditLib
|
|||||||
// true if success, false if fail.
|
// true if success, false if fail.
|
||||||
// Note that the Parent and Child XML node variables below are not coding for Parent/Child Applicabily Fields
|
// Note that the Parent and Child XML node variables below are not coding for Parent/Child Applicabily Fields
|
||||||
public bool SaveData()
|
public bool SaveData()
|
||||||
|
|
||||||
{
|
{
|
||||||
if (mysavexml)
|
if (mysavexml)
|
||||||
{
|
{
|
||||||
@@ -688,7 +705,7 @@ namespace ctlXMLEditLib
|
|||||||
string imgdate;
|
string imgdate;
|
||||||
|
|
||||||
//go thru the hash table to get textboxes. Find the ones that have text.
|
//go thru the hash table to get textboxes. Find the ones that have text.
|
||||||
foreach (string str in myHT.Keys) // RO Editor add symbols C2025 - 003
|
foreach (string str in myHT.Keys) // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
object o = myHT[str];
|
object o = myHT[str];
|
||||||
hwnd = (RichTextBox) o;
|
hwnd = (RichTextBox) o;
|
||||||
@@ -714,22 +731,6 @@ namespace ctlXMLEditLib
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2025 - 003
|
|
||||||
|
|
||||||
var results = Regex.Matches(hwnd.Text, pattern);
|
|
||||||
|
|
||||||
string num1;
|
|
||||||
|
|
||||||
int num2;
|
|
||||||
|
|
||||||
foreach (Match result in results)
|
|
||||||
{
|
|
||||||
num1 = (result.Groups[1].Value);
|
|
||||||
string resultString = Regex.Match(num1, @"\d+").Value;
|
|
||||||
string resultString1 = string.Format("{0:x}", resultString);
|
|
||||||
num2 = int.Parse(resultString, System.Globalization.NumberStyles.HexNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
hwnd.Text = result1;
|
hwnd.Text = result1;
|
||||||
|
|
||||||
@@ -849,7 +850,7 @@ namespace ctlXMLEditLib
|
|||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// RO Editor add symbols C2025 - 003
|
// RO Editor add symbols C2022 - 003
|
||||||
private static Regex sreg1 = new Regex(@"\\par\r\n(?!\\)");
|
private static Regex sreg1 = new Regex(@"\\par\r\n(?!\\)");
|
||||||
private static Regex sreg2 = new Regex(@"[\r\n]", RegexOptions.Singleline); // Strip Carriage Returns and Newlines
|
private static Regex sreg2 = new Regex(@"[\r\n]", RegexOptions.Singleline); // Strip Carriage Returns and Newlines
|
||||||
private static Regex sreg3 = new Regex(@"^\{(.*)\}$", RegexOptions.Singleline); // Strip Opening and Closing Braces
|
private static Regex sreg3 = new Regex(@"^\{(.*)\}$", RegexOptions.Singleline); // Strip Opening and Closing Braces
|
||||||
@@ -905,7 +906,7 @@ namespace ctlXMLEditLib
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
// RO Editor add symbols C2025 - 003
|
// RO Editor add symbols C2022 - 003
|
||||||
public static string RTFConvertedSymbolsToUnicode(string str)
|
public static string RTFConvertedSymbolsToUnicode(string str)
|
||||||
{
|
{
|
||||||
string rtnStr = str;
|
string rtnStr = str;
|
||||||
@@ -1386,6 +1387,15 @@ namespace ctlXMLEditLib
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public delegate void ctlXMLEditEvent(object sender, ctlXMLEditEventArgs args); // RO Editor add symbols C2022 - 003 for turning off symbols btn for RO ID field.
|
||||||
|
public event ctlXMLEditEvent EnableDisableSymbolsBtn;
|
||||||
|
private void OnEnableDisableSymbolsBtn(ctlXMLEditEventArgs args)
|
||||||
|
{
|
||||||
|
if (EnableDisableSymbolsBtn != null)
|
||||||
|
EnableDisableSymbolsBtn(this, args);
|
||||||
|
}
|
||||||
|
|
||||||
// when data in a text box has changed, flag it (except for when this
|
// when data in a text box has changed, flag it (except for when this
|
||||||
// happens during loading of original data). This flag will be used
|
// happens during loading of original data). This flag will be used
|
||||||
// later to know whether to save data.
|
// later to know whether to save data.
|
||||||
@@ -1620,6 +1630,19 @@ namespace ctlXMLEditLib
|
|||||||
zoomtextbox = null;
|
zoomtextbox = null;
|
||||||
|
|
||||||
TextBoxFocus = textbox;
|
TextBoxFocus = textbox;
|
||||||
|
|
||||||
|
string RO_IDENDITY = RO_IDEN.Substring(1, RO_IDEN.Length - 2); // RO Editor add symbols C2022 - 003 for turning off symbols btn for RO ID.
|
||||||
|
if (textbox.Name == RO_IDENDITY)
|
||||||
|
{
|
||||||
|
//ROEditor.rbtnSymbols.Enabled = false;
|
||||||
|
OnEnableDisableSymbolsBtn(new ctlXMLEditEventArgs(DisplaySymBolBtn:false));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//ROEditor.rbtnSymbols.Enabled = true;
|
||||||
|
OnEnableDisableSymbolsBtn(new ctlXMLEditEventArgs(DisplaySymBolBtn:true));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void textbox_Validating(object sender, System.ComponentModel.CancelEventArgs e)
|
private void textbox_Validating(object sender, System.ComponentModel.CancelEventArgs e)
|
||||||
@@ -1653,10 +1676,7 @@ namespace ctlXMLEditLib
|
|||||||
btnZoom_click(null, null);
|
btnZoom_click(null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void btnSymbols_click(object sender, System.EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
public void btnZoom_click(object sender, System.EventArgs e)
|
public void btnZoom_click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
//TextBox tb = (TextBox) sender;
|
//TextBox tb = (TextBox) sender;
|
||||||
@@ -2125,7 +2145,22 @@ namespace ctlXMLEditLib
|
|||||||
return curTZ.GetDaylightChanges(year);
|
return curTZ.GetDaylightChanges(year);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static class RichTextBoxExtensions // RO Editor add symbols C2025 - 003
|
public class ctlXMLEditEventArgs : EventArgs // RO Editor add symbols C2022 - 003 for turning off symbols btn for RO ID.
|
||||||
|
{
|
||||||
|
public ctlXMLEditEventArgs() {; }
|
||||||
|
public ctlXMLEditEventArgs(bool DisplaySymBolBtn)
|
||||||
|
{
|
||||||
|
_DisplaySymBolBtn = DisplaySymBolBtn;
|
||||||
|
}
|
||||||
|
private bool _DisplaySymBolBtn;
|
||||||
|
|
||||||
|
public bool DisplaySymBolBtn
|
||||||
|
{
|
||||||
|
get { return _DisplaySymBolBtn; }
|
||||||
|
set { _DisplaySymBolBtn = value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static class RichTextBoxExtensions // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
public static void InsertSymbol(this RichTextBox richTextBox, int symbcode)
|
public static void InsertSymbol(this RichTextBox richTextBox, int symbcode)
|
||||||
{
|
{
|
||||||
@@ -2134,8 +2169,9 @@ namespace ctlXMLEditLib
|
|||||||
string RtfPrefixForSymbols = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 FreeMono; } {\f1\fnil\fcharset0 FreeMono; } } {\colortbl;\red255\green0\blue0;\red0\green0\blue255; } \viewkind4\uc1\pard\fs24 \f1\fs24 ";
|
string RtfPrefixForSymbols = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 FreeMono; } {\f1\fnil\fcharset0 FreeMono; } } {\colortbl;\red255\green0\blue0;\red0\green0\blue255; } \viewkind4\uc1\pard\fs24 \f1\fs24 ";
|
||||||
richTextBox.SelectedRtf = RtfPrefixForSymbols + sym + @"}";
|
richTextBox.SelectedRtf = RtfPrefixForSymbols + sym + @"}";
|
||||||
richTextBox.SelectedRtf = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033\uc1 }";
|
richTextBox.SelectedRtf = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033\uc1 }";
|
||||||
richTextBox.Select(position, 1);
|
richTextBox.Select(position, 0);
|
||||||
richTextBox.Select(position + 1, 0);
|
//richTextBox.Select(position, 1); //left here for reference
|
||||||
|
//richTextBox.Select(position + 1, 0);
|
||||||
|
|
||||||
//TextPointer caretPos = rtb.CaretPosition;
|
//TextPointer caretPos = rtb.CaretPosition;
|
||||||
//if (symbcode < 256)
|
//if (symbcode < 256)
|
||||||
|
|||||||
@@ -2154,12 +2154,12 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (string.IsNullOrEmpty(s2))
|
if (string.IsNullOrEmpty(s2))
|
||||||
return s2;
|
return s2;
|
||||||
|
|
||||||
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2025 - 003
|
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2022 - 003
|
||||||
|
|
||||||
if (Regex.IsMatch(s2, pattern))
|
if (Regex.IsMatch(s2, pattern))
|
||||||
|
|
||||||
s2 = s2.Replace(@"\u160?", "<HSP>"); // convert hard spaces bug fix: B2016-206
|
s2 = s2.Replace(@"\u160?", "<HSP>"); // convert hard spaces bug fix: B2016-206
|
||||||
if (!Regex.IsMatch(s2, pattern)) // RO Editor add symbols C2025 - 003
|
if (!Regex.IsMatch(s2, pattern)) // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
s2 = s2.Replace(@"\", @"\u9586?"); // convert backslashes to a backslash symbol
|
s2 = s2.Replace(@"\", @"\u9586?"); // convert backslashes to a backslash symbol
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -774,7 +774,7 @@ namespace Volian.Controls.Library
|
|||||||
tmp = new TreeNode(roc.title);
|
tmp = new TreeNode(roc.title);
|
||||||
tmp.Tag = roc;
|
tmp.Tag = roc;
|
||||||
|
|
||||||
if (tmp.Text.IndexOf("\\u") > -1) // RO Editor add symbols C2025 - 003
|
if (tmp.Text.IndexOf("\\u") > -1) // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
tmp.Text = Regex.Replace(tmp.Text, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString());
|
tmp.Text = Regex.Replace(tmp.Text, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1401,7 +1401,7 @@ namespace Volian.Controls.Library
|
|||||||
int position = SelectionStart;
|
int position = SelectionStart;
|
||||||
SelectionLength = 0;
|
SelectionLength = 0;
|
||||||
|
|
||||||
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2025 - 003
|
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2022 - 003
|
||||||
foreach (Match match in Regex.Matches(linkValue, pattern, RegexOptions.IgnoreCase))
|
foreach (Match match in Regex.Matches(linkValue, pattern, RegexOptions.IgnoreCase))
|
||||||
{
|
{
|
||||||
linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + " \\f0");
|
linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + " \\f0");
|
||||||
|
|||||||
Reference in New Issue
Block a user