private async void ContentPage_Appearing(object sender, EventArgs e) { try { //if (charts == null) //{ var ao = new Urho.ApplicationOptions(assetsFolder: null); var urhoSurface = new Urho.Forms.UrhoSurface() { VerticalOptions = LayoutOptions.FillAndExpand, BackgroundColor = Xamarin.Forms.Color.White }; RootSurface.Children.Add(urhoSurface); charts = await urhoSurface.Show <Charts>(ao); //} } catch (Exception ex) { Debug.WriteLine(ex); } try { if (!Accelerometer.IsMonitoring) { Accelerometer.ShakeDetected += Accelerometer_ShakeDetected; Accelerometer.Start(SensorSpeed.Game); } } catch { } }
public override async void ViewDidLoad() { base.ViewDidLoad(); sampleTypes = typeof(Sample).Assembly.GetTypes() .Where(t => t.IsSubclassOf(typeof(Application)) && t != typeof(Sample)) .ToArray(); ButtonNext.Activated += (s, e) => { if (++currentSampleIndex >= sampleTypes.Length) currentSampleIndex = 0; RunSample(sampleTypes[currentSampleIndex]); }; ButtonPrev.Activated += (s, e) => { if (--currentSampleIndex < 0) currentSampleIndex = sampleTypes.Length - 1; RunSample(sampleTypes[currentSampleIndex]); }; var view = new UrhoSurface(); view.Frame = UrhoSurface.Frame; view.AutoresizingMask = NSViewResizingMask.WidthSizable | NSViewResizingMask.HeightSizable; UrhoSurface.AddSubview(view); string assets = "../../../../../Assets"; Urho.Desktop.DesktopUrhoInitializer.CopyEmbeddedCoreDataTo(assets); options = new ApplicationOptions("Data") { ExternalWindow = view.Handle, LimitFps = true, ResourcePrefixPaths = new string[] { assets }, }; }
public Application(ApplicationOptions options) : this(new Context(), options) { }
public static T CreateInstance <T>(ApplicationOptions options = null) where T : Application { return((T)CreateInstance(typeof(T), options)); }
public Charts(ApplicationOptions options = null) : base(options) { }
public HelloWorldApplication(ApplicationOptions opts) : base(opts) { }
public SimpleApplication(ApplicationOptions options) : base(options) { }
public GrilDemo(Urho.ApplicationOptions opts) : base(opts) { }
public UrhoAppViewSource(ApplicationOptions opts) { this.opts = opts; }
public const int VideoCapturingFPS = 0; //200, 60, 24, 0 (no limit) public UrhoApp(ApplicationOptions options) : base(options) {}
public CognitiveServicesApp(ApplicationOptions opts) : base(opts) { }
public Progam(ApplicationOptions assets) : base(assets) { }
public SamplyGame(ApplicationOptions opts) : base(opts) { }
public ScannerApp(ApplicationOptions opts) : base(opts) { }
public HelloWorld(Urho.ApplicationOptions options) : base(options) { }
public MutantApp(ApplicationOptions opts) : base(opts) { }
public SpatialMappingApp(ApplicationOptions opts) : base(opts) { }