对缺少图片的支持

This commit is contained in:
ZouJin 2023-01-29 16:27:24 +08:00
parent e56a7e4164
commit 433bcc9367
8 changed files with 17 additions and 10 deletions

View File

@ -1035,6 +1035,11 @@ namespace VPet_Simulator.Core
/// <param name="EndAction">结束操作</param>
public void Display(IGraph graph, Action EndAction = null)
{
if(graph == null)
{
EndAction?.Invoke();
return;
}
//if(graph.GraphType == GraphType.Climb_Up_Left)
//{
// Dispatcher.Invoke(() => Say(graph.GraphType.ToString()));

View File

@ -339,7 +339,7 @@ namespace VPet_Simulator.Core
return Graphs[type][Function.Rnd.Next(Graphs[type].Count)];
}
}
return FindGraph(GraphType.Default, mode);
return null;// FindGraph(GraphType.Default, mode);
}
static string[] graphtypevalue = null;
/// <summary>

View File

@ -83,7 +83,7 @@ namespace VPet_Simulator.Core
return;
}
}
#if DEBUG
#if DEMO
throw new Exception("未知的图像类型: " + path_name);
#endif
}

View File

@ -15,7 +15,9 @@ namespace VPet_Simulator.Windows
{
public App() : base()
{
#if !DEBUG
base.DispatcherUnhandledException += App_DispatcherUnhandledException;
#endif
//AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
}

View File

@ -41,7 +41,7 @@ namespace VPet_Simulator.Windows
//在 https://store.steampowered.com/app/1920960/VPet
try
{
#if DEBUG
#if DEMO
SteamClient.Init(2293870, true);
#else
SteamClient.Init(1920960, true);

View File

@ -7,13 +7,13 @@ using System.Windows;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("VPet-Simulator.Windows")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyTitle("虚拟桌宠模拟器")]
[assembly: AssemblyDescription("VPET的独立窗口实现")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("LB Game")]
[assembly: AssemblyProduct("VPet-Simulator.Windows")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCopyright("Copyright © exLB.org 2022")]
[assembly: AssemblyTrademark("exLB.org")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型

View File

@ -46,7 +46,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;X64,DEMO</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>

View File

@ -331,7 +331,7 @@ namespace VPet_Simulator.Windows
MessageBoxX.Show("模组 Core 为<虚拟桌宠模拟器>核心文件,无法发布\n如需发布自定义内容,请复制并更改名称", "MOD上传失败", MessageBoxIcon.Error);
return;
}
#if DEBUG
#if DEMO
MessageBoxX.Show("经测试,除正式版均无创意工坊权限,此功能仅作为展示", "特殊版无法上传创意工坊");
#endif
ButtonPublish.IsEnabled = false;