Пример #1
0
        private void ConnectAndStartSession()
        {
            ipAddress  = IPAddress.Parse("144.32.137.126");
            portNumber = int.Parse("8001");
            IPEndPoint ipEndPoint = new IPEndPoint(ipAddress, portNumber);

            try
            {
                TCPProcessor.ConnectToServer(ipEndPoint);
            }
            catch
            {
                MessageBox.Show("Connection to server failed");
            }

            if (ipAddress != null)
            {
                SendMCECommand.StartCameras();
            }
            else
            {
                MessageBox.Show("Connection to server failed");
            }

            btnStartTreadmill.Enabled = true;
            //nudElevation.Enabled = true;
            nudSpeed.Enabled = true;
            //btnDisengage.Enabled = true;
            btnReset.Enabled      = true;
            btnEndSession.Enabled = true;
        }
Пример #2
0
        /// <summary>
        /// The contructor
        /// </summary>
        public GUI()
        {
            InitializeComponent();

            SendMCECommand.StartCameras();

            //Set screen docks, add and hide them
            clinican_Login_Screen.Dock = DockStyle.Fill;
            this.Controls.Add(clinican_Login_Screen);


            _progressBarHiderTimer.Interval = 500;
            _progressBarHiderTimer.Tick    += new EventHandler(_progressBarHiderTimer_Tick);

            Patient_Screen.HideForm += new Patient_Screen.HideFormEventHandler(Patient_Screen_HideForm);

            //Register for events for screen load and close
            Clinician_Login_Screen.Login       += new Clinician_Login_Screen.LoginEventHandler(Clinician_Login_Screen_Login);
            Patient_Records_Screen.Logout      += new Patient_Records_Screen.LogoutEventHandler(Patient_Records_Screen_Logout);
            Patient_Records_Screen.OpenPatient += new Patient_Records_Screen.OpenPatientEventHandler(Patient_Records_Screen_OpenPatient);
            Patient_Screen.ClosePatient        += new Patient_Screen.ClosePatientEventHandler(Patient_Screen_ClosePatient);
            Clinician_Records_Screen.Logout    += new Clinician_Records_Screen.LogoutEventHandler(Clinician_Records_Screen_Logout);

            //register for events for status bar updates
            Patient_Records_Screen.SetProgressBarValue += new Patient_Records_Screen.SetProgressBarValueEventHandler(Patient_Records_Screen_SetProgressBarValue);
            Patient_Records_Screen.SetStatusLabelValue += new Patient_Records_Screen.SetStatusLabelValueEventHandler(Patient_Records_Screen_SetStatusLabelValue);
            Patient_Screen.SetProgressBarValue         += new Patient_Screen.SetProgressBarValueEventHandler(Patient_Screen_SetProgressBarValue);
            Patient_Screen.SetStatusLabelValue         += new Patient_Screen.SetStatusLabelValueEventHandler(Patient_Screen_SetStatusLabelValue);
        }
Пример #3
0
        private void ConnectAndStartSession()
        {
            TCPProcessor.ManagedConnectToServer();
            SendMCECommand.StartCameras();

            //btnStartTreadmill.Enabled = true;

            nudSpeed.Enabled = true;
        }
Пример #4
0
        /// <summary>
        /// Main Task Designer Form.
        /// </summary>
        public TaskDesigner()
        {
            InitializeComponent();
            TCPProcessor.ManagedConnectToServer();

            m_objectsToDraw = (StromoLight_RemoteDrawingList.DrawingList)Activator.GetObject(typeof(StromoLight_RemoteDrawingList.DrawingList), "tcp://localhost:8002/TaskDesignerConnection");
            m_prevHeight    = this.numericUpDownObjectHeight.Value;



            SendMCECommand.StartCameras();
            //Set up getting tasks from server
            if (TCPProcessor.ConnectedToServer)
            {
                _remote_DataManager = (Task_Remote_DataManager)Activator.GetObject(typeof(Task_Remote_DataManager), TCPProcessor.BuildServerRemotingString(8005, "TaskRemoteDataManagerConnection"));
            }

            //make the default task
            _defaultTask = new Task();
            Corridor corridor = new Corridor(-1.5f, 0.0f, 4.0f, 1.5f, 6.0f, -500.0f);

            _defaultTask.ObjectList.Add(corridor);
        }
Пример #5
0
 private void Connect()
 {
     TCPProcessor.ManagedConnectToServer();
     SendMCECommand.StartCameras();
 }