private void Grid_Load(object sender, RoutedEventArgs e) { Data = new DataSource("000013"); model = Data.getMiaoShu(); wheateZhiLiangTeXingHeader.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu); col.ItemsSource = Data; col.Visibility = Visibility.Visible; //textName.Content = Data[0].yLable; //water.Content = Data[0].Water; //temp.Content = Data[0].GrainTemp; labTitle.Content = "储藏过程中小麦脂肪酸的变化情况"; categoryXAxis.ItemsSource = Data; //HighestValueOverlay.ItemsSource = Data; //LowestValueOverlay.ItemsSource = Data; //MeanValueOverlay.ItemsSource = Data; }
public void ButMap1(RadioButton but, int dayNum) { if (but == but1) { predictData = getPredictData("000040", dayNum); model = (new DataSource("000040")).getMiaoShu(); } if (but == but2) { predictData = getPredictData("000041", dayNum); model = (new DataSource("000041")).getMiaoShu(); } if (but == but3) { predictData = getPredictData("000042", dayNum); model = (new DataSource("000042")).getMiaoShu(); } wheateHaiChongDuiXiaoMaiYingXiang.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu);; col.ItemsSource = predictData; col.Visibility = Visibility.Visible; //textName.Text = predictData[0].yLable; // water.Text = Convert.ToString(predictData[0].PeatsMiDu); tempText.Text = predictData[0].InTemp; labTitle.Content = "小麦感染米象后虫蚀粒率的变化预测情况"; colPredict.MarkerType = MarkerType.None; colPredict.Thickness = 5; colPredict.ItemsSource = predictData; colPredict.ValueMemberPath = "PredictData"; colPredict.XAxis = categoryDateAxis; colPredict.YAxis = numericYAxis; colPredict.Opacity = 0.5; colPredict.Visibility = Visibility.Visible; colPredict.ToolTip = col.ToolTip; colPredict.Brush = new SolidColorBrush(Colors.Green); this.CategoryChart.Series.Add(colPredict); categoryDateAxis.ItemsSource = predictData; numericXAxis.MinimumValue = predictData[0].date.Ticks; numericXAxis.MaximumValue = predictData[predictData.Count - 1].date.Ticks; ClipLine.Value = predictData[dayNum].date.Ticks; moveLine.Value = predictData[dayNum].date.Ticks; textChaZhi.Text = string.Format("{0:MM-dd}", predictData[dayNum].date); //textTime.Text = string.Format("{0:yyyy-MM-dd}", predictData[dayNum - 1].date); }
public ValueOverlays2() { InitializeComponent(); try { Axis = new DataSource("000051"); yData = new DataSource("000051"); model = yData.getMiaoShu(); y1Data = new DataSource("000052"); model1 = y1Data.getMiaoShu(); y2Data = new DataSource("000053"); model2 = y2Data.getMiaoShu(); y3Data = new DataSource("000054"); model3 = y3Data.getMiaoShu(); } catch (Exception e) { throw e; } }
public SpeedDataWindow() { InitializeComponent(); try { Axis = new DataSource("000051"); yData = new DataSource("000051"); model = yData.getMiaoShu(); y1Data = new DataSource("000052"); model1 = y1Data.getMiaoShu(); y2Data = new DataSource("000053"); model2 = y2Data.getMiaoShu(); y3Data = new DataSource("000054"); model3 = y3Data.getMiaoShu(); } catch (Exception e) { MessageBox.Show(e.Message); } }
public AllWindow() { InitializeComponent(); try { yData = new CircleDataSource("000051"); model = (new DataSource("000051")).getMiaoShu(); y1Data = new CircleDataSource("000052"); model1 = (new DataSource("000052")).getMiaoShu(); y2Data = new CircleDataSource("000053"); model2 = (new DataSource("000053")).getMiaoShu(); y3Data = new CircleDataSource("000054"); model3 = (new DataSource("000054")).getMiaoShu(); } catch (Exception e) { MessageBox.Show(e.Message); } }
public void ButMap(RadioButton but) { if (but == but1) { predictData = getPredictData("000037"); model = (new DataSource("000037")).getMiaoShu(); } if (but == but2) { predictData = getPredictData("000038"); model = (new DataSource("000038")).getMiaoShu(); } if (but == but3) { predictData = getPredictData("000039"); model = (new DataSource("000039")).getMiaoShu(); } wheateHaiChongDuiXiaoMaiYingXiang.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu);; col.ItemsSource = predictData; col.Visibility = Visibility.Visible; //textName.Text = predictData[0].yLable; //num.Text = Convert.ToString(predictData[0].PeatsMiDu); tempText.Text = predictData[0].InTemp; labTitle.Content = "小麦感染谷蠹后虫蚀粒率的变化预测情况"; colPredict.MarkerType = Infragistics.Controls.Charts.MarkerType.None; colPredict.Thickness = 5; colPredict.ItemsSource = predictData; colPredict.ValueMemberPath = "PredictData"; colPredict.XAxis = categoryDateAxis; colPredict.YAxis = numericYAxis; colPredict.Opacity = 0.5; colPredict.Visibility = Visibility.Visible; colPredict.ToolTip = col.ToolTip; colPredict.Brush = new SolidColorBrush(Colors.Green); this.CategoryChart.Series.Add(colPredict); categoryDateAxis.ItemsSource = predictData; }
private void comBoxTemp_Change(object sender, EventArgs e) { if (But11.IsChecked == true) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new DataSource("000001"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new DataSource("000002"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new DataSource("000003"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new DataSource("000004"); } } if (But12.IsChecked == true) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new DataSource("000005"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new DataSource("000006"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new DataSource("000007"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new DataSource("000008"); } } if (But13.IsChecked == true) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new DataSource("000009"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new DataSource("000010"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new DataSource("000011"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new DataSource("000012"); } } model = Data.getMiaoShu(); wheateZhiLiangTeXingHeader.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartSpeedMiaoShu); col.ItemsSource = Data; col.Visibility = Visibility.Visible; //textName.Content = Data[0].yLable; //water.Content = Data[0].Water; //temp.Content = Data[0].GrainTemp; labTitle.Content = "储藏过程中小麦面筋吸水率增加速率的变化情况"; categoryDateAxis.ItemsSource = Data; //HighestValueOverlay.ItemsSource = Data; //LowestValueOverlay.ItemsSource = Data; //MeanValueOverlay.ItemsSource = Data; }
private void Button_Click(object sender, RoutedEventArgs e) { RadioButton but = sender as RadioButton; but0.IsChecked = false; but2.IsChecked = false; but5.IsChecked = false; but10.IsChecked = false; but.IsChecked = true; if (Convert.ToInt16(temp.SelectedItem) == 20) { if (but == but0) { Data = new DataSource("000043"); } else if (but == but2) { Data = new DataSource("000044"); } else if (but == but5) { Data = new DataSource("000045"); } else if (but == but10) { Data = new DataSource("000046"); } else { MessageBox.Show("没有数据"); return; } } else if (Convert.ToInt16(temp.SelectedItem) == 25) { if (but == but0) { Data = new DataSource("000047"); } else if (but == but2) { Data = new DataSource("000048"); } else if (but == but5) { Data = new DataSource("000049"); } else if (but == but10) { Data = new DataSource("000050"); } else { MessageBox.Show("没有数据"); return; } } else { MessageBox.Show("没有数据"); return; } model = Data.getMiaoShu(); wheateHaiChongDuiXiaoMaiYingXiang.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu);; col.ItemsSource = Data; col.Visibility = Visibility.Visible; //textName.Text = Data[0].yLable; //num.Content = Data[0].PeatsMiDu; labTitle.Content = "小麦感染玉米象后容重的变化情况"; categoryDateAxis.ItemsSource = Data; }
private void temp_Changed(object sender, EventArgs e) { if (Convert.ToInt16(temp.SelectedItem) == 20) { if (but0.IsChecked == true) { Data = new CircleDataSource("000043"); model = (new DataSource("000043")).getMiaoShu(); } else if (but2.IsChecked == true) { Data = new CircleDataSource("000044"); model = (new DataSource("000044")).getMiaoShu(); } else if (but5.IsChecked == true) { Data = new CircleDataSource("000045"); model = (new DataSource("000045")).getMiaoShu(); } else if (but10.IsChecked == true) { Data = new CircleDataSource("000046"); model = (new DataSource("000046")).getMiaoShu(); } else { MessageBox.Show("没有数据"); return; } } else if (Convert.ToInt16(temp.SelectedItem) == 25) { if (but0.IsChecked == true) { Data = new CircleDataSource("000047"); model = (new DataSource("000047")).getMiaoShu(); } else if (but2.IsChecked == true) { Data = new CircleDataSource("000048"); model = (new DataSource("000048")).getMiaoShu(); } else if (but5.IsChecked == true) { Data = new CircleDataSource("000049"); model = (new DataSource("000049")).getMiaoShu(); } else if (but10.IsChecked == true) { Data = new CircleDataSource("000050"); model = (new DataSource("000050")).getMiaoShu(); } else { MessageBox.Show("没有数据"); return; } } else { MessageBox.Show("没有数据"); return; } col.ItemsSource = Data; col.Visibility = Visibility.Visible; //textName.Text = Data[0].yLable; // num.Content = Data[0].PeatsMiDu; // temp.Text = Data[0].InTemp; labTitle.Content = "小麦感染玉米象后容重的变化情况"; categoryXAxis.ItemsSource = Data; wheateHaiChongDuiXiaoMaiYingXiang.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu); }
private void Button_Click(object sender, RoutedEventArgs e) { RadioButton but = sender as RadioButton; But11.IsChecked = false; But12.IsChecked = false; But13.IsChecked = false; but.IsChecked = true; if (but == But11) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new CircleDataSource("000025"); model = (new DataSource("000025")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new CircleDataSource("000026"); model = (new DataSource("000026")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new CircleDataSource("000027"); model = (new DataSource("000027")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new CircleDataSource("000028"); model = (new DataSource("000028")).getMiaoShu(); } } if (but == But12) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new CircleDataSource("000029"); model = (new DataSource("000029")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new CircleDataSource("000030"); model = (new DataSource("000030")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new CircleDataSource("000031"); model = (new DataSource("000031")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new CircleDataSource("000032"); model = (new DataSource("000032")).getMiaoShu(); } } if (but == But13) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new CircleDataSource("000033"); model = (new DataSource("000033")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new CircleDataSource("000034"); model = (new DataSource("000034")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new CircleDataSource("000035"); model = (new DataSource("000035")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new CircleDataSource("000036"); model = (new DataSource("000036")).getMiaoShu(); } } wheateZhiLiangTeXingHeader.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu); col.ItemsSource = Data; col.Visibility = Visibility.Visible; //textName.Content = Data[0].yLable; //water.Content = Data[0].Water; //temp.Content = Data[0].GrainTemp; labTitle.Content = "储藏过程中小麦不完善度的变化情况"; categoryXAxis.ItemsSource = Data; }
public void ButMap(RadioButton but, int date) { if (but == But11) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { predictData = getPredictData("000025", date); model = (new DataSource("000025")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { predictData = getPredictData("000026", date); model = (new DataSource("000026")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { predictData = getPredictData("000027", date); model = (new DataSource("000027")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { predictData = getPredictData("000028", date); model = (new DataSource("000028")).getMiaoShu(); } } if (but == But12) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { predictData = getPredictData("000029", date); model = (new DataSource("000029")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { predictData = getPredictData("000030", date); model = (new DataSource("000030")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { predictData = getPredictData("000031", date); model = (new DataSource("000031")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { predictData = getPredictData("000032", date); model = (new DataSource("000032")).getMiaoShu(); } } if (but == But13) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { predictData = getPredictData("000033", date); model = (new DataSource("000033")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { predictData = getPredictData("000034", date); model = (new DataSource("000034")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { predictData = getPredictData("000035", date); model = (new DataSource("000035")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { predictData = getPredictData("000036", date); model = (new DataSource("000036")).getMiaoShu(); } } wheateZhiLiangTeXingHeader.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu); labelY.Content = "不\n完\n善\n度\n(\n%\n)"; numericYAxis.MinimumValue = 2; numericYAxis.MaximumValue = 4; numericYAxis.Interval = 0.2; text.Content = "不完善度"; col.ItemsSource = predictData; col.Visibility = Visibility.Visible; //textName.Text = predictData[0].yLable; //water.Text = Convert.ToString(predictData[0].Water); //temp.Text = Convert.ToString(predictData[0].GrainTemp); labTitle.Content = "储藏过程中小麦不完善度的预测情况"; colPredict.MarkerType = MarkerType.None; colPredict.Thickness = 5; colPredict.ItemsSource = predictData; colPredict.ValueMemberPath = "PredictData"; colPredict.XAxis = categoryDateAxis; colPredict.YAxis = numericYAxis; colPredict.Opacity = 0.5; colPredict.Visibility = Visibility.Visible; colPredict.ToolTip = col.ToolTip; colPredict.Brush = new SolidColorBrush(Colors.Green); this.CategoryChart.Series.Add(colPredict); numericXAxis.MinimumValue = predictData[0].date.Ticks; numericXAxis.MaximumValue = predictData[predictData.Count - 1].date.Ticks; ClipLine.Value = predictData[date - 1].date.Ticks; moveLine.Value = predictData[date - 1].date.Ticks; categoryDateAxis.ItemsSource = predictData; textChaZhi.Text = string.Format("{0:MM-dd}", predictData[date - 1].date); //textTime.Text = string.Format("{0:yyyy-MM-dd}", predictData[date-1].date); }
public void ButMap2(RadioButton but) { if (but == But11) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { predictData = getPredictData("000001"); model = (new DataSource("000001")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { predictData = getPredictData("000002"); model = (new DataSource("000002")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { predictData = getPredictData("000003"); model = (new DataSource("000003")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { predictData = getPredictData("000004"); model = (new DataSource("000004")).getMiaoShu(); } } if (but == But12) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { predictData = getPredictData("000005"); model = (new DataSource("000005")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { predictData = getPredictData("000006"); model = (new DataSource("000006")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { predictData = getPredictData("000007"); model = (new DataSource("000007")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { predictData = getPredictData("000008"); model = (new DataSource("000008")).getMiaoShu(); } } if (but == But13) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { predictData = getPredictData("000009"); model = (new DataSource("000009")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { predictData = getPredictData("000010"); model = (new DataSource("000010")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { predictData = getPredictData("000011"); model = (new DataSource("000011")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { predictData = getPredictData("000012"); model = (new DataSource("000012")).getMiaoShu(); } } wheateZhiLiangTeXingHeader.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu); labelY.Content = "面\n筋\n吸\n水\n率\n(\n%\n)"; numericYAxis.MinimumValue = 185; numericYAxis.MaximumValue = 210; numericYAxis.Interval = 2; text.Content = "面筋吸水率"; col.ItemsSource = predictData; col.Visibility = Visibility.Visible; //textName.Text = predictData[0].yLable; //water.Text = Convert.ToString(predictData[0].Water); //temp.Text = Convert.ToString(predictData[0].GrainTemp); labTitle.Content = "储藏过程中小麦面筋吸水率的预测情况"; colPredict.MarkerType = MarkerType.None; colPredict.Thickness = 5; colPredict.ItemsSource = predictData; colPredict.ValueMemberPath = "PredictData"; colPredict.XAxis = categoryDateAxis; colPredict.YAxis = numericYAxis; colPredict.Opacity = 0.5; colPredict.Visibility = Visibility.Visible; colPredict.ToolTip = col.ToolTip; colPredict.Brush = new SolidColorBrush(Colors.Green); this.CategoryChart.Series.Add(colPredict); categoryDateAxis.ItemsSource = predictData; numericXAxis.MinimumValue = 1; numericXAxis.MaximumValue = 13; }
private void comBoxTemp_Change(object sender, EventArgs e) { if (But11.IsChecked == true) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new CircleDataSource("000013"); model = (new DataSource("000013")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new CircleDataSource("000014"); model = (new DataSource("000014")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new CircleDataSource("000015"); model = (new DataSource("000015")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new CircleDataSource("000016"); model = (new DataSource("000016")).getMiaoShu(); } } if (But12.IsChecked == true) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new CircleDataSource("000017"); model = (new DataSource("000017")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new CircleDataSource("000018"); model = (new DataSource("000018")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new CircleDataSource("000019"); model = (new DataSource("000019")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new CircleDataSource("000020"); model = (new DataSource("000020")).getMiaoShu(); } } if (But13.IsChecked == true) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new CircleDataSource("000021"); model = (new DataSource("000021")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new CircleDataSource("000022"); model = (new DataSource("000022")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new CircleDataSource("000023"); model = (new DataSource("000023")).getMiaoShu(); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new CircleDataSource("000024"); model = (new DataSource("000024")).getMiaoShu(); } } wheateZhiLiangTeXingHeader.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu); col.ItemsSource = Data; col.Visibility = Visibility.Visible; //textName.Content = Data[0].yLable; //water.Content = Data[0].Water; //temp.Content = Data[0].GrainTemp; labTitle.Content = "储藏过程中小麦脂肪酸的变化情况"; categoryXAxis.ItemsSource = Data; //HighestValueOverlay.ItemsSource = Data; //LowestValueOverlay.ItemsSource = Data; //MeanValueOverlay.ItemsSource = Data; }
public void ButMap3(RadioButton but, int date) { if (but == But11) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new DataSource("000001"); predictData = getPredictData("000001", date); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new DataSource("000002"); predictData = getPredictData("000002", date); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new DataSource("000003"); predictData = getPredictData("000003", date); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new DataSource("000004"); predictData = getPredictData("000004", date); } } if (but == But12) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new DataSource("000005"); predictData = getPredictData("000005", date); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new DataSource("000006"); predictData = getPredictData("000006", date); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new DataSource("000007"); predictData = getPredictData("000007", date); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new DataSource("000008"); predictData = getPredictData("000008", date); } } if (but == But13) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new DataSource("000009"); predictData = getPredictData("000009", date); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new DataSource("000010"); predictData = getPredictData("000010", date); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new DataSource("000011"); predictData = getPredictData("000011", date); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new DataSource("000012"); predictData = getPredictData("000012", date); } } model = Data.getMiaoShu(); wheateZhiLiangTeXingHeader.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu); labelY.Content = "面\n筋\n吸\n水\n率\n(\n%\n)"; numericYAxis.MinimumValue = 185; numericYAxis.MaximumValue = 210; numericYAxis.Interval = 2; text.Content = "面筋吸水率"; //col.ItemsSource = Data; // col.Visibility = Visibility.Visible; //textName.Text = Data[0].yLable; //water.Content = Data[0].Water; //temp.Content = Data[0].GrainTemp; labTitle.Content = "储藏过程中小麦面筋吸水率的预测情况"; colPredict.MarkerType = MarkerType.None; colPredict.Thickness = 5; colPredict.ItemsSource = predictData; colPredict.ValueMemberPath = "PredictData"; colPredict.XAxis = categoryDateAxis; colPredict.YAxis = numericYAxis; colPredict.Opacity = 0.5; colPredict.Visibility = Visibility.Visible; colPredict.ToolTip = col.ToolTip; colPredict.Brush = new SolidColorBrush(Colors.Green); this.CategoryChart.Series.Add(colPredict); categoryDateAxis.ItemsSource = predictData; numericXAxis.MinimumValue = predictData[0].date.Ticks; numericXAxis.MaximumValue = predictData[predictData.Count - 1].date.Ticks; //textTime.Text = String.Format("{0:yyyy-MM-dd}", predictData[predictData.Count - 1].date); ClipLine.Value = Data[0].EndTime.Ticks; }
private void comBoxTemp_Change(object sender, EventArgs e) { if (But11.IsChecked == true) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new DataSource("000025"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new DataSource("000026"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new DataSource("000027"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new DataSource("000028"); } } if (But12.IsChecked == true) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new DataSource("000029"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new DataSource("000030"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new DataSource("000031"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new DataSource("000032"); } } if (But13.IsChecked == true) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new DataSource("000033"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new DataSource("000034"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new DataSource("000035"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new DataSource("000036"); } } model = Data.getMiaoShu(); wheateZhiLiangTeXingHeader.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu); col.ItemsSource = Data; col.Visibility = Visibility.Visible; //textName.Content = Data[0].yLable; //water.Content = Data[0].Water; //temp.Content = Data[0].GrainTemp; labTitle.Content = "储藏过程中小麦不完善度的变化情况"; categoryDateAxis.ItemsSource = Data; }
private void Button_Click(object sender, RoutedEventArgs e) { RadioButton but = sender as RadioButton; But11.IsChecked = false; But12.IsChecked = false; But13.IsChecked = false; but.IsChecked = true; if (but == But11) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new DataSource("000013"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new DataSource("000014"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new DataSource("000015"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new DataSource("000016"); } } if (but == But12) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new DataSource("000017"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new DataSource("000018"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new DataSource("000019"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new DataSource("000020"); } } if (but == But13) { if (Convert.ToDouble(comBoxTemp.SelectedItem) == 20) { Data = new DataSource("000021"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 25) { Data = new DataSource("000022"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 27.5) { Data = new DataSource("000023"); } else if (Convert.ToDouble(comBoxTemp.SelectedItem) == 30) { Data = new DataSource("000024"); } } model = Data.getMiaoShu(); wheateZhiLiangTeXingHeader.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu); col.ItemsSource = Data; col.Visibility = Visibility.Visible; //textName.Content = Data[0].yLable; // water.Content = Data[0].Water; // temp.Content = Data[0].GrainTemp; labTitle.Content = "储藏过程中小麦脂肪酸的变化情况"; categoryXAxis.ItemsSource = Data; //HighestValueOverlay.ItemsSource = Data; //LowestValueOverlay.ItemsSource = Data; //MeanValueOverlay.ItemsSource = Data; }
private void LayoutRoot_Loaded(object sender, RoutedEventArgs e) { string miaoShu = null; this.DataSources = new Dictionary <int, IList>(); int j = 0; if (wheateHaiChongDuiXiaoMaiYingXiang.type == 1) { titleLab.Content = "小麦感染谷蠹后虫蚀粒率的变化情况"; for (int i = 37; i < 40; i++) { List <DataPoint> data = SelectData.recieveData("0000" + i); XAxis.ItemsSource = data; this.DataSources.Add(j++, data); model = (new DataSource("0000" + i)).getMiaoShu(); if (miaoShu == null) { miaoShu = model.chartMiaoShu; } else { miaoShu = miaoShu + "\n" + model.chartMiaoShu; } } } if (wheateHaiChongDuiXiaoMaiYingXiang.type == 2) { titleLab.Content = "小麦感染米象后虫蚀粒率的变化情况"; for (int i = 40; i < 43; i++) { List <DataPoint> data = SelectData.recieveData("0000" + i); XAxis.ItemsSource = data; this.DataSources.Add(j++, data); model = (new DataSource("0000" + i)).getMiaoShu(); if (miaoShu == null) { miaoShu = model.chartMiaoShu; } else { miaoShu = miaoShu + "\n" + model.chartMiaoShu; } } } if (wheateHaiChongDuiXiaoMaiYingXiang.type == 3) { titleLab.Content = "小麦感染玉米象后容重的变化情况"; for (int i = 43; i < 51; i++) { List <DataPoint> data = SelectData.recieveData("0000" + i); XAxis.ItemsSource = data; this.DataSources.Add(j++, data); model = (new DataSource("0000" + i)).getMiaoShu(); if (miaoShu == null) { miaoShu = model.chartMiaoShu; } else { miaoShu = miaoShu + "\n" + model.chartMiaoShu; } } } this.MotionFramework.DataSources = this.DataSources; wheateHaiChongDuiXiaoMaiYingXiang.miaoShu.Document = convertToBox.convertStringToFlowDocument(miaoShu); }
private void MenuItemDataDisplay_Click(object sender, RoutedEventArgs e) { MenuItem menuItem = sender as MenuItem; DataFenXi.Background = null; DataDisplay.Background = new SolidColorBrush(Colors.RoyalBlue); DataYuCe.Background = null; Frame frame = new Frame(); if (menuItem == QXT1) { frame.Source = new Uri("pack://application:,,,/ScatterDiagram;component/LineCrosshairCoordinates.xaml"); } //else if (menuItem == QXT2) //{ // frame.Source = new Uri("pack://application:,,,/ScatterDiagram;component/LineCrosshairCoordinates1.xaml"); //} else if (menuItem == QXT3) { frame.Source = new Uri("pack://application:,,,/ScatterDiagram;component/LineCrosshairCoordinates2.xaml"); } else if (menuItem == TXT1) { frame.Source = new Uri("pack://application:,,,/BarChart;component/series/ValueOverlays.xaml"); } //else if (menuItem == TXT2) //{ // frame.Source = new Uri("pack://application:,,,/BarChart;component/series/ValueOverlays1.xaml"); //} else if (menuItem == TXT3) { frame.Source = new Uri("pack://application:,,,/BarChart;component/series/ValueOverlays2.xaml"); } else if (menuItem == ZXT1) { frame.Source = new Uri("pack://application:,,,/ScatterDiagram;component/ChartCrosshairCoordinates.xaml"); } //else if (menuItem == ZXT2) //{ // frame.Source = new Uri("pack://application:,,,/ScatterDiagram;component/ChartCrosshairCoordinates1.xaml"); //} else if (menuItem == ZXT3) { frame.Source = new Uri("pack://application:,,,/ScatterDiagram;component/ChartCrosshairCoordinates2.xaml"); } else if (menuItem == DTT) { frame.Source = new Uri("pack://application:,,,/WpfApplication6;component/MainWindow.xaml"); XiaoMaiDisplayModel model = (new DataSource("000051")).getMiaoShu(); XiaoMaiDisplayModel model1 = (new DataSource("000052")).getMiaoShu(); XiaoMaiDisplayModel model2 = (new DataSource("000053")).getMiaoShu(); XiaoMaiDisplayModel model3 = (new DataSource("000054")).getMiaoShu(); jieshi.Document = convertToBox.convertStringToFlowDocument (model.chartMiaoShu + "\n" + model1.chartMiaoShu + "\n" + model2.chartMiaoShu + "\n" + model3.chartMiaoShu + "\n"); } else if (menuItem == QPT) { frame.Source = new Uri("pack://application:,,,/Glob;component/AllWindow.xaml"); } if (mainGrid.Children.Count > 0) { mainGrid.Children.Clear(); } mainGrid.Children.Add(frame); }
public void ButMap3(RadioButton but, int dayNum) { if (but == but1) { if (Convert.ToInt16(tempCom.SelectedItem) == 20) { Data = new DataSource("000043"); predictData = getPredictData("000043", dayNum); } else if (Convert.ToInt16(tempCom.SelectedItem) == 25) { Data = new DataSource("000047"); predictData = getPredictData("000047", dayNum); } } if (but == but2) { if (Convert.ToInt16(tempCom.SelectedItem) == 20) { Data = new DataSource("000044"); predictData = getPredictData("000044", dayNum); } else if (Convert.ToInt16(tempCom.SelectedItem) == 25) { Data = new DataSource("000048"); predictData = getPredictData("000048", dayNum); } } if (but == but3) { if (Convert.ToInt16(tempCom.SelectedItem) == 20) { Data = new DataSource("000045"); predictData = getPredictData("000045", dayNum); } else if (Convert.ToInt16(tempCom.SelectedItem) == 25) { Data = new DataSource("000049"); predictData = getPredictData("000049", dayNum); } } if (but == but4) { if (Convert.ToInt16(tempCom.SelectedItem) == 20) { Data = new DataSource("000046"); predictData = getPredictData("000046", dayNum); } else if (Convert.ToInt16(tempCom.SelectedItem) == 25) { Data = new DataSource("000050"); predictData = getPredictData("000050", dayNum); } } model = Data.getMiaoShu(); wheateHaiChongDuiXiaoMaiYingXiang.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu);; col.ItemsSource = Data; //col.Visibility = Visibility.Visible; //textName.Text = Data[0].yLable; //water.Content = Data[0].PeatsMiDu; //temp.Content = Data[0].InTemp; labTitle.Content = "小麦感染玉米象后容重的变化预测情况"; colPredict.MarkerType = MarkerType.None; colPredict.Thickness = 5; colPredict.ItemsSource = predictData; colPredict.ValueMemberPath = "PredictData"; colPredict.XAxis = categoryDateAxis; colPredict.YAxis = numericYAxis; colPredict.Opacity = 0.5; colPredict.Visibility = Visibility.Visible; colPredict.ToolTip = col.ToolTip; colPredict.Brush = new SolidColorBrush(Colors.Green); this.CategoryChart.Series.Add(colPredict); categoryDateAxis.ItemsSource = predictData; numericXAxis.MinimumValue = predictData[0].date.Ticks; numericXAxis.MaximumValue = predictData[predictData.Count - 1].date.Ticks; //textTime.Text = String.Format("{0:yyyy-MM-dd}", predictData[predictData.Count - 1].date); ClipLine.Value = Data[0].EndTime.Ticks; textChaZhi.Text = String.Format("{0:MM-dd}", Data[0].EndTime); }