public Create_Edit_Session_Control()
        {
            InitializeComponent();

            //Intercept the mouse wheel
            flowLayoutPanelTasks.MouseWheel += new MouseEventHandler(flowLayoutPanelTasks_MouseWheel);

            //A slight delay is required after the mouse wheel event
            _mouseWheelGuiUpdateTimer.Interval = 50;
            _mouseWheelGuiUpdateTimer.Tick    += new EventHandler(_mouseWheelGuiUpdateTimer_Tick);

            //timer to delay selecting a task to allow time for the panel to resize
            _delayedSelectTaskTimer.Interval = 300;
            _delayedSelectTaskTimer.Tick    += new EventHandler(_delayedSelectTaskTimer_Tick);



            //Fill out combobox
            foreach (Task.TaskTypeType type in Enum.GetValues(typeof(Task.TaskTypeType)))
            {
                comboBoxType.Items.Add(Task.GetEnumDescription(type));
            }
            comboBoxType.SelectedIndex = 0;
            foreach (Task.DistanceRangeType type in Enum.GetValues(typeof(Task.DistanceRangeType)))
            {
                comboBoxDistance.Items.Add(Task.GetEnumDescription(type));
            }
            comboBoxDistance.SelectedIndex = 0;
            foreach (Task.NumberOfObjectsRangeType type in Enum.GetValues(typeof(Task.NumberOfObjectsRangeType)))
            {
                comboBoxNumObjects.Items.Add(Task.GetEnumDescription(type));
            }
            comboBoxNumObjects.SelectedIndex = 0;

            //connect to the server via remoting
            if (TCPProcessor.ConnectedToServer)
            {
                _remote_Data_Manager = (Task_Remote_DataManager)Activator.GetObject(typeof(Task_Remote_DataManager), TCPProcessor.BuildServerRemotingString(8005, "TaskRemoteDataManagerConnection"));
            }

            //Setup the detailed task preview
            task_Detailed_Preview_Control.Visible = false;
            task_Detailed_Preview_Control.Dock    = DockStyle.Fill;
            this.Controls.Add(task_Detailed_Preview_Control);
        }
        public Patient_Screen()
        {
            InitializeComponent();

            if (TCPProcessor.ConnectedToServer)
            {
                _remote_DataManager = (Patient_Remote_DataManager)Activator.GetObject(typeof(Patient_Remote_DataManager), TCPProcessor.BuildServerRemotingString(8005, "PatientRemoteDataManagerConnection"));
            }

            _sessionSorter = new ListViewColumnSorter();
            this.listViewSessions.ListViewItemSorter = _sessionSorter;

            listViewSessions.Groups.Add(listViewGroup_New);
            listViewSessions.Groups.Add(listViewGroup_Scheduled);
            listViewSessions.Groups.Add(listViewGroup_Completed);

            _runReviewButtonTimer.Interval = 100;
            _runReviewButtonTimer.Tick    += new EventHandler(_runReviewButtonTimer_Tick);
            _runReviewButtonTimer.Start();

            Create_Edit_Session_Control.Cancel                += new Create_Edit_Session_Control.CancelEventHandler(Create_Edit_Session_Control_Cancel);
            Create_Edit_Session_Control.TaskSelect            += new Create_Edit_Session_Control.TaskSelectEventHandler(Create_Edit_Session_Control_TaskSelect);
            Create_Edit_Session_Control.SetProgressBarValue   += new Create_Edit_Session_Control.SetProgressBarValueEventHandler(Create_Edit_Session_Control_SetProgressBarValue);
            Create_Edit_Session_Control.SelectionStateChanged += new Create_Edit_Session_Control.SelectionStateChangedEventHandler(Create_Edit_Session_Control_SelectionStateChanged);
            Create_Edit_Session_Control.CreateNewTask         += new Create_Edit_Session_Control.CreateNewTaskEventHandler(Create_Edit_Session_Control_CreateNewTask);
        }
 private void buttonUpdate_Click(object sender, EventArgs e)
 {
     if (TCPProcessor.ConnectedToServer)
     {
         _remote_Data_Manager = (Task_Remote_DataManager)Activator.GetObject(typeof(Task_Remote_DataManager), TCPProcessor.BuildServerRemotingString(8005, "TaskRemoteDataManagerConnection"));
         _remote_Data_Manager.ClientRequestTaskList();
         UpdateListOfTasks();
         GenerateTaskControls();
         OnSelectionStateChanged(false);
     }
 }
Example #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);
        }
Example #5
0
        public Run_Review_Session_Form()
        {
            InitializeComponent();
            if (TCPProcessor.ConnectedToServer)
            {
                _remote_DataManager = (Patient_Remote_DataManager)Activator.GetObject(typeof(Patient_Remote_DataManager), TCPProcessor.BuildServerRemotingString(8005, "PatientRemoteDataManagerConnection"));
            }

            //Register for events from the server
            TCPProcessor.AvatarSpeedChangedEvent         += new TCPProcessor.AvatarSpeedChangedHandler(TCPProcessor_AvatarSpeedChangedEvent);
            TCPProcessor.FilteredMarkerListReceivedEvent += new TCPProcessor.FilteredMarkerListReceivedHandler(TCPProcessor_FilteredMarkerListReceivedEvent);
            TCPProcessor.TrackableListReceivedEvent      += new TCPProcessor.TrackableListReceivedHandler(TCPProcessor_TrackableListReceivedEvent);
            TCPProcessor.JointListReceivedEvent          += new TCPProcessor.JointListReceivedHandler(TCPProcessor_JointListReceivedEvent);


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

            StroMoHab_Task_Designer.Externals.LoadVisualiser(m_objectsToDraw);

            _delayedWindowSetup.Interval = 1500;
            _delayedWindowSetup.Tick    += new EventHandler(_delayedWindowSetup_Tick);
            _delayedWindowSetup.Start();
            this.TopMost = true;

            _waitForVisualiser.Interval = 1000;
            _waitForVisualiser.Start();
            _waitForVisualiser.Tick += new EventHandler(_waitForVisualiser_Tick);

            _guiUpdate.Interval = 100;
            _guiUpdate.Tick    += new EventHandler(_guiUpdate_Tick);
            _guiUpdate.Start();
        }
        public Clinician_Login_Screen()
        {
            InitializeComponent();

            AssemblyName assemName = Assembly.GetExecutingAssembly().GetName();
            string       version   = assemName.Version.ToString();

            string statusMsg = "";

#if (DEBUG)
            statusMsg = "Running in DEBUG Mode!\n";
#endif
            statusMsg = statusMsg + "StroMoHab Client Version : " + version + "\n";
            if (TCPProcessor.ConnectedToServer)
            {
                labelServer.Text = statusMsg + "Connected to the StroMoHab Server - IP Address : " + TCPProcessor.ServerIPAddress;
            }
            else
            {
                labelServer.Text = statusMsg + "Not Connected to the StroMoHab Server!\nFunctionality will be severely limited!";
                labelServer.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            }


            //login service
            if (TCPProcessor.ConnectedToServer)
            {
                _remote_Data_Manager = (Clinician_Remote_DateManager)Activator.GetObject(typeof(Clinician_Remote_DateManager), TCPProcessor.BuildServerRemotingString(8005, "ClinicianRemoteDataManagerConnection"));
            }
        }
        public Patient_Records_Screen()
        {
            InitializeComponent();

            if (TCPProcessor.ConnectedToServer)
            {
                _Remote_Data_Manager = (Patient_Remote_DataManager)Activator.GetObject(typeof(Patient_Remote_DataManager), TCPProcessor.BuildServerRemotingString(8005, "PatientRemoteDataManagerConnection"));
            }



            //Setup the sorter
            _patientSorter = new ListViewColumnSorter();
            this.listViewPatients.ListViewItemSorter = _patientSorter;

            listViewPatients.Groups.Add(listViewGroup_New);
            listViewPatients.Groups.Add(listViewGroup_Patients);


            //Setup background worker events
            backgroundWorkerSearcher.DoWork             += new DoWorkEventHandler(backgroundWorkerSearcher_DoWork);
            backgroundWorkerSearcher.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorkerSearcher_RunWorkerCompleted);
            backgroundWorkerLoader.DoWork             += new DoWorkEventHandler(backgroundWorkerLoader_DoWork);
            backgroundWorkerLoader.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorkerLoader_RunWorkerCompleted);

            //Request an updated patient list and then retreive it
            _Remote_Data_Manager.ClientRequestUpdatedPatientList();
            //Load in the patient data into the open patient list view
            LoadInPatientData();
        }
Example #8
0
        public Clinician_Records_Screen()
        {
            InitializeComponent();

            listViewClinicians.Groups.Add(listViewGroup_New);
            listViewClinicians.Groups.Add(listViewGroup_Special);
            listViewClinicians.Groups.Add(listViewGroup_Clinicians);

            if (TCPProcessor.ConnectedToServer)
            {
                _remote_DataManager = (Clinician_Remote_DateManager)Activator.GetObject(typeof(Clinician_Remote_DateManager), TCPProcessor.BuildServerRemotingString(8005, "ClinicianRemoteDataManagerConnection"));
            }
        }