public void Edit_SaveAllParam()
 {
     if (ParamList.Count != 0)
     {
         ShouldPadDAO dataBaseDAO = new ShouldPadDAO();
         foreach (Tablet Tab in ParamList)
         {
             dataBaseDAO.SetDataBaseValue((ShouldPadDataEnum)Convert.ToInt16(Tab.Tag), Tab.Content);
         }
     }
 }
示例#2
0
        public void SetShouldPadPoints(Point[] shapePoints)
        {
            String shapePointInfos = String.Empty;

            for (int i = 0; i < shapePoints.Length; i++)
            {
                shapePointInfos += String.Format("{0} {1},", shapePoints[i].X, shapePoints[i].Y);
            }
            shapePointInfos = shapePointInfos.TrimEnd(',');
            ShouldPadDAO shouldPadDAO = new ShouldPadDAO();

            shouldPadDAO.SetDataBaseValue(ShouldPadDataEnum.ShapePoints, shapePointInfos);
        }
示例#3
0
        private void InitParamButtons()
        {
            //读Xml数据
            ShouldPadDAO PadDAO = new ShouldPadDAO();

            foreach (Tablet Tab in EditManager.ParamList)
            {
                if (Tab.Tag.ToString() == "6")
                {
                    Tab.Val_Max = Convert.ToInt32(tlPadLength.Content) / 2;
                }
                Tab.Content = PadDAO.GetDataBaseValue(int.Parse(Tab.Tag.ToString()));
            }
            tlPadHalf.SetValRange(20, Convert.ToInt32(tlPadLength.Content) / 2);
            PadDAO.SetDataBaseValue((ShouldPadDataEnum)Convert.ToInt16(tlPadHalf.Tag), tlPadHalf.Content);
        }