/// <inheritdoc />
 public async Task ActivateAsync(bool activatedBefore)
 {
     if (!CanHandle(_remoteCommand))
     {
         await NavigationProxy.PopModalAsync();
     }
 }
 public NavigationImpl(
     NavigationMonitoringTab navigationMonitoringTab,
     INavigation navigation)
 {
     _navigationMonitoringTab = navigationMonitoringTab;
     _navigation = (NavigationProxy)navigation;
 }
示例#3
0
        private void button_connect_Click(object sender, EventArgs e)
        {
            string ip = this.textBox1.Text;

            this.tts        = new TextToSpeechProxy(ip, 9559);
            this.motion     = new MotionProxy(ip, 9559);
            this.posture    = new RobotPostureProxy(ip, 9559);
            this.navigation = new NavigationProxy(ip, 9559);

            Console.Beep();
            this.label1.Text += "\nconnected.";
        }
示例#4
0
        public async Task PushesModalIntoNextInner()
        {
            var page     = new ContentPage();
            var navProxy = new NavigationProxy();

            await navProxy.PushModalAsync(page);

            var navTest = new NavigationTest();

            navProxy.Inner = navTest;

            Assert.AreEqual(page, navTest.LastPushedModal);
        }
示例#5
0
        public async Task TestPushModalWithInner()
        {
            var proxy = new NavigationProxy();
            var inner = new NavigationTest();

            proxy.Inner = inner;

            var child = new ContentPage {
                Content = new View()
            };
            await proxy.PushModalAsync(child);

            Assert.AreEqual(child, inner.LastPushedModal);
        }
示例#6
0
        public async Task TestPopModalWithInner()
        {
            var proxy = new NavigationProxy();
            var inner = new NavigationTest();

            proxy.Inner = inner;

            var child = new ContentPage {
                Content = new View()
            };
            await proxy.PushModalAsync(child);

            await proxy.PopModalAsync();

            Assert.True(inner.PoppedModal, "Pop was never called on the inner proxy item");
        }
示例#7
0
        public async Task TestPopWithInner()
        {
            var proxy = new NavigationProxy();
            var inner = new NavigationTest();

            proxy.Inner = inner;

            var child = new ContentPage {
                Content = new View()
            };
            await proxy.PushAsync(child);

            var result = await proxy.PopAsync();

            Assert.AreEqual(child, result);
            Assert.True(inner.Popped, "Pop was never called on the inner proxy item");
        }
示例#8
0
        public void NavigationProxyWireUpTest()
        {
            var page         = new ContentPage();
            var shell        = new Shell();
            var shellItem    = new ShellItem();
            var shellSection = new ShellSection();
            var shellContent = new ShellContent {
                Content = page
            };

            shellSection.Items.Add(shellContent);
            shellItem.Items.Add(shellSection);
            shell.Items.Add(shellItem);

            NavigationProxy proxy = page.NavigationProxy.Inner as NavigationProxy;

            Assert.IsNotNull(proxy);

            var shellProxy = proxy.Inner;

            Assert.IsNotNull(shellProxy);
        }
示例#9
0
 internal NavigableElement()
 {
     Navigation   = new NavigationProxy();
     _mergedStyle = new MergedStyle(GetType(), this);
 }
示例#10
0
		internal VisualElement()
		{
			Navigation = new NavigationProxy();
			_mergedStyle = new MergedStyle(GetType(), this);
		}
 public TemplateNavigation()
 {
     Navigation = new NavigationProxy();
 }
示例#12
0
        public void Constructor()
        {
            var proxy = new NavigationProxy();

            Assert.Null(proxy.Inner);
        }
 public async Task End()
 {
     await NavigationProxy.PopAsync();
 }
 public async Task Begin()
 {
     await NavigationProxy.PushAsync(new ContentPage { Content = this });
 }