添加注册到期提示页面
This commit is contained in:
commit
c17474c77f
2 files changed
+39
-19
No files matched your search
+15
-12
@@ -13,7 +13,7 @@
|
|||||||
<ViewModel:MainWindowViewModel x:Key="MainWindowViewModel"/>
|
<ViewModel:MainWindowViewModel x:Key="MainWindowViewModel"/>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Menu IsTabStop="False" Grid.ColumnSpan="2">
|
<Menu IsTabStop="False" Grid.ColumnSpan="1">
|
||||||
<MenuItem x:Name="tab" Header="_文件" FontSize="16" Focusable ="False" >
|
<MenuItem x:Name="tab" Header="_文件" FontSize="16" Focusable ="False" >
|
||||||
<MenuItem Header="_许可证" Click="CDKEY_SET" FontSize="16"/>
|
<MenuItem Header="_许可证" Click="CDKEY_SET" FontSize="16"/>
|
||||||
<Separator/>
|
<Separator/>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<MenuItem Header="_备份/还原" FontSize="16" Name="_SQLBAK" Click="SQLBAK" IsEnabled="False"/>
|
<MenuItem Header="_备份/还原" FontSize="16" Name="_SQLBAK" Click="SQLBAK" IsEnabled="False"/>
|
||||||
<Separator/>
|
<Separator/>
|
||||||
<MenuItem Header="_软件设置" FontSize="16" Name="_SOFTWARE_SET" Click="SOFTWARE_SET" IsEnabled="False"/>
|
<MenuItem Header="_软件设置" FontSize="16" Name="_SOFTWARE_SET" Click="SOFTWARE_SET" IsEnabled="False"/>
|
||||||
<MenuItem Header="_转换设置" FontSize="16" Name="_EXCHANGE_SET" IsEnabled="False"/>
|
<MenuItem Header="_转换设置" FontSize="16" Name="_EXCHANGE_SET" IsEnabled="False"/>
|
||||||
<MenuItem Header="_打印设置" FontSize="16" Name="_PRINT_SET" Click="PRINT_SET" IsEnabled="False"/>
|
<MenuItem Header="_打印设置" FontSize="16" Name="_PRINT_SET" Click="PRINT_SET" IsEnabled="False"/>
|
||||||
<MenuItem Header="_用户设置" FontSize="16" Name="_USER_SET" Click="USER_SET" IsEnabled="False"/>
|
<MenuItem Header="_用户设置" FontSize="16" Name="_USER_SET" Click="USER_SET" IsEnabled="False"/>
|
||||||
<MenuItem Header="_登录限制" FontSize="16" Name="_USER_log" IsEnabled="False"/>
|
<MenuItem Header="_登录限制" FontSize="16" Name="_USER_log" IsEnabled="False"/>
|
||||||
@@ -189,16 +189,16 @@
|
|||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
<DataGridTextColumn Header="计算单位" Width="80" MaxWidth="80" MinWidth="80" CellStyle="{StaticResource CellStyle}" Binding="{Binding SHIFT}"/>
|
<DataGridTextColumn Header="计算单位" Width="80" MaxWidth="80" MinWidth="80" CellStyle="{StaticResource CellStyle}" Binding="{Binding SHIFT}"/>
|
||||||
<DataGridTemplateColumn Header="原料名称" Width="200" MaxWidth="400" MinWidth="100" CellStyle="{StaticResource CellStyle}">
|
<DataGridTemplateColumn Header="原料名称" Width="200" MaxWidth="400" MinWidth="100" CellStyle="{StaticResource CellStyle}">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<ComboBox x:Name="CP_PRODUCT_NAME" BorderThickness="0,0,0,0"
|
<ComboBox x:Name="CP_PRODUCT_NAME" BorderThickness="0,0,0,0"
|
||||||
ItemsSource="{Binding stuff_Product, Source={StaticResource MainWindowViewModel}}"
|
ItemsSource="{Binding stuff_Product, Source={StaticResource MainWindowViewModel}}"
|
||||||
DisplayMemberPath="ProductName"
|
DisplayMemberPath="ProductName"
|
||||||
Text="{Binding PRODUCT_NAME}"
|
Text="{Binding PRODUCT_NAME}"
|
||||||
DropDownClosed="CP_PRODUCT_NAME_DropDownClosed"
|
DropDownClosed="CP_PRODUCT_NAME_DropDownClosed"
|
||||||
BorderBrush="{x:Null}" Background="{x:Null}" IsEditable="True" IsReadOnly="True" Focusable="True" IsTabStop="False"/>
|
BorderBrush="{x:Null}" Background="{x:Null}" IsEditable="True" IsReadOnly="True" Focusable="True" IsTabStop="False"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
<DataGridTextColumn Header="目标重量(g)" Width="200" FontSize="15" MaxWidth="400" MinWidth="100" IsReadOnly="True" Binding="{Binding TARGET_WT}" CellStyle="{StaticResource CellStyle}"/>
|
<DataGridTextColumn Header="目标重量(g)" Width="200" FontSize="15" MaxWidth="400" MinWidth="100" IsReadOnly="True" Binding="{Binding TARGET_WT}" CellStyle="{StaticResource CellStyle}"/>
|
||||||
<DataGridTextColumn Header="单位" Width="80" FontSize="15" MaxWidth="80" MinWidth="80" IsReadOnly="True" Binding="{Binding UNIT}" CellStyle="{StaticResource CellStyle}"/>
|
<DataGridTextColumn Header="单位" Width="80" FontSize="15" MaxWidth="80" MinWidth="80" IsReadOnly="True" Binding="{Binding UNIT}" CellStyle="{StaticResource CellStyle}"/>
|
||||||
@@ -215,10 +215,13 @@
|
|||||||
<ContentControl x:Name="Deputy"/>
|
<ContentControl x:Name="Deputy"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Viewbox x:Name="cdk_box" Margin="0,0,0,0" Opacity="0.8" Visibility="Hidden">
|
<Grid Grid.Column="1" Margin="0,0,0,0" Background="White" Opacity="0.8" Visibility="{Binding Cdk_page}">
|
||||||
<Grid Background="#FFA4A4A4" >
|
<TextBlock Height="50" Margin="0,0,0,300" TextWrapping="Wrap" Text="The registration code expires" Width="500" FontSize="34" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
<TextBlock Height="40" Margin="0,0,0,0" TextWrapping="Wrap" Text="ReRegistration" Width="180" FontSize="28" HorizontalAlignment="Center" Foreground="Black" VerticalAlignment="Center"/>
|
<TextBlock Height="50" Margin="0,0,0,200" TextWrapping="Wrap" Text="{Binding Cdk_time}" Width="500" FontSize="34" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
</Grid>
|
<TextBlock Height="50" Margin="0,0,0,100" TextWrapping="Wrap" Text="Contact SUNLIGHT Reactivate" Width="500" FontSize="34" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
</Viewbox>
|
<Button Content="Reactivate" HorizontalAlignment="Center" Height="50" Margin="200,100,0,0" VerticalAlignment="Center" Width="150" FontSize="24" BorderBrush="{x:Null}" Background="#FFDFDFDF" Click="CDKEY_SET"/>
|
||||||
|
<Button Content="Contact" HorizontalAlignment="Center" Height="50" Margin="0,100,200,0" VerticalAlignment="Center" Width="150" FontSize="24" BorderBrush="{x:Null}" Background="#FFDFDFDF" Click="HELP"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
@@ -51,12 +51,26 @@ namespace formula_manage.ViewModel
|
|||||||
|
|
||||||
public string INIPath = Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "formula.ini"; //配置文件路径
|
public string INIPath = Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "formula.ini"; //配置文件路径
|
||||||
public string sys_Time; //显示系统时间
|
public string sys_Time; //显示系统时间
|
||||||
|
public string cdk_time; //注册到期时间
|
||||||
|
public string cdk_page = "Hidden"; //注册到期页面状态
|
||||||
|
|
||||||
public string Sys_Time //通知UI控件参数改变
|
public string Sys_Time //通知UI控件参数改变
|
||||||
{
|
{
|
||||||
get { return sys_Time; }
|
get { return sys_Time; }
|
||||||
set { sys_Time = value; OnPropertyChanged("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_SQLIP;
|
||||||
string TEXT_SQLNAME;
|
string TEXT_SQLNAME;
|
||||||
string TEXT_SQMOD;
|
string TEXT_SQMOD;
|
||||||
@@ -67,7 +81,7 @@ namespace formula_manage.ViewModel
|
|||||||
string SN_KEY;
|
string SN_KEY;
|
||||||
|
|
||||||
private void CDkey_()
|
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);
|
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))
|
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 MM = DateTime.Now.ToString("MM");
|
||||||
string DD = DateTime.Now.ToString("dd");
|
string DD = DateTime.Now.ToString("dd");
|
||||||
|
|
||||||
|
cdk_time = "Expires time: " + Y +"/"+ M +"/"+ D+ "Hidden";
|
||||||
|
|
||||||
if (string.Compare(Y, YY) < 0)
|
if (string.Compare(Y, YY) < 0)
|
||||||
{
|
{
|
||||||
CDKEY cDKEY = new CDKEY();
|
cdk_page = "Visible";
|
||||||
cDKEY.ShowDialog();//实例化并置顶打开窗口
|
|
||||||
}
|
}
|
||||||
else if (string.Compare(M, MM) < 0)
|
else if (string.Compare(M, MM) < 0)
|
||||||
{
|
{
|
||||||
CDKEY cDKEY = new CDKEY();
|
cdk_page = "Visible";
|
||||||
cDKEY.ShowDialog();//实例化并置顶打开窗口
|
|
||||||
}
|
}
|
||||||
else if (string.Compare(D, DD) < 0)
|
else if (string.Compare(D, DD) < 0)
|
||||||
{
|
{
|
||||||
CDKEY cDKEY = new CDKEY();
|
cdk_page = "Visible";
|
||||||
cDKEY.ShowDialog();//实例化并置顶打开窗口
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,6 +165,8 @@ namespace formula_manage.ViewModel
|
|||||||
CountDown();
|
CountDown();
|
||||||
Sql_();
|
Sql_();
|
||||||
|
|
||||||
|
CDkey_();
|
||||||
|
|
||||||
stuff_Product = ToObservableCollection<Product>(STUFFdataTable); //stuff_Product表转换
|
stuff_Product = ToObservableCollection<Product>(STUFFdataTable); //stuff_Product表转换
|
||||||
mac_Machine = ToObservableCollection<Machine>(MACHINEdataTable);
|
mac_Machine = ToObservableCollection<Machine>(MACHINEdataTable);
|
||||||
flow_Workflow = ToObservableCollection<Workflow>(DissolvedataTable);
|
flow_Workflow = ToObservableCollection<Workflow>(DissolvedataTable);
|
||||||
|
|||||||
Reference in new issue
Block a user