Update ControlPanel to use the new IServerInterface

This commit is contained in:
Cyberboss
2017-12-08 12:47:13 -05:00
parent d20a79c3f9
commit 50a78b3193
11 changed files with 136 additions and 166 deletions
+10 -4
View File
@@ -7,6 +7,7 @@ namespace TGS.ControlPanel
{
static class Program
{
public static IServerInterface ServerInterface;
[STAThread]
static void Main(string[] args)
{
@@ -20,13 +21,18 @@ namespace TGS.ControlPanel
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
ServerInterface.SetBadCertificateHandler(BadCertificateHandler);
var login = new Login();
login.Show();
Application.Run();
Interface.ServerInterface.SetBadCertificateHandler(BadCertificateHandler);
Application.Run(new Login());
if(ServerInterface != null)
{
new InstanceSelector(ServerInterface.Server).Show();
Application.Run();
}
}
catch (Exception e)
{
if (ServerInterface != null)
ServerInterface.Dispose();
ServiceDisconnectException(e);
}
finally