|
@@ -28,6 +28,7 @@ using SqlSugar;
|
|
|
using System;
|
|
|
using System.Configuration;
|
|
|
using System.Data;
|
|
|
+using System.Diagnostics;
|
|
|
using System.IO;
|
|
|
using System.Reflection;
|
|
|
using System.Windows;
|
|
@@ -139,24 +140,29 @@ namespace BlankApp1
|
|
|
/// <param name="containerProvider"></param>
|
|
|
public static void LoginOut(IContainerProvider containerProvider)
|
|
|
{
|
|
|
- Current.MainWindow.Hide();
|
|
|
+ //Current.MainWindow.Hide();
|
|
|
|
|
|
- var dialog = containerProvider.Resolve<IDialogService>();
|
|
|
+ //var dialog = containerProvider.Resolve<IDialogService>();
|
|
|
|
|
|
- dialog.ShowDialog("LoginView", callback =>
|
|
|
- {
|
|
|
- if (callback.Result != ButtonResult.OK)
|
|
|
- {
|
|
|
- Environment.Exit(0);
|
|
|
- return;
|
|
|
- }
|
|
|
+ //dialog.ShowDialog("LoginView", callback =>
|
|
|
+ //{
|
|
|
+ // if (callback.Result != ButtonResult.OK)
|
|
|
+ // {
|
|
|
+ // Environment.Exit(0);
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
|
|
|
- //调试发现service为MainViewModel
|
|
|
- var service = App.Current.MainWindow.DataContext as IConfigureService;
|
|
|
- if (service != null)
|
|
|
- service.Configure();
|
|
|
- Current.MainWindow.Show();
|
|
|
- });
|
|
|
+
|
|
|
+ //});
|
|
|
+
|
|
|
+ // 关闭当前窗口
|
|
|
+ Current.MainWindow.Close();
|
|
|
+ string exePath=System.AppDomain.CurrentDomain.BaseDirectory + "PLCTool.exe";
|
|
|
+ System.Diagnostics.Process.Start(exePath);
|
|
|
+ // 获取当前exe文件的路径
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|