85 lines
2.1 KiB
C#
85 lines
2.1 KiB
C#
using BaseFunction;
|
|
using System;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using Telerik.WinControls.UI;
|
|
|
|
namespace NSAnalysis
|
|
{
|
|
public partial class AboutSoftwareInfo : Telerik.WinControls.UI.ShapedForm
|
|
{
|
|
public AboutSoftwareInfo()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void AboutSoftwareInfo_Load(object sender, EventArgs e)
|
|
{
|
|
labelExpiryDateValue.Text = ConfigDfn.strExpiredTime;//ConfigDfn.strExpiredTime
|
|
labVersion.Text = AssemblyFileVersion;
|
|
//海克斯康制造智能技术(青岛)有限公司 / Hexagon Manufacturing Intelligence (Qingdao) Co., Ltd.
|
|
//Please send the request file to Hexagon Manufacturing Intelligence (Qingdao) Co., Ltd.
|
|
}
|
|
|
|
public string AssemblyVersion
|
|
{
|
|
get
|
|
{
|
|
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
|
}
|
|
}
|
|
|
|
public string AssemblyFileVersion
|
|
{
|
|
get { return FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location).FileVersion; }
|
|
}
|
|
|
|
private void rbtnCreateRequest_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
SaveFileDialog fbd = new SaveFileDialog();
|
|
fbd.DefaultExt = ".key";
|
|
fbd.Filter = "KEY (*.key)|*.key";
|
|
fbd.FileName = "Request.key";
|
|
|
|
if (fbd.ShowDialog() == DialogResult.OK)
|
|
{
|
|
using (StreamWriter sw = new StreamWriter(fbd.FileName, false, Encoding.Default))
|
|
{
|
|
sw.WriteLine(Covert.GetSystemInfo.GetCode1() + Covert.GetSystemInfo.GetCode2());
|
|
sw.Dispose();
|
|
|
|
MessageBox.Show("授权请求文件,保存成功!");
|
|
return;
|
|
}
|
|
}
|
|
MyBase.TraceWriteLine("授权请求文件未生成——取消");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show("授权请求文件生成出错:" + ex.ToString());
|
|
}
|
|
}
|
|
|
|
#region RadButton鼠标事件
|
|
|
|
private void btn_MouseHover(object sender, EventArgs e)
|
|
{
|
|
RadButton btn = sender as RadButton;
|
|
btn.BackColor = Color.FromArgb(0, 151, 186);
|
|
}
|
|
|
|
private void btn_MouseLeave(object sender, EventArgs e)
|
|
{
|
|
RadButton btn = sender as RadButton;
|
|
btn.BackColor = Color.FromArgb(19, 46, 53);
|
|
}
|
|
|
|
#endregion RadButton鼠标事件
|
|
}
|
|
} |