Exemplo n.º 1
0
        public WorldView()
        {
            penGrid1 = new Pen(Color.Gray, 3);
            penGrid2 = new Pen(Color.Gray, 1);
            penAngle = new Pen(Color.Black, 7);
            penRadar = new Pen(Color.Green, 9);

            brushRobot = new SolidBrush(Color.Gray);

            viewPort = new ViewPort(-1, 4, -2, 2);

            InitializeComponent();
            updateTimer = new Timer();
            updateTimer.Interval = 100;
            updateTimer.Tick += new EventHandler(updateTimer_Tick);
            updateTimer.Enabled = true;
        }
Exemplo n.º 2
0
        public WorldView()
        {
            penGrid1 = new Pen(Color.Gray, 3);
            penGrid0 = new Pen(Color.Gray, 1);
            penGrid2 = new Pen(Color.Gray, 2);
            penAngle = new Pen(Color.Black, 7);
            penRadar = new Pen(Color.Green, 9);

            brushRobot = new SolidBrush(Color.Gray);

            viewPort = new ViewPort(-1, 4, -2, 2);

            InitializeComponent();

            System.Threading.Timer t = new System.Threading.Timer(t_Tick, null, 200, 200);

            /*Timer t = new Timer();
            t.Interval = 100;
            t.Tick +=new EventHandler(t_Tick);
            t.Enabled = true;*/
        }
Exemplo n.º 3
0
 public FormWorldView(int xMin, int yMin, int xMax, int yMax)
 {
     InitializeComponent();
     ViewPort p = new ViewPort(xMin, xMax, yMin, yMax);
     this.ViewPort = p;
 }