Exemple #1
0
 private void diskComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (diskComboBox.SelectedItem == diskComboBox.Items[0])
     {
         return;
     }
     else if (diskLineChart == null)
     {
         noDiskOverlayLabel.Visibility = Visibility.Collapsed;
         diskIOGrid.Visibility         = Visibility.Visible;
         diskUtilGrid.Visibility       = Visibility.Visible;
         diskLineChart = new LineChart(diskIOChart, new PerformanceCounter("PhysicalDisk", "Disk Read Bytes/sec", (string)diskComboBox.SelectedItem), new PerformanceCounter("PhysicalDisk", "Disk Write Bytes/sec", (string)diskComboBox.SelectedItem), "MiB/s", "Lese-/Schreibrate");
         diskPieChart  = new PieChart(diskUtilChart, getDisk(diskComboBox.SelectedItem.ToString()));
     }
     else
     {
         diskLineChart.changePerfCounter(new PerformanceCounter("PhysicalDisk", "Disk Read Bytes/sec", (string)diskComboBox.SelectedItem), new PerformanceCounter("PhysicalDisk", "Disk Write Bytes/sec", (string)diskComboBox.SelectedItem));
     }
 }
Exemple #2
0
 private void networkComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (networkComboBox.SelectedItem == networkComboBox.Items[0])
     {
         return;
     }
     else if (networkRecLineChart == null)
     {
         noInterfaceOverlayLabel.Visibility = Visibility.Collapsed;
         networkRecGrid.Visibility          = Visibility.Visible;
         networkSenGrid.Visibility          = Visibility.Visible;
         networkRecLineChart = new LineChart(networkRecChart, new PerformanceCounter("Network Interface", "Bytes Received/sec", (string)networkComboBox.SelectedItem), "KiB/s", "Netzwerk Empfagsrate");
         networkSenLineChart = new LineChart(networkSenChart, new PerformanceCounter("Network Interface", "Bytes Sent/sec", (string)networkComboBox.SelectedItem), "KiB/s", "Netzwerk Senderate");
     }
     else
     {
         networkRecLineChart.changePerfCounter(new PerformanceCounter("Network Interface", "Bytes Received/sec", (string)networkComboBox.SelectedItem));
         networkSenLineChart.changePerfCounter(new PerformanceCounter("Network Interface", "Bytes Sent/sec", (string)networkComboBox.SelectedItem));
     }
 }