public DialogProvider(BaseScreen activity, AndroidApplicationContext applicationContext) { _activity = activity; _applicationContext = applicationContext; Dialogs = new Stack <AlertDialog>(); }
public Manager(AndroidApplicationContext applicationContext, IGlobalEventsController events, String host, String userName, String password, String deviceId) { _applicationContext = applicationContext; _events = events; _host = host; _userName = userName; _password = password; _deviceId = deviceId; }
void StartApplication(Settings settings) { Settings = settings; Settings.ReadSettings(); Settings.WriteSettings(); _logonScreen = new LogonScreen(BaseActivity, Settings, LoadApplication); _progressScreen = new ProgressScreen(BaseActivity, Settings); AppContext = new AndroidApplicationContext(BaseActivity, Settings, LoadComplete); AppContext.LoadingProgress += _progressScreen.Progress; AppContext.ReturnToStartMenu += OpenStartScreen; ExceptionHandler = new ExceptionHandler(Settings, BaseActivity, AppContext); HandleLastError(); }
public CameraProvider(BaseScreen activity, AndroidApplicationContext context) : base(activity, context) { }
public static Manager CreateInstance(AndroidApplicationContext context, IGlobalEventsController events , string host, string userName, string password, string deviceId) { return(_manager ?? (_manager = new Manager(context, events, host, userName, password, deviceId))); }
/// <summary> /// Startup is complete /// </summary> private bool DoConfigure() { this.RunOnUiThread(() => this.FindViewById <TextView>(Resource.Id.txt_splash_info).Text = Resources.GetString(Resource.String.startup)); AndroidApplicationContext.ProgressChanged += this.OnProgressUpdated; try { if (AndroidApplicationContext.Current != null) { return(true); } if (!AndroidApplicationContext.Start(this, this.ApplicationContext, this.Application)) { CancellationTokenSource ctSource = new CancellationTokenSource(); CancellationToken ct = ctSource.Token; Task notifyUserWork = new Task(() => { try { if (!AndroidApplicationContext.StartTemporary(this, this.ApplicationContext)) { throw new InvalidOperationException("Cannot start temporary authentication pricipal"); } } catch (Exception e) { this.m_tracer.TraceError(e.ToString()); ctSource.Cancel(); this.ShowException(e); } finally { AndroidApplicationContext.ProgressChanged -= this.OnProgressUpdated; } }, ct); // Now show the configuration screen. notifyUserWork.ContinueWith(t => { if (!ct.IsCancellationRequested) { Action doStart = () => { Intent viewIntent = new Intent(this, typeof(AppletActivity)); viewIntent.PutExtra("assetLink", "http://127.0.0.1:9200/org.openiz.core/views/settings/splash.html"); viewIntent.PutExtra("continueTo", typeof(SplashActivity).AssemblyQualifiedName); this.StartActivity(viewIntent); }; if (AndroidApplicationContext.Current.GetService <MiniImsServer>().IsRunning) { doStart(); } else { AndroidApplicationContext.Current.GetService <MiniImsServer>().Started += (oo, oe) => { doStart(); } }; } }, TaskScheduler.Current); notifyUserWork.Start(); return(false); } else { this.m_tracer = Tracer.GetTracer(this.GetType()); } return(true); } catch (AppDomainUnloadedException) { this.Finish(); return(false); } catch (Exception e) { this.ShowException(e); return(false); } }
public ExceptionHandler(Settings settings, BaseScreen screen, AndroidApplicationContext context) { _settings = settings; _screen = screen; _context = context; }
public void SetApplicationContext(object applicationContext) { CurrentContext = (AndroidApplicationContext)applicationContext; }
public GalleryProvider(BaseScreen activity, AndroidApplicationContext context) { Activity = activity; _context = context; }