|
@@ -25,6 +25,7 @@ using Vinno.Modules.ExamInfoModule;
|
|
|
using NPOI.POIFS.Properties;
|
|
|
using System.IO;
|
|
|
using Avalonia.Visuals.Media.Imaging;
|
|
|
+using System.ComponentModel;
|
|
|
|
|
|
namespace fis
|
|
|
{
|
|
@@ -197,8 +198,22 @@ namespace fis
|
|
|
_browserContainer.IsVisible = false;
|
|
|
//托盘行为事件监听
|
|
|
TrayIconManager.TrayIconChanged += OnTrayChanged;
|
|
|
+ if (AppManager.IsVStation)
|
|
|
+ {
|
|
|
+ Logger.WriteShellLog("ShowInTaskbar cancelled");
|
|
|
+ ShowInTaskbar = false;
|
|
|
+ var windowTitleBar = this.FindControl<WindowsTitleBar>("WinTitleBar");
|
|
|
+ if (windowTitleBar != null)
|
|
|
+ {
|
|
|
+ windowTitleBar.IsVisible = true;
|
|
|
+ windowTitleBar.Height = 32;
|
|
|
+ }
|
|
|
+ Hide();
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
private System.IO.Stream GetBgImage()
|
|
|
{
|
|
|
var resourcesManager = AppManager.Get<IResourceManager>();
|
|
@@ -348,6 +363,22 @@ namespace fis
|
|
|
}));
|
|
|
}
|
|
|
|
|
|
+ protected override void OnClosing(CancelEventArgs e)
|
|
|
+ {
|
|
|
+ ///若非强制关闭副窗口,则隐藏副窗口
|
|
|
+ ///用于保持Flutter在内存中不被销毁
|
|
|
+ if (!AppManager.IsVStation)
|
|
|
+ {
|
|
|
+ OnClosing(e);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ e.Cancel = true;
|
|
|
+ ShowActivated = false;
|
|
|
+ Hide();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void OnBrowserCloseTheWindow(object? sender, string e)
|
|
|
{
|
|
|
if (e == WindowName)
|