Example #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            RadioButton but = sender as RadioButton;

            but4.IsChecked  = false;
            but6.IsChecked  = false;
            but10.IsChecked = false;
            but.IsChecked   = true;

            if (but == but4)
            {
                Data  = new CircleDataSource("000040");
                model = (new DataSource("000040")).getMiaoShu();
            }
            if (but == but6)
            {
                Data  = new CircleDataSource("000041");
                model = (new DataSource("000041")).getMiaoShu();
            }
            if (but == but10)
            {
                Data  = new CircleDataSource("000042");
                model = (new DataSource("000042")).getMiaoShu();
            }

            col.ItemsSource = Data;
            col.Visibility  = Visibility.Visible;
            //textName.Text = Data[0].nameStr;
            // water.Content = Data[0].ValueOfWater;
            temp.Text                 = Data[0].InTemp;
            labTitle.Content          = "小麦感染米象后虫蚀粒率的变化情况";
            categoryXAxis.ItemsSource = Data;
            wheateHaiChongDuiXiaoMaiYingXiang.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu);
        }
Example #2
0
 private void DataChart_Load(object sender, RoutedEventArgs e)
 {
     Data                      = new CircleDataSource("000040");
     col.ItemsSource           = Data;
     col.Visibility            = Visibility.Visible;
     temp.Text                 = Data[0].InTemp;
     labTitle.Content          = "小麦感染米象后虫蚀粒率的变化情况";
     categoryXAxis.ItemsSource = Data;
     model                     = (new DataSource("000040")).getMiaoShu();
     wheateHaiChongDuiXiaoMaiYingXiang.miaoShu.Document = convertToBox.convertStringToFlowDocument(model.chartMiaoShu);
 }
Example #3
0
        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 CircleDataSource("000043");
                    model = (new DataSource("000043")).getMiaoShu();
                }
                else if (but == but2)
                {
                    Data  = new CircleDataSource("000044");
                    model = (new DataSource("000044")).getMiaoShu();
                }
                else if (but == but5)
                {
                    Data  = new CircleDataSource("000045");
                    model = (new DataSource("000045")).getMiaoShu();
                }
                else if (but == but10)
                {
                    Data  = new CircleDataSource("000046");
                    model = (new DataSource("000046")).getMiaoShu();
                }
                else
                {
                    MessageBox.Show("没有数据");
                    return;
                }
            }
            else if (Convert.ToInt16(temp.SelectedItem) == 25)
            {
                if (but == but0)
                {
                    Data  = new CircleDataSource("000047");
                    model = (new DataSource("000047")).getMiaoShu();
                }
                else if (but == but2)
                {
                    Data  = new CircleDataSource("000048");
                    model = (new DataSource("000048")).getMiaoShu();
                }
                else if (but == but5)
                {
                    Data  = new CircleDataSource("000049");
                    model = (new DataSource("000049")).getMiaoShu();
                }
                else if (but == but10)
                {
                    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);
        }