Example #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            args = e;
            passer = e.Parameter as InfoPasser;

            // Check to disable any buttons
            List<string> fileNames = passer.currentPatient.getTestFilenames();
            // Check if the file name includes trailsA, trailsB, or Clock and allow button press
            foreach (string name in fileNames)
            {
                if (name.Contains("TRAILS_A"))
                {
                    viewTrailsA.IsEnabled = true;
                }
                else if (name.Contains("TRAILS_B"))
                {
                    viewTrailsB.IsEnabled = true;
                }
                else if (name.Contains("CLOCK"))
                {
                    viewClock.IsEnabled = true;
                }
                else if (name.Contains("REY_OSTERRIETH"))
                {
                    viewReyo.IsEnabled = true;
                }
            }
        }
Example #2
0
 // Debug as WIPTTE clicked
 private void WIPTTE_Click(object sender, RoutedEventArgs e)
 {
     InfoPasser passer = new InfoPasser("WIPPTE");
     this.Frame.Navigate(typeof(PatientSelection), passer);
 }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            passer = e.Parameter as InfoPasser;    // This is the type of the trails test.


            nodes.Clear();
            
            TEST_TYPE type = TEST_TYPE.TRAILS_A;
            if (passer.trailsTestVersion == 'A')
                type = TEST_TYPE.TRAILS_A;
            else if (passer.trailsTestVersion == 'B')
                type = TEST_TYPE.TRAILS_B;

            testReplay = new TestReplay(passer.currentPatient, type);

            if (passer.currentPatient.getTestFilenames().Count > 0)
            {
                currentlySelectedDate = passer.currentPatient.getTestFilenames()[0];
            }

            var stuff = passer.currentPatient.getTestFilenames();
            foreach (string filename in stuff)
            {
                if (filename.Contains(testReplay.getTestType().ToString()))
                {
                    testDatesBox.Items.Add(testReplay.getDisplayedDatetime(filename));
                }
            }
        }
 private void registerButtonClicked(object sender, RoutedEventArgs e)
 {
     if (registerPasswordInputText.Password == null
         || registerUsernameInputText.Text == null
         || registerConfirmPasswordInputText.Password == null
         || registerPasswordInputText.Password == ""
         || registerUsernameInputText.Text == ""
         || registerConfirmPasswordInputText.Password == "") return;
     if (registerPasswordInputText.Password != 
         registerConfirmPasswordInputText.Password) return;
     bool usernameAlreadyExists = false;
     foreach (KeyValuePair<string, string> K in usernameHashDictionary)
     {
         if (K.Key == registerUsernameInputText.Text) 
             usernameAlreadyExists = true;
     }
     if (usernameAlreadyExists) return;
     usernameHashDictionary.Add(
         registerUsernameInputText.Text, 
         registerPasswordInputText.Password.GetHashCode().ToString());
     saveAccounts();
     InfoPasser passer = new InfoPasser(registerUsernameInputText.Text);
     this.Frame.Navigate(typeof(PatientSelection), passer);
 }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            passer = e.Parameter as InfoPasser;
            testReplay = new TestReplay(passer.currentPatient, TEST_TYPE.CLOCK);

            // set default selected test
            if (passer.currentPatient.getTestFilenames().Count > 0)
            {
                currentlySelectedDate = passer.currentPatient.getTestFilenames()[0];
            }
            else
            {
                granularReplayButton.IsEnabled = false;
            }

            // display the filenames in the listview
            var stuff = passer.currentPatient.getTestFilenames();
            foreach(string filename in stuff)
            {
                if (filename.Contains(testReplay.getTestType().ToString()))
                {
                    testDatesBox.Items.Add(testReplay.getDisplayedDatetime(filename));
                }
            }
        }
Example #6
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            passer = e.Parameter as InfoPasser;    // This is the type of the trails test.

            nodes.Clear();
            populateNodes(passer.trailsTestVersion, nodes);      // Populate the list of trail nodes (no longer occurs in constructor bec need to have passer to know which test to load)

            //TODO must have real patient info here
            TEST_TYPE type = TEST_TYPE.TRAILS_A;
            if (passer.trailsTestVersion == 'A')
            {
                type = TEST_TYPE.TRAILS_A;
                if (!passer.trailsVertical)
                {
                    type = TEST_TYPE.TRAILS_A_H;
                }
            }
            else if (passer.trailsTestVersion == 'B')
            {
                type = TEST_TYPE.TRAILS_B;
                if(!passer.trailsVertical)
                {
                    type = TEST_TYPE.TRAILS_B_H;
                }
            }
            testReplay = new TestReplay(passer.currentPatient, type);
        }
Example #7
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            passer = e.Parameter as InfoPasser;
            testReplay = new TestReplay(passer.currentPatient, TEST_TYPE.CLOCK);
        }
 // Get the doctor's name
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     passer = e.Parameter as InfoPasser;    // This is the name of the doctor.
     docName = passer.doctorId;
     greeting.Text = "Howdy, " + docName;
 }
 /// The methods provided in this section are simply used to allow
 /// NavigationHelper to respond to the page's navigation methods.
 /// 
 /// Page specific logic should be placed in event handlers for the  
 /// <see cref="GridCS.Common.NavigationHelper.LoadState"/>
 /// and <see cref="GridCS.Common.NavigationHelper.SaveState"/>.
 /// The navigation parameter is available in the LoadState method 
 /// in addition to page state preserved during an earlier session.
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     navigationHelper.OnNavigatedTo(e);
     passer = e.Parameter as InfoPasser;    // This is the type of the trails test.
     pageTitle.Text = "Instructions: Trails Test " + passer.trailsTestVersion;
     populateNodes();
     makeInstructions();
 }
 private void logout(object sender, RoutedEventArgs e)
 {
     passer = new InfoPasser();
     passer.currentPatient = null;
     this.Frame.Navigate(typeof(MainPage), passer);
 }
Example #11
0
        /// The methods provided in this section are simply used to allow
        /// NavigationHelper to respond to the page's navigation methods.
        /// 
        /// Page specific logic should be placed in event handlers for the  
        /// <see cref="GridCS.Common.NavigationHelper.LoadState"/>
        /// and <see cref="GridCS.Common.NavigationHelper.SaveState"/>.
        /// The navigation parameter is available in the LoadState method 
        /// in addition to page state preserved during an earlier session.

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            navigationHelper.OnNavigatedTo(e);
            passer = e.Parameter as InfoPasser;
            docName = passer.doctorId;
        }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            passer = e.Parameter as InfoPasser;
            testReplay1 = new TestReplay(passer.currentPatient, TEST_TYPE.REY_OSTERRIETH);
            testReplay2 = new TestReplay(passer.currentPatient, TEST_TYPE.REY_OSTERRIETH);

            if (passer.currentPatient.getTestFilenames().Count > 0)
            {
                currentlySelectedDate1 = passer.currentPatient.getTestFilenames()[0];
                currentlySelectedDate2 = passer.currentPatient.getTestFilenames()[0];
            }
            else
            {
                replayButton.IsEnabled = false;
            }

            var stuff = passer.currentPatient.getTestFilenames();
            foreach(string filename in stuff)
            {
                if (filename.Contains(testReplay1.getTestType().ToString()))
                {
                    testDatesBox1.Items.Add(testReplay1.getDisplayedDatetime(filename));
                    testDatesBox2.Items.Add(testReplay1.getDisplayedDatetime(filename));
                }
            }
        }
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     base.OnNavigatedTo(e);
     passer = e.Parameter as InfoPasser;
 }
        /// The methods provided in this section are simply used to allow
        /// NavigationHelper to respond to the page's navigation methods.
        /// 
        /// Page specific logic should be placed in event handlers for the  
        /// <see cref="GridCS.Common.NavigationHelper.LoadState"/>
        /// and <see cref="GridCS.Common.NavigationHelper.SaveState"/>.
        /// The navigation parameter is available in the LoadState method 
        /// in addition to page state preserved during an earlier session.

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            navigationHelper.OnNavigatedTo(e);
            passer = e.Parameter as InfoPasser;
            testReplay = new TestReplay();
        }