|
|
|
@ -147,10 +147,7 @@ namespace Aucma.Core.PrintTo.ViewModels
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
// 最小化当前窗口
|
|
|
|
|
case "Minimized":
|
|
|
|
|
Application.Current.MainWindow.WindowState = WindowState.Minimized;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -163,6 +160,51 @@ namespace Aucma.Core.PrintTo.ViewModels
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 最小化界面
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 关闭当前界面
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="parameter"></param>
|
|
|
|
|
[RelayCommand]
|
|
|
|
|
public void MinWindow(object parameter)
|
|
|
|
|
{
|
|
|
|
|
var window = parameter as Window;
|
|
|
|
|
if (window == null) return;
|
|
|
|
|
window.WindowState = WindowState.Minimized;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 关闭当前界面
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 关闭当前界面
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="parameter"></param>
|
|
|
|
|
[RelayCommand]
|
|
|
|
|
public void CloseWindow(object parameter)
|
|
|
|
|
{
|
|
|
|
|
var window = parameter as Window;
|
|
|
|
|
if (window == null) return;
|
|
|
|
|
|
|
|
|
|
if (MessageBox.Show("确定要退出系统吗?", "系统提醒", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
|
|
|
|
{
|
|
|
|
|
appConfig.TeamCode = "";
|
|
|
|
|
appConfig.TeamName = "";
|
|
|
|
|
appConfig.Account = "";
|
|
|
|
|
|
|
|
|
|
window.Hide();
|
|
|
|
|
//跳转到登录页
|
|
|
|
|
LoginPageView login = new LoginPageView();
|
|
|
|
|
login.Show();
|
|
|
|
|
window.Close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 刷新时间
|
|
|
|
|
|
|
|
|
|
public string _currentDateTime;
|
|
|
|
@ -231,31 +273,6 @@ namespace Aucma.Core.PrintTo.ViewModels
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 关闭当前界面
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 关闭当前界面
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="parameter"></param>
|
|
|
|
|
[RelayCommand]
|
|
|
|
|
public void CloseWindow(object parameter)
|
|
|
|
|
{
|
|
|
|
|
var window = parameter as Window;
|
|
|
|
|
if (window == null) return;
|
|
|
|
|
|
|
|
|
|
if (MessageBox.Show("确定要退出系统吗?", "系统提醒", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
|
|
|
|
{
|
|
|
|
|
appConfig.TeamCode = "";
|
|
|
|
|
appConfig.TeamName = "";
|
|
|
|
|
appConfig.Account = "";
|
|
|
|
|
|
|
|
|
|
window.Hide();
|
|
|
|
|
//跳转到登录页
|
|
|
|
|
LoginPageView login = new LoginPageView();
|
|
|
|
|
login.Show();
|
|
|
|
|
window.Close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|