修改窗口置顶逻辑 Fix#20

This commit is contained in:
ZouJin 2023-09-11 14:37:03 +08:00
parent 31665c686c
commit 653cdd31ee
4 changed files with 20 additions and 7 deletions

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VPet_Simulator.Core;
namespace VPet_Simulator.Windows.Interface
{
/// <summary>
/// 游戏存档
/// </summary>
public class GameSaves
{
Dictionary<string, GameSave> Saves = new Dictionary<string, GameSave>();
}
}

View File

@ -516,7 +516,6 @@ namespace VPet_Simulator.Windows
m.Click += (x, y) =>
{
Main.ToolBar.Visibility = Visibility.Collapsed;
Topmost = false;
winSetting.MainTab.SelectedIndex = 5;
winSetting.Show();
};
@ -600,7 +599,6 @@ namespace VPet_Simulator.Windows
Main.ToolBar.AddMenuButton(VPet_Simulator.Core.ToolBar.MenuType.Setting, "设置面板".Translate(), () =>
{
Main.ToolBar.Visibility = Visibility.Collapsed;
Topmost = false;
winSetting.Show();
});
@ -674,7 +672,6 @@ namespace VPet_Simulator.Windows
m_menu.MenuItems.Add(new MenuItem("设置面板".Translate(), (x, y) =>
{
Topmost = false;
winSetting.Show();
}));
m_menu.MenuItems.Add(new MenuItem("退出桌宠".Translate(), (x, y) => Close()));
@ -688,7 +685,6 @@ namespace VPet_Simulator.Windows
notifyIcon.Visible = true;
notifyIcon.BalloonTipClicked += (a, b) =>
{
Topmost = false;
winSetting.Show();
};

View File

@ -1,7 +1,7 @@
<pu:WindowX x:Class="VPet_Simulator.Windows.winBetterBuy"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Topmost="True"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pu="https://opensource.panuon.com/wpf-ui" xmlns:local="clr-namespace:VPet_Simulator.Windows"

View File

@ -49,7 +49,6 @@ namespace VPet_Simulator.Windows
Run rMoney;
public void Show(Food.FoodType type)
{
mw.Topmost = false;
showeatanm = true;//逃出
if (_searchTextBox != null)
_searchTextBox.Text = "";
@ -280,7 +279,7 @@ namespace VPet_Simulator.Windows
public void TryClose()
{
IcCommodity.ItemsSource = null;
mw.Topmost = mw.Set.TopMost;
//mw.Topmost = mw.Set.TopMost;
Hide();
}
private void WindowX_Closing(object sender, System.ComponentModel.CancelEventArgs e)