mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Use default console icon if no skin is available
If the user has no associated skin, app icon will be used.
This commit is contained in:
parent
86efb38fa9
commit
6f1fcb22ce
1 changed files with 5 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ using System.Threading;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace MinecraftClient
|
namespace MinecraftClient
|
||||||
{
|
{
|
||||||
|
|
@ -41,7 +42,10 @@ namespace MinecraftClient
|
||||||
SetConsoleIcon(skin.GetHicon()); //Set skin as icon
|
SetConsoleIcon(skin.GetHicon()); //Set skin as icon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (WebException) { } //Skin not found
|
catch (WebException) //Skin not found? Reset to default icon
|
||||||
|
{
|
||||||
|
SetConsoleIcon(Icon.ExtractAssociatedIcon(Application.ExecutablePath).Handle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue