static int Main() { TimeService.Current = new TimeService(); EnvironmentSettings.Current = new EnvironmentSettings(); FileSystem.Current = new FileSystem(); ArchiveFactory.Current = new ArchiveFactory(); HttpRequestManager.Current = new HttpRequestManager(); ProcessManager.Current = new ProcessManager(); Registry.Current = new Registry(); ShortcutManager.Current = new ShortcutManager(); IconManager.Current = new IconManager(); Config.Current = new Config(); ViewImpl.RegisterViews(); try { return(RunMain()); } catch (System.Security.SecurityException) { ViewFactory.Current.CreateView <IMessage>().Show("A Security exception occurred, This could be because you are running the GamesManager from a network share. If this is the case please try running it from a local folder.", "Security Exception"); } catch (Exception ex) { ShowUnhandledError(ex); } return(-1); }
public AvaloniaView(Context context) : base(context) { _view = new ViewImpl(context); AddView(_view.View); _root = new EmbeddableControlRoot(_view); _root.Prepare(); }
public TopLevelImpl(Context context, bool placeOnTop = false) { _view = new ViewImpl(context, this, placeOnTop); _keyboardHelper = new AndroidKeyboardEventsHelper <TopLevelImpl>(this); _touchHelper = new AndroidTouchEventsHelper <TopLevelImpl>(this, () => InputRoot, p => GetAvaloniaPointFromEvent(p)); MaxClientSize = new Size(_view.Resources.DisplayMetrics.WidthPixels, _view.Resources.DisplayMetrics.HeightPixels); }
public static ViewImpl GetImplementation(View handle) { ViewImpl ret = new ViewImpl(Interop.NDalic.GetImplementation__SWIG_0(View.getCPtr(handle)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public void ViewImplNew() { tlog.Debug(tag, $"ViewImplNew START"); var testingTarget = ViewImpl.New(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <View>(testingTarget, "Should return View instance."); testingTarget.Dispose(); tlog.Debug(tag, $"ViewImplNew END (OK)"); }
public TopLevelImpl(Context context, bool placeOnTop = false) { _view = new ViewImpl(context, this, placeOnTop); _textInputMethod = new AndroidInputMethod <ViewImpl>(_view); _keyboardHelper = new AndroidKeyboardEventsHelper <TopLevelImpl>(this); _touchHelper = new AndroidTouchEventsHelper <TopLevelImpl>(this, () => InputRoot, GetAvaloniaPointFromEvent); _gl = GlPlatformSurface.TryCreate(this); _framebuffer = new FramebufferManager(this); RenderScaling = (int)_view.Scaling; MaxClientSize = new PixelSize(_view.Resources.DisplayMetrics.WidthPixels, _view.Resources.DisplayMetrics.HeightPixels).ToSize(RenderScaling); }
public TopLevelImpl(AvaloniaView avaloniaView, bool placeOnTop = false) { _view = new ViewImpl(avaloniaView.Context, this, placeOnTop); _textInputMethod = new AndroidInputMethod <ViewImpl>(_view); _keyboardHelper = new AndroidKeyboardEventsHelper <TopLevelImpl>(this); _pointerHelper = new AndroidMotionEventsHelper(this); _gl = GlPlatformSurface.TryCreate(this); _framebuffer = new FramebufferManager(this); RenderScaling = _view.Scaling; MaxClientSize = new PixelSize(_view.Resources.DisplayMetrics.WidthPixels, _view.Resources.DisplayMetrics.HeightPixels).ToSize(RenderScaling); NativeControlHost = new AndroidNativeControlHostImpl(avaloniaView); StorageProvider = new AndroidStorageProvider((AvaloniaActivity)avaloniaView.Context); }
public virtual void Dispose() { _view.Dispose(); _view = null; }
public AvaloniaView(Context context) : base(context) { _view = new ViewImpl(this); AddView(_view.View); }