Пример #1
0
 void InitChartTestList()
 {
     ChartTestList.Clear();
     foreach (WriteableBitmap tb in TargetWindow.PhotoList.PhotoList)
     {
         ChartTestList.Add(tb, TargetWindow.getChartTest(tb));
     }
 }
Пример #2
0
        public void Clear()
        {
            if (TargetWindow == null)
            {
                return;
            }
            TargetWindow.PIToolbar.setTarget(null);
            TargetWindow.PhotoList.TargetControl  = null;
            TargetWindow.PhotoList.photoOperated -= new UIControl.PhotoOperation(PhotoList_photoModifyed);

            TargetWindow.PEToolbar.setChartControl(null);//设置图版和工具栏的关联
            TargetWindow.PEToolbar.saveChartTestResult = null;
            TargetWindow.PEToolbar.setTestAll(null);
            TargetWindow.ChartPhoto.InitTest(null);

            foreach (KeyValuePair <WriteableBitmap, AbstractTestChart> kvp in ChartTestList)
            {
                kvp.Value.Clear();
            }
            ChartTestList.Clear();
        }
Пример #3
0
 void ProcRemove(WriteableBitmap b)
 {
     if (ChartTestList.ContainsKey(b))
     {
         ChartTestList[b].Clear();
         List <IParameter> r = ParameterList.Where(v => v.TestChart == ChartTestList[b]).ToList();
         foreach (IParameter ip in r)
         {
             ParameterList.Remove(ip);
         }
         r.Clear();
         ChartTestList.Remove(b);
     }
     if (ChartTestList.Count > 0)
     {
         ProcSelect(ChartTestList.ElementAt(0).Key);//删除以后选择第一个
     }
     else
     {
         ProcSelect(null);//删光了
     }
 }
Пример #4
0
        void ProcSelect(WriteableBitmap b)
        {
            //if (b == null)
            //{
            //    TargetWindow.ShowTestResult();
            //}
            //else
            //{
            TargetWindow.ShowTestResult(b);
            TargetWindow.ChartPhoto.setPhoto(b);
            if ((b != null) && (ChartTestList.ContainsKey(b)))
            {
                CurrentChart = ChartTestList[b];

                if (TargetWindow.ChartCorrectToolbar != null)
                {
                    TargetWindow.ChartCorrectToolbar.Init(ChartTestList[b], TargetWindow.ChartPhoto);    //初始化管理按钮
                }
            }
            else
            {
                CurrentChart = null;
            }
        }
Пример #5
0
        void ProcAdd(WriteableBitmap b)
        {
            AbstractTestChart xt = TargetWindow.getChartTest(b);

            ChartTestList.Add(b, xt);
        }