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

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