优化加载速度

This commit is contained in:
ZouJin 2023-02-23 15:12:14 +11:00
parent 3bddcd5767
commit 73b8ff9043
7 changed files with 28 additions and 13 deletions

View File

@ -69,13 +69,13 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="LinePutScript, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\VUP-Simulator\packages\LinePutScript.1.6.1\lib\net462\LinePutScript.dll</HintPath>
<HintPath>..\packages\LinePutScript.1.6.1\lib\net462\LinePutScript.dll</HintPath>
</Reference>
<Reference Include="Panuon.WPF, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\VUP-Simulator\packages\Panuon.WPF.1.0.1\lib\net462\Panuon.WPF.dll</HintPath>
<HintPath>..\packages\Panuon.WPF.1.0.1\lib\net462\Panuon.WPF.dll</HintPath>
</Reference>
<Reference Include="Panuon.WPF.UI, Version=1.1.7.1, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\VUP-Simulator\packages\Panuon.WPF.UI.1.1.7.2\lib\net462\Panuon.WPF.UI.dll</HintPath>
<HintPath>..\packages\Panuon.WPF.UI.1.1.7.2\lib\net462\Panuon.WPF.UI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />

View File

@ -13,6 +13,7 @@ using MenuItem = System.Windows.Forms.MenuItem;
using Application = System.Windows.Application;
using System.Timers;
using LinePutScript;
using System.Diagnostics;
namespace VPet_Simulator.Windows
{
@ -181,6 +182,7 @@ namespace VPet_Simulator.Windows
ContextMenu m_menu;
m_menu = new ContextMenu();
m_menu.MenuItems.Add(new MenuItem("操作教程", (x, y) => { Process.Start(AppDomain.CurrentDomain.BaseDirectory + @"\Tutorial.html"); }));
m_menu.MenuItems.Add(new MenuItem("重置状态", (x, y) =>
{
Main.CleanState();
@ -208,14 +210,20 @@ namespace VPet_Simulator.Windows
winSetting.Show();
};
if (Set["SingleTips"].GetDateTime("tutorial") <= new DateTime(2023, 2, 23))
{
Set["SingleTips"].SetDateTime("tutorial", DateTime.Now);
Process.Start(AppDomain.CurrentDomain.BaseDirectory + @"\Tutorial.html");
}
if (!Set["SingleTips"].GetBool("helloworld"))
{
Set["SingleTips"].SetBool("helloworld", true);
notifyIcon.ShowBalloonTip(10, "你好 " + (IsSteamUser ? Steamworks.SteamClient.Name : Environment.UserName),
"欢迎使用虚拟桌宠模拟器!\n如果遇到桌宠爬不见了,可以在我这里设置居中或退出桌宠", ToolTipIcon.Info);
Task.Run(() =>
{
Thread.Sleep(1000);
Thread.Sleep(2000);
Set["SingleTips"].SetBool("helloworld", true);
notifyIcon.ShowBalloonTip(10, "你好 " + (IsSteamUser ? Steamworks.SteamClient.Name : Environment.UserName),
"欢迎使用虚拟桌宠模拟器!\n如果遇到桌宠爬不见了,可以在我这里设置居中或退出桌宠", ToolTipIcon.Info);
Thread.Sleep(2000);
Main.Say("欢迎使用虚拟桌宠模拟器\n这是个早期的测试版,若有bug请多多包涵\n欢迎在菜单栏-管理-反馈中提交bug或建议");
});
}
@ -228,8 +236,8 @@ namespace VPet_Simulator.Windows
notifyIcon.ShowBalloonTip(10, "更新通知 02/20",
"现已支通过抚摸(鼠标左右移动)进行摸头", ToolTipIcon.Info);
Set["SingleTips"].SetDateTime("update", DateTime.Now);
}
Save();
}));
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

View File

@ -206,7 +206,7 @@
<Resource Include="vpeticon.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Res\TopLogo2018.PNG" />
<Resource Include="Res\TopLogo2019.PNG" />
<Content Include="steam_api.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

View File

@ -193,7 +193,7 @@
Background="{x:Null}" />
</Grid>
</Grid>
</StackPanel>
</TabItem>
<TabItem Header="互动" BorderBrush="{DynamicResource PrimaryDarker}">
@ -481,7 +481,9 @@
</TabItem>
<TabItem Header="关于" BorderBrush="{DynamicResource PrimaryDarker}"
Foreground="{DynamicResource PrimaryText}">
<Grid HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid>
<Image x:Name="ImageWHY" Width="38" Margin="208,257,0,0" HorizontalAlignment="Left"
VerticalAlignment="Top" Height="38" Source="/Res/TopLogo2019.PNG" />
<TextBlock Margin="0,0,0,0" Text="虚拟主播模拟器 规格" FontSize="20" FontWeight="Bold" />
<TextBlock Margin="0,30,0,0" FontWeight="Bold">
<Run>用户名</Run><LineBreak />
@ -508,8 +510,7 @@
<LineBreak />
<Run FontStyle="Italic" FontSize="8">由于游戏暂未开发完毕,该名单并非完整名单.将在正式版完成前修改</Run><LineBreak />
</TextBlock>
<Image Source="/Res/TopLogo2018.PNG" Width="38" Margin="208,257,0,0" HorizontalAlignment="Left"
VerticalAlignment="Top" Height="38" />
<TextBlock Margin="0,130,0,0" FontWeight="Bold">
<Run>游戏策划</Run><LineBreak />

View File

@ -30,7 +30,13 @@ namespace VPet_Simulator.Windows
public winGameSetting(MainWindow mw)
{
this.mw = mw;
//Console.WriteLine(DateTime.Now.ToString("mm:ss.fff"));
InitializeComponent();
//Console.WriteLine(DateTime.Now.ToString("mm:ss.fff"));
//var bit = new BitmapImage(new Uri("pack://application:,,,/Res/TopLogo2019.png"));
//Console.WriteLine(DateTime.Now.ToString("mm:ss.fff"));
////ImageWHY.Source = bit;
//Console.WriteLine(DateTime.Now.ToString("mm:ss.fff"));
TopMostBox.IsChecked = mw.Set.TopMost;
if (mw.Set.IsBiggerScreen)
{