VEPROMS_UI / remove BouncyCastle

This commit is contained in:
2026-08-21 06:11:06 -04:00
parent 23a296df86
commit 0c3e4bb3e9
41 changed files with 2298 additions and 4704 deletions
+39 -47
View File
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
@@ -12,14 +10,16 @@ namespace VEPROMS
{
public partial class frmSI : Form
{
private StepTabRibbon _MyStepTabRibbon;
private Dictionary<string, StepRTB> _DicStepRtb;
private Dictionary<string, CheckBox> _DicCheckBox;
private bool DoFolder = true;
private SI SIDialogDef = null;
private string OrigConfig = null;
private FolderInfo MyFolderInfo = null;
private DocVersionInfo MyDocVersionInfo = null;
private readonly StepTabRibbon _MyStepTabRibbon;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
private Dictionary<string, StepRTB> _DicStepRtb;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
private Dictionary<string, CheckBox> _DicCheckBox;
private readonly bool DoFolder = true;
private readonly SI SIDialogDef = null;
private readonly string OrigConfig = null;
private readonly FolderInfo MyFolderInfo = null;
private readonly DocVersionInfo MyDocVersionInfo = null;
public frmSI(SI siDialogDef, string config, bool doFolder, FolderInfo fi, DocVersionInfo dvi)
{
DoFolder = doFolder;
@@ -36,22 +36,23 @@ namespace VEPROMS
private void InitializeSpecificControls()
{
this.Text = SIDialogDef.Caption;
this.Location = new Point((int)SIDialogDef.x * 2, (int)SIDialogDef.y * 2);
Text = SIDialogDef.Caption;
Location = new Point((int)SIDialogDef.x * 2, (int)SIDialogDef.y * 2);
int maxx = 0;
int maxy = 0;
int xB4Scroll = 900;
int yB4Scroll = 630;
this.panelSI.AutoScroll = false;
panelSI.AutoScroll = false;
foreach (SILabel lbl in SIDialogDef.LabelList)
{
Label wlbl = new Label();
wlbl.Text = lbl.text;
wlbl.Location = new Point((int)lbl.x * 2, (int)lbl.y * 2);
wlbl.AutoSize = true;
//wlbl.Size = new Size((int)lbl.width * 2, (int)lbl.height * 2);
wlbl.Visible = true;
this.panelSI.Controls.Add(wlbl);
Label wlbl = new Label
{
Text = lbl.text,
Location = new Point((int)lbl.x * 2, (int)lbl.y * 2),
AutoSize = true,
Visible = true
};
panelSI.Controls.Add(wlbl);
maxx = ((int)lbl.x * 2 + (int)lbl.width * 2) > maxx ? ((int)lbl.x * 2 + (int)lbl.width * 2) : maxx;
maxy = ((int)lbl.y * 2 + (int)lbl.height * 2) > maxy ? ((int)lbl.y * 2 + (int)lbl.height * 2) : maxy;
}
@@ -70,7 +71,7 @@ namespace VEPROMS
// (Removed the frmSI specific contextmenustrip1)
tb.FieldToEdit = E_FieldToEdit.PSI;
tb.BorderStyle = BorderStyle.FixedSingle;
tb.Enter += new System.EventHandler(this.FieldStepRTB_Enter);
tb.Enter += new System.EventHandler(FieldStepRTB_Enter);
// see if config has data for this field, i.e. search for the 'name'
// B2019-133 continuation of B2018-057 Replace non-breaking hyphen with hyphen.
string val = (DoFolder ? folderConfig.GetValue("SI", fld.name) : dvConfig.GetValue("SI", fld.name)).Replace("\\u8209?", "-");
@@ -78,12 +79,12 @@ namespace VEPROMS
StringBuilder sb = new StringBuilder();
sb.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Arial;}");
sb.Append(@"{\f1\fnil\fcharset0 Arial;}}{\colortbl ;\red255\green0\blue0;}"); // C2017-036 Microsoft removed Arial Unicode MS with Word16
sb.Append(@"\viewkind4\uc1\pard\sl-240\slmult0\fs" + (int)(this.Font.SizeInPoints*2) + " " + dt.StartText + @"}");
sb.Append(@"\viewkind4\uc1\pard\sl-240\slmult0\fs" + (int)(Font.SizeInPoints*2) + " " + dt.StartText + @"}");
tb.Rtf = sb.ToString();
tb.Location = new Point((int)fld.x * 2, (int)fld.y * 2);
tb.Size = new Size((int)fld.width * 2, (int)fld.height * 2);
tb.Visible = true;
this.panelSI.Controls.Add(tb);
panelSI.Controls.Add(tb);
maxx = ((int)fld.x * 2 + (int)fld.width * 2) > maxx ? ((int)fld.x * 2 + (int)fld.width * 2) : maxx;
maxy = ((int)fld.y * 2 + (int)fld.height * 2) > maxy ? ((int)fld.y * 2 + (int)fld.height * 2) : maxy;
}
@@ -96,8 +97,8 @@ namespace VEPROMS
cb.Visible = true;
cb.Width = (int)fld.width * 2;
string val = DoFolder ? folderConfig.GetValue("SI", fld.name) : dvConfig.GetValue("SI", fld.name);
cb.Checked = val!=null && val!="" && val.ToUpper()[0] == 'Y' ? true : false;
this.panelSI.Controls.Add(cb);
cb.Checked = val !=null && val!="" && val.ToUpper()[0] == 'Y';
panelSI.Controls.Add(cb);
maxx = ((int)fld.x * 2 + (int)fld.width * 2) > maxx ? ((int)fld.x * 2 + (int)fld.width * 2) : maxx;
maxy = ((int)fld.y * 2 + (int)fld.height * 2) > maxy ? ((int)fld.y * 2 + (int)fld.height * 2) : maxy;
}
@@ -105,19 +106,19 @@ namespace VEPROMS
if (maxx > xB4Scroll)
{
maxx = xB4Scroll;
this.panelSI.Width = xB4Scroll;
this.panelSI.AutoScroll = true;
panelSI.Width = xB4Scroll;
panelSI.AutoScroll = true;
}
else
this.panelSI.Width = maxx + 50;
panelSI.Width = maxx + 50;
if (maxy > yB4Scroll)
{
maxy = yB4Scroll;
this.panelSI.Height = yB4Scroll;
this.panelSI.AutoScroll = true;
panelSI.Height = yB4Scroll;
panelSI.AutoScroll = true;
}
else
this.panelSI.Height = maxy + 50;
panelSI.Height = maxy + 50;
if (SIDialogDef.ButtonsOnBottom == null || SIDialogDef.ButtonsOnBottom.ToUpper() == "NO")
{
btnOk.Location = new Point(maxx+70, 30);
@@ -189,29 +190,20 @@ namespace VEPROMS
}
}
DialogResult = DialogResult.OK;
this.Close();
Close();
}
private void btnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
this.Close();
Close();
}
// B2017-024 - added a clip board context menu
private void fwdCMCbCut_Click(object sender, EventArgs e)
{
SendKeys.Send("^x"); // <cltr><x>
}
// B2017-024 - added a clip board context menu
private void fwdCMCbCut_Click(object sender, EventArgs e) => SendKeys.Send("^x"); // <cltr><x>
private void fwdCMCbCopy_Click(object sender, EventArgs e)
{
SendKeys.Send("^c"); // <cltr><c>
}
private void fwdCMCbCopy_Click(object sender, EventArgs e) => SendKeys.Send("^c"); // <cltr><c>
private void fwdCMCbPaste_Click(object sender, EventArgs e)
{
SendKeys.Send("^v"); // <cltr><v>
}
}
private void fwdCMCbPaste_Click(object sender, EventArgs e) => SendKeys.Send("^v"); // <cltr><v>
}
}