示例#1
0
        private async Task Setup()
        {
            // sometimes, the scene is not big enough. we wait completion
            await Task.Delay(500);

            if (_app == null && _urhoSurface != null)
            {
                if (!Application.HasCurrent)
                {
                    var applicationOptions = new ApplicationOptions
                    {
                        Orientation = ApplicationOptions.OrientationType.LandscapeAndPortrait
                    };

                    _app = await _urhoSurface.Show <PanoramaApp>(applicationOptions);
                }
                else
                {
                    _app = (PanoramaApp)Application.Current;
                }

                UpdateImage();
                UpdateFieldOfView();
                UpdatePitch();
                UpdateYaw();
            }
        }
示例#2
0
        public void Initialize()
        {
            Device.BeginInvokeOnMainThread(async() =>
            {
                if (_app == null && _urhoSurface != null)
                {
                    // sometimes, the scene is not big enough. we wait completion
                    await Task.Delay(500);

                    _app = await _urhoSurface.Show <PanoramaApp>(new ApplicationOptions(null) // "Data"
                    {
                        Orientation = ApplicationOptions.OrientationType.LandscapeAndPortrait
                    });

                    UpdateImage();
                    UpdateFieldOfView();
                    UpdatePitch();
                    UpdateYaw();
                }
            });
        }