public ProcessesUserControl(Manager man) { InitializeComponent(); this.man = man; this.currentPerformanceData = currentPerformanceData; this.baselineDatesCount = man.currentUser.baselineDates.Count; // add days in the days combo box List <String> days = man.currentUser.availableDates; foreach (string s in days) { dayComboBox.Items.Add(String.Format("{0}/{1}/{2}", s.Substring(6, 2), s.Substring(4, 2), s.Substring(0, 4))); } if (dayComboBox.Items.Count == 0) { dayComboBox.Text = "No days available."; dayComboBox.Enabled = false; } else { dayComboBox.SelectedIndex = dayComboBox.Items.Count - 1; } // set current day SetCurrentDateData(); dataComboBox.Enabled = false; processComboBox.Enabled = false; }
private void SetAnotherDateData(int index) { string date = man.currentUser.availableDates[index]; otherDateData = man.GetPerformanceData(date); cpuUsage = otherDateData.globalCPUusage; cpuUsageValuesNo = otherDateData.globalCPUusageValuesNo; cpuUsageBaseline = man.baselineData.globalCPUusage; cpuUsageBaselineValuesNo = man.baselineData.globalCPUusageValuesNo; gpuUsage = otherDateData.globalGPUusage; gpuUsageValuesNo = otherDateData.globalGPUusageValuesNo; gpuUsageBaseline = man.baselineData.globalGPUusage; gpuUsageBaselineValuesNo = man.baselineData.globalGPUusageValuesNo; memoryUsage = otherDateData.globalMemoryUsage; memoryUsageValuesNo = otherDateData.globalMemoryUsageValuesNo; memoryUsageBaseline = man.baselineData.globalMemoryUsage; memoryUsageBaselineValuesNo = man.baselineData.globalMemoryUsageValuesNo; networkSend = otherDateData.globalNetworkSend; networkSendBaseline = man.baselineData.globalNetworkSend; networkReceive = otherDateData.globalNetworkReceive; networkReceiveBaseline = man.baselineData.globalNetworkReceive; diskUsage = otherDateData.globalDiskUsage; diskUsageBaseline = man.baselineData.globalDiskUsage; packets = otherDateData.packets_counter; packetsBaseline = man.baselineData.packets_counter; }
private void SetAnotherDateData(int index) { string date = man.currentUser.availableDates[index]; currentPerformanceData = man.GetPerformanceData(date); }
private void SetCurrentDateData() { currentPerformanceData = man.performanceData; }