public void ShowContacts() { // 5. Start the Contacts app var detailsApp = App.Glue.AppManager.Applications.FirstOrDefault((app) => app.Name == "Contacts"); var context = AppManagerContext.CreateNew(); detailsApp?.Start(context).Wait(); }
private void StartAppWithURL(string url) { var webAppHostApp = this.GetWebManagerHost(); var webAppHostContext = AppManagerContext.CreateNew(); webAppHostContext.Set("url", url); webAppHostApp.Start(webAppHostContext); }
private void startButton_Click(object sender, RoutedEventArgs e) { var selectedApplication = applicationList.SelectedItem as IAppManagerApplication; if (selectedApplication != null) { var context = AppManagerContext.CreateNew(); context.Set("startedFrom", Process.GetCurrentProcess().Id); var task = selectedApplication.Start(context); task.ContinueWith(t => { if (t.Status != TaskStatus.RanToCompletion) { // Applcation failed to start } else { // Started application instance var instance = t.Result; } }); } }