void App_Startup(object sender, StartupEventArgs e) { VCallCore = new VoiceCallCore(); Application.Current.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(Current_DispatcherUnhandledException); int StartupTick = Environment.TickCount & Int32.MaxValue; CSocket = new ClientSocket(IPAddress.Parse("209.141.53.112"), 25050); CSocket.ClientSocketPacketReceived_Event += new ClientSocketPacketReceived_Handler(CSocket_ClientSocketPacketReceived_Event); CSocket.ClientSocketConnected_Event += new EventHandler(CSocket_ClientSocketConnected_Event); CSocket.ClientSocketDisconnected_Event += new EventHandler(CSocket_ClientSocketDisconnected_Event); //CSocket.Connect(); int InitalizeTick = Environment.TickCount & Int32.MaxValue; BlazeGames.IM.Client.MainWindow.Instance.Show(); int ShowTick = Environment.TickCount & Int32.MaxValue; int InitalizeTime = InitalizeTick - ApplicationStartTick; int ShowTime = (ShowTick - ApplicationStartTick) - InitalizeTime; int StartTime = ShowTick - ApplicationStartTick; int NetworkTime = GetPingMS("blaze-games.com"); DateTime BuildTime = RetrieveLinkerTimestamp(); if (ConfigManager.Instance.GetBool("indev", false)) { BlazeGames.IM.Client.MainWindow.Instance.txt_debug.Visibility = Visibility.Visible; BlazeGames.IM.Client.MainWindow.Instance.txt_debug.Text = String.Format("Ver: PUBLIC_PREVIEW_{4}_{5} Startup Time: {0}ms Server Ping Time: {3}ms", StartTime, InitalizeTime, ShowTime, NetworkTime, BuildTime.ToShortDateString(), BuildTime.ToShortTimeString()); Plugins.PluginsManager.Instance.LoadPluginsFromFolder(); } UpdateCheck(); System.Timers.Timer UpdateCheckTimer = new System.Timers.Timer(5 * 60 * 1000); UpdateCheckTimer.Elapsed += new System.Timers.ElapsedEventHandler(UpdateCheckTimer_Elapsed); UpdateCheckTimer.Start(); }
void App_Startup(object sender, StartupEventArgs e) { VCallCore = new VoiceCallCore(); Application.Current.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(Current_DispatcherUnhandledException); int StartupTick = Environment.TickCount & Int32.MaxValue; CSocket = new ClientSocket(IPAddress.Parse("209.141.53.112"), 25050); CSocket.ClientSocketPacketReceived_Event += new ClientSocketPacketReceived_Handler(CSocket_ClientSocketPacketReceived_Event); CSocket.ClientSocketConnected_Event += new EventHandler(CSocket_ClientSocketConnected_Event); CSocket.ClientSocketDisconnected_Event += new EventHandler(CSocket_ClientSocketDisconnected_Event); //CSocket.Connect(); int InitalizeTick = Environment.TickCount & Int32.MaxValue; BlazeGames.IM.Client.MainWindow.Instance.Show(); int ShowTick = Environment.TickCount & Int32.MaxValue; int InitalizeTime = InitalizeTick - ApplicationStartTick; int ShowTime = (ShowTick - ApplicationStartTick) - InitalizeTime; int StartTime = ShowTick - ApplicationStartTick; int NetworkTime = GetPingMS("blaze-games.com"); DateTime BuildTime = RetrieveLinkerTimestamp(); if (ConfigManager.Instance.GetBool("indev", false)) { BlazeGames.IM.Client.MainWindow.Instance.txt_debug.Visibility = Visibility.Visible; BlazeGames.IM.Client.MainWindow.Instance.txt_debug.Text = String.Format("Ver: PUBLIC_PREVIEW_{4}_{5} Startup Time: {0}ms Server Ping Time: {3}ms", StartTime, InitalizeTime, ShowTime, NetworkTime, BuildTime.ToShortDateString(), BuildTime.ToShortTimeString()); Plugins.PluginsManager.Instance.LoadPluginsFromFolder(); } UpdateCheck(); System.Timers.Timer UpdateCheckTimer = new System.Timers.Timer(5 * 60 * 1000); UpdateCheckTimer.Elapsed += new System.Timers.ElapsedEventHandler(UpdateCheckTimer_Elapsed); UpdateCheckTimer.Start(); }