mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Refactoring Settings.cs
This commit is contained in:
parent
f16b1c118b
commit
16c1d1fd77
59 changed files with 3425 additions and 2180 deletions
|
|
@ -67,6 +67,16 @@ namespace MinecraftClient.WinAPI
|
|||
imageStream.Dispose();
|
||||
httpWebRequest.Dispose();
|
||||
}
|
||||
catch (AggregateException ae)
|
||||
{
|
||||
foreach (var ex in ae.InnerExceptions)
|
||||
{
|
||||
if (ex is HttpRequestException) //Skin not found? Reset to default icon
|
||||
RevertToMCCIcon();
|
||||
else
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
catch (HttpRequestException) //Skin not found? Reset to default icon
|
||||
{
|
||||
RevertToMCCIcon();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
|
||||
namespace MinecraftClient.WinAPI
|
||||
{
|
||||
|
|
@ -79,9 +80,10 @@ namespace MinecraftClient.WinAPI
|
|||
}
|
||||
|
||||
[DllImport("Kernel32")]
|
||||
private static extern bool SetConsoleCtrlHandler(ConsoleCtrlHandler handler, bool add);
|
||||
private delegate bool ConsoleCtrlHandler(CtrlType sig);
|
||||
private static readonly ConsoleCtrlHandler? _handler;
|
||||
private static extern bool SetConsoleCtrlHandler(EventHandler handler, bool add);
|
||||
|
||||
private delegate bool EventHandler(CtrlType sig);
|
||||
static EventHandler? _handler;
|
||||
|
||||
enum CtrlType
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue