Exemplo n.º 1
0
 public List <DataValue> getPredictData(String shiYanNumber, int date)
 {
     return(SelectData.getLagPredictValue(shiYanNumber, date));
 }
Exemplo n.º 2
0
        private void daySelect_Changed(object sender, EventArgs e)
        {
            int date;

            if (!this.IsLoaded)
            {
                return;
            }

            date = Convert.ToInt32(daySelect.SelectedItem);

            try
            {
                predictYData  = SelectData.getLagPredictValue("000051", date);
                predictY1Data = SelectData.getLagPredictValue("000052", date);
                predictY2Data = SelectData.getLagPredictValue("000053", date);
                predictY3Data = SelectData.getLagPredictValue("000054", date);

                colGrainPredict.MarkerType      = MarkerType.None;
                colGrainPredict.Thickness       = 5;
                colGrainPredict.ItemsSource     = predictYData;
                colGrainPredict.ValueMemberPath = "PredictData";
                colGrainPredict.XAxis           = categoryDateAxis;
                colGrainPredict.YAxis           = numericYAxis;
                colGrainPredict.Opacity         = 0.5;
                colGrainPredict.Visibility      = Visibility.Hidden;
                colGrainPredict.ToolTip         = colGrain.ToolTip;
                colGrainPredict.Brush           = new SolidColorBrush(Colors.Green);

                this.CategoryChart.Series.Add(colGrainPredict);



                colCornPredict.MarkerType      = MarkerType.None;
                colCornPredict.Thickness       = 5;
                colCornPredict.ItemsSource     = predictY1Data;
                colCornPredict.ValueMemberPath = "PredictData";
                colCornPredict.XAxis           = categoryDateAxis;
                colCornPredict.YAxis           = numericYAxis;
                colCornPredict.Opacity         = 0.5;
                colCornPredict.Visibility      = Visibility.Hidden;
                colCornPredict.ToolTip         = colCorn.ToolTip;
                colCornPredict.Brush           = new SolidColorBrush(Colors.Black);
                this.CategoryChart.Series.Add(colCornPredict);


                colRicePredict.MarkerType      = MarkerType.None;
                colRicePredict.Thickness       = 5;
                colRicePredict.ItemsSource     = predictY2Data;
                colRicePredict.ValueMemberPath = "PredictData";
                colRicePredict.XAxis           = categoryDateAxis;
                colRicePredict.YAxis           = numericYAxis;
                colRicePredict.Opacity         = 0.5;
                colRicePredict.Visibility      = Visibility.Hidden;
                colRicePredict.ToolTip         = colRice.ToolTip;
                colRicePredict.Brush           = new SolidColorBrush(Colors.Chocolate);
                this.CategoryChart.Series.Add(colRicePredict);


                colTCCPredict.MarkerType      = MarkerType.None;
                colTCCPredict.Thickness       = 5;
                colTCCPredict.ItemsSource     = predictY3Data;
                colTCCPredict.ValueMemberPath = "PredictData";
                colTCCPredict.XAxis           = categoryDateAxis;
                colTCCPredict.YAxis           = numericYAxis;
                colTCCPredict.Opacity         = 0.5;
                colTCCPredict.Visibility      = Visibility.Hidden;
                colTCCPredict.ToolTip         = colTCC.ToolTip;
                colTCCPredict.Brush           = new SolidColorBrush(Colors.Blue);
                this.CategoryChart.Series.Add(colTCCPredict);

                categoryDateAxis.ItemsSource = predictYData;
                colCorn.ItemsSource          = predictY1Data;
                colRice.ItemsSource          = predictY2Data;
                colGrain.ItemsSource         = predictYData;
                colTCC.ItemsSource           = predictY3Data;


                numericXAxis.MinimumValue = 1;
                numericXAxis.MaximumValue = predictYData.Count;

                ClipLine.Value  = date;
                moveLine.Value  = date;
                textChaZhi.Text = string.Format("{0:MM-dd}", predictYData[date - 1].date);
            }
            catch (Exception e1)
            {
                MessageBox.Show(e1.Message);
            }

            if (butCorn.IsChecked == true)
            {
                Click(butCorn);
            }
            else if (butGrain.IsChecked == true)
            {
                Click(butGrain);
            }
            else if (butRice.IsChecked == true)
            {
                Click(butRice);
            }
            else if (butTcc.IsChecked == true)
            {
                Click(butTcc);
            }
        }