public FormWorldControl() { InitializeComponent(); World.Robot = new Robot(); if (!Constants.IsWinCE) { //World.ObstacleMap = new ObstacleMap(RobotUI.Properties.Resource.ObstacleMap1, -1.25f, 1.25f, -2.75f, -.25f); World.ObstacleMap = new ObstacleMap(RobotUI.Properties.Resource.ObstacleMap1, -3,3,-1,5); } // WorldView erstellen und anzeigen FormWorldView fww = new FormWorldView(); fww.ViewPort = new ViewPort(-3,3,-1,5); fww.Show(); // FormWorldControl in die obere, linke Ecke setzen #if !WindowsCE this.StartPosition = FormStartPosition.Manual; fww.StartPosition = FormStartPosition.Manual; #endif Location = new Point(0, 0); int width = Math.Min(Screen.PrimaryScreen.WorkingArea.Height, Screen.PrimaryScreen.WorkingArea.Width - Width); fww.Width = width; fww.ClientSize = new Size(fww.ClientSize.Width, fww.ClientSize.Width); fww.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - fww.Width, 0); driveView1.Drive = World.Robot.Drive; runLineView1.StartClicked += RunLineView1OnStartClicked; runTurnView1.StartClicked += RunTurnView1OnStartClicked; runArcView1.StartClicked += RunArcView1OnStartClicked; }
public FormWorldControl() { InitializeComponent(); World.Robot = new Robot(); if (!Constants.IsWinCE) { //World.ObstacleMap = new ObstacleMap(RobotUI.Properties.Resource.ObstacleMap1, -1.25f, 1.25f, -2.75f, -.25f); World.ObstacleMap = new ObstacleMap(RobotUI.Properties.Resource.ObstacleMap1, -3, 3, -1, 5); } // WorldView erstellen und anzeigen FormWorldView fww = new FormWorldView(); fww.ViewPort = new ViewPort(-3, 3, -1, 5); fww.Show(); // FormWorldControl in die obere, linke Ecke setzen #if !WindowsCE this.StartPosition = FormStartPosition.Manual; fww.StartPosition = FormStartPosition.Manual; #endif Location = new Point(0, 0); int width = Math.Min(Screen.PrimaryScreen.WorkingArea.Height, Screen.PrimaryScreen.WorkingArea.Width - Width); fww.Width = width; fww.ClientSize = new Size(fww.ClientSize.Width, fww.ClientSize.Width); fww.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - fww.Width, 0); driveView1.Drive = World.Robot.Drive; runLineView1.StartClicked += RunLineView1OnStartClicked; runTurnView1.StartClicked += RunTurnView1OnStartClicked; runArcView1.StartClicked += RunArcView1OnStartClicked; }
public FormWorldControl() { InitializeComponent(); World.Robot = new Robot(); if (!Constants.IsWinCE) { upDownMap.ValueChanged += upDownMap_ValueChanged; upDownMap_ValueChanged(null, null); upDownMap.Visible = true; label1.Visible = true; } // WorldView erstellen und anzeigen fww = new FormWorldView(); fww.ViewPort = new ViewPort(xMin, xMax, yMin, yMax); fww.Show(); // FormWorldControl in die obere, linke Ecke setzen #if !WindowsCE this.StartPosition = FormStartPosition.Manual; fww.StartPosition = FormStartPosition.Manual; #endif Location = new Point(0, 0); int width = Math.Min(Screen.PrimaryScreen.WorkingArea.Height, Screen.PrimaryScreen.WorkingArea.Width - Width); fww.Width = width; fww.ClientSize = new Size(fww.ClientSize.Width, fww.ClientSize.Width); fww.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - fww.Width, 0); driveView1.Drive = World.Robot.Drive; consoleView1.RobotConsole = World.Robot.RobotConsole; World.Robot.RobotConsole[Switches.Switch1].SwitchStateChanged += OnSwitchStateChanged; World.Robot.RobotConsole[Switches.Switch2].SwitchStateChanged += MakeImageSwitchStateChanged; World.Robot.RobotConsole[Switches.Switch3].SwitchStateChanged += ResetSwitchStateChanged; driveView1.buttonReset.Click += ButtonResetOnClick; }