Compare commits
39 Commits
49f5f506d4
...
C2022-003-
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ce168071c | |||
| d560468f3c | |||
| ac5e49d0fc | |||
| 447d1f510c | |||
| c0651e4e2c | |||
| f8865206e9 | |||
| 5e7d2431b3 | |||
| 99216321a8 | |||
| 5a2c0460aa | |||
| 72c2bd90e4 | |||
| d4ecf28147 | |||
| 751794c1ec | |||
| c561aad661 | |||
| 0a301e1a84 | |||
| 37e727202c | |||
| 9023cc76a0 | |||
| 49bdd03c1c | |||
| 23f4b672b2 | |||
| 599d45086f | |||
| 93aed0e06a | |||
| 7eb94d7575 | |||
| fa8b0bd6a1 | |||
| c26e271676 | |||
| 7d87477d68 | |||
| 9002fb3828 | |||
| 10257a832a | |||
| 261f5a526c | |||
| b5e0c121e8 | |||
| 6d99c456e4 | |||
| 8c6f0c2736 | |||
| bd89af5e8c | |||
| b0e4128d3c | |||
| 875a8f101a | |||
| c5a8ef57ac | |||
| c8adeed187 | |||
| 52583a05f6 | |||
| 37b4726925 | |||
| cc66eb5329 | |||
| 563c133676 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -96,10 +96,10 @@ 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.TextBox tbSingleTxtWid;
|
ctlXMLEditLib.roRichTextBox tbSingleTxtWid; // RO Editor add symbols C2022 - 003
|
||||||
private System.Windows.Forms.TextBox tbVariableTxtWid;
|
ctlXMLEditLib.roRichTextBox tbVariableTxtWid;
|
||||||
private System.Windows.Forms.TextBox tbTableWid;
|
ctlXMLEditLib.roRichTextBox tbTableWid;
|
||||||
private System.Windows.Forms.TextBox tbXYPlotWid;
|
ctlXMLEditLib.roRichTextBox tbXYPlotWid;
|
||||||
private System.Windows.Forms.Button btnOK;
|
private System.Windows.Forms.Button btnOK;
|
||||||
private System.Windows.Forms.Button btnCancel;
|
private System.Windows.Forms.Button btnCancel;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -218,10 +218,10 @@ 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.TextBox();
|
this.tbXYPlotWid = new ctlXMLEditLib.roRichTextBox(); // RO Editor add symbols C2022 - 003
|
||||||
this.tbTableWid = new System.Windows.Forms.TextBox();
|
this.tbTableWid = new ctlXMLEditLib.roRichTextBox();
|
||||||
this.tbVariableTxtWid = new System.Windows.Forms.TextBox();
|
this.tbVariableTxtWid = new ctlXMLEditLib.roRichTextBox ();
|
||||||
this.tbSingleTxtWid = new System.Windows.Forms.TextBox();
|
this.tbSingleTxtWid = new ctlXMLEditLib.roRichTextBox();
|
||||||
this.lblW4 = new System.Windows.Forms.Label();
|
this.lblW4 = new System.Windows.Forms.Label();
|
||||||
this.lblW3 = new System.Windows.Forms.Label();
|
this.lblW3 = new System.Windows.Forms.Label();
|
||||||
this.lblW2 = new System.Windows.Forms.Label();
|
this.lblW2 = new System.Windows.Forms.Label();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -109,6 +109,10 @@
|
|||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="DevComponents.DotNetBar2, Version=14.1.0.37, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\..\..\..\..\..\3rdPartyLibraries\DotNetBar\DotNetBar4.6Build\DevComponents.DotNetBar2.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System">
|
<Reference Include="System">
|
||||||
<Name>System</Name>
|
<Name>System</Name>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -124,10 +128,6 @@
|
|||||||
<Reference Include="System.Xml">
|
<Reference Include="System.Xml">
|
||||||
<Name>System.XML</Name>
|
<Name>System.XML</Name>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Volian.Base.Library, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\..\..\..\Volian.Base.Library\bin\Debug\Volian.Base.Library.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AboutROEditor.cs">
|
<Compile Include="AboutROEditor.cs">
|
||||||
@@ -168,6 +168,7 @@
|
|||||||
<Compile Include="RO_FST.cs">
|
<Compile Include="RO_FST.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Content Include="Symbols.xml" />
|
||||||
<EmbeddedResource Include="AboutROEditor.resx">
|
<EmbeddedResource Include="AboutROEditor.resx">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<DependentUpon>AboutROEditor.cs</DependentUpon>
|
<DependentUpon>AboutROEditor.cs</DependentUpon>
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
|
||||||
CAAAAk1TRnQBSQFMAgEBAgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CAAAAk1TRnQBSQFMAgEBAgEAAUQBAAFEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
|
||||||
CwAAAk1TRnQBSQFMAgEBBgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CwAAAk1TRnQBSQFMAgEBBgEAAUQBAAFEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ using System.Runtime.InteropServices;
|
|||||||
using VlnStatus;
|
using VlnStatus;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using ROFST_FILE;
|
using ROFST_FILE;
|
||||||
using Volian.Base.Library;
|
|
||||||
|
|
||||||
//using VlnProfiler; //don't forget to add VlnProfiler to the reference list
|
//using VlnProfiler; //don't forget to add VlnProfiler to the reference list
|
||||||
|
|
||||||
|
|||||||
@@ -263,6 +263,7 @@ using System.Collections.Specialized;
|
|||||||
using Org.Mentalis.Files;
|
using Org.Mentalis.Files;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
|
||||||
namespace RODBInterface
|
namespace RODBInterface
|
||||||
@@ -1909,6 +1910,8 @@ 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 C2022 - 003
|
||||||
|
|
||||||
node.SetAttribute("HasChild", "True");
|
node.SetAttribute("HasChild", "True");
|
||||||
|
|
||||||
// Store data in the VlnXmlElement as a subgroup
|
// Store data in the VlnXmlElement as a subgroup
|
||||||
@@ -2182,10 +2185,13 @@ namespace RODBInterface
|
|||||||
parent.SetAttribute("ChildLoaded", "True");
|
parent.SetAttribute("ChildLoaded", "True");
|
||||||
}
|
}
|
||||||
string xmlstr = GenerateXmlString(ro, false);
|
string xmlstr = GenerateXmlString(ro, false);
|
||||||
|
|
||||||
string wraccid = null;
|
string wraccid = null;
|
||||||
if (ro.HasAttribute("AccPageID"))
|
if (ro.HasAttribute("AccPageID"))
|
||||||
{
|
{
|
||||||
string accid = ro.GetAttribute("AccPageID");
|
string accid = ro.GetAttribute("AccPageID");
|
||||||
|
|
||||||
|
|
||||||
int quote = accid.IndexOf("'");
|
int quote = accid.IndexOf("'");
|
||||||
if (quote >= 0)
|
if (quote >= 0)
|
||||||
wraccid = accid.Insert(quote, "'");
|
wraccid = accid.Insert(quote, "'");
|
||||||
@@ -2251,7 +2257,7 @@ namespace RODBInterface
|
|||||||
// select all of the field definition records in this table.
|
// select all of the field definition records in this table.
|
||||||
// strGetFields = "SELECT RecID, Info from " + elem.GetAttribute("Table");
|
// strGetFields = "SELECT RecID, Info from " + elem.GetAttribute("Table");
|
||||||
strGetFields = "SELECT RecID, Info from " + TableName;
|
strGetFields = "SELECT RecID, Info from " + TableName;
|
||||||
strGetFields = strGetFields + " where RecType = 2"; // + rtype.ToString();
|
strGetFields = strGetFields + " where RecType = 2";
|
||||||
DBE.Command(strGetFields);
|
DBE.Command(strGetFields);
|
||||||
DBE.Reader();
|
DBE.Reader();
|
||||||
|
|
||||||
|
|||||||
@@ -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.TextBox tbZoom;
|
private ctlXMLEditLib.roRichTextBox 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.TextBox();
|
this.tbZoom = new ctlXMLEditLib.roRichTextBox(); // 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.ScrollBars.Vertical;
|
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;
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -200,7 +200,10 @@ using System.Xml.Schema;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using RODBInterface;
|
using RODBInterface;
|
||||||
using Org.Mentalis.Files;
|
using Org.Mentalis.Files;
|
||||||
//using IniFileIO;
|
using System.Windows;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -221,6 +224,7 @@ namespace ctlXMLEditLib
|
|||||||
///
|
///
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public class ctlXMLEdit : System.Windows.Forms.UserControl
|
public class ctlXMLEdit : System.Windows.Forms.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -237,12 +241,12 @@ namespace ctlXMLEditLib
|
|||||||
private bool dosaveflag;
|
private bool dosaveflag;
|
||||||
private VlnXmlElement editelem;
|
private VlnXmlElement editelem;
|
||||||
private XmlDocument editdoc;
|
private XmlDocument editdoc;
|
||||||
private TextBox zoomtextbox;
|
private roRichTextBox zoomtextbox;
|
||||||
// the following is used for handling images. Note that if we want to have more
|
// the following is used for handling images. Note that if we want to have more
|
||||||
// than one image defined in an ro, this should be become a list.
|
// than one image defined in an ro, this should be become a list.
|
||||||
private TextBox GraphicsFiletextbox;
|
private roRichTextBox GraphicsFiletextbox;
|
||||||
private TextBox GraphicsWdtextbox;
|
private roRichTextBox GraphicsWdtextbox;
|
||||||
private TextBox GraphicsHttextbox;
|
private roRichTextBox GraphicsHttextbox;
|
||||||
private System.Windows.Forms.Button btnFindFile;
|
private System.Windows.Forms.Button btnFindFile;
|
||||||
private string GraphicsText;
|
private string GraphicsText;
|
||||||
private ToolTip zmtooltip;
|
private ToolTip zmtooltip;
|
||||||
@@ -265,6 +269,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
|
||||||
@@ -311,10 +328,19 @@ 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 roRichTextBox _TextBoxFocus; // RO Editor add symbols C2022 - 003
|
||||||
|
public roRichTextBox TextBoxFocus
|
||||||
|
{
|
||||||
|
get { return _TextBoxFocus; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_TextBoxFocus = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
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
|
||||||
@@ -359,11 +385,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(TextBox hwnd, string msg)
|
private void DoSet(roRichTextBox 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)
|
||||||
@@ -378,7 +405,7 @@ namespace ctlXMLEditLib
|
|||||||
private void SetRequiredFields(ArrayList reqfields)
|
private void SetRequiredFields(ArrayList reqfields)
|
||||||
{
|
{
|
||||||
Object o;
|
Object o;
|
||||||
TextBox hwnd;
|
roRichTextBox hwnd;
|
||||||
string field, msg;
|
string field, msg;
|
||||||
int indx;
|
int indx;
|
||||||
foreach (string strfld in reqfields)
|
foreach (string strfld in reqfields)
|
||||||
@@ -397,15 +424,15 @@ namespace ctlXMLEditLib
|
|||||||
o = myHT[field+"a"];
|
o = myHT[field+"a"];
|
||||||
if (o != null) // set all combo types required, the checker
|
if (o != null) // set all combo types required, the checker
|
||||||
{
|
{
|
||||||
DoSet((TextBox)o,msg);
|
DoSet((roRichTextBox)o,msg);
|
||||||
DoSet((TextBox)myHT[field+"b"],msg);
|
DoSet((roRichTextBox)myHT[field+"b"],msg);
|
||||||
DoSet((TextBox)myHT[field+"c"],msg);
|
DoSet((roRichTextBox)myHT[field+"c"],msg);
|
||||||
DoSet((TextBox)myHT[field+"d"],msg);
|
DoSet((roRichTextBox)myHT[field+"d"],msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (o != null)
|
else if (o != null)
|
||||||
{
|
{
|
||||||
hwnd = (TextBox) o;
|
hwnd = (roRichTextBox) o;
|
||||||
if (hwnd.Tag != null)
|
if (hwnd.Tag != null)
|
||||||
{
|
{
|
||||||
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
||||||
@@ -419,7 +446,7 @@ namespace ctlXMLEditLib
|
|||||||
|
|
||||||
// C2021-026 If this is a Parent/Child field that has no value saved in the database
|
// C2021-026 If this is a Parent/Child field that has no value saved in the database
|
||||||
// then use the parent's value and display it as grey colored text.
|
// then use the parent's value and display it as grey colored text.
|
||||||
private void GetDefaultParentValue(TextBox tb, XmlNode node, string chldName)
|
private void GetDefaultParentValue(roRichTextBox tb, XmlNode node, string chldName)
|
||||||
{
|
{
|
||||||
XmlNode parentNode = null;
|
XmlNode parentNode = null;
|
||||||
// PCChildren contains a list strings reprenting the Children setup in the current Working Draft Parent/Child property
|
// PCChildren contains a list strings reprenting the Children setup in the current Working Draft Parent/Child property
|
||||||
@@ -463,21 +490,23 @@ namespace ctlXMLEditLib
|
|||||||
private void DisplayFieldContents(XmlNode node)
|
private void DisplayFieldContents(XmlNode node)
|
||||||
{
|
{
|
||||||
Object o;
|
Object o;
|
||||||
TextBox hwnd;
|
roRichTextBox hwnd;
|
||||||
XmlNode nd;
|
XmlNode nd;
|
||||||
// if we have an image, check it for validity, i.e. file exists, etc.??
|
// if we have an image, check it for validity, i.e. file exists, etc.??
|
||||||
foreach (string str in myHT.Keys)
|
foreach (string str in myHT.Keys)
|
||||||
{
|
{
|
||||||
o = myHT[str];
|
o = myHT[str];
|
||||||
hwnd = (TextBox) o;
|
hwnd = (roRichTextBox)o;
|
||||||
nd = node.SelectSingleNode(str);
|
nd = node.SelectSingleNode(str);
|
||||||
// if not found with just the string, search the tree.
|
// if not found with just the string, search the tree.
|
||||||
if (nd==null)nd = node.SelectSingleNode("*/"+str);
|
if (nd==null)nd = node.SelectSingleNode("*/"+str);
|
||||||
if (nd == null || nd.InnerText.Length==0) // B2024-004 use Parent value if Child text length is zero
|
if (nd == null || nd.InnerText.Length==0) // B2024-004 use Parent value if Child text length is zero
|
||||||
GetDefaultParentValue(hwnd, node, str); // C2021-026 Parent/Child Field has no value so use parent's value
|
GetDefaultParentValue(hwnd, node, str); // C2021-026 Parent/Child Field has no value so use parent's value
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hwnd.Text = nd.InnerText; // set the field's text from XML
|
|
||||||
|
hwnd.Text = Regex.Replace(nd.InnerText, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // set the field's text from XML
|
||||||
|
Size size = hwnd.Size;
|
||||||
|
|
||||||
// check if this window has a button name as part of its tag. If
|
// check if this window has a button name as part of its tag. If
|
||||||
// so it's a combo type & the radio button/visibility may need to
|
// so it's a combo type & the radio button/visibility may need to
|
||||||
@@ -546,7 +575,7 @@ namespace ctlXMLEditLib
|
|||||||
// height/width data of the image.
|
// height/width data of the image.
|
||||||
if (GraphicsFiletextbox != null && GraphicsFiletextbox.Text != "") UpdateHtWd();
|
if (GraphicsFiletextbox != null && GraphicsFiletextbox.Text != "") UpdateHtWd();
|
||||||
}
|
}
|
||||||
public TextBox GetGraphicsFiletextbox()
|
public roRichTextBox GetGraphicsFiletextbox()
|
||||||
{
|
{
|
||||||
return GraphicsFiletextbox;
|
return GraphicsFiletextbox;
|
||||||
}
|
}
|
||||||
@@ -585,13 +614,13 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
dosaveflag=false;
|
dosaveflag=false;
|
||||||
mysavexml=false;
|
mysavexml=false;
|
||||||
TextBox hwnd;
|
roRichTextBox hwnd;
|
||||||
// first, clear out all of the text boxes.
|
// first, clear out all of the text boxes.
|
||||||
|
|
||||||
foreach (string str in myHT.Keys)
|
foreach (string str in myHT.Keys)
|
||||||
{
|
{
|
||||||
object o = myHT[str];
|
object o = myHT[str];
|
||||||
hwnd = (TextBox) o;
|
hwnd = (roRichTextBox) o;
|
||||||
hwnd.Text = "";
|
hwnd.Text = "";
|
||||||
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
||||||
RadioButton radio;
|
RadioButton radio;
|
||||||
@@ -623,7 +652,7 @@ namespace ctlXMLEditLib
|
|||||||
// to the parent's value, then clear the child's textbox so that nothing is saved
|
// to the parent's value, then clear the child's textbox so that nothing is saved
|
||||||
// to the database. This allow us to know that a specific value was not set
|
// to the database. This allow us to know that a specific value was not set
|
||||||
// for this Parent/Child child
|
// for this Parent/Child child
|
||||||
private void RemovePCChildTextIfSameAsParent(XmlNode node, TextBox tb, string chldName)
|
private void RemovePCChildTextIfSameAsParent(XmlNode node, roRichTextBox tb, string chldName)
|
||||||
{
|
{
|
||||||
XmlNode parentNode = null;
|
XmlNode parentNode = null;
|
||||||
// if this is a child node get the parent's value
|
// if this is a child node get the parent's value
|
||||||
@@ -656,22 +685,42 @@ namespace ctlXMLEditLib
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// SaveData saves the data in the element which had been sent to the control. Return
|
// SaveData saves the data in the element which had been sent to the control. Return
|
||||||
// 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)
|
||||||
{
|
{
|
||||||
TextBox hwnd;
|
roRichTextBox hwnd;
|
||||||
TextBoxAttrTag tag;
|
TextBoxAttrTag tag;
|
||||||
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)
|
foreach (string str in myHT.Keys) // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
object o = myHT[str];
|
object o = myHT[str];
|
||||||
hwnd = (TextBox) o;
|
hwnd = (roRichTextBox) o;
|
||||||
|
|
||||||
|
StringBuilder result1 = new StringBuilder();
|
||||||
|
char[] chrAry = hwnd.Text.ToCharArray();
|
||||||
|
foreach (int chr in chrAry)
|
||||||
|
{
|
||||||
|
if (chr > 166)
|
||||||
|
{
|
||||||
|
result1.Append($"\\u{(int)chr}?");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result1.Append((char)chr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hwnd.Text = result1.ToString();
|
||||||
|
|
||||||
imgdate = null;
|
imgdate = null;
|
||||||
// if this is a required field and there is no text, put out an error
|
// if this is a required field and there is no text, put out an error
|
||||||
// message and get out of here.
|
// message and get out of here.
|
||||||
@@ -788,6 +837,7 @@ namespace ctlXMLEditLib
|
|||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region Component Designer generated code
|
#region Component Designer generated code
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
||||||
@@ -858,7 +908,7 @@ namespace ctlXMLEditLib
|
|||||||
// 'normalizedString') or a multiline text box(type is 'string'). Also, a radio
|
// 'normalizedString') or a multiline text box(type is 'string'). Also, a radio
|
||||||
// button is passed in if this was called to handle an element within a combo type.
|
// button is passed in if this was called to handle an element within a combo type.
|
||||||
// This button is saved for a given text box so that initialization of these combo types can occur.
|
// This button is saved for a given text box so that initialization of these combo types can occur.
|
||||||
private string DisplayXmlSchemaSimpleType(XmlSchemaSimpleType simpleType, TextBox mytextbox, RadioButton radio,
|
private string DisplayXmlSchemaSimpleType(XmlSchemaSimpleType simpleType, roRichTextBox mytextbox, RadioButton radio,
|
||||||
bool img, string imgname)
|
bool img, string imgname)
|
||||||
{
|
{
|
||||||
// set up for text box tag, which stores whether field is required and
|
// set up for text box tag, which stores whether field is required and
|
||||||
@@ -888,12 +938,17 @@ namespace ctlXMLEditLib
|
|||||||
if (getannot.IndexOf("Lines")>=0)
|
if (getannot.IndexOf("Lines")>=0)
|
||||||
{
|
{
|
||||||
GraphicsHttextbox = mytextbox;
|
GraphicsHttextbox = mytextbox;
|
||||||
|
|
||||||
|
Size size = GraphicsHttextbox.Size;
|
||||||
mytextbox.LostFocus += new System.EventHandler(this.GraphicsHt_lostfocus);
|
mytextbox.LostFocus += new System.EventHandler(this.GraphicsHt_lostfocus);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (getannot.IndexOf("Character")>=0)
|
if (getannot.IndexOf("Character")>=0)
|
||||||
{
|
{
|
||||||
GraphicsWdtextbox = mytextbox;
|
GraphicsWdtextbox = mytextbox;
|
||||||
|
|
||||||
mytextbox.LostFocus += new System.EventHandler(this.GraphicsWd_lostfocus);
|
mytextbox.LostFocus += new System.EventHandler(this.GraphicsWd_lostfocus);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -904,14 +959,17 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
// A Schema Type Restriction is used to define single or multi-line boxes.
|
// A Schema Type Restriction is used to define single or multi-line boxes.
|
||||||
XmlSchemaSimpleTypeRestriction myRestrictions = (XmlSchemaSimpleTypeRestriction) simpleType.Content;
|
XmlSchemaSimpleTypeRestriction myRestrictions = (XmlSchemaSimpleTypeRestriction) simpleType.Content;
|
||||||
if (myRestrictions.BaseTypeName.Name == "normalizedString")
|
if (myRestrictions.BaseTypeName.Name == "normalizedString")
|
||||||
|
{
|
||||||
mytextbox.Multiline = false;
|
mytextbox.Multiline = false;
|
||||||
|
mytextbox.Size = new Size(300, 40);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mytextbox.Multiline = true;
|
mytextbox.Multiline = true;
|
||||||
mytextbox.AcceptsReturn = true;
|
mytextbox.AcceptsTab = true;
|
||||||
mytextbox.Height = (int) mytextbox.Font.GetHeight() * 4;
|
mytextbox.Height = (int)mytextbox.Font.GetHeight() * 4;
|
||||||
mytextbox.ScrollBars = ScrollBars.Vertical;
|
mytextbox.ScrollBars = RichTextBoxScrollBars.Vertical;
|
||||||
zmtooltip.SetToolTip(mytextbox, "Press Shift F2 To Zoom");
|
zmtooltip.SetToolTip(mytextbox, "Press Shift F2 To Zoom");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -992,7 +1050,8 @@ namespace ctlXMLEditLib
|
|||||||
radio.CheckedChanged += new System.EventHandler(this.radiocheckchg);
|
radio.CheckedChanged += new System.EventHandler(this.radiocheckchg);
|
||||||
gbox.Controls.Add(radio);
|
gbox.Controls.Add(radio);
|
||||||
|
|
||||||
TextBox tb = new TextBox();
|
roRichTextBox tb = new roRichTextBox();
|
||||||
|
Size size3 = tb.Size;
|
||||||
tb.Location = new Point(boxx+20, y+25);
|
tb.Location = new Point(boxx+20, y+25);
|
||||||
if (!first) tb.Visible = false;
|
if (!first) tb.Visible = false;
|
||||||
myHT.Add(element.Name,tb);
|
myHT.Add(element.Name,tb);
|
||||||
@@ -1001,7 +1060,7 @@ namespace ctlXMLEditLib
|
|||||||
// the groupbox.
|
// the groupbox.
|
||||||
Controls.Add(tb);
|
Controls.Add(tb);
|
||||||
tb.TextChanged += new System.EventHandler(this.textbox_change);
|
tb.TextChanged += new System.EventHandler(this.textbox_change);
|
||||||
tb.GotFocus += new System.EventHandler(this.textbox_zoombtn);
|
tb.GotFocus += new System.EventHandler(this.currentTextBox);
|
||||||
tb.KeyDown += new KeyEventHandler(MyOnKeyDown);
|
tb.KeyDown += new KeyEventHandler(MyOnKeyDown);
|
||||||
gbox.Contains(tb);
|
gbox.Contains(tb);
|
||||||
// the following will set attributes on the text boxes such as maxlength, multiline, etc.
|
// the following will set attributes on the text boxes such as maxlength, multiline, etc.
|
||||||
@@ -1144,8 +1203,9 @@ namespace ctlXMLEditLib
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TextBox mytextbox;
|
roRichTextBox mytextbox;
|
||||||
mytextbox = new TextBox();
|
mytextbox = new roRichTextBox();
|
||||||
|
Size size3 = mytextbox.Size;
|
||||||
mytextbox.Location = new Point(screenx+indent, screeny);
|
mytextbox.Location = new Point(screenx+indent, screeny);
|
||||||
string tFieldName = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName);
|
string tFieldName = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName);
|
||||||
mytextbox.Name = tFieldName;
|
mytextbox.Name = tFieldName;
|
||||||
@@ -1155,7 +1215,7 @@ namespace ctlXMLEditLib
|
|||||||
screeny = screeny + 10;
|
screeny = screeny + 10;
|
||||||
mytextbox.TextChanged += new System.EventHandler(this.textbox_change);
|
mytextbox.TextChanged += new System.EventHandler(this.textbox_change);
|
||||||
mytextbox.Validating += new System.ComponentModel.CancelEventHandler(this.textbox_Validating);
|
mytextbox.Validating += new System.ComponentModel.CancelEventHandler(this.textbox_Validating);
|
||||||
mytextbox.GotFocus += new System.EventHandler(this.textbox_zoombtn);
|
mytextbox.GotFocus += new System.EventHandler(this.currentTextBox);
|
||||||
mytextbox.KeyDown += new KeyEventHandler(MyOnKeyDown);
|
mytextbox.KeyDown += new KeyEventHandler(MyOnKeyDown);
|
||||||
if (pcChildIdx > 0)
|
if (pcChildIdx > 0)
|
||||||
{
|
{
|
||||||
@@ -1192,9 +1252,18 @@ namespace ctlXMLEditLib
|
|||||||
// the following is needed to load the control.
|
// the following is needed to load the control.
|
||||||
private void ctlXMLEdit_Load(object sender, System.EventArgs e)
|
private void ctlXMLEdit_Load(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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.
|
||||||
@@ -1210,7 +1279,7 @@ namespace ctlXMLEditLib
|
|||||||
// When leaving the textbox
|
// When leaving the textbox
|
||||||
private void txtBox_Leave(object sender, EventArgs e)
|
private void txtBox_Leave(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox tb = sender as TextBox;
|
roRichTextBox tb = sender as roRichTextBox;
|
||||||
string dfTxt = "";
|
string dfTxt = "";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1219,7 +1288,7 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
object o = myHT[parentid];
|
object o = myHT[parentid];
|
||||||
if (o != null)
|
if (o != null)
|
||||||
dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
|
dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1227,7 +1296,7 @@ namespace ctlXMLEditLib
|
|||||||
string parName = pcGrpBox.Name.Substring(5);
|
string parName = pcGrpBox.Name.Substring(5);
|
||||||
object o = myHT[parName];
|
object o = myHT[parName];
|
||||||
if (o != null)
|
if (o != null)
|
||||||
dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
|
dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
@@ -1235,7 +1304,7 @@ namespace ctlXMLEditLib
|
|||||||
string parName = pcGrpBox.Name.Substring(5);
|
string parName = pcGrpBox.Name.Substring(5);
|
||||||
object o = myHT[parName];
|
object o = myHT[parName];
|
||||||
if (o != null)
|
if (o != null)
|
||||||
dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
|
dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dosaveflag) mysavexml = true;
|
if (dosaveflag) mysavexml = true;
|
||||||
@@ -1251,7 +1320,7 @@ namespace ctlXMLEditLib
|
|||||||
// so clear the textbox so that user can enter the value for that child
|
// so clear the textbox so that user can enter the value for that child
|
||||||
private void txtBox_Enter(object sender, EventArgs e)
|
private void txtBox_Enter(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox tb = sender as TextBox;
|
roRichTextBox tb = sender as roRichTextBox;
|
||||||
if (tb.ForeColor == SystemColors.GrayText) // currently no value set - using parent's value
|
if (tb.ForeColor == SystemColors.GrayText) // currently no value set - using parent's value
|
||||||
{
|
{
|
||||||
tb.Text = "";
|
tb.Text = "";
|
||||||
@@ -1264,7 +1333,7 @@ namespace ctlXMLEditLib
|
|||||||
private void radiocheckchg(object sender, System.EventArgs e)
|
private void radiocheckchg(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
RadioButton btnsel = (RadioButton) sender;
|
RadioButton btnsel = (RadioButton) sender;
|
||||||
TextBox assocbox;
|
roRichTextBox assocbox;
|
||||||
string btntext, str;
|
string btntext, str;
|
||||||
|
|
||||||
if(dosaveflag)mysavexml = true;
|
if(dosaveflag)mysavexml = true;
|
||||||
@@ -1277,7 +1346,7 @@ namespace ctlXMLEditLib
|
|||||||
str = btnsel.Name.Replace(btntext,"");
|
str = btnsel.Name.Replace(btntext,"");
|
||||||
object o = myHT[str];
|
object o = myHT[str];
|
||||||
if (o == null) return;
|
if (o == null) return;
|
||||||
assocbox = (TextBox) o;
|
assocbox = (roRichTextBox) o;
|
||||||
// make the text box visible if checked, otherwise, invisible
|
// make the text box visible if checked, otherwise, invisible
|
||||||
assocbox.Visible = btnsel.Checked;
|
assocbox.Visible = btnsel.Checked;
|
||||||
// C2021-026 show or hide the Parent/Child appicability group box
|
// C2021-026 show or hide the Parent/Child appicability group box
|
||||||
@@ -1299,7 +1368,7 @@ namespace ctlXMLEditLib
|
|||||||
c.Visible = vsblState; // show or hide the lable inside the group box
|
c.Visible = vsblState; // show or hide the lable inside the group box
|
||||||
object oo = myHT[c.Name];
|
object oo = myHT[c.Name];
|
||||||
if (oo != null)
|
if (oo != null)
|
||||||
(oo as TextBox).Visible = vsblState; // show or hide the associated text box
|
(oo as roRichTextBox).Visible = vsblState; // show or hide the associated text box
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1391,7 +1460,7 @@ namespace ctlXMLEditLib
|
|||||||
|
|
||||||
// The following can be used to validate the text, i.e. check the text against
|
// The following can be used to validate the text, i.e. check the text against
|
||||||
// the pattern. this needs written yet (5/16/02)
|
// the pattern. this needs written yet (5/16/02)
|
||||||
private void MyValidatingCode(TextBox tb)
|
private void MyValidatingCode(roRichTextBox tb)
|
||||||
{
|
{
|
||||||
//get the text box's tag which contains a flag for whether this is required &
|
//get the text box's tag which contains a flag for whether this is required &
|
||||||
//if it has a pattern. If it has a pattern, validate the field against the pattern.
|
//if it has a pattern. If it has a pattern, validate the field against the pattern.
|
||||||
@@ -1420,20 +1489,35 @@ namespace ctlXMLEditLib
|
|||||||
}
|
}
|
||||||
|
|
||||||
// save which box we're on, for zoom processing.
|
// save which box we're on, for zoom processing.
|
||||||
private void textbox_zoombtn(object sender, System.EventArgs e)
|
private void currentTextBox(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox textbox = (TextBox) sender;
|
roRichTextBox textbox = (roRichTextBox) sender;
|
||||||
if (textbox.Multiline == true || textbox == GraphicsFiletextbox)
|
if (textbox.Multiline == true || textbox == GraphicsFiletextbox)
|
||||||
zoomtextbox = textbox;
|
zoomtextbox = textbox;
|
||||||
else
|
else
|
||||||
zoomtextbox = null;
|
zoomtextbox = null;
|
||||||
|
|
||||||
|
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)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MyValidatingCode((TextBox) sender);
|
MyValidatingCode((roRichTextBox) sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
@@ -1460,10 +1544,9 @@ namespace ctlXMLEditLib
|
|||||||
btnZoom_click(null, null);
|
btnZoom_click(null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void btnZoom_click(object sender, System.EventArgs e)
|
public void btnZoom_click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
//TextBox tb = (TextBox) sender;
|
|
||||||
TextBoxAttrTag tag;
|
TextBoxAttrTag tag;
|
||||||
bool doimage = false;
|
bool doimage = false;
|
||||||
if (zoomtextbox.Tag != null)
|
if (zoomtextbox.Tag != null)
|
||||||
@@ -1507,7 +1590,7 @@ namespace ctlXMLEditLib
|
|||||||
// file local & keep width/height of file proportional.
|
// file local & keep width/height of file proportional.
|
||||||
private void GraphicText_lostfocus(object sender, System.EventArgs e)
|
private void GraphicText_lostfocus(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox fnamebox = (TextBox) sender;
|
roRichTextBox fnamebox = (roRichTextBox) sender;
|
||||||
if (fnamebox.Text != "" && fnamebox.Modified == true)
|
if (fnamebox.Text != "" && fnamebox.Modified == true)
|
||||||
{
|
{
|
||||||
FileInfo ifi = new FileInfo(fnamebox.Text);
|
FileInfo ifi = new FileInfo(fnamebox.Text);
|
||||||
@@ -1716,7 +1799,7 @@ namespace ctlXMLEditLib
|
|||||||
// if changed height, calculate associated width
|
// if changed height, calculate associated width
|
||||||
private void GraphicsHt_lostfocus(object sender, System.EventArgs e)
|
private void GraphicsHt_lostfocus(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox ht = (TextBox) sender;
|
roRichTextBox ht = (roRichTextBox) sender;
|
||||||
if (ht.Modified == true)
|
if (ht.Modified == true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -1733,7 +1816,7 @@ namespace ctlXMLEditLib
|
|||||||
// if changed width, calculate associated height
|
// if changed width, calculate associated height
|
||||||
private void GraphicsWd_lostfocus(object sender, System.EventArgs e)
|
private void GraphicsWd_lostfocus(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox wd = (TextBox) sender;
|
roRichTextBox wd = (roRichTextBox) sender;
|
||||||
if (wd.Modified == true)
|
if (wd.Modified == true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -1888,7 +1971,7 @@ namespace ctlXMLEditLib
|
|||||||
* and overload a couple of it's functions in order to use it.
|
* and overload a couple of it's functions in order to use it.
|
||||||
* - called in CalculatePromsDate() above.
|
* - called in CalculatePromsDate() above.
|
||||||
*/
|
*/
|
||||||
public class ThisTimeZone : TimeZone
|
public class ThisTimeZone : TimeZone
|
||||||
{
|
{
|
||||||
private TimeZone curTZ;
|
private TimeZone curTZ;
|
||||||
public TimeSpan SpanTZ;
|
public TimeSpan SpanTZ;
|
||||||
@@ -1929,5 +2012,30 @@ namespace ctlXMLEditLib
|
|||||||
return curTZ.GetDaylightChanges(year);
|
return curTZ.GetDaylightChanges(year);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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 enum E_FontStyle : byte
|
||||||
|
{
|
||||||
|
FS_NONE = 0,
|
||||||
|
FS_BOLD = 0x01,
|
||||||
|
FS_UNDERLINE = 0x02,
|
||||||
|
FS_ITALIC = 0x04,
|
||||||
|
FS_SUPERSCRIPT = 0x08,
|
||||||
|
FS_SUBSCRIPT = 0x10
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,6 +137,12 @@
|
|||||||
<Compile Include="ImageDialog.cs">
|
<Compile Include="ImageDialog.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="roRichTextBox.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="roRichTextBox.Designer.cs">
|
||||||
|
<DependentUpon>roRichTextBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="ZoomDialog.cs">
|
<Compile Include="ZoomDialog.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|||||||
40
PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/roRichTextBox.Designer.cs
generated
Normal file
40
PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/roRichTextBox.Designer.cs
generated
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
namespace ctlXMLEditLib
|
||||||
|
{
|
||||||
|
partial class roRichTextBox
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Component Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
System.Windows.Forms.AutoScaleMode AutoScaleMode;
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace ctlXMLEditLib
|
||||||
|
{
|
||||||
|
public partial class roRichTextBox : RichTextBox // C2022-003 Symbols in RO Editor. Customized RichTextBox for RO Editor.
|
||||||
|
{
|
||||||
|
public roRichTextBox()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertSymbol( int symbcode)
|
||||||
|
{
|
||||||
|
int position = this.SelectionStart;
|
||||||
|
string sym = string.Format(symbcode < 256 ? "\'{0:X2}" : @"\u{0}", symbcode);
|
||||||
|
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 ";
|
||||||
|
this.SelectedRtf = RtfPrefixForSymbols + sym + @"}";
|
||||||
|
this.SelectedRtf = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033\uc1 }";
|
||||||
|
this.Select(position, 0); this.SelectedRtf = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033\uc1 }";
|
||||||
|
this.Select(position, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -98,6 +98,8 @@ namespace VEPROMS
|
|||||||
_SelectedStepTabPanel.MyStepTabRibbon.ContActionSummaryRequest += MyStepTabRibbon_ContActionSummaryRequest;
|
_SelectedStepTabPanel.MyStepTabRibbon.ContActionSummaryRequest += MyStepTabRibbon_ContActionSummaryRequest;
|
||||||
_SelectedStepTabPanel.MyStepTabRibbon.AddProcToDVInTree -= new StepTabRibbonEvent(MyStepTabRibbon_AddProcToDocVersionInTree);
|
_SelectedStepTabPanel.MyStepTabRibbon.AddProcToDVInTree -= new StepTabRibbonEvent(MyStepTabRibbon_AddProcToDocVersionInTree);
|
||||||
_SelectedStepTabPanel.MyStepTabRibbon.AddProcToDVInTree += new StepTabRibbonEvent(MyStepTabRibbon_AddProcToDocVersionInTree);
|
_SelectedStepTabPanel.MyStepTabRibbon.AddProcToDVInTree += new StepTabRibbonEvent(MyStepTabRibbon_AddProcToDocVersionInTree);
|
||||||
|
_SelectedStepTabPanel.MyStepTabRibbon.EnableDisableStepProperties -= EnableDisableStepProperties;
|
||||||
|
_SelectedStepTabPanel.MyStepTabRibbon.EnableDisableStepProperties += new StepTabRibbonEvent(EnableDisableStepProperties);
|
||||||
// F2022-024 Time Critical Action Summary
|
// F2022-024 Time Critical Action Summary
|
||||||
_SelectedStepTabPanel.MyStepTabRibbon.TimeCriticalActionSummaryRequest -= MyStepTabRibbon_TimeCriticalActionSummaryRequest;
|
_SelectedStepTabPanel.MyStepTabRibbon.TimeCriticalActionSummaryRequest -= MyStepTabRibbon_TimeCriticalActionSummaryRequest;
|
||||||
_SelectedStepTabPanel.MyStepTabRibbon.TimeCriticalActionSummaryRequest += MyStepTabRibbon_TimeCriticalActionSummaryRequest;
|
_SelectedStepTabPanel.MyStepTabRibbon.TimeCriticalActionSummaryRequest += MyStepTabRibbon_TimeCriticalActionSummaryRequest;
|
||||||
@@ -119,7 +121,7 @@ namespace VEPROMS
|
|||||||
|
|
||||||
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = pi.ProcedureConfig.SelectedSlave;
|
pi.MyDocVersion.DocVersionConfig.SelectedSlave = pi.ProcedureConfig.SelectedSlave;
|
||||||
|
|
||||||
DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi);
|
DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi);
|
||||||
|
|
||||||
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||||
@@ -372,12 +374,12 @@ namespace VEPROMS
|
|||||||
cmbFont.SelectedIndex = -1;
|
cmbFont.SelectedIndex = -1;
|
||||||
string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray());
|
string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray());
|
||||||
string db = Volian.Base.Library.VlnSettings.GetDB();
|
string db = Volian.Base.Library.VlnSettings.GetDB();
|
||||||
|
|
||||||
if (db != null)
|
if (db != null)
|
||||||
Database.SelectedDatabase = db;
|
Database.SelectedDatabase = db;
|
||||||
|
|
||||||
//B2018-129 Most Recently Used list was being cleared. Needed to remove a (string) type case in the IF statement
|
//B2018-129 Most Recently Used list was being cleared. Needed to remove a (string) type case in the IF statement
|
||||||
if (!string.IsNullOrEmpty((string)Properties.Settings.Default["DefaultDB"]))
|
if (!string.IsNullOrEmpty((string)Properties.Settings.Default["DefaultDB"]))
|
||||||
Database.LastDatabase = Properties.Settings.Default.DefaultDB;
|
Database.LastDatabase = Properties.Settings.Default.DefaultDB;
|
||||||
|
|
||||||
// Setup the Context menu for DisplaySearch including the symbols
|
// Setup the Context menu for DisplaySearch including the symbols
|
||||||
@@ -416,7 +418,7 @@ namespace VEPROMS
|
|||||||
// B2019-107 Error Log message for inconsistent PromsFixes
|
// B2019-107 Error Log message for inconsistent PromsFixes
|
||||||
_MyLog.InfoFormat("\r\nSession Beginning\r\n<===={0}[SQL:{1:yyMM.ddHH}]====== User: {2}/{3} Started {4} ===============>{5}"
|
_MyLog.InfoFormat("\r\nSession Beginning\r\n<===={0}[SQL:{1:yyMM.ddHH}]====== User: {2}/{3} Started {4} ===============>{5}"
|
||||||
, Application.ProductVersion, Database.RevDate, Environment.UserDomainName, Environment.UserName, DateTime.Now.ToString("dddd MMMM d, yyyy h:mm:ss tt"), FormatInfo.Failed ?? "");
|
, Application.ProductVersion, Database.RevDate, Environment.UserDomainName, Environment.UserName, DateTime.Now.ToString("dddd MMMM d, yyyy h:mm:ss tt"), FormatInfo.Failed ?? "");
|
||||||
|
|
||||||
// C2022-030 Notify the user if the stored procedure in the database are not update to date
|
// C2022-030 Notify the user if the stored procedure in the database are not update to date
|
||||||
// with those in the PROMSFixes.sql delivered with the PROMS executable
|
// with those in the PROMSFixes.sql delivered with the PROMS executable
|
||||||
string pfVersion = ExeInfo.GetAssocicatedPROMSFixesVersion();
|
string pfVersion = ExeInfo.GetAssocicatedPROMSFixesVersion();
|
||||||
@@ -546,7 +548,7 @@ namespace VEPROMS
|
|||||||
tv.ProcedureCheckedOutTo += new vlnTreeViewEvent(tv_ProcedureCheckedOutTo);
|
tv.ProcedureCheckedOutTo += new vlnTreeViewEvent(tv_ProcedureCheckedOutTo);
|
||||||
tv.ViewPDF += new vlnTreeViewPdfEvent(tv_ViewPDF);
|
tv.ViewPDF += new vlnTreeViewPdfEvent(tv_ViewPDF);
|
||||||
displayApplicability.ApplicabilityViewModeChanged += new DisplayApplicability.DisplayApplicabilityEvent(displayApplicability_ApplicabilityViewModeChanged);
|
displayApplicability.ApplicabilityViewModeChanged += new DisplayApplicability.DisplayApplicabilityEvent(displayApplicability_ApplicabilityViewModeChanged);
|
||||||
|
|
||||||
tv.ExportImportProcedureSets += new vlnTreeViewEvent(tv_ExportImportProcedureSets);
|
tv.ExportImportProcedureSets += new vlnTreeViewEvent(tv_ExportImportProcedureSets);
|
||||||
tv.PrintTransitionReport += new vlnTreeViewEvent(tv_PrintTransitionReport);
|
tv.PrintTransitionReport += new vlnTreeViewEvent(tv_PrintTransitionReport);
|
||||||
tv.ProcessingComplete += tv_ProcessingComplete;
|
tv.ProcessingComplete += tv_ProcessingComplete;
|
||||||
@@ -587,7 +589,7 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void tv_SelectDateToStartChangeBars(object sender, vlnTreeEventArgs args)
|
void tv_SelectDateToStartChangeBars(object sender, vlnTreeEventArgs args)
|
||||||
{
|
{
|
||||||
ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo;
|
ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo;
|
||||||
if (pi == null) return;
|
if (pi == null) return;
|
||||||
@@ -1196,6 +1198,7 @@ namespace VEPROMS
|
|||||||
|
|
||||||
if (!MySessionInfo.CanCheckOutItem(pi.ItemID, CheckOutType.Procedure, ref message))
|
if (!MySessionInfo.CanCheckOutItem(pi.ItemID, CheckOutType.Procedure, ref message))
|
||||||
{
|
{
|
||||||
|
message = message.Replace("\r\nWould You like to open the procedure in View Only Mode?", "");
|
||||||
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2085,7 +2088,10 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
foreach (DisplayTabItem dti in tc.MyBar.Items)
|
foreach (DisplayTabItem dti in tc.MyBar.Items)
|
||||||
{
|
{
|
||||||
if (!myList.Contains(dti.OwnerID))
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
// View Only Mode is no longer checked out, so no longer has an OwnerID
|
||||||
|
// This will keep those tabs from auto-closing based on the timer
|
||||||
|
if (!myList.Contains(dti.OwnerID) && dti.MyStepTabPanel.MyStepPanel.VwMode != E_ViewMode.View)
|
||||||
{
|
{
|
||||||
MyCloseTabList.PushDTI(dti);
|
MyCloseTabList.PushDTI(dti);
|
||||||
}
|
}
|
||||||
@@ -2491,7 +2497,7 @@ namespace VEPROMS
|
|||||||
//and set checkboxes based on what they are set to
|
//and set checkboxes based on what they are set to
|
||||||
UserSettings usersettings = new UserSettings(VlnSettings.UserID);
|
UserSettings usersettings = new UserSettings(VlnSettings.UserID);
|
||||||
|
|
||||||
if (DisPlayTabState.Rows.Count > 0 && (usersettings.UserSetting_OpenTabs_AutoOpen || !usersettings.UserSetting_OpenTabs_Remember))
|
if (!Settings.Default.SeparateWindows && DisPlayTabState.Rows.Count > 0 && (usersettings.UserSetting_OpenTabs_AutoOpen || !usersettings.UserSetting_OpenTabs_Remember))
|
||||||
{
|
{
|
||||||
//will open tabs by default / ask by default
|
//will open tabs by default / ask by default
|
||||||
DialogResult result = DialogResult.Yes;
|
DialogResult result = DialogResult.Yes;
|
||||||
@@ -3926,6 +3932,7 @@ namespace VEPROMS
|
|||||||
string message = string.Empty;
|
string message = string.Empty;
|
||||||
if (!MySessionInfo.CanCheckOutItem(args.ProcedureConfig.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
if (!MySessionInfo.CanCheckOutItem(args.ProcedureConfig.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||||
{
|
{
|
||||||
|
message = message.Replace("\r\nWould You like to open the procedure in View Only Mode?", "");
|
||||||
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
return DialogResult.None;
|
return DialogResult.None;
|
||||||
@@ -3949,6 +3956,7 @@ namespace VEPROMS
|
|||||||
string message = string.Empty;
|
string message = string.Empty;
|
||||||
if (!MySessionInfo.CanCheckOutItem(args.SectionConfig.MySection.MySectionInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
if (!MySessionInfo.CanCheckOutItem(args.SectionConfig.MySection.MySectionInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||||
{
|
{
|
||||||
|
message = message.Replace("\r\nWould You like to open the procedure in View Only Mode?", "");
|
||||||
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
return DialogResult.None;
|
return DialogResult.None;
|
||||||
@@ -4749,6 +4757,11 @@ namespace VEPROMS
|
|||||||
// B2022-026 RO Memory reduction coding (Jakes Merge)
|
// B2022-026 RO Memory reduction coding (Jakes Merge)
|
||||||
displayRO.SetFindDocROButton(false);
|
displayRO.SetFindDocROButton(false);
|
||||||
displayRO.LoadTree();
|
displayRO.LoadTree();
|
||||||
|
|
||||||
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
//In View Only Mode - Step Properties should be disabled
|
||||||
|
EnableDisableStepProperties(sender, new StepTabRibbonEventArgs(args.MyEditItem.MyItemInfo, 0, args.MyEditItem.MyStepPanel.VwMode));
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -4780,6 +4793,22 @@ namespace VEPROMS
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
//In View Only Mode - Step Properties should be disabled
|
||||||
|
public void EnableDisableStepProperties(object sender, StepTabRibbonEventArgs args)
|
||||||
|
{
|
||||||
|
if (args.ViewMode == E_ViewMode.View && (infoTabs.Enabled || infoTabs.SelectedTab != infotabTags))
|
||||||
|
{
|
||||||
|
infoTabs.Enabled = true;
|
||||||
|
infoTabs.SelectedTab = infotabTags;
|
||||||
|
infoTabs.Enabled = false;
|
||||||
|
}
|
||||||
|
else if (args.ViewMode != E_ViewMode.View && !infoTabs.Enabled)
|
||||||
|
{
|
||||||
|
infoTabs.Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void _LastStepRTB_EditModeChanged(object sender, EventArgs args)
|
void _LastStepRTB_EditModeChanged(object sender, EventArgs args)
|
||||||
{
|
{
|
||||||
if (_LastStepRTB.EditMode) // going into edit mode in a cell of the grid.
|
if (_LastStepRTB.EditMode) // going into edit mode in a cell of the grid.
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
|
using Csla.Data;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using static System.Net.Mime.MediaTypeNames;
|
||||||
using Csla.Data;
|
|
||||||
|
|
||||||
|
|
||||||
namespace VEPROMS.CSLA.Library
|
namespace VEPROMS.CSLA.Library
|
||||||
@@ -494,6 +494,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
roid = FormatRoidKey(roid, true);
|
roid = FormatRoidKey(roid, true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
string retval = GetRoChild(roid).value;
|
string retval = GetRoChild(roid).value;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(retval))
|
if (string.IsNullOrEmpty(retval))
|
||||||
@@ -2153,7 +2155,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return s2;
|
return s2;
|
||||||
|
|
||||||
s2 = s2.Replace(@"\u160?", "<HSP>"); // convert hard spaces bug fix: B2016-206
|
s2 = s2.Replace(@"\u160?", "<HSP>"); // convert hard spaces bug fix: B2016-206
|
||||||
s2 = s2.Replace(@"\", @"\u9586?"); // convert backslashes to a backslash symbol
|
s2 = Regex.Replace(s2, @"\\(?!u)", @"\u9586?"); // convert backslashes to a backslash symbol
|
||||||
s2 = s2.Replace("<HSP>", @"\u160?"); // convert hard spaces bug fix: B2016-206
|
s2 = s2.Replace("<HSP>", @"\u160?"); // convert hard spaces bug fix: B2016-206
|
||||||
s2 = s2.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days.
|
s2 = s2.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days.
|
||||||
s2 = s2.Replace("\xf8", @"\'b0"); // convert \xf8 to degree.
|
s2 = s2.Replace("\xf8", @"\'b0"); // convert \xf8 to degree.
|
||||||
|
|||||||
@@ -7984,12 +7984,20 @@ namespace VEPROMS.CSLA.Library
|
|||||||
public ProcedureInfo(SafeDataReader dr) : base(dr) { }
|
public ProcedureInfo(SafeDataReader dr) : base(dr) { }
|
||||||
#endif
|
#endif
|
||||||
private ProcedureInfo() : base() { ;}
|
private ProcedureInfo() : base() { ;}
|
||||||
public new static ProcedureInfo Get(int itemID)
|
public new static ProcedureInfo Get(int itemID, bool forcerefresh = false)
|
||||||
{
|
{
|
||||||
//if (!CanGetObject())
|
//if (!CanGetObject())
|
||||||
// throw new System.Security.SecurityException("User not authorized to view a Item");
|
// throw new System.Security.SecurityException("User not authorized to view a Item");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
// fixes caching issue
|
||||||
|
// so this forces a refresh of the cache
|
||||||
|
if (forcerefresh)
|
||||||
|
{
|
||||||
|
_CacheByPrimaryKey.Remove(itemID.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
ProcedureInfo tmp = GetCachedByPrimaryKey(itemID);
|
ProcedureInfo tmp = GetCachedByPrimaryKey(itemID);
|
||||||
if (tmp == null)
|
if (tmp == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (string.IsNullOrEmpty(name))
|
if (string.IsNullOrEmpty(name))
|
||||||
{ name = tmpproc.DisplayText; }
|
{ name = tmpproc.DisplayText; }
|
||||||
|
|
||||||
message = string.Format("The procedure {0} is already checked out to {1}", name, si.UserID);
|
message = string.Format("The procedure {0} is already checked out to {1}.\r\nWould You like to open the procedure in View Only Mode?", name, si.UserID);
|
||||||
rv = rv && false;
|
rv = rv && false;
|
||||||
}
|
}
|
||||||
else if (si.ProcessID != this.ProcessID && objectType == CheckOutType.Document)
|
else if (si.ProcessID != this.ProcessID && objectType == CheckOutType.Document)
|
||||||
|
|||||||
@@ -990,12 +990,21 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
public static Content Get(int contentID)
|
public static Content Get(int contentID, bool forcerefresh = false)
|
||||||
{
|
{
|
||||||
if (!CanGetObject())
|
if (!CanGetObject())
|
||||||
throw new System.Security.SecurityException("User not authorized to view a Content");
|
throw new System.Security.SecurityException("User not authorized to view a Content");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
// fixes caching issue
|
||||||
|
// this forces a refresh of the cache for a case when need to do a hard refresh
|
||||||
|
if (forcerefresh)
|
||||||
|
{
|
||||||
|
ConvertListToDictionary();
|
||||||
|
_CacheByPrimaryKey.Remove(contentID.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
Content tmp = GetCachedByPrimaryKey(contentID);
|
Content tmp = GetCachedByPrimaryKey(contentID);
|
||||||
if (tmp == null)
|
if (tmp == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ namespace Volian.Controls.Library
|
|||||||
this.lbROId.Dock = System.Windows.Forms.DockStyle.Left;
|
this.lbROId.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.lbROId.ForeColor = System.Drawing.SystemColors.Highlight;
|
this.lbROId.ForeColor = System.Drawing.SystemColors.Highlight;
|
||||||
this.lbROId.Location = new System.Drawing.Point(48, 24);
|
this.lbROId.Location = new System.Drawing.Point(48, 24);
|
||||||
this.lbROId.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
this.lbROId.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.lbROId.Name = "lbROId";
|
this.lbROId.Name = "lbROId";
|
||||||
this.lbROId.Size = new System.Drawing.Size(183, 33);
|
this.lbROId.Size = new System.Drawing.Size(183, 33);
|
||||||
this.superTooltip1.SetSuperTooltip(this.lbROId, new DevComponents.DotNetBar.SuperTooltipInfo("RO ID", "", "The RO ID for the selected RO Value will be displayed here. Double-Click to open" +
|
this.superTooltip1.SetSuperTooltip(this.lbROId, new DevComponents.DotNetBar.SuperTooltipInfo("RO ID", "", "The RO ID for the selected RO Value will be displayed here. Double-Click to open" +
|
||||||
@@ -97,7 +97,7 @@ namespace Volian.Controls.Library
|
|||||||
this.lblROID.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.lblROID.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
this.lblROID.Dock = System.Windows.Forms.DockStyle.Left;
|
this.lblROID.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.lblROID.Location = new System.Drawing.Point(0, 24);
|
this.lblROID.Location = new System.Drawing.Point(0, 24);
|
||||||
this.lblROID.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
this.lblROID.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.lblROID.Name = "lblROID";
|
this.lblROID.Name = "lblROID";
|
||||||
this.lblROID.Size = new System.Drawing.Size(48, 33);
|
this.lblROID.Size = new System.Drawing.Size(48, 33);
|
||||||
this.superTooltip1.SetSuperTooltip(this.lblROID, new DevComponents.DotNetBar.SuperTooltipInfo("RO ID", "", "The RO ID for the selected RO Value will be displayed here.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(150, 80)));
|
this.superTooltip1.SetSuperTooltip(this.lblROID, new DevComponents.DotNetBar.SuperTooltipInfo("RO ID", "", "The RO ID for the selected RO Value will be displayed here.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(150, 80)));
|
||||||
@@ -139,7 +139,7 @@ namespace Volian.Controls.Library
|
|||||||
this.btnGoToRO.Dock = System.Windows.Forms.DockStyle.Top;
|
this.btnGoToRO.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.btnGoToRO.Enabled = false;
|
this.btnGoToRO.Enabled = false;
|
||||||
this.btnGoToRO.Location = new System.Drawing.Point(0, 55);
|
this.btnGoToRO.Location = new System.Drawing.Point(0, 55);
|
||||||
this.btnGoToRO.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
this.btnGoToRO.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.btnGoToRO.Name = "btnGoToRO";
|
this.btnGoToRO.Name = "btnGoToRO";
|
||||||
this.btnGoToRO.Size = new System.Drawing.Size(233, 18);
|
this.btnGoToRO.Size = new System.Drawing.Size(233, 18);
|
||||||
this.btnGoToRO.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
this.btnGoToRO.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||||
@@ -155,7 +155,7 @@ namespace Volian.Controls.Library
|
|||||||
this.btnPreviewRO.Dock = System.Windows.Forms.DockStyle.Top;
|
this.btnPreviewRO.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.btnPreviewRO.Enabled = false;
|
this.btnPreviewRO.Enabled = false;
|
||||||
this.btnPreviewRO.Location = new System.Drawing.Point(0, 37);
|
this.btnPreviewRO.Location = new System.Drawing.Point(0, 37);
|
||||||
this.btnPreviewRO.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
this.btnPreviewRO.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.btnPreviewRO.Name = "btnPreviewRO";
|
this.btnPreviewRO.Name = "btnPreviewRO";
|
||||||
this.btnPreviewRO.Size = new System.Drawing.Size(233, 18);
|
this.btnPreviewRO.Size = new System.Drawing.Size(233, 18);
|
||||||
this.superTooltip1.SetSuperTooltip(this.btnPreviewRO, new DevComponents.DotNetBar.SuperTooltipInfo("Preview", "", "This will Preview the selected RO Table, X/Y Plot, or Image.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(150, 80)));
|
this.superTooltip1.SetSuperTooltip(this.btnPreviewRO, new DevComponents.DotNetBar.SuperTooltipInfo("Preview", "", "This will Preview the selected RO Table, X/Y Plot, or Image.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(150, 80)));
|
||||||
@@ -263,6 +263,7 @@ namespace Volian.Controls.Library
|
|||||||
this.Controls.Add(this.tvROFST);
|
this.Controls.Add(this.tvROFST);
|
||||||
this.Controls.Add(this.lbFound);
|
this.Controls.Add(this.lbFound);
|
||||||
this.Controls.Add(this.panelValue);
|
this.Controls.Add(this.panelValue);
|
||||||
|
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.Name = "DisplayRO";
|
this.Name = "DisplayRO";
|
||||||
this.Size = new System.Drawing.Size(233, 507);
|
this.Size = new System.Drawing.Size(233, 507);
|
||||||
this.panelValue.ResumeLayout(false);
|
this.panelValue.ResumeLayout(false);
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
|
using DevComponents.DotNetBar;
|
||||||
|
using JR.Utils.GUI.Forms;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Text;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VEPROMS.CSLA.Library;
|
using VEPROMS.CSLA.Library;
|
||||||
using XYPlots;
|
|
||||||
using DevComponents.DotNetBar;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using Volian.Base.Library;
|
using Volian.Base.Library;
|
||||||
using JR.Utils.GUI.Forms;
|
using XYPlots;
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
@@ -372,8 +372,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
// B2022-088: [JPR] Find Doc Ro button not working in Word Sections
|
// B2022-088: [JPR] Find Doc Ro button not working in Word Sections
|
||||||
// B2022-098: [JPR] ROs not being resolved in Word Sections
|
// B2022-098: [JPR] ROs not being resolved in Word Sections
|
||||||
if (e.Node.Tag is ROFSTLookup.rochild)
|
if (e.Node.Tag is ROFSTLookup.rochild){
|
||||||
{
|
|
||||||
ROFSTLookup.rochild chld = (ROFSTLookup.rochild)e.Node.Tag;
|
ROFSTLookup.rochild chld = (ROFSTLookup.rochild)e.Node.Tag;
|
||||||
selectedChld = chld;
|
selectedChld = chld;
|
||||||
|
|
||||||
@@ -770,9 +769,15 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
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 C2022 - 003
|
||||||
|
{
|
||||||
|
tmp.Text = Regex.Replace(tmp.Text, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString());
|
||||||
|
}
|
||||||
|
|
||||||
if (roc.roid.Length == 16)
|
if (roc.roid.Length == 16)
|
||||||
{
|
{
|
||||||
tn.Nodes.Add(tmp);
|
tn.Nodes.Add(tmp);
|
||||||
@@ -921,11 +926,12 @@ namespace Volian.Controls.Library
|
|||||||
// Pad to 16 to store in the RoUsage table.
|
// Pad to 16 to store in the RoUsage table.
|
||||||
string padroid = ROFSTLookup.FormatRoidKey(roc.roid, true);
|
string padroid = ROFSTLookup.FormatRoidKey(roc.roid, true);
|
||||||
string linktxt = string.Format(@"#Link:ReferencedObject:<NewID> {0} {1}", padroid, MyROFST.RODbID);
|
string linktxt = string.Format(@"#Link:ReferencedObject:<NewID> {0} {1}", padroid, MyROFST.RODbID);
|
||||||
|
|
||||||
// Resolve symbols and scientific notation in the RO return value
|
|
||||||
string valtxt = MyROFSTLookup.GetTranslatedRoValue(padroid, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, false, MyRTB.MyItemInfo);
|
|
||||||
|
|
||||||
MyRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, selectedChld.value, linktxt, padroid, MyROFST.RODbID));
|
// Resolve symbols and scientific notation in the RO return value
|
||||||
|
string valtxt = MyROFSTLookup.GetTranslatedRoValue(padroid, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, false, MyRTB.MyItemInfo);
|
||||||
|
|
||||||
|
MyRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, selectedChld.value, linktxt, padroid, MyROFST.RODbID));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,20 +112,12 @@
|
|||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<data name="btnSaveRO.SuperTooltip" xml:space="preserve">
|
|
||||||
<value>For Step Editor sections:
|
|
||||||
- This will place the selected RO at the cursor position.
|
|
||||||
- This will replace an RO with the selected RO.
|
|
||||||
|
|
||||||
For Word sections
|
|
||||||
- This will place the needed RO ID on the clipboard.</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
||||||
@@ -603,6 +603,8 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
ItemInfo myItemInfo = myItemInfo2;
|
ItemInfo myItemInfo = myItemInfo2;
|
||||||
|
|
||||||
|
bool viewonlymode = false;
|
||||||
|
|
||||||
//B2025-046 Remember Tabs failing when swapping versions of PROMS
|
//B2025-046 Remember Tabs failing when swapping versions of PROMS
|
||||||
if (myItemInfo?.MyDocVersion == null) // bug fix: B2016-108 disconnected data will not have a MyDocVersion
|
if (myItemInfo?.MyDocVersion == null) // bug fix: B2016-108 disconnected data will not have a MyDocVersion
|
||||||
{
|
{
|
||||||
@@ -620,8 +622,20 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
if (!MySessionInfo.CanCheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
if (!MySessionInfo.CanCheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||||
{
|
{
|
||||||
FlexibleMessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
DisplayTabItem dti = MyBar?.Items?.OfType<DisplayTabItem>().FirstOrDefault(x => x.MyItemInfo?.ItemID == myItemInfo.MyProcedure.ItemID);
|
||||||
return null;
|
|
||||||
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
//shouldn't prompt - should just auto put in view only if already in open tab
|
||||||
|
//in view only
|
||||||
|
if (
|
||||||
|
(dti != null && dti.MyStepTabPanel.MyStepPanel.VwMode == E_ViewMode.View)
|
||||||
|
||
|
||||||
|
(SeparateWindows && VersionID == myItemInfo.MyDocVersion.VersionID)
|
||||||
|
|| //to handle special case where item will be opened in a separate window
|
||||||
|
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
|
||||||
|
viewonlymode = true;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -682,7 +696,7 @@ namespace Volian.Controls.Library
|
|||||||
// C2023-016 if a Word section and doing Find/Replace don't open Word section, position to section title in step editor instead
|
// C2023-016 if a Word section and doing Find/Replace don't open Word section, position to section title in step editor instead
|
||||||
if (myItemInfo.MyContent.MyEntry == null || doingFindReplace) // If it is not a Word document open in step editor
|
if (myItemInfo.MyContent.MyEntry == null || doingFindReplace) // If it is not a Word document open in step editor
|
||||||
{
|
{
|
||||||
return OpenStepTabPage(myItemInfo, setFocus);
|
return OpenStepTabPage(myItemInfo, setFocus, viewonlymode);
|
||||||
}
|
}
|
||||||
else // Otherwise open it in the Word editor
|
else // Otherwise open it in the Word editor
|
||||||
{
|
{
|
||||||
@@ -1178,7 +1192,7 @@ namespace Volian.Controls.Library
|
|||||||
//}
|
//}
|
||||||
//public Dictionary<DocVersionInfo, frmEnhanced> dicEnhancedDocuments = new Dictionary<DocVersionInfo, frmEnhanced>();
|
//public Dictionary<DocVersionInfo, frmEnhanced> dicEnhancedDocuments = new Dictionary<DocVersionInfo, frmEnhanced>();
|
||||||
|
|
||||||
private DisplayTabItem OpenStepTabPage(ItemInfo myItemInfo, bool setFocus)
|
private DisplayTabItem OpenStepTabPage(ItemInfo myItemInfo, bool setFocus, bool viewonlymode = false)
|
||||||
{
|
{
|
||||||
ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item
|
ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item
|
||||||
string key = "Item - " + proc.ItemID.ToString();
|
string key = "Item - " + proc.ItemID.ToString();
|
||||||
@@ -1197,7 +1211,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
else // If not already open, create a new Page
|
else // If not already open, create a new Page
|
||||||
{
|
{
|
||||||
pg = new DisplayTabItem(this.components, this, proc, key); // Open a new Procedure Tab
|
pg = new DisplayTabItem(this.components, this, proc, key, viewonlymode); // Open a new Procedure Tab
|
||||||
_MyDisplayTabItems.Add(key, pg);
|
_MyDisplayTabItems.Add(key, pg);
|
||||||
if (setFocus)
|
if (setFocus)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -98,13 +98,18 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Constructors
|
#region Constructors
|
||||||
public DisplayTabItem(IContainer container, DisplayTabControl myDisplayTabControl, ItemInfo myItemInfo, string myKey)
|
public DisplayTabItem(IContainer container, DisplayTabControl myDisplayTabControl, ItemInfo myItemInfo, string myKey, bool viewonlymode = false)
|
||||||
{
|
{
|
||||||
_MyItemInfo = myItemInfo;
|
_MyItemInfo = myItemInfo;
|
||||||
if (MyItemInfo.MyContent.MyEntry == null)
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure);
|
//don't want to check out if opening in View Only Mode Due to someone else having it checked out
|
||||||
else
|
if (!viewonlymode)
|
||||||
OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyContent.MyEntry.DocID, CheckOutType.Document);
|
{
|
||||||
|
if (MyItemInfo.MyContent.MyEntry == null)
|
||||||
|
OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure);
|
||||||
|
else
|
||||||
|
OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyContent.MyEntry.DocID, CheckOutType.Document);
|
||||||
|
}
|
||||||
//Console.WriteLine("DisplayTabItem");
|
//Console.WriteLine("DisplayTabItem");
|
||||||
_MyKey = myKey;
|
_MyKey = myKey;
|
||||||
_MyDisplayTabControl = myDisplayTabControl;
|
_MyDisplayTabControl = myDisplayTabControl;
|
||||||
@@ -112,7 +117,7 @@ namespace Volian.Controls.Library
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.Click += new EventHandler(DisplayTabItem_Click);
|
this.Click += new EventHandler(DisplayTabItem_Click);
|
||||||
if (myItemInfo.MyContent.MyEntry == null)
|
if (myItemInfo.MyContent.MyEntry == null)
|
||||||
SetupStepTabPanel();
|
SetupStepTabPanel(viewonlymode);
|
||||||
else
|
else
|
||||||
SetupDSOTabPanel();
|
SetupDSOTabPanel();
|
||||||
SetupSecurity(myItemInfo);
|
SetupSecurity(myItemInfo);
|
||||||
@@ -128,7 +133,37 @@ namespace Volian.Controls.Library
|
|||||||
private bool MesssageShown = false;
|
private bool MesssageShown = false;
|
||||||
public void SetupSecurity(ItemInfo myItem)
|
public void SetupSecurity(ItemInfo myItem)
|
||||||
{
|
{
|
||||||
UserInfo ui = UserInfo.GetByUserID(OwnerInfo.Get(OwnerID).SessionUserID);
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
//is in View Only Mode, so do not set up the Security
|
||||||
|
if (OwnerID == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
UserInfo uiViewOnly = UserInfo.GetByUserID(Base.Library.VlnSettings.UserID);
|
||||||
|
if (uiViewOnly.IsAdministrator())
|
||||||
|
{
|
||||||
|
MyUserRole = $"{Base.Library.VlnSettings.UserID} - Administrator";
|
||||||
|
}
|
||||||
|
else if (uiViewOnly.IsSetAdministrator(myItem.MyDocVersion))
|
||||||
|
{
|
||||||
|
MyUserRole = $"{Base.Library.VlnSettings.UserID} - Set Administrator";
|
||||||
|
}
|
||||||
|
else if (uiViewOnly.IsWriter(myItem.MyDocVersion))
|
||||||
|
{
|
||||||
|
MyUserRole = $"{Base.Library.VlnSettings.UserID} - Writer";
|
||||||
|
}
|
||||||
|
else if (uiViewOnly.IsROEditor(myItem.MyDocVersion))
|
||||||
|
{
|
||||||
|
MyUserRole = $"{Base.Library.VlnSettings.UserID} - RO Editor";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MyUserRole = $"{Base.Library.VlnSettings.UserID} - Reviewer";
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserInfo ui = UserInfo.GetByUserID(OwnerInfo.Get(OwnerID).SessionUserID);
|
||||||
|
|
||||||
if (ui == null)
|
if (ui == null)
|
||||||
{
|
{
|
||||||
@@ -246,7 +281,7 @@ namespace Volian.Controls.Library
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates and sets-up a StepTabPanel
|
/// Creates and sets-up a StepTabPanel
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void SetupStepTabPanel()
|
private void SetupStepTabPanel(bool viewonlymode = false)
|
||||||
{
|
{
|
||||||
((System.ComponentModel.ISupportInitialize)(_MyDisplayTabControl.MyBar)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(_MyDisplayTabControl.MyBar)).BeginInit();
|
||||||
_MyDisplayTabControl.MyBar.SuspendLayout();
|
_MyDisplayTabControl.MyBar.SuspendLayout();
|
||||||
@@ -276,7 +311,7 @@ namespace Volian.Controls.Library
|
|||||||
_MyDisplayTabControl.MyBar.ResumeLayout(false);
|
_MyDisplayTabControl.MyBar.ResumeLayout(false);
|
||||||
DocVersionInfo dvi = _MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo; //MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
DocVersionInfo dvi = _MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo; //MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
||||||
if (dvi == null) return;
|
if (dvi == null) return;
|
||||||
if (dvi.VersionType > 127)
|
if (dvi.VersionType > 127 || viewonlymode)
|
||||||
MyStepTabPanel.MyStepPanel.VwMode = E_ViewMode.View;
|
MyStepTabPanel.MyStepPanel.VwMode = E_ViewMode.View;
|
||||||
// C2021 - 027: Procedure level PC/PC - add _MyIteminfo to argument list
|
// C2021 - 027: Procedure level PC/PC - add _MyIteminfo to argument list
|
||||||
if (dvi.MultiUnitCount > 1)
|
if (dvi.MultiUnitCount > 1)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using System.Drawing;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Volian.Base.Library;
|
using Volian.Base.Library;
|
||||||
using JR.Utils.GUI.Forms;
|
using JR.Utils.GUI.Forms;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
@@ -386,6 +387,26 @@ namespace Volian.Controls.Library
|
|||||||
// The following line expands the items needed to display SelectedItemInfo
|
// The following line expands the items needed to display SelectedItemInfo
|
||||||
ExpandAsNeeded(myItemInfo);
|
ExpandAsNeeded(myItemInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
public void ResetAll()
|
||||||
|
{
|
||||||
|
List<int> itemIDs = Controls.OfType<RTBItem>().Where(t => t?.MyItemInfo?.ActiveParent != null && t.MyItemInfo.ActiveParent.GetType() == typeof(ItemInfo)).Select(x => (x.MyItemInfo.ActiveParent as ItemInfo).ItemID).Distinct().ToList();
|
||||||
|
|
||||||
|
foreach (int itemID in itemIDs)
|
||||||
|
{
|
||||||
|
ItemInfo.ResetParts(itemID);
|
||||||
|
}
|
||||||
|
|
||||||
|
// The following line actually reloads the procedure item
|
||||||
|
MyProcedureItemInfo = ItemInfo.Get(MyProcedureItemInfo.ItemID, true);
|
||||||
|
MyProcedureItemInfo.RefreshConfig();
|
||||||
|
ContentInfo.Refresh(Content.Get(MyProcedureItemInfo.MyContent.ContentID, true));
|
||||||
|
|
||||||
|
// The following line expands the items needed to display SelectedItemInfo
|
||||||
|
ExpandAsNeeded(SelectedItemInfo);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Currently selected StepRTB
|
/// Currently selected StepRTB
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1400,9 +1400,13 @@ namespace Volian.Controls.Library
|
|||||||
if (SelectionLength > 0)HandleDeleteKeyWithSelectedText(new KeyEventArgs(Keys.None), null);
|
if (SelectionLength > 0)HandleDeleteKeyWithSelectedText(new KeyEventArgs(Keys.None), null);
|
||||||
int position = SelectionStart;
|
int position = SelectionStart;
|
||||||
SelectionLength = 0;
|
SelectionLength = 0;
|
||||||
linkValue = linkValue.Replace("\\u8209?", "\\f1\\u8209?\\f0 ");
|
|
||||||
linkValue = linkValue.Replace("\\u9586?", "\\f1\\u9586?\\f0 "); // backslash symbol
|
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2022 - 003
|
||||||
linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 ");
|
foreach (Match match in Regex.Matches(linkValue, pattern, RegexOptions.IgnoreCase))
|
||||||
|
{
|
||||||
|
linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + " \\f0");
|
||||||
|
}
|
||||||
|
|
||||||
linkValue = linkValue.Replace(@"{", @"\{");
|
linkValue = linkValue.Replace(@"{", @"\{");
|
||||||
linkValue = linkValue.Replace(@"}", @"\}");
|
linkValue = linkValue.Replace(@"}", @"\}");
|
||||||
SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}\v" + FontSize + @" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"[END>\v0 }";
|
SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}\v" + FontSize + @" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"[END>\v0 }";
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ using DevComponents.DotNetBar;
|
|||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using JR.Utils.GUI.Forms;
|
using JR.Utils.GUI.Forms;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
@@ -721,6 +723,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetBtnInsSupInfoVisible()
|
private void SetBtnInsSupInfoVisible()
|
||||||
{
|
{
|
||||||
if (MyItemInfo == null) return;
|
if (MyItemInfo == null) return;
|
||||||
@@ -906,6 +909,11 @@ namespace Volian.Controls.Library
|
|||||||
// //SetButtonAndMenuEnabling(false);
|
// //SetButtonAndMenuEnabling(false);
|
||||||
//}
|
//}
|
||||||
private Bitmap createTextBitmap(char ch)
|
private Bitmap createTextBitmap(char ch)
|
||||||
|
{
|
||||||
|
return createTextBitmap(ch, new Font("FreeMono", 18, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel));
|
||||||
|
}
|
||||||
|
|
||||||
|
private Bitmap createTextBitmap(char ch, Font objFont)
|
||||||
{
|
{
|
||||||
string txt = string.Format("{0}", ch);
|
string txt = string.Format("{0}", ch);
|
||||||
Bitmap objBmpImage = new Bitmap(1, 1);
|
Bitmap objBmpImage = new Bitmap(1, 1);
|
||||||
@@ -916,8 +924,6 @@ namespace Volian.Controls.Library
|
|||||||
// Create the Font object for the image text drawing.
|
// Create the Font object for the image text drawing.
|
||||||
// later on, we could add logic to use either FreeMono or Arial Unicode MS based on the format being used
|
// later on, we could add logic to use either FreeMono or Arial Unicode MS based on the format being used
|
||||||
// but for now, we are going to use FreeMono to create the symbol list
|
// but for now, we are going to use FreeMono to create the symbol list
|
||||||
Font objFont = new Font("FreeMono", 18, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
|
||||||
//Font objFont = new Font("Arial Unicode MS", 18, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
|
||||||
|
|
||||||
// Create a graphics object to measure the text's width and height.
|
// Create a graphics object to measure the text's width and height.
|
||||||
Graphics objGraphics = Graphics.FromImage(objBmpImage);
|
Graphics objGraphics = Graphics.FromImage(objBmpImage);
|
||||||
@@ -937,7 +943,6 @@ namespace Volian.Controls.Library
|
|||||||
objGraphics.SmoothingMode = SmoothingMode.AntiAlias;
|
objGraphics.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
objGraphics.TextContrast = 0;
|
objGraphics.TextContrast = 0;
|
||||||
objGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;
|
objGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;
|
||||||
//objGraphics.DrawString(txt, objFont, new SolidBrush(Color.FromArgb(102, 102, 102)), 0, 0);
|
|
||||||
objGraphics.DrawString(txt, objFont, new SolidBrush(Color.Black),0,0);
|
objGraphics.DrawString(txt, objFont, new SolidBrush(Color.Black),0,0);
|
||||||
objGraphics.Flush();
|
objGraphics.Flush();
|
||||||
return (objBmpImage);
|
return (objBmpImage);
|
||||||
@@ -2067,6 +2072,9 @@ namespace Volian.Controls.Library
|
|||||||
rtabHome.Select();
|
rtabHome.Select();
|
||||||
rtabTableGridTools.Visible = false;
|
rtabTableGridTools.Visible = false;
|
||||||
SetButtonMenuEnabledDisabledOnStepType(false);
|
SetButtonMenuEnabledDisabledOnStepType(false);
|
||||||
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
//Is in View Only Mode so show button as selected
|
||||||
|
btnEditMode.Checked = btnCMEditMode1.Checked = true;
|
||||||
this.Refresh();
|
this.Refresh();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3338,10 +3346,43 @@ namespace Volian.Controls.Library
|
|||||||
public void SetupAdminMode()
|
public void SetupAdminMode()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
public event StepTabRibbonEvent EnableDisableStepProperties;
|
||||||
|
private void OnEnableDisableStepProperties(StepTabRibbonEventArgs args)
|
||||||
|
{
|
||||||
|
if (EnableDisableStepProperties != null)
|
||||||
|
EnableDisableStepProperties(this, args);
|
||||||
|
}
|
||||||
private void btnToggleEditView_Click(object sender, EventArgs e)
|
private void btnToggleEditView_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (MyEditItem == null) return;
|
if (MyEditItem == null) return;
|
||||||
|
|
||||||
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
string message = string.Empty;
|
||||||
|
if (MyEditItem.MyStepPanel.VwMode == E_ViewMode.View && !MySessionInfo.CanCheckOutItem(MyEditItem.MyItemInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||||
|
{
|
||||||
|
//someone else has the procedure checked out so cannot swap out of view only mode
|
||||||
|
message = message.Replace("\r\nWould You like to open the procedure in View Only Mode?", "\r\n\r\nYou will be unable to turn off View Only Mode for this procedure until it is checked in by the user specified above.");
|
||||||
|
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (MyEditItem.MyStepPanel.VwMode == E_ViewMode.View)
|
||||||
|
{
|
||||||
|
//swapping into edit mode, so check out procedure and Setup Security
|
||||||
|
(this.Parent as StepTabPanel).MyDisplayTabItem.OwnerID = MySessionInfo.CheckOutItem(MyEditItem.MyItemInfo.MyProcedure.ItemID, 0);
|
||||||
|
(this.Parent as StepTabPanel).MyDisplayTabItem.SetupSecurity(MyItemInfo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//swapping into View Only mode, so check in procedure
|
||||||
|
OwnerInfo oi = OwnerInfo.GetByItemID(MyEditItem.MyItemInfo.MyProcedure.ItemID, CheckOutType.Procedure);
|
||||||
|
MySessionInfo.CheckInItem(oi.OwnerID);
|
||||||
|
}
|
||||||
|
|
||||||
MyEditItem.MyStepPanel.VwMode = MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit ? E_ViewMode.View : E_ViewMode.Edit;
|
MyEditItem.MyStepPanel.VwMode = MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit ? E_ViewMode.View : E_ViewMode.Edit;
|
||||||
|
//enable / disable the Step Properties Panel based on the ViewMode
|
||||||
|
OnEnableDisableStepProperties(new StepTabRibbonEventArgs(MyEditItem.MyItemInfo, 0, MyEditItem.MyStepPanel.VwMode));
|
||||||
MyEditItem.ToggleEditView(MyEditItem.MyStepPanel.VwMode);
|
MyEditItem.ToggleEditView(MyEditItem.MyStepPanel.VwMode);
|
||||||
SetButtonAndMenuEnabling(true);
|
SetButtonAndMenuEnabling(true);
|
||||||
SetStepButtonAndMenuEnabling(true);
|
SetStepButtonAndMenuEnabling(true);
|
||||||
@@ -3355,7 +3396,62 @@ namespace Volian.Controls.Library
|
|||||||
// btnEnhancedDocSync.Checked = !btnEnhancedDocSync.Checked;
|
// btnEnhancedDocSync.Checked = !btnEnhancedDocSync.Checked;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
// using a blocking collection to make it thread safe in case someone
|
||||||
|
// spams hitting the refresh button
|
||||||
|
private BlockingCollection<bool> blockingRefreshProcedure = new BlockingCollection<bool>();
|
||||||
|
|
||||||
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
private void btnRefreshProcedure_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//Consumer
|
||||||
|
Task.Run(() =>
|
||||||
|
{
|
||||||
|
//Blocks until a newRefresh Procedure Run is available
|
||||||
|
while (!blockingRefreshProcedure.IsCompleted)
|
||||||
|
{
|
||||||
|
_ = blockingRefreshProcedure.Take();
|
||||||
|
RefreshProcedure();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//Producer
|
||||||
|
Task.Run(() => { blockingRefreshProcedure.Add(true); });
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RefreshProcedure()
|
||||||
|
{
|
||||||
|
StepTabPanel stab_Panel = Parent as StepTabPanel;
|
||||||
|
|
||||||
|
if (MyEditItem != null)
|
||||||
|
{
|
||||||
|
if (!MyEditItem.MyStepPanel.ContainsFocus)
|
||||||
|
this.Invoke((Action)(() => { MyEditItem.MyStepPanel.Focus(); }));
|
||||||
|
|
||||||
|
E_ViewMode mode = MyEditItem.MyStepPanel.VwMode;
|
||||||
|
Application.DoEvents();
|
||||||
|
this.Invoke((Action)(() => {MyEditItem.MyStepPanel.ResetAll();}));
|
||||||
|
Application.DoEvents();
|
||||||
|
this.Invoke((Action)(() => {MyEditItem.MyStepPanel.Refresh();}));
|
||||||
|
Application.DoEvents();
|
||||||
|
MyEditItem.MyStepPanel.VwMode = mode;
|
||||||
|
Application.DoEvents();
|
||||||
|
}
|
||||||
|
else if (stab_Panel != null)
|
||||||
|
{
|
||||||
|
if (!stab_Panel.MyStepPanel.ContainsFocus)
|
||||||
|
this.Invoke((Action)(() => {stab_Panel.MyStepPanel.Focus();}));
|
||||||
|
|
||||||
|
E_ViewMode mode = stab_Panel.MyStepPanel.VwMode;
|
||||||
|
Application.DoEvents();
|
||||||
|
this.Invoke((Action)(() => {stab_Panel.MyStepPanel.ResetAll();}));
|
||||||
|
Application.DoEvents();
|
||||||
|
this.Invoke((Action)(() => {stab_Panel.MyStepPanel.Refresh();}));
|
||||||
|
Application.DoEvents();
|
||||||
|
stab_Panel.MyStepPanel.VwMode = mode;
|
||||||
|
Application.DoEvents();
|
||||||
|
}
|
||||||
|
}
|
||||||
private void btnROEdit_Click(object sender, EventArgs e)
|
private void btnROEdit_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (VlnSettings.ReleaseMode.Equals("DEMO"))
|
if (VlnSettings.ReleaseMode.Equals("DEMO"))
|
||||||
@@ -4865,10 +4961,11 @@ namespace Volian.Controls.Library
|
|||||||
public class StepTabRibbonEventArgs : EventArgs
|
public class StepTabRibbonEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public StepTabRibbonEventArgs() { ; }
|
public StepTabRibbonEventArgs() { ; }
|
||||||
public StepTabRibbonEventArgs(ItemInfo proc, int oringFlg = 0)
|
public StepTabRibbonEventArgs(ItemInfo proc, int oringFlg = 0, E_ViewMode viewMode = E_ViewMode.Edit)
|
||||||
{
|
{
|
||||||
_Proc = proc;
|
_Proc = proc;
|
||||||
OringFlg = oringFlg;
|
OringFlg = oringFlg;
|
||||||
|
ViewMode = viewMode;
|
||||||
}
|
}
|
||||||
private ItemInfo _Proc;
|
private ItemInfo _Proc;
|
||||||
|
|
||||||
@@ -4884,6 +4981,9 @@ namespace Volian.Controls.Library
|
|||||||
get { return _OringFlg; }
|
get { return _OringFlg; }
|
||||||
set { _OringFlg = value; }
|
set { _OringFlg = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//C2019-036 View Only mode work with Checked Out Procedures
|
||||||
|
public E_ViewMode ViewMode { get; set; }
|
||||||
}
|
}
|
||||||
public delegate void StepTabRibbonEvent(object sender, StepTabRibbonEventArgs args);
|
public delegate void StepTabRibbonEvent(object sender, StepTabRibbonEventArgs args);
|
||||||
|
|
||||||
|
|||||||
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1855,7 +1855,10 @@ namespace Volian.Print.Library
|
|||||||
if (doSectionContinue) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, null);
|
if (doSectionContinue) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, null);
|
||||||
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
||||||
// B2020-164 added check for SpecialCaseCalvert to bypass IsSeparateSubsection STP O-67B-2 step 6.5
|
// B2020-164 added check for SpecialCaseCalvert to bypass IsSeparateSubsection STP O-67B-2 step 6.5
|
||||||
if ((!MyItemInfo.IsSection || MyItemInfo.IsSubsection) &&
|
// B2025-060 no section continue message if previous was not in same section or sub-section
|
||||||
|
// fixes Vogtle units 3&4 3-AOP-116 Attachments 2 & 3
|
||||||
|
if ((!MyItemInfo.IsSection || MyItemInfo.IsSubsection) &&
|
||||||
|
(MyItemInfo.MyPrevious != null && MyItemInfo.ActiveSection == MyItemInfo.MyPrevious.ActiveSection) &&
|
||||||
MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader &&
|
MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader &&
|
||||||
(!MyItemInfo.IsSection || (MyItemInfo.IsSeparateSubsection || MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)))
|
(!MyItemInfo.IsSection || (MyItemInfo.IsSeparateSubsection || MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user