コード例 #1
0
ファイル: HostTest.cs プロジェクト: tkram01/see3po
 public void isConnectedTest()
 {
     Host target = new Host(new EmptyUI()); // TODO: Initialize to an appropriate value
     bool expected = false; // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.isConnected();
     Assert.AreEqual(expected, actual);
 }
コード例 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public MainForm()
        {
            InitializeComponent();

            m_host = new See3PO.Host(this);                                            // Create a Host

            m_center = new Point(floorPlanPanel.Width / 2, floorPlanPanel.Height / 2); //find the center of the image

            m_fg = Graphics.FromHwnd(floorPlanPanel.Handle);                           // create a graphics object to draw on the floorplanpanel

            m_scale = 2.0;                                                             // default ppf

            m_callback          = new TimerCallback(DrawScale);                        // I have no idea why we do this, but
            t_DrawFloorDelegate = new DDrawFloor(DrawFloor);                           //it's necessary for the drawscale thread

            m_fpState = fpState.START;                                                 // Set the fpState to none, since nothing has been done
            Click_ConnectMenuItem(this, null);
        }
コード例 #3
0
ファイル: HostTest.cs プロジェクト: tkram01/see3po
        public void RequestImageTest()
        {
            Host target = new Host(new EmptyUI()); // TODO: Initialize to an appropriate value
            target.ToggleConnection();
            bool expected = true; // TODO: Initialize to an appropriate value
            bool actual;

            //We should manually click "Connections->Connect to Remote Brain" in 5 secs
            System.Threading.Thread.Sleep(5000);

            actual = target.isConnected();

            //request image
            target.RequestImage();
            //give it some time to receive image
            System.Threading.Thread.Sleep(3000);

            Assert.AreEqual(expected, actual);

            //disconnect
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: tkram01/see3po
        private Timer t_DrawTimer; // A timer for drawing the line when setting scale

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Constructor
        /// </summary>
        public MainForm()
        {
            InitializeComponent();

            m_host = new See3PO.Host(this);                                     // Create a Host

            m_center = new Point(floorPlanPanel.Width / 2, floorPlanPanel.Height / 2); //find the center of the image

            m_fg = Graphics.FromHwnd(floorPlanPanel.Handle);                    // create a graphics object to draw on the floorplanpanel

            m_scale = 2.0;                                                      // default ppf

            m_callback = new TimerCallback(DrawScale);                          // I have no idea why we do this, but
            t_DrawFloorDelegate = new DDrawFloor(DrawFloor);                    //it's necessary for the drawscale thread

            m_fpState = fpState.START;                                           // Set the fpState to none, since nothing has been done
            Click_ConnectMenuItem(this, null);
        }