示例#1
0
        void recentpatientlink_Click(object sender, RoutedEventArgs e)
        {
            windowMeta = new MetaLoader();
            windowMeta.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            windowMeta.Owner = this;
            windowMeta.button3.Visibility = Visibility.Collapsed;
            windowMeta.Show();

            this.export2.IsEnabled = true;

            windowMeta.Closing += new CancelEventHandler(windowMeta_Closing);
        }
示例#2
0
        /// <summary>
        /// opens the load scan metaloader to few current patients in the database
        /// </summary>
        /// <param name="sender">the object</param>
        /// <param name="e">the routed event</param>

        private void LoadScan_Click(object sender, RoutedEventArgs e)
        {
            //Load metaloader with list of currently recorded patients provide the option to just load point cloud if required.

            this.export1.IsEnabled = false;
            this.export2.IsEnabled = true;

            windowMeta = new MetaLoader();
            windowMeta.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            windowMeta.Owner = this;
            windowMeta.button3.Visibility = Visibility.Collapsed;
            windowMeta.Show();

            this.export2.IsEnabled = true;

            windowMeta.Closing += new CancelEventHandler(windowMeta_Closing);
        }
示例#3
0
        private void SaveScan_Click(object sender, RoutedEventArgs e)
        {
            //Test if patientloader is currently active and then attribute the scan to them.
            //Otherwise if this is not the case, we need to manually attribute the scan to
            //a patient.

            DateTime curTime = DateTime.Now;

            if (windowPatient == null)
            {
                windowMeta = new MetaLoader();
                windowMeta.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                windowMeta.Owner = this;

                //save specific actions.
                windowMeta.setWorkingDir(workingDir);
                windowMeta.setPC(pcdl);
                windowMeta.Title = "Attribute scan to whom?";
                windowMeta.button1.Visibility = Visibility.Collapsed;
                windowMeta.button2.Visibility = Visibility.Collapsed;
                windowMeta.button3.Visibility = Visibility.Visible;
                windowMeta.Show();
            }
            else
            {
                int currentPatient = Convert.ToInt32(windowPatient.patientIDExisting.Content);

                //save to db and workingdirectory with appropriate id.

                db.insertScans(1, currentPatient, System.IO.Path.Combine(workingDir, currentPatient + "-" + curTime.ToString("ddMMyyyyHHMM") + ".PARSE"), "", curTime);

                //save scan to .parse file in the working directory
                ScanSerializer.serialize(System.IO.Path.Combine(workingDir, currentPatient + "-" + curTime.ToString("ddMMyyyyHHMM") + ".PARSE"), pcdl);

                MessageBoxResult result = System.Windows.MessageBox.Show(this, "Patient saved to database", "Patient Scan Saved", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }