コード例 #1
0
        private void PassOn()
        {
            if (!TelemetryService.HasTelemetryConfig() || (BridgeInformation.demoMode && !BridgeInformation.showedDemoModeIntroduction))
            {
                mainShell.ShowIntroduction();
                return;
            }

            if (BridgeInformation.isConnected)
            {
                FillWithInformation();

                mainShell.userCanUseNav = true;
                return;
            }

            if (!ConnectToBridge.HasIPAddress())
            {
                this.Frame.Navigate(typeof(FindBridge));
                return;
            }

            if (!ConnectToBridge.HasAppKey())
            {
                if (ConnectToBridge.SelectBridgeWithSavedIPAddress())
                {
                    this.Frame.Navigate(typeof(RegisterApplication));
                    return;
                }
            }

            if (!BridgeInformation.isConnected && !BridgeInformation.demoMode)
            {
                if (ConnectToSavedBridge())
                {
                    _ = TelemetryService.SendTelemetryReport();
                    mainShell.userCanUseNav = true;

                    if (BridgeInformation.redirectToLightControl)
                    {
                        BridgeInformation.redirectToLightControl = false;
                        mainShell.NavigateToPageAndSelect(1);
                    }
                    else
                    {
                        FillWithInformation();
                    }
                    return;
                }
            }
        }