Example #1
0
 public Robot AddRobot(string owner)
 {
     Update();
     Robot robot = new Robot(this, owner);
     robots.Add(robot);
     return robot;
 }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RobotProperties.Handle = int.Parse(Request.QueryString["robot"]);
            robot = Robot.AllRobots.GetRobot(RobotProperties.Handle);

            bool myRobot = Context.User.Identity.Name == robot.Owner;
            ButtonName.Enabled = myRobot;
            ButtonDelete.Enabled = myRobot;

            if (!IsPostBack)
                TextBoxName.Text = robot.ToString();
        }
Example #3
0
        public MainForm()
        {
            InitializeComponent();

            robot = arena.AddRobot("");
            propertyGridRobot.SelectedObject = robot;

            scalingPanelArena.IncludePoint(-1, -1);
            scalingPanelArena.IncludePoint(1, 1);

            robot.SpeedDemand = 1;
            robot.SteerDemand = 0.5;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            robot = Robot.AllRobots.GetRobot(Handle);

            bool myRobot = Context.User.Identity.Name == robot.Owner;
            TextBoxSpeedDemand.Enabled = myRobot;
            TextBoxSteerDemand.Enabled = myRobot;
            TextBoxColor.Enabled = myRobot;

            if (!IsPostBack)
            {
                TextBoxSpeedDemand.Text = robot.SpeedDemand.ToString();
                TextBoxSteerDemand.Text = robot.SteerDemand.ToString();
                TextBoxColor.Text = robot.Color.ToParseString();

                HyperLinkArena.Text = robot.Arena.ToString();
                HyperLinkArena.NavigateUrl = string.Format("Arena.aspx?arena={0}", robot.Arena.Handle);

                TimerRobot_Tick(sender, e);
            }
        }
 public RobotProperties(Robot robot)
 {
     this.robot = robot;
 }
Example #6
0
 public void Delete(Robot robot)
 {
     robots.Remove(robot);
     Robot.AllRobots.RemoveRobot(robot);
 }