public NitroStreamViewModel() { _ViewSettings = new Model.ViewSettings(true); _NtrClient = new Model.NtrClient(); _NtrInputConverter = new Model.NtrClientInputsConverter(); _DisconnectTimeout = new System.Timers.Timer(10000); _DisconnectTimeout.Elapsed += _disconnectTimeout_Elapsed; _UpdateScreenTimeout = new System.Timers.Timer(100); _UpdateScreenTimeout.Elapsed += _UpdateScreenTimeout_Elapsed; _HearthbeatTimeout = new System.Timers.Timer(1000); _HearthbeatTimeout.Elapsed += _UpdateHearthbeat_Elapsed; _HearthbeatTimeout.Start(); if (System.IO.File.Exists(configPath)) { _ViewSettings = Model.ViewSettings.Load(configPath); } _NtrClient.onLogArrival += WriteToLog; _NtrClient.Connected += _ntrClient_Connected; _NtrClient.InfosReady += _ntrClient_InfosReady; AppDomain.CurrentDomain.UnhandledException += ExceptionToLog; _RunningLog = new StringBuilder(""); //Updater = new Model.Updater(); }
public NitroStreamViewModel() { _ViewSettings = new Model.ViewSettings(true); _NtrClient = new Model.NtrClient(); _DisconnectTimeout = new System.Timers.Timer(10000); _DisconnectTimeout.Elapsed += _disconnectTimeout_Elapsed; if (System.IO.File.Exists(configPath)) { _ViewSettings = Model.ViewSettings.Load(configPath); } _NtrClient.onLogArrival += WriteToLog; _NtrClient.Connected += _ntrClient_Connected; AppDomain.CurrentDomain.UnhandledException += ExceptionToLog; _RunningLog = new StringBuilder(""); Updater = new Model.Updater(); }