|
@@ -6,6 +6,7 @@ using System.Drawing;
|
|
using System.IO;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using System.Management;
|
|
using System.Management;
|
|
|
|
+using System.Reflection;
|
|
using System.Text;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using System.Windows.Forms;
|
|
@@ -102,14 +103,21 @@ namespace RegistrationAuthorization
|
|
|
|
|
|
private void Form1_Load(object sender, EventArgs e)
|
|
private void Form1_Load(object sender, EventArgs e)
|
|
{
|
|
{
|
|
|
|
+
|
|
|
|
+ //string assemblyPath = Assembly.GetExecutingAssembly().Location;
|
|
|
|
+ //string assemblyDirectory = Path.GetDirectoryName(assemblyPath);
|
|
|
|
+ //Console.WriteLine("编译路径(程序集位置): " + assemblyPath);
|
|
|
|
+ //Console.WriteLine("编译目录: " + assemblyDirectory);
|
|
|
|
+
|
|
|
|
+
|
|
string CPUID, DiskID;
|
|
string CPUID, DiskID;
|
|
CPUID = getCpu();
|
|
CPUID = getCpu();
|
|
DiskID = GetDiskVolumeSerialNumber();
|
|
DiskID = GetDiskVolumeSerialNumber();
|
|
- var ID = ReadXML("./Config/SysData/RegistrationProofreading.txt");
|
|
|
|
|
|
+ var ID = ReadXML(AppDomain.CurrentDomain.BaseDirectory+"\\Config\\SysData\\RegistrationProofreading.txt");
|
|
List<string> list_time = new List<string>();
|
|
List<string> list_time = new List<string>();
|
|
List<string> list_str = new List<string>();
|
|
List<string> list_str = new List<string>();
|
|
- ID.TryGetValue("ID", out list_str);
|
|
|
|
- ID.TryGetValue("Time", out list_time);
|
|
|
|
|
|
+ //ID.TryGetValue("ID", out list_str);
|
|
|
|
+ //ID.TryGetValue("Time", out list_time);
|
|
|
|
|
|
ID.TryGetValue("ID", out list_str);
|
|
ID.TryGetValue("ID", out list_str);
|
|
ID.TryGetValue("Time", out list_time);
|
|
ID.TryGetValue("Time", out list_time);
|