Beispiel #1
0
 public void SetLocations()
 {
     this.LocationX = RobotIcon.Location.X / March.stepWidth;
     this.LocationY = RobotIcon.Location.Y / March.stepHeight;
     foreach (Control c in RobotIcon.Controls)
     {
         if (c.Tag != null)
         {
             if (c.Tag.ToString() == "X")
             {
                 c.Text = LocationX.ToString();
             }
             if (c.Tag.ToString() == "Y")
             {
                 c.Text = LocationY.ToString();
             }
             if (c.Tag.ToString() == "Pers")
             {
                 c.Text = Perspective == 0 ? "W" : (Perspective == 90 ? "S" : (Perspective == 180 ? "E" : "N"));
             }
         }
     }
 }
 public string GetOutputLocation()
 {
     return(LocationX.ToString() + ' ' + LocationY.ToString() + ' ' + OppWay);
 }
Beispiel #3
0
        public string getInsertSQL()
        {
            String sqlString = "INSERT into board_param (name,controltype,linkkind,linkindex,locationx,locationy,text,basecolor,visible,editable,level,parentid)" +
                               "VALUES('{0}', '{1}', '{2}', {3}, {4}, {5}, '{6}', '{7}', '{8}', '{9}', {10}, {11}) ";

            return(String.Format(sqlString, ControlName, ControlType, LinkKind, LinkIndex.ToString(), LocationX.ToString(), LocationY.ToString(), ShowText, BaseColor, Visible, Editable, level.ToString(), ParentId.ToString()));
        }
Beispiel #4
0
        public string getUpdateSQL()
        {
            String sqlString = "update board_param set linkkind = '{0}',linkindex = {1},locationx = {2},locationy = {3},text = '{4}',basecolor = '{5}',visible = '{6}'," +
                               "editable = '{7}',level = {8},parentid = {9} where id = {10}";

            return(String.Format(sqlString, LinkKind, LinkIndex.ToString(), LocationX.ToString(), LocationY.ToString(), ShowText, BaseColor, Visible, Editable, level.ToString(), ParentId.ToString(), id.ToString()));
        }