public AsyncESAPI(string username = null, string password = null) { m_application = Execute(new Func <EApp>(() => { return(EApp.CreateApplication(username, password)); //return EApp.CreateApplication(null,null ); })); isInit = true; }
private void Initialize() #endif { #if ESAPI_13 _esapiApp = Application.CreateApplication(userId, password); #elif ESAPI_15 _esapiApp = Application.CreateApplication(); #endif _search = new PatientSummarySearch(_esapiApp.PatientSummaries, MaxSearchResults); _dataRepository = new DataRepository(GetDataPath()); }
static void Main(string[] args) { try { using (Application app = Application.CreateApplication(null, null)) { Execute(app); } } catch (Exception e) { Console.Error.WriteLine(e.ToString()); } }
static void Main(string[] args) { //Open file dialog box to select list of IMRT QA plans// var infile = new OpenFileDialog { Multiselect = false, Title = "Choose IMRT QA plans list", Filter = "Comma-separated values file|*.csv" }; //Open file dialog box to select archived information// var outfile = new SaveFileDialog { Title = "Choose the file to save the database", Filter = "Comma-separated values file|*.csv", OverwritePrompt = false }; if (infile.ShowDialog() == DialogResult.OK && outfile.ShowDialog() == DialogResult.OK) { try { //Start application// Console.WriteLine("Start to create patient database...\n"); using (Application app = Application.CreateApplication()) { Execute(app, infile.FileName, outfile.FileName); } } catch (Exception ex) { Console.Error.WriteLine(ex.ToString()); } Console.WriteLine("Database is created. Press any key to exit."); Console.ReadKey(); } }