public void Notes()
        {
            var dialog = new NotesDialog();

            dialog.Owner = System.Windows.Application.Current.MainWindow;
            dialog.ShowDialog();
        }
Exemplo n.º 2
0
        private void OnCancel(object parameter)
        {
            Log.Instance.LogInfo(string.Format("NotesViewModel.OnCancel {0}", parameter));

            NotesDialog w = parameter as NotesDialog;

            if (w != null)
            {
                w.Close();
            }
        }
Exemplo n.º 3
0
        private void OnOK(object parameter)
        {
            Log.Instance.LogInfo(string.Format("NotesViewModel.OnOK {0}", parameter));

            NotesDialog w = parameter as NotesDialog;

            if (w != null)
            {
                w.Close();
            }

            OnOKAction(Index, w.textBox.Text);
        }
Exemplo n.º 4
0
        private void OpenNotesDialog(object sender)
        {
            if (!(sender is RequestItemViewModel))
            {
                return;
            }
            var requestModel = sender as RequestItemViewModel;

            if (!requestModel.RequestId.HasValue)
            {
                return;
            }
            var model = new NoteDialogViewModel(_requestService, requestModel.RequestId.Value);
            var view  = new NotesDialog();

            model.SetView(view);
            view.Owner       = _view;
            view.DataContext = model;
            view.ShowDialog();
        }
Exemplo n.º 5
0
        private void OnEditTaskNote(object parameter)
        {
            Log.Instance.LogInfo(string.Format("DataGridViewModel.OnEditTaskNote {0}", parameter));

            if (parameter is DataGridRow)
            {
                int r = (parameter as DataGridRow).GetIndex();

                if (r >= 0)
                {
                    Log.Instance.LogDebug(string.Format("DataGridViewModel.OnDeleteTask - editing  note for task {0}", r));

                    NotesDialog d = new NotesDialog(r, TaskListGroup.GetTaskNote(CurrentTaskList, r), OnChangeNote);
                    d.ShowDialog();
                }
            }
            else
            {
                Log.Instance.LogError("DataGridViewModel.OnDeleteTask - parameter is not a DataGridRow");
            }
        }
Exemplo n.º 6
0
        public void initialize(StandaloneController standaloneController)
        {
            standaloneController.DocumentController.addDocumentHandler(new PatientDocumentHandler(standaloneController));

            this.standaloneController = standaloneController;
            standaloneController.PatientDataController.PatientDataChanged += new Action <PatientDataFile>(PatientDataController_PatientDataChanged);

            GUIManager guiManager = standaloneController.GUIManager;

            //Dialogs
            mandibleMovementDialog = new MandibleMovementDialog(standaloneController.MovementSequenceController, standaloneController.MusclePositionController);
            guiManager.addManagedDialog(mandibleMovementDialog);

            notesDialog = new NotesDialog(standaloneController.MedicalStateController);
            guiManager.addManagedDialog(notesDialog);

            stateList = new StateListDialog(standaloneController.MedicalStateController);
            guiManager.addManagedDialog(stateList);

            savePatientDialog           = new SavePatientDialog(guiManager);
            savePatientDialog.SaveFile += new EventHandler(savePatientDialog_SaveFile);

            openPatientDialog           = new OpenPatientDialog(guiManager);
            openPatientDialog.OpenFile += new EventHandler(openPatientDialog_OpenFile);

            //Tasks Menu
            TaskController     taskController = standaloneController.TaskController;
            AnatomyTaskManager anatomyTasks   = standaloneController.AnatomyTaskManager;

            taskController.addTask(new ShowToothContactsTask(0));

            PinableMDIDialogOpenTask mandibleMovementTask = new PinableMDIDialogOpenTask(mandibleMovementDialog, "Medical.ManualMovement", "Manual Movement", "DentalSimIcons/ManualMovement", "Dental Simulation", 2);

            taskController.addTask(mandibleMovementTask);

            anatomyTasks.addTask(new StartEmbeddedMvcTask("DentalSim.Eminence", "Eminence", "DentalSimIcons/Eminence", "Dental Simulation", GetType(), "DentalSim.Wizards.", "Eminence.mvc", standaloneController.TimelineController, standaloneController.MvcCore), new String[] { "Outer Skull", "Inner Skull" });
            anatomyTasks.addTask(new StartEmbeddedMvcTask("DentalSim.Dentition", "Dentition", "DentalSimIcons/Dentition", "Dental Simulation", GetType(), "DentalSim.Wizards.", "Dentition.mvc", standaloneController.TimelineController, standaloneController.MvcCore), TeethNames);
            anatomyTasks.addTask(new StartEmbeddedMvcTask("DentalSim.DiscClockFace", "Disc Clock Face", "DentalSimIcons/DiscClockFace", "Dental Simulation", GetType(), "DentalSim.Wizards.DiscClock.", "DiscClockFace.mvc", standaloneController.TimelineController, standaloneController.MvcCore, true), new String[] { "Left TMJ Disc", "Right TMJ Disc" });
            anatomyTasks.addTask(new StartEmbeddedMvcTask("DentalSim.Mandible", "Mandible", "DentalSimIcons/Mandible", "Dental Simulation", GetType(), "DentalSim.Wizards.", "Mandible.mvc", standaloneController.TimelineController, standaloneController.MvcCore), new String[] { "Mandible" });
            anatomyTasks.addTask(new StartEmbeddedMvcTask("DentalSim.ClinicalDoppler", "Doppler", "DentalSimIcons/ClinicalDoppler", "Dental Simulation", GetType(), "DentalSim.Wizards.ClinicalDoppler.", "ClinicalDoppler.mvc", standaloneController.TimelineController, standaloneController.MvcCore), new String[] { "Left TMJ Disc", "Right TMJ Disc", "Mandible" });
            anatomyTasks.addTask(new StartEmbeddedMvcTask("DentalSim.ClinicalCT", "CT", "DentalSimIcons/ClinicalCT", "Dental Simulation", GetType(), "DentalSim.Wizards.ClinicalCT.", "ClinicalCT.mvc", standaloneController.TimelineController, standaloneController.MvcCore), new String[] { "Left TMJ Disc", "Right TMJ Disc", "Mandible" });
            anatomyTasks.addTask(new StartEmbeddedMvcTask("DentalSim.ClinicalMRI", "MRI", "DentalSimIcons/ClinicalMRI", "Dental Simulation", GetType(), "DentalSim.Wizards.ClinicalMRI.", "ClinicalMRI.mvc", standaloneController.TimelineController, standaloneController.MvcCore), new String[] { "Left TMJ Disc", "Right TMJ Disc", "Mandible" });
            anatomyTasks.addTask(new StartEmbeddedMvcTask("DentalSim.ClinicalOrthoAndSkeletal", "Orthodontic and Skeletal", "DentalSimIcons/ClinicalOrthodonticAndSkeletal", "Dental Simulation", GetType(), "DentalSim.Wizards.", "ClinicalOrthoAndSkeletal.mvc", standaloneController.TimelineController, standaloneController.MvcCore), new String[] { "Left TMJ Disc", "Right TMJ Disc", "Mandible" });

            taskController.addTask(new ShowPopupTask(openPatientDialog, "Medical.OpenPatient", "Open", "DentalSimIcons/Open", TaskMenuCategories.Scene, 1));

            PinableMDIDialogOpenTask statesTask = new PinableMDIDialogOpenTask(stateList, "Medical.StateList", "States", "DentalSimIcons/StatesIcon", TaskMenuCategories.Scene);

            taskController.addTask(statesTask);

            PinableMDIDialogOpenTask notesTask = new PinableMDIDialogOpenTask(notesDialog, "Medical.Notes", "Notes", "DentalSimIcons/NotesIcon", TaskMenuCategories.Scene);

            taskController.addTask(notesTask);

            CallbackTask saveTaskItem = new CallbackTask("Medical.SavePatient", "Save", "CommonToolstrip/Save", TaskMenuCategories.Scene, 2, false);

            saveTaskItem.OnClicked += new CallbackTask.ClickedCallback(saveTaskItem_OnClicked);
            taskController.addTask(saveTaskItem);

            CallbackTask saveAsTaskItem = new CallbackTask("Medical.SavePatientAs", "Save As", "CommonToolstrip/SaveAs", TaskMenuCategories.Scene, 3, false);

            saveAsTaskItem.OnClicked += new CallbackTask.ClickedCallback(saveAsTaskItem_OnClicked);
            taskController.addTask(saveAsTaskItem);

            //Movement Sequences
            MovementSequenceController movementSequenceController = standaloneController.MovementSequenceController;
            Assembly assembly = GetType().Assembly;

            //Border Movements
            movementSequenceController.addMovementSequence("Border Movements", new EmbeddedMovementSequenceInfo(assembly, "Posselt Sagittal", "DentalSim.Sequences.BorderMovements.Posselt Sagittal.seq"));

            //Excursion
            movementSequenceController.addMovementSequence("Excursion", new EmbeddedMovementSequenceInfo(assembly, "Left Tooth Contact Bruxism", "DentalSim.Sequences.Excursion.Left Tooth Contact Bruxism.seq"));
            movementSequenceController.addMovementSequence("Excursion", new EmbeddedMovementSequenceInfo(assembly, "Left Tooth Contact Maximal", "DentalSim.Sequences.Excursion.Left Tooth Contact Maximal.seq"));
            movementSequenceController.addMovementSequence("Excursion", new EmbeddedMovementSequenceInfo(assembly, "Left Tooth Contact", "DentalSim.Sequences.Excursion.Left Tooth Contact.seq"));
            movementSequenceController.addMovementSequence("Excursion", new EmbeddedMovementSequenceInfo(assembly, "Open Bilateral", "DentalSim.Sequences.Excursion.Open Bilateral.seq"));
            movementSequenceController.addMovementSequence("Excursion", new EmbeddedMovementSequenceInfo(assembly, "Open Left", "DentalSim.Sequences.Excursion.Open Left.seq"));
            movementSequenceController.addMovementSequence("Excursion", new EmbeddedMovementSequenceInfo(assembly, "Open Right", "DentalSim.Sequences.Excursion.Open Right.seq"));
            movementSequenceController.addMovementSequence("Excursion", new EmbeddedMovementSequenceInfo(assembly, "Right Tooth Contact Bruxism", "DentalSim.Sequences.Excursion.Right Tooth Contact Bruxism.seq"));
            movementSequenceController.addMovementSequence("Excursion", new EmbeddedMovementSequenceInfo(assembly, "Right Tooth Contact Maximal", "DentalSim.Sequences.Excursion.Right Tooth Contact Maximal.seq"));
            movementSequenceController.addMovementSequence("Excursion", new EmbeddedMovementSequenceInfo(assembly, "Right Tooth Contact", "DentalSim.Sequences.Excursion.Right Tooth Contact.seq"));

            //Normal Chewing
            movementSequenceController.addMovementSequence("Normal Chewing", new EmbeddedMovementSequenceInfo(assembly, "Chewing Left Side", "DentalSim.Sequences.NormalChewing.Chewing Left Side.seq"));
            movementSequenceController.addMovementSequence("Normal Chewing", new EmbeddedMovementSequenceInfo(assembly, "Chewing Right Side", "DentalSim.Sequences.NormalChewing.Chewing Right Side.seq"));

            //Protrusion
            movementSequenceController.addMovementSequence("Protrusion", new EmbeddedMovementSequenceInfo(assembly, "Open Protrusion", "DentalSim.Sequences.Protrusion.Open Protrusion.seq"));
            movementSequenceController.addMovementSequence("Protrusion", new EmbeddedMovementSequenceInfo(assembly, "Protrusion Maximal", "DentalSim.Sequences.Protrusion.Protrusion Maximal.seq"));
            movementSequenceController.addMovementSequence("Protrusion", new EmbeddedMovementSequenceInfo(assembly, "Protrusion Tooth Contact Edge to Edge", "DentalSim.Sequences.Protrusion.Protrusion Tooth Contact Edge to Edge.seq"));

            //Vertical Opening
            movementSequenceController.addMovementSequence("Vertical Opening", new EmbeddedMovementSequenceInfo(assembly, "Hinge Opening", "DentalSim.Sequences.VerticalOpening.Hinge Opening.seq"));
            movementSequenceController.addMovementSequence("Vertical Opening", new EmbeddedMovementSequenceInfo(assembly, "Maximal Opening", "DentalSim.Sequences.VerticalOpening.Maximal Opening.seq"));
            movementSequenceController.addMovementSequence("Vertical Opening", new EmbeddedMovementSequenceInfo(assembly, "Tapping Teeth", "DentalSim.Sequences.VerticalOpening.Tapping Teeth.seq"));
        }