diff --git a/PLCSharpWpf/VVMs/MainWindow/MainWindow.xaml b/PLCSharpWpf/VVMs/MainWindow/MainWindow.xaml
index 2a20824..9e19d2b 100644
--- a/PLCSharpWpf/VVMs/MainWindow/MainWindow.xaml
+++ b/PLCSharpWpf/VVMs/MainWindow/MainWindow.xaml
@@ -212,7 +212,7 @@
Background="Transparent"
BorderBrush="{x:Null}"
Command="{Binding ShowDialog}"
- CommandParameter="Config" Cursor="Hand" ToolTip="配置">
+ CommandParameter="SystemConfig" Cursor="Hand" ToolTip="配置">
diff --git a/PLCSharpWpf/VVMs/MainWindow/MainWindowViewModel.cs b/PLCSharpWpf/VVMs/MainWindow/MainWindowViewModel.cs
index abd3be8..25371c2 100644
--- a/PLCSharpWpf/VVMs/MainWindow/MainWindowViewModel.cs
+++ b/PLCSharpWpf/VVMs/MainWindow/MainWindowViewModel.cs
@@ -162,6 +162,12 @@ namespace PLCSharp.VVMs.MainWindow
void ExecuteShowDialog(string param)
{
+
+ if (showList.Contains(param))
+ {
+ return;
+ }
+
switch (param)
{
case "Login":
@@ -170,35 +176,33 @@ namespace PLCSharp.VVMs.MainWindow
{
if (r.Result == ButtonResult.Yes)
{
-
+
}
-
- if (r.Result == ButtonResult.Retry)
+ else if (r.Result == ButtonResult.Retry)
{
_dialogService.ShowDialog("UserManage", new DialogParameters($"message={"message:管理"}"), r => { });
}
});
}
break;
- case "Config":
+ case "SystemConfig":
{
- if (Login.CurrentUser == null || Login.CurrentUser.Authority )(r =>
+ _dialogService.Show("SystemConfig", new DialogParameters($"message={"message:系统设置"}"), r =>
{
-
- }));
+ showList.Remove("SystemConfig");
+ });
}
break;
case "ErrorLogs":
{
- if (showList.Contains("ErrorLogs"))
- {
- return;
- }
+
showList.Add("ErrorLogs");
_dialogService.Show("ErrorLogs", new DialogParameters($"message={"message:错误日志"}"), (Action)(r =>
{
@@ -210,7 +214,7 @@ namespace PLCSharp.VVMs.MainWindow
}
}
-
+
///
/// _EventAggregator
///
@@ -226,7 +230,7 @@ namespace PLCSharp.VVMs.MainWindow
{
Target = "Exit"
});
-
+
}
}