private void trackBar_Scroll(object sender, EventArgs e)
        {
            TrackBar tb   = (TrackBar)sender;
            DOFDesc  desc = (DOFDesc)((object[])tb.Tag)[0];
            Label    lb   = (Label)((object[])tb.Tag)[1];

            lb.Text = (tb.Value / desc.Scale).ToString();
            _fromWinformPort.Post(new FromWinformMsg(FromWinformMsg.MsgEnum.MoveJoint, null, new MoveJoint(tb.Value / desc.Scale, desc.Name)));
        }
Example #2
0
 void _cameraImage_MouseMove(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         _fromWinformPort.Post(new FromWinformMsg(FromWinformMsg.MsgEnum.Drag, null, new Vector2(e.X - _mouseDown.X, e.Y - _mouseDown.Y)));
         _mouseDown = new Vector2(e.X, e.Y);
     }
     else if (e.Button == MouseButtons.Right)
     {
         _fromWinformPort.Post(new FromWinformMsg(FromWinformMsg.MsgEnum.Zoom, null, new Vector2(e.X - _mouseDown.X, e.Y - _mouseDown.Y)));
         _mouseDown = new Vector2(e.X, e.Y);
     }
 }
Example #3
0
        public SimulatedRobotArmForm(FromWinformEvents EventsPort)
        {
            _fromWinformPort = EventsPort;

            InitializeComponent();

            _fromWinformPort.Post(new FromWinformMsg(FromWinformMsg.MsgEnum.Loaded, null, this));
        }
        public SimulatedBipedMoverUI(FromWinformEvents EventsPort)
        {
            _fromWinformPort = EventsPort;

            InitializeComponent();

            _fromWinformPort.Post(new FromWinformMsg(FromWinformMsg.MsgEnum.Loaded, null, this));
        }
Example #5
0
        public EmbeddedSimUI(FromWinformEvents EventsPort)
        {
            _fromWinformPort = EventsPort;

            InitializeComponent();
            _cameraImage.MouseMove += new MouseEventHandler(_cameraImage_MouseMove);
            _cameraImage.MouseDown += new MouseEventHandler(_cameraImage_MouseDown);
            _fromWinformPort.Post(new FromWinformMsg(FromWinformMsg.MsgEnum.Loaded, null, this));
        }
        public ControlPanel(FromWinformEvents EventsPort)
        {
            _fromWinformPort = EventsPort;

            InitializeComponent();
            _bodyweight = float.Parse(bw.Text);
            _uleglength = float.Parse(ull.Text);
            _lleglength = float.Parse(lll.Text);
            _ulegweight = float.Parse(ulw.Text);
            _llegweight = float.Parse(llw.Text);
            _height     = float.Parse(H.Text);
            _width      = float.Parse(W.Text);
            _length     = float.Parse(L.Text);
            _hipradius  = float.Parse(R1.Text);
            _kneeradius = float.Parse(R2.Text);
            _fromWinformPort.Post(new FromWinformMsg(FromWinformMsg.MsgEnum.Loaded, null, this));
        }
        public ControlPanel(FromWinformEvents EventsPort)
        {
            _fromWinformPort = EventsPort;

            InitializeComponent();
            _bodyweight = float.Parse(bw.Text);
            _uleglength = float.Parse(ull.Text);
            _lleglength = float.Parse(lll.Text);
            _ulegweight = float.Parse(ulw.Text);
            _llegweight = float.Parse(llw.Text);
            _height = float.Parse(H.Text);
            _width = float.Parse(W.Text);
            _length = float.Parse(L.Text);
            _hipradius = float.Parse(R1.Text);
            _kneeradius = float.Parse(R2.Text);
            _fromWinformPort.Post(new FromWinformMsg(FromWinformMsg.MsgEnum.Loaded, null, this));
        }
 private void _resetButton_Click(object sender, EventArgs e)
 {
     _interval = float.Parse(interval.Text);
     _period   = float.Parse(period.Text);
     _velocity = float.Parse(v.Text);
     _fromWinformPort.Post(new FromWinformMsg(FromWinformMsg.MsgEnum.Set, null));
 }