示例#1
0
        private Task SetCollections(SeriesCollectionOperate seriesCollectionOperate, int i)
        {
            Labels = seriesCollectionOperate.SetValues(SeriesCollection[i].Values, csvDataTable, 1, 2, arSeries[i].Column,
                                                       (System.DateTime)pickedData.SelectedDate, (System.DateTime)PickerDataStop.SelectedDate, comboBoxHourStart.SelectedIndex,
                                                       comboBoxHourEnd.SelectedIndex, comboBoxMinuteStart.SelectedIndex, comboBoxMinuteEnd.SelectedIndex);

            KeyValuePair <System.DateTime, double> maxValue = new KeyValuePair <DateTime, double>();

            maxValue          = seriesCollectionOperate.GetMax();
            textBoxes[i].Text = "Max: [" + maxValue.Key.ToString() + "]  " + maxValue.Value.ToString();

            KeyValuePair <System.DateTime, double> minValue = new KeyValuePair <DateTime, double>();

            minValue             = seriesCollectionOperate.GetMin();
            textBoxesMin[i].Text = "Min: [" + minValue.Key.ToString() + "]  " + minValue.Value.ToString();

            return(Task.CompletedTask);
        }
示例#2
0
        protected void btnFromDays_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                csvDataTable = CSV_DataTable.ConvertCSVtoDataTable(filePath);
            }
            catch (Exception ex) { }

            SeriesCollectionOperate seriesCollectionOperate = new SeriesCollectionOperate();

            try
            {
                for (int i = 0; i < series.Length; i++)
                {
                    Labels = seriesCollectionOperate.SetValues(SeriesCollection[i].Values, csvDataTable, 1, 2, series[i].Column,
                                                               (System.DateTime)pickedData.SelectedDate, (System.DateTime)PickerDataStop.SelectedDate, comboBoxHourStart.SelectedIndex,
                                                               comboBoxHourEnd.SelectedIndex, comboBoxMinuteStart.SelectedIndex, comboBoxMinuteEnd.SelectedIndex);
                }
            }
            catch (Exception ex) { System.Windows.MessageBox.Show("Укажите время и дату начала и конца графика"); }
        }