示例#1
0
 //内存曲线
 private void MemoryLine_Click(object sender, RoutedEventArgs e)
 {
     if (allProcessesListView.SelectedIndex >= 0)
     {
         string name = ((Process_Info)allProcessesListView.SelectedItem).Name;
         int    id   = ((Process_Info)allProcessesListView.SelectedItem).ID;
         SingleProcessMemoryLine memoryLine = new SingleProcessMemoryLine();
         memoryLine.processName.Text = name.Split('.')[0];
         memoryLine.processId.Text   = id.ToString();
         memoryLine.ShowDialog();
     }
     else
     {
         MessageBox.Show("无选中项!", "提醒", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
 //内存曲线
 private void MemoryLine_Click(object sender, RoutedEventArgs e)
 {
     if (allProcessesListView.SelectedIndex >= 0)
     {
         string name = ((Process_Info)allProcessesListView.SelectedItem).Name;
         int id = ((Process_Info)allProcessesListView.SelectedItem).ID;
         SingleProcessMemoryLine memoryLine = new SingleProcessMemoryLine();
         memoryLine.processName.Text = name.Split('.')[0];
         memoryLine.processId.Text = id.ToString();
         memoryLine.ShowDialog();
     }
     else
         MessageBox.Show("无选中项!", "提醒", MessageBoxButton.OK, MessageBoxImage.Warning);
 }