mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
fix: 最小化后退出MAA保存的离谱位置数值
This commit is contained in:
@@ -2415,12 +2415,17 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
/// </summary>
|
||||
public void SaveGUIParameters()
|
||||
{
|
||||
var mainWindow = Application.Current.MainWindow;
|
||||
if (mainWindow.WindowState != WindowState.Normal)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 请在配置文件中修改该部分配置,暂不支持从GUI设置
|
||||
// Please modify this part of configuration in the configuration file.
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.LoadPositionAndSize, LoadGUIParameters.ToString());
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.SavePositionAndSize, SaveGUIParametersOnClosing.ToString());
|
||||
|
||||
var mainWindow = Application.Current.MainWindow;
|
||||
System.Windows.Forms.Screen currentScreen =
|
||||
System.Windows.Forms.Screen.FromHandle(new WindowInteropHelper(mainWindow).Handle);
|
||||
var screenRect = currentScreen.Bounds;
|
||||
|
||||
Reference in New Issue
Block a user