コード例 #1
0
ファイル: ActUIElement.cs プロジェクト: ramizil/Ginger
 //Pack
 public void GetLocateByXYValues(out double X, out double Y)
 {
     // split the Value, do not create new param
     // all locate value need to be combined into string
     if (string.IsNullOrEmpty(ElementLocateValue))
     {
         X = 0;
         Y = 0;
     }
     else
     {
         string[] xy = ElementLocateValue.Split(',');
         if ((xy != null) && (xy.Count() > 1))
         {
             if (!double.TryParse(xy[0].Split('=')[1], out X))
             {
                 X = 0;
             }
             if (!double.TryParse(xy[1].Split('=')[1], out Y))
             {
                 Y = 0;
             }
         }
         else
         {
             X = 0;
             Y = 0;
         }
     }
 }
コード例 #2
0
ファイル: ActUIElement.cs プロジェクト: itaynidam/Ginger
        //Pack
        public void GetLocateByXYValues(out double X, out double Y)
        {
            // split the Value, do not create new param
            // all locate value need to be combined into string
            if (string.IsNullOrEmpty(ElementLocateValue))
            {
                X = 0;
                Y = 0;
            }
            else
            {
                string[] xy = ElementLocateValue.Split(',');

                X = int.Parse(xy[0].Split('=')[1]);
                Y = int.Parse(xy[1].Split('=')[1]);
            }
        }