mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
更新版本号计算方法
This commit is contained in:
parent
da3213bb77
commit
d62be3fd6d
@ -2,6 +2,7 @@
|
|||||||
using LinePutScript.Converter;
|
using LinePutScript.Converter;
|
||||||
using LinePutScript.Dictionary;
|
using LinePutScript.Dictionary;
|
||||||
using LinePutScript.Localization.WPF;
|
using LinePutScript.Localization.WPF;
|
||||||
|
using NAudio.SoundFont;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
@ -48,7 +49,7 @@ namespace VPet_Simulator.Windows
|
|||||||
public bool SuccessLoad = true;
|
public bool SuccessLoad = true;
|
||||||
public DateTime CacheDate;
|
public DateTime CacheDate;
|
||||||
public string ErrorMessage;
|
public string ErrorMessage;
|
||||||
public static string INTtoVER(int ver) => $"{ver / 100}.{ver % 100:00}";
|
public static string INTtoVER(int ver) => ver < 10000 ? $"{ver / 100}.{ver % 100:00}" : $"{ver / 10000}.{ver % 10000 / 100}.{ver % 100:00}";
|
||||||
public static void LoadImage(MainWindow mw, DirectoryInfo di)
|
public static void LoadImage(MainWindow mw, DirectoryInfo di)
|
||||||
{
|
{
|
||||||
//加载其他放在文件夹的图片
|
//加载其他放在文件夹的图片
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using IWshRuntimeLibrary;
|
using LinePutScript;
|
||||||
using LinePutScript;
|
|
||||||
using LinePutScript.Localization.WPF;
|
using LinePutScript.Localization.WPF;
|
||||||
using Panuon.WPF;
|
using Panuon.WPF;
|
||||||
using Panuon.WPF.UI;
|
using Panuon.WPF.UI;
|
||||||
|
@ -20,6 +20,8 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
using VPet_Simulator.Core;
|
using VPet_Simulator.Core;
|
||||||
using VPet_Simulator.Windows.Interface;
|
using VPet_Simulator.Windows.Interface;
|
||||||
|
using static VPet_Simulator.Windows.Win32;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace VPet_Simulator.Windows
|
namespace VPet_Simulator.Windows
|
||||||
{
|
{
|
||||||
@ -351,7 +353,7 @@ namespace VPet_Simulator.Windows
|
|||||||
ImageMOD.Source = ImageResources.NewSafeBitmapImage(@"pack://application:,,,/Res/TopLogo2019.PNG");
|
ImageMOD.Source = ImageResources.NewSafeBitmapImage(@"pack://application:,,,/Res/TopLogo2019.PNG");
|
||||||
if (mod.GameVer < mw.version)
|
if (mod.GameVer < mw.version)
|
||||||
{
|
{
|
||||||
if (mod.GameVer / 10 == mw.version / 10)
|
if (mod.GameVer / 1000 == mw.version / 1000)
|
||||||
{
|
{
|
||||||
runMODGameVer.Text += " (兼容)".Translate();
|
runMODGameVer.Text += " (兼容)".Translate();
|
||||||
}
|
}
|
||||||
@ -363,7 +365,7 @@ namespace VPet_Simulator.Windows
|
|||||||
}
|
}
|
||||||
else if (mod.GameVer > mw.version)
|
else if (mod.GameVer > mw.version)
|
||||||
{
|
{
|
||||||
if (mod.GameVer / 10 == mw.version / 10)
|
if (mod.GameVer / 1000 == mw.version / 1000)
|
||||||
{
|
{
|
||||||
runMODGameVer.Text += " (兼容)".Translate();
|
runMODGameVer.Text += " (兼容)".Translate();
|
||||||
runMODGameVer.Foreground = Function.ResourcesBrush(Function.BrushType.PrimaryText);
|
runMODGameVer.Foreground = Function.ResourcesBrush(Function.BrushType.PrimaryText);
|
||||||
@ -895,6 +897,7 @@ namespace VPet_Simulator.Windows
|
|||||||
return;
|
return;
|
||||||
mw.Main.SetMoveMode(mw.Set.AllowMove, mw.Set.SmartMove, mw.Set.SmartMoveInterval * 1000);
|
mw.Main.SetMoveMode(mw.Set.AllowMove, mw.Set.SmartMove, mw.Set.SmartMoveInterval * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GenStartUP()
|
public void GenStartUP()
|
||||||
{
|
{
|
||||||
mw.Set["v"][(gbol)"newverstartup"] = true;
|
mw.Set["v"][(gbol)"newverstartup"] = true;
|
||||||
@ -903,22 +906,22 @@ namespace VPet_Simulator.Windows
|
|||||||
{
|
{
|
||||||
if (File.Exists(path))
|
if (File.Exists(path))
|
||||||
File.Delete(path);
|
File.Delete(path);
|
||||||
IWshRuntimeLibrary.WshShell shell = new IWshRuntimeLibrary.WshShell();
|
var link = (IShellLink)new ShellLink();
|
||||||
IWshRuntimeLibrary.IWshShortcut shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(path);
|
|
||||||
if (mw.Set.StartUPBootSteam)
|
if (mw.Set.StartUPBootSteam)
|
||||||
{
|
{
|
||||||
shortcut.TargetPath = ExtensionValue.BaseDirectory + @"\VPet.Solution.exe";
|
link.SetPath(ExtensionValue.BaseDirectory + @"\VPet.Solution.exe");
|
||||||
shortcut.Arguments = "launchsteam";
|
link.SetArguments("launchsteam");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
shortcut.TargetPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
|
link.SetPath(System.Reflection.Assembly.GetExecutingAssembly().Location);
|
||||||
|
|
||||||
shortcut.Description = "VPet Simulator";
|
link.SetDescription("VPet Simulator");
|
||||||
shortcut.WorkingDirectory = ExtensionValue.BaseDirectory;
|
link.SetPath(ExtensionValue.BaseDirectory);
|
||||||
shortcut.IconLocation = ExtensionValue.BaseDirectory + @"vpeticon.ico";
|
link.SetIconLocation(ExtensionValue.BaseDirectory + @"vpeticon.ico", 0);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
shortcut.Save();
|
var file = (IPersistFile)link;
|
||||||
|
file.Save(path, false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
vupmod#Core:|author#LorisYounger:|gamever#100:|ver#100:|
|
vupmod#Core:|author#LorisYounger:|gamever#11000:|ver#11000:|
|
||||||
intro#这是虚拟桌宠模拟器的核心运行文件/com可以参考此文件编写mod:|
|
intro#这是虚拟桌宠模拟器的核心运行文件/com可以参考此文件编写mod:|
|
||||||
authorid#253101309:|
|
authorid#253101309:|
|
||||||
itemid#1:|
|
itemid#1:|
|
||||||
|
Loading…
Reference in New Issue
Block a user