diff --git a/MainWindow.xaml b/MainWindow.xaml
index 661d58b..239a3c0 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -13,7 +13,7 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/ViewModel/MainWindowViewModel.cs b/ViewModel/MainWindowViewModel.cs
index f7534db..6f1a36b 100644
--- a/ViewModel/MainWindowViewModel.cs
+++ b/ViewModel/MainWindowViewModel.cs
@@ -51,12 +51,26 @@ namespace formula_manage.ViewModel
public string INIPath = Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "formula.ini"; //配置文件路径
public string sys_Time; //显示系统时间
+ public string cdk_time; //注册到期时间
+ public string cdk_page = "Hidden"; //注册到期页面状态
+
public string Sys_Time //通知UI控件参数改变
{
get { return sys_Time; }
set { sys_Time = value; OnPropertyChanged("Sys_Time"); }
}
+ public string Cdk_time //通知UI控件参数改变
+ {
+ get { return cdk_time; }
+ set { cdk_time = value; OnPropertyChanged("Cdk_time"); }
+ }
+ public string Cdk_page //通知UI控件参数改变
+ {
+ get { return cdk_page; }
+ set { cdk_page = value; OnPropertyChanged("Cdk_page"); }
+ }
+
string TEXT_SQLIP;
string TEXT_SQLNAME;
string TEXT_SQMOD;
@@ -67,7 +81,7 @@ namespace formula_manage.ViewModel
string SN_KEY;
private void CDkey_()
- {
+ {
string id_1 = SN_ID.Substring(5, 1) + SN_ID.Substring(0, 1) + SN_ID.Substring(4, 1) + SN_ID.Substring(1, 1) + SN_ID.Substring(3, 1) + SN_ID.Substring(2, 1);
if ((id_1 == SN_KEY.Substring(0, 6)) && (SN_KEY.Length == 16))
{
@@ -81,21 +95,22 @@ namespace formula_manage.ViewModel
string MM = DateTime.Now.ToString("MM");
string DD = DateTime.Now.ToString("dd");
+ cdk_time = "Expires time: " + Y +"/"+ M +"/"+ D+ "Hidden";
+
if (string.Compare(Y, YY) < 0)
{
- CDKEY cDKEY = new CDKEY();
- cDKEY.ShowDialog();//实例化并置顶打开窗口
+ cdk_page = "Visible";
}
else if (string.Compare(M, MM) < 0)
{
- CDKEY cDKEY = new CDKEY();
- cDKEY.ShowDialog();//实例化并置顶打开窗口
+ cdk_page = "Visible";
}
else if (string.Compare(D, DD) < 0)
{
- CDKEY cDKEY = new CDKEY();
- cDKEY.ShowDialog();//实例化并置顶打开窗口
+ cdk_page = "Visible";
}
+
+
}
}
}
@@ -150,6 +165,8 @@ namespace formula_manage.ViewModel
CountDown();
Sql_();
+ CDkey_();
+
stuff_Product = ToObservableCollection(STUFFdataTable); //stuff_Product表转换
mac_Machine = ToObservableCollection(MACHINEdataTable);
flow_Workflow = ToObservableCollection(DissolvedataTable);