private void btnClosed_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     this.Close(sender, e);
     myDemo = null;
 }
        void GetChartDemo(ChartDemo demo)
        {
            #region 清空集合

            #region 对比集合
            DateResult1.Clear();
            DateResult2.Clear();
            DateResult3.Clear();
            DateResult4.Clear();
            DateResult5.Clear();
            DateResult6.Clear();
            DateResult7.Clear();
            DateResult8.Clear();
            #endregion

            #region 获取参与力量
            CkGuided_ParticipationStrengthList.Clear();
            CkFree_ParticipationStrengthList.Clear();
            CkInitiated_ParticipationStrengthList.Clear();
            CkFreeConstantResistance_ParticipationStrengthList.Clear();
            CkFreeCounterWeight_ParticipationStrengthList.Clear();
            CkIsotonicA_ParticipationStrengthList.Clear();
            CkIsotonicB_ParticipationStrengthList.Clear();
            CkSokoban_ParticipationStrengthList.Clear();

            #endregion

            #region 活动范围
            CkGuided_RangeList.Clear();
            CkFree_RangeList.Clear();
            CkInitiated_RangeList.Clear();
            CkFreeConstantResistance_RangeList.Clear();
            CkFreeCounterWeight_RangeList.Clear();
            CkIsotonicA_RangeList.Clear();
            CkIsotonicB_RangeList.Clear();
            CkSokoban_RangeList.Clear();
            #endregion

            #endregion

            #region 数据绑定
            DtAllResult = GetAllTrainResult(ModuleConstant.PatientId, demo.ExItemId, Convert.ToDateTime(demo.StartTime), Convert.ToDateTime(demo.EndTime));

            #region 获得总集合
            var obj = (from p in DtAllResult.AsEnumerable()
                       group p by new { t1 = p.Field<string>("ExerciseDate") } into g
                       select new
                       {
                           g.Key.t1
                       });

            foreach (var item in obj)
            {
                ModeResultDemo d1 = new ModeResultDemo();
                d1.Key = item.t1.ToString();
                d1.Value = "0";
                d1.Value2 = "0";
                ModeResultDemo d2 = new ModeResultDemo();
                d2.Key = item.t1.ToString();
                d2.Value = "0";
                d2.Value2 = "0";
                ModeResultDemo d3 = new ModeResultDemo();
                d3.Key = item.t1.ToString();
                d3.Value = "0";
                d3.Value2 = "0";
                ModeResultDemo d4 = new ModeResultDemo();
                d4.Key = item.t1.ToString();
                d4.Value = "0";
                d4.Value2 = "0";
                ModeResultDemo d5 = new ModeResultDemo();
                d5.Key = item.t1.ToString();
                d5.Value = "0";
                d5.Value2 = "0";
                ModeResultDemo d6 = new ModeResultDemo();
                d6.Key = item.t1.ToString();
                d6.Value = "0";
                d6.Value2 = "0";
                ModeResultDemo d7 = new ModeResultDemo();
                d7.Key = item.t1.ToString();
                d7.Value = "0";
                d7.Value2 = "0";
                ModeResultDemo d8 = new ModeResultDemo();
                d8.Key = item.t1.ToString();
                d8.Value = "0";
                d8.Value2 = "0";
                DateResult1.Add(d1);
                DateResult2.Add(d2);
                DateResult3.Add(d3);
                DateResult4.Add(d4);
                DateResult5.Add(d5);
                DateResult6.Add(d6);
                DateResult7.Add(d7);
                DateResult8.Add(d8);
            }
            #endregion

            #region 被动运动集合
            //获取参与力量
            SetParticipationStrength(DateResult1, CkGuided_ParticipationStrengthList, "1");
            //活动范围
            //SetRange(DateResult1, CkGuided_RangeList, "1");
            Set_Range(DateResult1, CkGuided_RangeList, "1");

            #endregion

            #region 主动运动集合
            //获取参与力量
            SetParticipationStrength(DateResult2, CkFree_ParticipationStrengthList, "2");
            //活动范围
            SetRange(DateResult2, CkFree_RangeList, "2");
            #endregion

            #region 助动运动集合
            //获取参与力量
            SetParticipationStrength(DateResult3, CkInitiated_ParticipationStrengthList, "3");
            //活动范围
            SetRange(DateResult3, CkInitiated_RangeList, "3");

            #endregion

            #region 主动配重块集合
            //获取参与力量
            SetParticipationStrength(DateResult4, CkFreeConstantResistance_ParticipationStrengthList, "4");
            //活动范围
            SetRange(DateResult4, CkFreeConstantResistance_RangeList, "4");

            #endregion

            #region 主动恒阻力集合
            //获取参与力量
            SetParticipationStrength(DateResult5, CkFreeCounterWeight_ParticipationStrengthList, "5");
            //活动范围
            SetRange(DateResult5, CkFreeCounterWeight_RangeList, "5");

            #endregion

            #region 等长A集合
            //获取参与力量
            SetParticipationStrength(DateResult6, CkIsotonicA_ParticipationStrengthList, "6");
            //活动范围
            SetRange(DateResult6, CkIsotonicA_RangeList, "6");

            #endregion

            #region 等长B集合
            //获取参与力量
            SetParticipationStrength(DateResult7, CkIsotonicB_ParticipationStrengthList, "7");
            //活动范围
            SetRange(DateResult7, CkIsotonicB_RangeList, "7");

            #endregion

            #region 推箱子集合
            //获取参与力量
            SetParticipationStrength(DateResult8, CkSokoban_ParticipationStrengthList, "8");
            //活动范围
            SetRange(DateResult8, CkSokoban_RangeList, "8");
            #endregion

            #endregion
        }
        public ChartNodesControl(ChartDemo item)
        {
            InitializeComponent();

            if (item != null)
            {
                myDemo = item;
                this.txExitemName.Text = myDemo.ExerciseItemName;
                GetChartDemo(myDemo);
            }
            this.ColumnScroll.ScrollToHome();
            Column(Mid, ColumnScroll);
        }