Example #1
0
 public LoginForm()
 {
     InitializeComponent();
     this.client          = new DoctorClient();
     this.client.OnLogin += Client_OnLogin;
     this.AcceptButton    = this.LoginButton;
 }
Example #2
0
        public PatientListViewUserControl(DoctorClient client, string user)
        {
            InitializeComponent();

            this.Anchor = AnchorStyles.Left | AnchorStyles.Right;

            this.client = client;
            this.client.OnBikeDataReceived += Client_OnBikeDataReceived;

            this.selectedUser = user;
            this.UserControlNameLabel.Text = user;

            // repositioning to center
            this.UserControlNameLabel.Location = new Point((this.Width / 2) - (this.UserControlNameLabel.Width / 2), this.UserControlNameLabel.Location.Y);
            this.label1.Location = new Point((this.Width / 2) - (this.label1.Width / 2), this.label1.Location.Y);
            this.label3.Location = new Point((this.Width / 2) - (this.label3.Width / 2), this.label3.Location.Y);
            this.labelCurrentHearthbeatValue.Location = new Point((this.Width / 2) - (this.labelCurrentHearthbeatValue.Width / 2), this.labelCurrentHearthbeatValue.Location.Y);

            this.Click += this.PatientListViewUserControl_Click;

            foreach (Control control in this.Controls.OfType <Control>().Where(c => c != this.EmergencyShutdownButton))
            {
                control.Click += this.PatientListViewUserControl_Click;
            }
        }
        public LiveSession(DoctorClient client, string selected)
        {
            InitializeComponent();
            this.client = client;
            this.client.OnChatReceived                += Client_OnChatReceived;
            this.client.OnBikeDataReceived            += Client_OnBikeDataReceived;
            this.client.OnSessionStateReceived        += Client_OnSessionStateReceived;
            this.client.OnSessionStateMessageReceived += Client_OnSessionStateMessageReceived;
            this.client.OnBikeStateChanged            += Client_OnBikeStateChanged;
            this.client.OnEmergencyResponse           += Client_OnEmergencyResponse;
            this.client.OnClientListReceived          += Client_OnClientListReceived;
            this.selectedUser = selected;
            Patient.Text     += selected;

            this.speedGraph.MinValue = -1;
            this.speedGraph.MaxValue = 41;

            this.heartbeatGraph.MinValue = 40;
            this.heartbeatGraph.MaxValue = 240;

            this.resistanceGraph.MinValue = -1;
            this.resistanceGraph.MaxValue = 100;

            this.powerGraph.MinValue = -1;
            this.powerGraph.MaxValue = 500;
        }
Example #4
0
        public HomePageForm(DoctorClient client)
        {
            this.client = client;
            this.client.OnClientListReceived += Client_OnClientListReceived;
            this.client.OnEmergencyResponse  += Client_OnEmergencyResponse;
            InitializeComponent();

            this.client.RequestClientList();

            this.PatientTableLayoutPanel.AutoScroll = false;
            this.PatientTableLayoutPanel.HorizontalScroll.Enabled = false;
            this.PatientTableLayoutPanel.HorizontalScroll.Visible = false;
            this.PatientTableLayoutPanel.AutoScroll = true;
        }
Example #5
0
        public HistoryForm(DoctorClient client, string selected)
        {
            InitializeComponent();

            this.selectedUser = selected;
            this.client       = client;

            this.trainingDataDataGridView.AllowUserToAddRows = false;
            this.trainingDataDataGridView.ColumnCount        = 7;

            this.trainingDataDataGridView.Columns[0].Name = "Speed";
            this.trainingDataDataGridView.Columns[1].Name = "Heartbeat";
            this.trainingDataDataGridView.Columns[2].Name = "Elapsed Time";
            this.trainingDataDataGridView.Columns[3].Name = "Distance Traveled";
            this.trainingDataDataGridView.Columns[4].Name = "Power";
            this.trainingDataDataGridView.Columns[5].Name = "Resistance";
            this.trainingDataDataGridView.Columns[6].Name = "Timestamp";

            this.client.OnTrainingListReceived += Client_OnTrainingListReceived;
            this.client.OnTrainingDataReceived += Client_OnTrainingDataReceived;

            this.trainingListView.SelectedIndexChanged += TrainingListView_SelectedIndexChanged;
        }