private void Form3_FormClosing(object sender, FormClosingEventArgs e) { if (paciente != null) { cerrarPaciente(); app.Dispose(); } }
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(); } }
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(); }
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 } }
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(); }
private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { _app.ClosePatient(); _app.Dispose(); }
public void Dispose() { _esapiApp.Dispose(); }