VEPROMS_UI / remove BouncyCastle
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Reflection;
|
||||
using Volian.Controls.Library;
|
||||
@@ -24,7 +21,7 @@ namespace VEPROMS
|
||||
string connectionString = Database.VEPROMS_Connection;
|
||||
Match mServer = Regex.Match(connectionString, ".*Data Source=([^;]*).*");
|
||||
_SQLServerName = (mServer.Success) ? mServer.Groups[1].Value : "unknown";
|
||||
if (_SQLServerName.StartsWith(@".\")) _SQLServerName = @"Local \ " + _SQLServerName.Substring(2);
|
||||
if (_SQLServerName.StartsWith(@".\")) _SQLServerName = $@"Local \ {_SQLServerName.Substring(2)}";
|
||||
}
|
||||
return _SQLServerName;
|
||||
}
|
||||
@@ -37,7 +34,7 @@ namespace VEPROMS
|
||||
{
|
||||
if (_DatabaseName == null)
|
||||
{
|
||||
_DatabaseName = string.Format("{0}[SQL:{1:yyMM.ddHH}]", Database.ActiveDatabase, Database.RevDate);
|
||||
_DatabaseName = $"{Database.ActiveDatabase}[SQL:{Database.RevDate:yyMM.ddHH}]";
|
||||
}
|
||||
return _DatabaseName;
|
||||
}
|
||||
@@ -55,26 +52,16 @@ namespace VEPROMS
|
||||
DateTime buildDateTime = new System.IO.FileInfo(Assembly.GetExecutingAssembly().Location).LastWriteTime;
|
||||
// If the AssemblyConfiguration is "DEMO" then we are running a Demo version
|
||||
string demoTxt = VlnSettings.DemoMode ? "(Demo)": VlnSettings.DebugMode ? "(Debug)" : "(Production)";
|
||||
// C2018-015 made this information static so we can use in meta files
|
||||
//string connectionString = Database.VEPROMS_Connection;
|
||||
//Match mServer = Regex.Match(connectionString,".*Data Source=([^;]*).*");
|
||||
//string server = (mServer.Success)?mServer.Groups[1].Value:"unknown";
|
||||
//if (server.StartsWith(@".\")) server = @"Local \ " + server.Substring(2);
|
||||
//string databaseName = string.Format("{0}[SQL:{1:yyMM.ddHH}]", Database.ActiveDatabase, Database.RevDate);
|
||||
this.Text = String.Format("About {0}", AssemblyTitle + " " + demoTxt);
|
||||
this.labelProductName.Text = AssemblyProduct;
|
||||
this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
|
||||
this.labelVersionDateTime.Text = String.Format("Build Date: {0}", buildDateTime.ToString());
|
||||
this.labelCopyright.Text = String.Format("Copyright © {0}. All Rights Reserved.", buildDateTime.Year.ToString());
|
||||
this.labelCompanyName.Text = AssemblyCompany;
|
||||
// this.textBoxDescription.Text = AssemblyDescription;
|
||||
this.labelCompanyName.Links[0].LinkData = "Volian Enterprises Inc.";
|
||||
this.labelCompanyName.Links.Add(0,23,"www.volian.com");
|
||||
//this.labelServer.Text = string.Format("SQL Server: {0}", server);
|
||||
this.labelServer.Text = string.Format("SQL Server: {0}", SQLServerName); // C2018-015 use static for this info.
|
||||
//if (databaseName == null) databaseName = Regex.Replace(connectionString, "^.*Initial Catalog=([^;]*);.*$", "$1", RegexOptions.IgnoreCase);
|
||||
//this.labelDatabase.Text = string.Format("Database: {0}", databaseName);
|
||||
this.labelDatabase.Text = string.Format("Database: {0}", DatabaseName); // C2018-015 use static for this info.
|
||||
Text = $"About {AssemblyTitle} {demoTxt}";
|
||||
labelProductName.Text = AssemblyProduct;
|
||||
labelVersion.Text = $"Version {AssemblyVersion}";
|
||||
labelVersionDateTime.Text = $"Build Date: {buildDateTime}";
|
||||
labelCopyright.Text = $"Copyright © {buildDateTime.Year}. All Rights Reserved.";
|
||||
labelCompanyName.Text = AssemblyCompany;
|
||||
labelCompanyName.Links[0].LinkData = "Volian Enterprises Inc.";
|
||||
labelCompanyName.Links.Add(0,23,"www.volian.com");
|
||||
labelServer.Text = $"SQL Server: {SQLServerName}"; // C2018-015 use static for this info.
|
||||
labelDatabase.Text = $"Database: {DatabaseName}"; // C2018-015 use static for this info.
|
||||
}
|
||||
|
||||
#region Assembly Attribute Accessors
|
||||
@@ -99,24 +86,12 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
|
||||
public string AssemblyVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
}
|
||||
}
|
||||
public string AssemblyVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
|
||||
// C2018-009 used to print the PROMS version number at the top of each PDF page
|
||||
public static string PROMSVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
}
|
||||
}
|
||||
// C2018-009 used to print the PROMS version number at the top of each PDF page
|
||||
public static string PROMSVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
|
||||
public string AssemblyDescription
|
||||
public string AssemblyDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -162,7 +137,7 @@ namespace VEPROMS
|
||||
private void labelCompanyName_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
// Determine which link was clicked within the LinkLabel.
|
||||
this.labelCompanyName.Links[0].Visited = true;
|
||||
labelCompanyName.Links[0].Visited = true;
|
||||
|
||||
// Display the appropriate link based on the value of the
|
||||
// LinkData property of the Link object.
|
||||
@@ -171,18 +146,17 @@ namespace VEPROMS
|
||||
System.Diagnostics.Process.Start(target); // this should start the default web browser
|
||||
}
|
||||
|
||||
private void logoPictureBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start(labelCompanyName.Links[0].LinkData as string); // this should start the default web browser
|
||||
}
|
||||
private void logoPictureBox_Click(object sender, EventArgs e) => System.Diagnostics.Process.Start(labelCompanyName.Links[0].LinkData as string); // this should start the default web browser
|
||||
|
||||
private void btnViewEULA_Click(object sender, EventArgs e)
|
||||
private void btnViewEULA_Click(object sender, EventArgs e)
|
||||
{
|
||||
string EulaFile = string.Format(@"\{0}", VlnSettings.EULAfile);
|
||||
string EulaFile = $@"\{VlnSettings.EULAfile}";
|
||||
string strEULA = System.Environment.CurrentDirectory + EulaFile;
|
||||
frmViewTextFile ViewFile = new frmViewTextFile(strEULA,RichTextBoxStreamType.PlainText);
|
||||
ViewFile.Text = "End-User License Agreement";
|
||||
ViewFile.ShowDialog();
|
||||
frmViewTextFile ViewFile = new frmViewTextFile(strEULA, RichTextBoxStreamType.PlainText)
|
||||
{
|
||||
Text = "End-User License Agreement"
|
||||
};
|
||||
ViewFile.ShowDialog();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user