public void UpdateQrCodeMode(QrCodeMode mode) { if (mode == QrCodeMode.Loading) { Loading.IsActive = true; TokenPanel.Visibility = Visibility.Collapsed; PhonePanel.Visibility = Visibility.Collapsed; } else if (mode == QrCodeMode.Disabled || mode == QrCodeMode.Secondary) { Loading.IsActive = false; TokenPanel.Visibility = Visibility.Collapsed; PhonePanel.Visibility = Visibility.Visible; Switch2.Visibility = mode == QrCodeMode.Secondary ? Visibility.Visible : Visibility.Collapsed; } else if (mode == QrCodeMode.Primary) { Loading.IsActive = false; TokenPanel.Visibility = Visibility.Visible; PhonePanel.Visibility = Visibility.Collapsed; Switch2.Visibility = Visibility.Visible; } }
public void UpdateQrCodeMode(QrCodeMode mode) { if (mode is QrCodeMode.Loading or QrCodeMode.Primary) { if (_waiting) { TokenPanel.Visibility = Visibility.Visible; PhonePanel.Visibility = Visibility.Collapsed; } Switch2.Visibility = Visibility.Visible; if (mode == QrCodeMode.Loading) { if (TokenPlaceholder.ActualTheme == ElementTheme.Light) { TokenPlaceholder.ColorReplacements = new Dictionary <int, int> { { 0xffffff, 0x000000 } }; } TokenPlaceholder.Source = new Uri("ms-appx:///Assets/Animations/Qr.tgs"); } }