Ejemplo n.º 1
0
 private void Form3_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (paciente != null)
     {
         cerrarPaciente();
         app.Dispose();
     }
 }
Ejemplo n.º 2
0
 private void Form3_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (paciente != null)
     {
         LB_Cursos.Items.Clear();
         LB_Planes.Items.Clear();
         cerrarPaciente();
     }
     if (app != null)
     {
         app.Dispose();
     }
 }
Ejemplo n.º 3
0
        public static void Execute(VMS.TPS.Common.Model.API.Application app)
        {
            string[] args = { "", "", "", "", "", "", "", "" };

            args[0] = "$P-901";

            Patient this_patient = app.OpenPatientById(args[0]);

            System.Windows.Forms.Application.EnableVisualStyles();
            System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
            System.Windows.Forms.Application.Run(new Form1(this_patient, args));
            app.ClosePatient();
            app.Dispose();
        }
Ejemplo n.º 4
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     try {
         using (_app = VMS.TPS.Common.Model.API.Application.CreateApplication()) {
             IEventAggregator eventAggregator = new EventAggregator();
             mv             = new MainView();
             mv.DataContext = new MainViewModel(
                 new NavigationViewModel(_app, eventAggregator),
                 new ScanCompareViewModel(eventAggregator));
             mv.ShowDialog();
         }
     } catch (ApplicationException ex) {
         // give the exception to the user somehow (log file, messagebox, etc)
         _app.ClosePatient(); //this is like closing the patient in Eclipse
         _app.Dispose();      //This is like closing Eclipse
     }
 }
Ejemplo n.º 5
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     //be sure to close the patient before closing the application. Not doing so will result in unclosed timestamps in eclipse
     app.ClosePatient();
     app.Dispose();
 }
Ejemplo n.º 6
0
 private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     _app.ClosePatient();
     _app.Dispose();
 }
Ejemplo n.º 7
0
 public void Dispose()
 {
     _esapiApp.Dispose();
 }