-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Corona-Studio/dev
- Loading branch information
Showing
11 changed files
with
153 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
using ProjBobcat.Class.Helper; | ||
using System; | ||
using System.Diagnostics; | ||
using ProjBobcat.Interface; | ||
using ProjBobcat.Event; | ||
using System.Threading.Tasks; | ||
using ProjBobcat.Class.Model; | ||
|
||
namespace ProjBobcat.DefaultComponent.Launch | ||
{ | ||
public class DefaultMinecraftUWPCore : IGameCore, IDisposable | ||
{ | ||
[Obsolete("UWP 版本的Minecraft不需要该字段。")] | ||
public string RootPath { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } | ||
[Obsolete("UWP 版本的Minecraft不需要该字段。")] | ||
public Guid ClientToken { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } | ||
[Obsolete("UWP 版本的Minecraft不需要该字段。")] | ||
public IVersionLocator VersionLocator { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } | ||
|
||
[Obsolete("UWP 版本的Minecraft不需要该字段。")] | ||
public event EventHandler<GameExitEventArgs> GameExitEventDelegate; | ||
[Obsolete("UWP 版本的Minecraft不需要该字段。")] | ||
public event EventHandler<GameLogEventArgs> GameLogEventDelegate; | ||
[Obsolete("UWP 版本的Minecraft不需要该字段。")] | ||
public event EventHandler<LaunchLogEventArgs> LaunchLogEventDelegate; | ||
|
||
public LaunchResult Launch(LaunchSettings launchSettings) | ||
{ | ||
if (SystemInfoHelper.IsMinecraftUWPInstalled() == false) | ||
{ | ||
throw new InvalidOperationException(); | ||
} | ||
|
||
using var process = new Process | ||
{StartInfo = new ProcessStartInfo {UseShellExecute = true, FileName = "minecraft:"}}; | ||
process.Start(); | ||
|
||
return default; | ||
} | ||
|
||
[Obsolete("UWP启动核心并不支持异步启动")] | ||
public Task<LaunchResult> LaunchTaskAsync(LaunchSettings settings) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
private static void GameExit(object sender, EventArgs e) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public void LogGameData(object sender, GameLogEventArgs e) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public void LogLaunchData(object sender, LaunchLogEventArgs e) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public void GameExit(object sender, GameExitEventArgs e) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
#region IDisposable Support | ||
|
||
// Dispose() calls Dispose(true) | ||
public void Dispose() | ||
{ | ||
Dispose(true); | ||
GC.SuppressFinalize(this); | ||
} | ||
|
||
// NOTE: Leave out the finalizer altogether if this class doesn't | ||
// own unmanaged resources, but leave the other methods | ||
// exactly as they are. | ||
~DefaultMinecraftUWPCore() | ||
{ | ||
// Finalizer calls Dispose(false) | ||
Dispose(false); | ||
} | ||
|
||
// The bulk of the clean-up code is implemented in Dispose(bool) | ||
protected virtual void Dispose(bool disposing) | ||
{ | ||
if (disposing) | ||
{ | ||
} | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<configSections> | ||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > | ||
<section name="ProjBobcat.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
<userSettings> | ||
<ProjBobcat.Properties.Settings> | ||
<setting name="IsAnalysisEnabled" serializeAs="String"> | ||
<value>True</value> | ||
</setting> | ||
</ProjBobcat.Properties.Settings> | ||
</userSettings> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters