Exemplo n.º 1
0
        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
            { }
        }
Exemplo n.º 2
0
		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 },
				};
		}
Exemplo n.º 3
0
 public Application(ApplicationOptions options) : this(new Context(), options)
 {
 }
Exemplo n.º 4
0
 public static T CreateInstance <T>(ApplicationOptions options = null) where T : Application
 {
     return((T)CreateInstance(typeof(T), options));
 }
Exemplo n.º 5
0
		public Charts(ApplicationOptions options = null) : base(options) { }
Exemplo n.º 6
0
		public HelloWorldApplication(ApplicationOptions opts) : base(opts) { }
Exemplo n.º 7
0
 public SimpleApplication(ApplicationOptions options) : base(options)
 {
 }
Exemplo n.º 8
0
 public GrilDemo(Urho.ApplicationOptions opts) : base(opts)
 {
 }
Exemplo n.º 9
0
 public UrhoAppViewSource(ApplicationOptions opts)
 {
     this.opts = opts;
 }
Exemplo n.º 10
0
		public const int VideoCapturingFPS = 0; //200, 60, 24, 0 (no limit)

		public UrhoApp(ApplicationOptions options) : base(options) {}
Exemplo n.º 11
0
		public CognitiveServicesApp(ApplicationOptions opts) : base(opts) { }
Exemplo n.º 12
0
		public Progam(ApplicationOptions assets) : base(assets) { }
Exemplo n.º 13
0
		public SamplyGame(ApplicationOptions opts) : base(opts) { }
Exemplo n.º 14
0
		public ScannerApp(ApplicationOptions opts) : base(opts) { }
Exemplo n.º 15
0
 public HelloWorld(Urho.ApplicationOptions options) : base(options)
 {
 }
Exemplo n.º 16
0
		public MutantApp(ApplicationOptions opts) : base(opts) { }
Exemplo n.º 17
0
		public SpatialMappingApp(ApplicationOptions opts) : base(opts) { }