internal Diagnostics() { LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType).Info("######Created Diagnostics Window######"); AutoScroll = true; #if (Release_Test) VersionType = "Test"; #elif (DEBUG) VersionType = "Debug"; #else VersionType = "Release"; #endif OctgnVersion = Const.OctgnVersion.ToString(); LatestVersion = UpdateManager.Instance.LatestVersion.Version; EventCounts = "Counts"; LatestLogLines = new List <string>(); refreshTimer.Elapsed += RefreshTimerOnElapsed; refreshTimer.Start(); this.Closing += OnClosing; this.IsVisibleChanged += OnIsVisibleChanged; CompositionTarget.Rendering += CompositionTargetOnRendering; pcounter = new PerformanceCounter("Process", "% Processor Time", Process.GetCurrentProcess().ProcessName, true); GoogleLatency = new CrudeLatencyDetector("Google", "www.google.com"); ChatServerLatency = new CrudeLatencyDetector("Chat", "of.octgn.net"); GameServerLatency = new CrudeLatencyDetector("Game", "games.octgn.net"); ApiServerLatency = new CrudeLatencyDetector("Api", "www.octgn.net"); GoogleLatency.Pause(); ChatServerLatency.Pause(); GameServerLatency.Pause(); ApiServerLatency.Pause(); this.InitializeComponent(); }
internal Diagnostics() { LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType).Info("######Created Diagnostics Window######"); AutoScroll = true; if (Program.IsReleaseTest) { VersionType = "Test"; } else if (X.Instance.Debug) { VersionType = "Debug"; } else { VersionType = "Release"; } OctgnVersion = Const.OctgnVersion.ToString(); LatestVersion = UpdateManager.Instance.LatestVersion.Version; EventCounts = "Counts"; LatestLogLines = new List <string>(); refreshTimer.Elapsed += RefreshTimerOnElapsed; this.Closing += OnClosing; this.IsVisibleChanged += OnIsVisibleChanged; CompositionTarget.Rendering += CompositionTargetOnRendering; pcounter = new PerformanceCounter("Process", "% Processor Time", Process.GetCurrentProcess().ProcessName, true); GoogleLatency = new CrudeLatencyDetector("Google", "www.google.com"); ChatServerLatency = new CrudeLatencyDetector("Chat", "of.octgn.net"); GameServerLatency = new CrudeLatencyDetector("Game", "games.octgn.net"); ApiServerLatency = new CrudeLatencyDetector("Api", "www.octgn.net"); GoogleLatency.Pause(); ChatServerLatency.Pause(); GameServerLatency.Pause(); ApiServerLatency.Pause(); Paths = new ObservableCollection <Tuple <string, string> >( Library.Config.Instance.Paths .GetType() .GetProperties() .Where(x => x.PropertyType == typeof(string)) .Select(x => new Tuple <string, string>(x.Name, x.GetValue(Config.Instance.Paths, null) as string)) ); refreshTimer.Start(); this.InitializeComponent(); }
internal Diagnostics() { LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType).Info("######Created Diagnostics Window######"); AutoScroll = true; #if(Release_Test) VersionType = "Test"; #elif(DEBUG) VersionType = "Debug"; #else VersionType = "Release"; #endif OctgnVersion = Const.OctgnVersion.ToString(); LatestVersion = UpdateManager.Instance.LatestVersion.Version; EventCounts = "Counts"; LatestLogLines = new List<string>(); refreshTimer.Elapsed += RefreshTimerOnElapsed; refreshTimer.Start(); this.Closing += OnClosing; this.IsVisibleChanged += OnIsVisibleChanged; CompositionTarget.Rendering += CompositionTargetOnRendering; pcounter = new PerformanceCounter("Process", "% Processor Time", Process.GetCurrentProcess().ProcessName, true); GoogleLatency = new CrudeLatencyDetector("Google", "www.google.com"); ChatServerLatency = new CrudeLatencyDetector("Chat", "of.octgn.net"); GameServerLatency = new CrudeLatencyDetector("Game", "games.octgn.net"); ApiServerLatency = new CrudeLatencyDetector("Api", "www.octgn.net"); GoogleLatency.Pause(); ChatServerLatency.Pause(); GameServerLatency.Pause(); ApiServerLatency.Pause(); this.InitializeComponent(); }
internal Diagnostics() { LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType).Info("######Created Diagnostics Window######"); AutoScroll = true; if (Program.IsReleaseTest) VersionType = "Test"; else if (X.Instance.Debug) VersionType = "Debug"; else VersionType = "Release"; OctgnVersion = Const.OctgnVersion.ToString(); LatestVersion = UpdateManager.Instance.LatestVersion.Version; EventCounts = "Counts"; LatestLogLines = new List<string>(); refreshTimer.Elapsed += RefreshTimerOnElapsed; this.Closing += OnClosing; this.IsVisibleChanged += OnIsVisibleChanged; CompositionTarget.Rendering += CompositionTargetOnRendering; pcounter = new PerformanceCounter("Process", "% Processor Time", Process.GetCurrentProcess().ProcessName, true); GoogleLatency = new CrudeLatencyDetector("Google", "www.google.com"); ChatServerLatency = new CrudeLatencyDetector("Chat", "of.octgn.net"); GameServerLatency = new CrudeLatencyDetector("Game", "games.octgn.net"); ApiServerLatency = new CrudeLatencyDetector("Api", "www.octgn.net"); GoogleLatency.Pause(); ChatServerLatency.Pause(); GameServerLatency.Pause(); ApiServerLatency.Pause(); Paths = new ObservableCollection<Tuple<string, string>>( Library.Config.Instance.Paths .GetType() .GetProperties() .Where(x => x.PropertyType == typeof(string)) .Select(x => new Tuple<string, string>(x.Name, x.GetValue(Config.Instance.Paths, null) as string)) ); refreshTimer.Start(); this.InitializeComponent(); }