Beispiel #1
0
            public static Dictionary <int, IList> GetDataSources()
            {
                d = new Dictionary <int, IList>();
                try
                {
                    switch (DaoGuMainPage.yType)
                    {
                    case 1:
                        d.Add(0, SelectData.getData(SelectSeZePage.DongTaiModels));
                        break;

                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        d.Add(0, SelectData.getData(SelectZhiLiangCanShuPage.DongTaiModels));
                        break;

                    case 6:
                        d.Add(0, SelectData.getData(SelectQiWeiPage.DongTaiModels));
                        break;

                    default:
                        break;
                    }
                }
                catch (Exception e)
                {
                    throw e;
                }
                return(d);
            }
Beispiel #2
0
            public DataSourceGenerator()
            {
                try
                {
                    switch (DaoGuMainPage.yType)
                    {
                    case 1:
                        d.Add(0, SelectData.getData(SelectSeZePage.DongTaiModels));
                        break;

                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        d.Add(0, SelectData.getData(SelectZhiLiangCanShuPage.DongTaiModels));
                        break;

                    case 6:
                        d.Add(0, SelectData.getData(SelectQiWeiPage.DongTaiModels));
                        break;

                    default:
                        break;
                    }
                }
                catch (Exception)
                {
                    return;
                }

                foreach (DataPoint dp in d[0])
                {
                    this.Add(dp);
                }
            }
Beispiel #3
0
        public DataSourceGenerator()
        {
            d = SelectData.getData();

            foreach (DataPoint dp in d[0])
            {
                this.Add(dp);
            }
        }
Beispiel #4
0
 public static Dictionary <int, IList> GetDataSources()
 {
     try
     {
         d = SelectData.getData();
     }
     catch (Exception e)
     {
         throw e;
     }
     return(d);
 }
Beispiel #5
0
 public static Dictionary <int, IList> GetDataSources()
 {
     d = new Dictionary <int, IList>();
     try
     {
         d.Add(0, SelectData.getData(SelectPageBaoZi.DongTaiModels));
     }
     catch (Exception e)
     {
         throw e;
     }
     return(d);
 }
Beispiel #6
0
            public DataSourceGenerator()
            {
                try
                {
                    d.Add(0, SelectData.getData(SelectPage.DongTaiModels));
                }
                catch (Exception)
                {
                    return;
                }

                foreach (DataPoint dp in d[0])
                {
                    this.Add(dp);
                }
            }
Beispiel #7
0
        public MotionFrameworkChart(string style, int action, int styleid)
        {
            InitializeComponent();

            if (SelectData.getCount() == 0)
            {
                this.line.Visibility = Visibility.Hidden;
                //this.line1.Visibility = Visibility.Visible;
            }
            else
            {
                //this.line1.Visibility = Visibility.Hidden;
                this.line.Visibility = Visibility.Visible;
            }
            this.Loaded += OnSampleLoaded;
        }
Beispiel #8
0
        public DataSourceGenerator()
        {
            try
            {
                d = SelectData.getData();
            }
            catch (Exception)
            {
                return;
            }

            foreach (DataPoint dp in d[0])
            {
                this.Add(dp);
            }
        }
Beispiel #9
0
 public static Dictionary <int, IList> GetDataSources()
 {
     d = SelectData.getData();
     return(d);
 }
Beispiel #10
0
        private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
        {
            this.DataSources = new Dictionary <int, IList>();
            int j = 0;
            XiaoMaiDisplayModel model;
            string miaoShu = null;

            if (wheateZhiLiangTeXingHeader.type == 1)
            {
                titleLab.Content = "储藏过程中小麦不完善度的变化情况";

                for (int i = 25; i < 37; 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 (wheateZhiLiangTeXingHeader.type == 2)
            {
                titleLab.Content = "储藏过程中小麦脂肪酸的变化情况";
                for (int i = 13; i < 25; 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 (wheateZhiLiangTeXingHeader.type == 3)
            {
                titleLab.Content = "储藏过程中小麦面筋吸水率的变化情况";
                for (int i = 1; i < 13; i++)
                {
                    List <DataPoint> data;
                    if (i < 10)
                    {
                        data  = SelectData.recieveData("00000" + i);
                        model = (new DataSource("00000" + i)).getMiaoShu();
                    }
                    else
                    {
                        data  = SelectData.recieveData("0000" + i);
                        model = (new DataSource("0000" + i)).getMiaoShu();
                    }

                    // XAxis.ItemsSource = data;
                    if (miaoShu == null)
                    {
                        miaoShu = model.chartMiaoShu;
                    }
                    else
                    {
                        miaoShu = miaoShu + "\n" + model.chartMiaoShu;
                    }

                    this.DataSources.Add(j++, data);
                }
            }

            this.MotionFramework.DataSources            = this.DataSources;
            wheateZhiLiangTeXingHeader.miaoShu.Document = convertToBox.convertStringToFlowDocument(miaoShu);
        }