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
@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using VEPROMS.CSLA.Library;
@@ -28,45 +25,36 @@ namespace VEPROMS
private List<MiniConfig> _Apples;
private List<MiniConfig> _DeletedApples;
private List<EnhancedMiniConfig> _Enhanced;
private DocVersionConfig _DocVersionConfig;
private string _OrgPDFPath; // B2024-030 used to save last PDF path
private readonly DocVersionConfig _DocVersionConfig;
private readonly string _OrgPDFPath; // B2024-030 used to save last PDF path
// Default values
private string _DefaultFormatName = null;
private string _DefaultROPrefix = null;
private string _DefaultImagePrefix = null;
private string _DefaultWatermark = null;
private string _DefaultChgBarType = null;
private string _DefaultChgBarLoc = null;
private string _DefaultChgBarText = null;
private string _DefaultChgBarUsrMsg1 = null;
private string _DefaultChgBarUsrMsg2 = null;
private bool _DefaultDisableDuplex = false;
private DisplaySearch _DisplaySearch1 = null;
private bool _Initializing = false;
private bool _Initializing = false;
private System.IO.StreamWriter swROUpdate;
private ProgressBarItem _ProgressBar = null;
private RODbInfo _CurRoDbInfo = null;
private RODbInfo _CurRoDbInfo = null;
private ROFstInfo _SelectedROFst;
private List<DocVersionInfo> NewEnhVersions = new List<DocVersionInfo>();
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
private List<DocVersionInfo> NewEnhVersions = new List<DocVersionInfo>();
private bool doingNew = false;
private bool _EnhNeedToUnlink = false;
private int _InitialIndex = -2; // added as part of code change C2017-004. this also makes it consistent with section properties
private int? _cmbxformatOriginal = null;
#endregion
#endregion
#region Properties
public DisplaySearch DisplaySearch1
{
get { return _DisplaySearch1; }
set { _DisplaySearch1 = value; }
}
#region Properties
// For the initial release, we are assuming there will be only one rofst for a docversion. Changes will be needed here if more than 1.
public ROFstInfo SelectedROFst
public DisplaySearch DisplaySearch1 { get; set; } = null;
// For the initial release, we are assuming there will be only one rofst for a docversion. Changes will be needed here if more than 1.
public ROFstInfo SelectedROFst
{
get
{
@@ -81,17 +69,13 @@ namespace VEPROMS
set { _SelectedROFst = value; }
}
public ProgressBarItem ProgressBar
{
get { return _ProgressBar; }
set { _ProgressBar = value; }
}
public ProgressBarItem ProgressBar { get; set; } = null;
#endregion
#endregion
#region Constructors
#region Constructors
public frmVersionsProperties(DocVersionConfig docVersionConfig)
public frmVersionsProperties(DocVersionConfig docVersionConfig)
{
_DocVersionConfig = docVersionConfig;
docVersionConfig.RefreshMyEnhancedDocuments();
@@ -103,7 +87,7 @@ namespace VEPROMS
_Initializing = false;
//build the caption
this.Text = string.Format("{0} Properties", _DocVersionConfig.Name);
Text = string.Format("{0} Properties", _DocVersionConfig.Name);
}
#endregion
@@ -147,9 +131,11 @@ namespace VEPROMS
srchtxt = myGrid.GetSearchableText();
}
List<string> retlist = new List<string>();
retlist.Add(srchtxt);
retlist.Add(xml);
List<string> retlist = new List<string>
{
srchtxt,
xml
};
return retlist;
}
@@ -164,7 +150,6 @@ namespace VEPROMS
docVersionConfigBindingSource.DataSource = _DocVersionConfig;
//formatInfoListBindingSource.DataSource = FormatInfoList.Get();
imageCodecInfoBindingSource.DataSource = ImageCodecInfo.GetImageDecoders();
ppCmbxFormat.DataSource = null;
@@ -185,7 +170,7 @@ namespace VEPROMS
// Get the saved settings for this user
// Get setting telling us whether to display the default values on this property page
ppCbShwDefSettings.Checked = (Settings.Default["ShowDefaultVersionProp"] != null) ? Settings.Default.ShowDefaultVersionProp : false;
ppCbShwDefSettings.Checked = (Settings.Default["ShowDefaultVersionProp"] != null) && Settings.Default.ShowDefaultVersionProp;
// Get the User's property page style "PropPageStyle" (this is a system wide user setting)
// 1 - Button Dialog (default)
@@ -194,7 +179,7 @@ namespace VEPROMS
{
tcVersions.TabsVisible = true;
panVerBtns.Visible = false;
this.Width -= panVerBtns.Width;
Width -= panVerBtns.Width;
}
// Get the default values for the property page information
@@ -298,12 +283,14 @@ namespace VEPROMS
}
else
{
Button btnPC = new Button();
btnPC.Text = "Add Applicability to Working Draft";
btnPC.Width = 250;
btnPC.Location = new Point(25, 271);
btnPC.Parent = tcpGeneral;
btnPC.Click += new EventHandler(btnPC_Click);
Button btnPC = new Button
{
Text = "Add Applicability to Working Draft",
Width = 250,
Location = new Point(25, 271),
Parent = tcpGeneral
};
btnPC.Click += new EventHandler(btnPC_Click);
btnApplicability.Visible = false;
tiApplicability.Visible = false;
}
@@ -394,12 +381,14 @@ namespace VEPROMS
}
if (validEmptyEnhancedExists)
{
Button btnEnh = new Button();
btnEnh.Text = "Link to Enhanced Document(s)";
btnEnh.Width = 220;
btnEnh.Location = new Point(290, 271);
btnEnh.Parent = tcpGeneral;
btnEnh.Click += new EventHandler(btnEnh_Click);
Button btnEnh = new Button
{
Text = "Link to Enhanced Document(s)",
Width = 220,
Location = new Point(290, 271),
Parent = tcpGeneral
};
btnEnh.Click += new EventHandler(btnEnh_Click);
}
}
btnEnhanced.Visible = false;
@@ -425,7 +414,7 @@ namespace VEPROMS
DocVersionInfo dvi = DocVersionInfo.Get(_DocVersionConfig.MyEnhancedDocuments[0].VersionID);
DVEnhancedDocument dvedUseData = _DocVersionConfig.MyEnhancedDocuments[0];
DocVersionConfig dvc = dvi.MyConfig as DocVersionConfig;
EnhancedMiniConfig ecfg = new EnhancedMiniConfig(0, dvi.VersionID, "?", dvi.SearchDVPath, dvedUseData.Name, dvedUseData.Type.ToString(), dvedUseData.PdfToken, dvedUseData.PdfX.ToString());
EnhancedMiniConfig ecfg = new EnhancedMiniConfig(0, dvi.VersionID, dvi.SearchDVPath, dvedUseData.Name, dvedUseData.Type.ToString(), dvedUseData.PdfToken, dvedUseData.PdfX.ToString());
cbxEnhVersions.Items.Add(dvi.SearchDVPath);
tbEnhName.Enabled = false;
tbEnhType.Enabled = false;
@@ -466,7 +455,7 @@ namespace VEPROMS
{
DocVersionInfo dvi = DocVersionInfo.Get(dved.VersionID);
DocVersionConfig dvc = dvi.MyConfig as DocVersionConfig;
EnhancedMiniConfig ecfg = new EnhancedMiniConfig(0, dvi.VersionID, "?", dvi.SearchDVPath, dved.Name, dved.Type.ToString(), dved.PdfToken, dved.PdfX.ToString());
EnhancedMiniConfig ecfg = new EnhancedMiniConfig(0, dvi.VersionID, dvi.SearchDVPath, dved.Name, dved.Type.ToString(), dved.PdfToken, dved.PdfX.ToString());
cbxEnhVersions.Items.Add(dvi.SearchDVPath);
_Enhanced.Add(ecfg);
}
@@ -549,47 +538,6 @@ namespace VEPROMS
}
}
private string AddSlaveNode(MiniConfig mc)
{
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
xd.LoadXml(_DocVersionConfig.ToString());
System.Xml.XmlNodeList nl = xd.SelectNodes("//Slave");
int max = 0;
foreach (System.Xml.XmlNode n in nl)
{
max = int.Parse(n.Attributes.GetNamedItem("index").InnerText);
}
max++;
System.Xml.XmlNode nn = xd.CreateElement("Slave");
AddSlaveAttribute(nn, "index", max.ToString());
AddSlaveAttribute(nn, "ID", mc.ID);
AddSlaveAttribute(nn, "Name", mc.Name);
AddSlaveAttribute(nn, "Number", mc.Number);
AddSlaveAttribute(nn, "Text", mc.Text);
AddSlaveAttribute(nn, "ProcedureNumber", mc.ProcedureNumber);
AddSlaveAttribute(nn, "SetID", mc.SetID);
AddSlaveAttribute(nn, "SetName", mc.SetName);
AddSlaveAttribute(nn, "OtherID", mc.OtherID);
AddSlaveAttribute(nn, "OtherName", mc.OtherName);
AddSlaveAttribute(nn, "OtherNumber", mc.OtherNumber);
AddSlaveAttribute(nn, "OtherText", mc.OtherText);
System.Xml.XmlNode sn = xd.SelectSingleNode("//Slaves");
sn.AppendChild(nn);
return xd.OuterXml;
}
private void AddSlaveAttribute(System.Xml.XmlNode nn, string name, string value)
{
System.Xml.XmlAttribute xa = nn.OwnerDocument.CreateAttribute(name);
xa.InnerText = value;
nn.Attributes.SetNamedItem(xa);
}
private void btnVersionsPropOK_Click(object sender, EventArgs e)
{
//B2024-030 Check the PDF Location path and prompt to create the folders if needed
@@ -683,8 +631,8 @@ namespace VEPROMS
{
dved.PdfX = Convert.ToInt32(emc.PdfXOffset);
}
catch (Exception ex)
{
catch (Exception)
{
dved.PdfX = 10;
}
}
@@ -698,8 +646,8 @@ namespace VEPROMS
{
ipdfx = Convert.ToInt32(emc.PdfXOffset);
}
catch (Exception ex)
{
catch (Exception)
{
ipdfx = (emc.PdfToken == null || emc.PdfToken == "") ? 0 : 10;
}
@@ -709,8 +657,8 @@ namespace VEPROMS
{
itype = Convert.ToInt32(emc.Type);
}
catch (Exception ex)
{
catch (Exception)
{
itype = 1;
}
@@ -773,20 +721,20 @@ namespace VEPROMS
if (_EnhNeedToUnlink)
{
this.Cursor = Cursors.WaitCursor;
Cursor = Cursors.WaitCursor;
_DocVersionConfig.MyDocVersion.MyDocVersionInfo.DoUnlinkEnhancedDocVersion();
this.Cursor = Cursors.Default;
Cursor = Cursors.Default;
}
// B2019-132 update the association count for this working draft
_DocVersionConfig.MyDocVersion.MyDocVersionInfo.RefreshDocVersionAssociations();
this.Close();
Close();
}
private void btnFldrPropCancel_Click(object sender, EventArgs e)
{
docVersionConfigBindingSource.CancelEdit();
this.Close();
Close();
}
/// <summary>
@@ -832,13 +780,15 @@ namespace VEPROMS
// Get the ro path - there is no 'default'
if (_DocVersionConfig.MyDocVersion.DocVersionAssociationCount < 0 && _DocVersionConfig.MyDocVersion.DocVersionAssociations.Count == 0)
;// The line above refreshes the data
#pragma warning disable CS0642 // Possible mistaken empty statement
;// The line above refreshes the data
#pragma warning restore CS0642 // Possible mistaken empty statement
if (_DocVersionConfig.MyDocVersion.DocVersionAssociationCount > 0)
if (_DocVersionConfig.MyDocVersion.DocVersionAssociationCount > 0)
{
RODbInfo rdi = RODbInfo.GetJustRODB(SelectedROFst.RODbID);
tbRoDb.Text = string.Format("{0} ({1})", rdi.ROName, rdi.FolderPath);
tbRoDb.Text = $"{rdi.ROName} ({rdi.FolderPath})";
ppBtnRoToSql.Visible = ppBtnRoToSql.Enabled = CanMigrateRoAccessToSql(rdi); // C2017-003: make button visible if ro migration is doable
_CurRoDbInfo = rdi;
}
@@ -851,7 +801,7 @@ namespace VEPROMS
foreach (RODbInfo rdi in RODbInfoList.Get())
{
int i = cmbRoDb.Items.Add(string.Format("{0} ({1})", rdi.ROName, rdi.FolderPath));
int i = cmbRoDb.Items.Add($"{rdi.ROName} ({rdi.FolderPath})");
if (rdi.RODbID == myrodbid)
{
@@ -958,10 +908,12 @@ namespace VEPROMS
if (tmp == null)
{
MessageBox.Show("Invalid ro fst directory, use the Property dialog to fix directory path to ro.fst.");
frmRODbProperties dlgROProperties = new frmRODbProperties(_DocVersionConfig.MyDocVersion, rdi);
dlgROProperties.ProgressBar = ProgressBar;
frmRODbProperties dlgROProperties = new frmRODbProperties(_DocVersionConfig.MyDocVersion, rdi)
{
ProgressBar = ProgressBar
};
if (dlgROProperties.ShowDialog() == DialogResult.OK)
if (dlgROProperties.ShowDialog() == DialogResult.OK)
{
tbRoDb.Text = string.Format("{0} ({1})", SelectedROFst.MyRODb.ROName, SelectedROFst.MyRODb.FolderPath);
// only allow update if association, and the RO update was not done and/or not completed
@@ -975,7 +927,7 @@ namespace VEPROMS
cmbRoDb.Visible = ppBtnRoDbBrowse.Visible = false;
tbRoDb.Visible = btnRoDbProperties.Visible = true;
tbRoDb.Text = string.Format("{0} ({1})", tmp.MyRODb.ROName, tmp.MyRODb.FolderPath);
tbRoDb.Text = $"{tmp.MyRODb.ROName} ({tmp.MyRODb.FolderPath})";
// C2017-003: See if the selected ro database has been converted to sql and if not, make visible a button to convert the data.
RODbInfo rodbi = RODbInfo.GetJustRODB(tmp.MyRODb.RODbID);
@@ -1007,12 +959,14 @@ namespace VEPROMS
private void ppBtnRoDbBrowse_Click(object sender, EventArgs e)
{
frmRODbProperties dlgROProperties = new frmRODbProperties(_DocVersionConfig.MyDocVersion, SelectedROFst == null ? null : SelectedROFst.MyRODb);
dlgROProperties.ParentLocation = Location;
frmRODbProperties dlgROProperties = new frmRODbProperties(_DocVersionConfig.MyDocVersion, SelectedROFst?.MyRODb)
{
ParentLocation = Location
};
// if a user has entered a valid rodb, then this docversion will be conntected to it - change
// to a non-editable text box and the button becomes a properties button rather than browse.
if (dlgROProperties.ShowDialog() == DialogResult.OK)
// if a user has entered a valid rodb, then this docversion will be conntected to it - change
// to a non-editable text box and the button becomes a properties button rather than browse.
if (dlgROProperties.ShowDialog() == DialogResult.OK)
{
cmbRoDb.Items.Clear();
_DocVersionConfig.MyDocVersion.Reset_DocVersionAssociations();
@@ -1075,12 +1029,9 @@ namespace VEPROMS
}
private void frmVersionsProperties_Shown(object sender, EventArgs e)
{
ppRTxtName.Focus();
}
private void frmVersionsProperties_Shown(object sender, EventArgs e) => ppRTxtName.Focus();
private void ppRTxtName_Leave(object sender, EventArgs e)
private void ppRTxtName_Leave(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(ppRTxtName.Text))
{
@@ -1089,12 +1040,9 @@ namespace VEPROMS
}
}
private void btnApplicability_Click(object sender, EventArgs e)
{
ProcessButtonClick(tiApplicability, btnApplicability);
}
private void btnApplicability_Click(object sender, EventArgs e) => ProcessButtonClick(tiApplicability, btnApplicability);
private void lbApplicabilities_SelectedIndexChanged(object sender, EventArgs e)
private void lbApplicabilities_SelectedIndexChanged(object sender, EventArgs e)
{
if (lbApplicabilities.SelectedIndex > -1)
{
@@ -1106,11 +1054,12 @@ namespace VEPROMS
private void btnNewApple_Click(object sender, EventArgs e)
{
MiniConfig cfg = new MiniConfig();
MiniConfig cfg = new MiniConfig
{
Name = "New Applicability"
};
cfg.Name = "New Applicability";
if (_Apples == null)
if (_Apples == null)
{
_Apples = new List<MiniConfig>();
}
@@ -1147,7 +1096,7 @@ namespace VEPROMS
if (_showApplicSearchResults)
{
_showApplicSearchResults = false;
_DisplaySearch1.SearchResults = null;
DisplaySearch1.SearchResults = null;
}
Cursor.Current = Cursors.WaitCursor;
@@ -1159,9 +1108,9 @@ namespace VEPROMS
if (MessageBox.Show(string.Format("Cannot remove an Applicability that is being use in {0} places.\n\nDo you want to view locations via Search Results?\n\nThe Search panel will open when you exit the property page.", placesUsed.Count), "Applicability In Use", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
_showApplicSearchResults = true;
_DisplaySearch1.SearchResults = placesUsed;
_DisplaySearch1.ReportTitle = string.Format("{0} Applicability", cfg.Name);
_DisplaySearch1.TypesSelected = string.Format("These Locations Specify The \"{0}\" Applicability", cfg.Name);
DisplaySearch1.SearchResults = placesUsed;
DisplaySearch1.ReportTitle = string.Format("{0} Applicability", cfg.Name);
DisplaySearch1.TypesSelected = string.Format("These Locations Specify The \"{0}\" Applicability", cfg.Name);
}
return true;
@@ -1187,7 +1136,7 @@ namespace VEPROMS
bsApples.DataSource = null;
bsApples.DataSource = _Apples;
// C2018-010: When removing an applicability, info on right side still contains old content. Do refreshes and reset datasource to fix this.
this.lbApplicabilities.Refresh();
lbApplicabilities.Refresh();
if (_Apples != null && _Apples.Count > 0)
{
@@ -1204,12 +1153,9 @@ namespace VEPROMS
dlgPL.ShowDialog();
}
private void btnEnhanced_Click(object sender, EventArgs e)
{
ProcessButtonClick(tiEnhanced, btnEnhanced);
}
private void btnEnhanced_Click(object sender, EventArgs e) => ProcessButtonClick(tiEnhanced, btnEnhanced);
private void lbEnhanced_SelectedIndexChanged(object sender, EventArgs e)
private void lbEnhanced_SelectedIndexChanged(object sender, EventArgs e)
{
if (!_Initializing && lbEnhanced.SelectedIndex > -1 && !doingNew)
{
@@ -1225,12 +1171,14 @@ namespace VEPROMS
_Initializing = true;
doingNew = true;
// the 'New' button is only enabled for Source documents.
EnhancedMiniConfig cfg = new EnhancedMiniConfig();
cfg.Name = "New Enhanced";
// the 'New' button is only enabled for Source documents.
EnhancedMiniConfig cfg = new EnhancedMiniConfig
{
Name = "New Enhanced"
};
// need to have a unique number for this enhanced link, find largest and then increment by 1.
int maxtype = -1;
// need to have a unique number for this enhanced link, find largest and then increment by 1.
int maxtype = -1;
if (_DocVersionConfig.MyEnhancedDocuments != null && _DocVersionConfig.MyEnhancedDocuments.Count > 0)
{
@@ -1451,40 +1399,36 @@ namespace VEPROMS
}
}
#region (General Tab)
#region (General Tab)
/// <summary>
/// This is the General button used on the button interface design
/// </summary>
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void btnGeneral_Click(object sender, EventArgs e)
/// <summary>
/// This is the General button used on the button interface design
/// </summary>
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void btnGeneral_Click(object sender, EventArgs e) => ProcessButtonClick(tiGeneral, btnGeneral);
#endregion
#region (Referenced Objects)
/// <summary>
/// This is the Referenced Objects button used on the button interface design
/// </summary>
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void btnRefObjs_Click(object sender, EventArgs e) => ProcessButtonClick(tiRefObjs, btnRefObjs);
private void btnRoDbProperties_Click(object sender, EventArgs e)
{
ProcessButtonClick(tiGeneral, btnGeneral);
}
frmRODbProperties dlgROProperties = new frmRODbProperties(_DocVersionConfig.MyDocVersion, SelectedROFst?.MyRODb)
{
ParentLocation = Location
};
#endregion
#region (Referenced Objects)
/// <summary>
/// This is the Referenced Objects button used on the button interface design
/// </summary>
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void btnRefObjs_Click(object sender, EventArgs e)
{
ProcessButtonClick(tiRefObjs, btnRefObjs);
}
private void btnRoDbProperties_Click(object sender, EventArgs e)
{
frmRODbProperties dlgROProperties = new frmRODbProperties(_DocVersionConfig.MyDocVersion, SelectedROFst == null ? null : SelectedROFst.MyRODb);
dlgROProperties.ParentLocation = Location;
if (dlgROProperties.ShowDialog() == DialogResult.OK)
if (dlgROProperties.ShowDialog() == DialogResult.OK)
{
tbRoDb.Text = string.Format("{0} ({1})", SelectedROFst.MyRODb.ROName, SelectedROFst.MyRODb.FolderPath);
tbRoDb.Text = $"{SelectedROFst.MyRODb.ROName} ({SelectedROFst.MyRODb.FolderPath})";
// only allow update if association, and the RO update was not done and/or not completed
ppBtnUpRoVals.Enabled = !_DocVersionConfig.MyDocVersion.ROfstLastCompleted || _DocVersionConfig.MyDocVersion.NewerRoFst;
}
@@ -1521,7 +1465,7 @@ namespace VEPROMS
if (!File.Exists(rofstPath))
{
FinalProgressBarMessage = "No existing RO.FST";
MessageBox.Show("No existing ro.fst in path " + rdi.FolderPath + ". Check for invalid path", "No existing RO.FST"); //B2017-125 added title to messagebox
MessageBox.Show($"No existing ro.fst in path {rdi.FolderPath}. Check for invalid path", "No existing RO.FST"); //B2017-125 added title to messagebox
break;
}
@@ -1581,29 +1525,26 @@ namespace VEPROMS
private void ContentInfo_StaticContentInfoChange(object sender, StaticContentInfoEventArgs args)
{
if (args.Type == "RO")
swROUpdate.Write(string.Format("Fixed Referenced Object for {1}({4}){0}Old Text: {2}{0}New Text: {3}{0}{0}", Environment.NewLine, (sender as ItemInfo).ShortPath, args.OldValue, args.NewValue, (sender as ItemInfo).ItemID));
swROUpdate.Write($"Fixed Referenced Object for {(sender as ItemInfo).ShortPath}({(sender as ItemInfo).ItemID}){Environment.NewLine}Old Text: {args.OldValue}{Environment.NewLine}New Text: {args.NewValue}{Environment.NewLine}{Environment.NewLine}");
}
#endregion
#endregion
#region (Output Settings)
#region (Output Settings)
/// <summary>
/// This is the Output Settings button used on the button interface design
/// </summary>
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void btnOutputSettings_Click(object sender, EventArgs e)
{
ProcessButtonClick(tiOutputSettings, btnOutputSettings);
}
/// <summary>
/// This is the Output Settings button used on the button interface design
/// </summary>
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void btnOutputSettings_Click(object sender, EventArgs e) => ProcessButtonClick(tiOutputSettings, btnOutputSettings);
/// <summary>
/// Selection in Watermark combo box changed.
/// </summary>
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void ppCmbxWatermark_SelectedValueChanged(object sender, EventArgs e)
/// <summary>
/// Selection in Watermark combo box changed.
/// </summary>
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void ppCmbxWatermark_SelectedValueChanged(object sender, EventArgs e)
{
if (!_Initializing)
{
@@ -1889,26 +1830,6 @@ namespace VEPROMS
deflabel.Visible = ppCbShwDefSettings.Checked && button.Visible;
}
/// <summary>
/// Process a change in the combo box selection
/// </summary>
/// <param name="cmbx">Combo Box Name</param>
/// <param name="defstr">string containing default text</param>
/// <param name="button">button to reset to default value</param>
/// <param name="deflabel">label containing the default</param>
private void ProcessCmbxSelectedValueChange(ComboBoxEx cmbx, string defstr, ButtonX button, Label deflabel)
{
if (cmbx.SelectedIndex > -1 && !string.IsNullOrEmpty(defstr) && defstr.Equals(cmbx.SelectedValue))
{
button.Visible = true;
button.Focus();
button.PerformClick();
}
button.Visible = cmbx.SelectedValue != null;
deflabel.Visible = ppCbShwDefSettings.Checked && button.Visible;
}
/// <summary>
/// Set the watermark and default label
/// </summary>
@@ -1925,34 +1846,28 @@ namespace VEPROMS
}
}
#endregion
#endregion
#region (MergedOutputSettings)
#region (MergedOutputSettings)
private void btnMergedOutputSettngs_Click(object sender, EventArgs e)
{
ProcessButtonClick(tiMergedOutputSettings, btnMergedOutputSettngs);
}
private void btnMergedOutputSettngs_Click(object sender, EventArgs e) => ProcessButtonClick(tiMergedOutputSettings, btnMergedOutputSettngs);
#endregion
#endregion
#region Library Documents
#region Library Documents
/// <summary>
/// This is the Library Documents button used on the button interface design
/// </summary>
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void btnLibDocs_Click(object sender, EventArgs e)
{
ProcessButtonClick(tiLibDocs, btnLibDocs);
}
/// <summary>
/// This is the Library Documents button used on the button interface design
/// </summary>
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void btnLibDocs_Click(object sender, EventArgs e) => ProcessButtonClick(tiLibDocs, btnLibDocs);
#endregion
#endregion
#endregion
#endregion
private void tbRoDb_TextChanged(object sender, EventArgs e)
private void tbRoDb_TextChanged(object sender, EventArgs e)
{
}
@@ -1972,10 +1887,7 @@ namespace VEPROMS
#region Fields
private static int lastindex = 0;
private bool _isDeleted;
private bool _isDirty;
private int _index;
private int _index;
private int _versionID;
private string _versionPathName;
private string _name;
@@ -1983,25 +1895,17 @@ namespace VEPROMS
private string _pdfToken;
private string _pdfXOffset;
#endregion
#endregion
#region Properties
#region Properties
[XmlIgnore]
public bool IsDeleted
{
get { return _isDeleted; }
set { _isDeleted = value; }
}
[XmlIgnore]
public bool IsDeleted { get; set; }
[XmlIgnore]
public bool IsDirty
{
get { return _isDirty; }
set { _isDirty = value; }
}
[XmlIgnore]
public bool IsDirty { get; set; }
[XmlAttribute("index")]
[XmlAttribute("index")]
public int Index
{
get { return _index; }
@@ -2063,10 +1967,10 @@ namespace VEPROMS
_type = string.Empty;
_pdfToken = string.Empty;
_pdfXOffset = string.Empty;
_isDirty = false;
IsDirty = false;
}
public EnhancedMiniConfig(int index, int versionid, string id, string versionPathName, string name, string type, string pdftoken, string pdfxoffset)
public EnhancedMiniConfig(int index, int versionid, string versionPathName, string name, string type, string pdftoken, string pdfxoffset)
{
_index = index;
_versionID = versionid;
@@ -2075,20 +1979,17 @@ namespace VEPROMS
_type = type;
_pdfToken = pdftoken;
_pdfXOffset = pdfxoffset;
_isDirty = false;
IsDirty = false;
}
#endregion
#endregion
#region Public Methods
#region Public Methods
public override string ToString()
{
return Name;
}
public override string ToString() => Name;
#endregion
}
#endregion
}
#endregion
@@ -2101,10 +2002,7 @@ namespace VEPROMS
#region Fields
private static int lastindex = 0;
private bool _isDeleted;
private bool _isDirty;
private int _index;
private int _index;
private string _iD;
private string _name;
private string _number;
@@ -2117,25 +2015,17 @@ namespace VEPROMS
private string _otherNumber;
private string _otherText;
#endregion
#endregion
#region Properties
#region Properties
[XmlIgnore]
public bool IsDeleted
{
get { return _isDeleted; }
set { _isDeleted = value; }
}
[XmlIgnore]
public bool IsDeleted { get; set; }
[XmlIgnore]
public bool IsDirty
{
get { return _isDirty; }
set { _isDirty = value; }
}
[XmlIgnore]
public bool IsDirty { get; set; }
[XmlAttribute("index")]
[XmlAttribute("index")]
public int Index
{
get { return _index; }
@@ -2237,7 +2127,7 @@ namespace VEPROMS
_otherName = string.Empty;
_otherNumber = string.Empty;
_otherText = string.Empty;
_isDirty = false;
IsDirty = false;
}
public MiniConfig(int index, string id, string name, string number, string text, string procedurenumber, string setid, string setname, string otherid, string othername, string othernumber, string othertext)
@@ -2254,25 +2144,19 @@ namespace VEPROMS
_otherName = othername;
_otherNumber = othernumber;
_otherText = othertext;
_isDirty = false;
IsDirty = false;
}
#endregion
#endregion
#region Public Methods
#region Public Methods
public override string ToString()
{
return Name;
}
public override string ToString() => Name;
public string MyXml
{
get { return GenericSerializer<MiniConfig>.StringSerialize(this); }
}
public string MyXml => GenericSerializer<MiniConfig>.StringSerialize(this);
#endregion
}
#endregion
}
#endregion