Пример #1
0
 /// <summary>
 /// The set state online.
 /// </summary>
 private void SetStateOnline()
 {
     Dispatcher.BeginInvoke(
         new Action(
             () =>
     {
         this.MatchmakingTab.IsEnabled = true;
         TabCommunityChat.IsEnabled    = true;
         ProfileTab.IsEnabled          = true;
         ProfileTabContent.Load(Program.LobbyClient.Me);
         var subbed = SubscriptionModule.Get().IsSubscribed;
         if (subbed == null || subbed == false)
         {
             menuSub.Visibility = Visibility.Visible;
         }
         else
         {
             menuSub.Visibility = Visibility.Collapsed;
         }
         if (Program.LobbyClient.Me.UserName.Contains(" "))
         {
             TopMostMessageBox.Show(
                 "WARNING: You have a space in your username. This will cause a host of problems on here. If you don't have a subscription, it would be best to make yourself a new account.",
                 "WARNING",
                 MessageBoxButton.OK,
                 MessageBoxImage.Warning);
         }
     }));
 }
Пример #2
0
        private async void LobbyClient_Connected(object sender, ConnectedEventArgs args)
        {
            try {
                OnPropertyChanged(nameof(ConnectionStatus));

                await Dispatcher.InvokeAsync(async() => {
                    ProfileTab.IsEnabled = true;
                    await ProfileTabContent.Load(Program.LobbyClient.User);
                });
            } catch (Exception ex) {
                Log.Error($"{nameof(LobbyClient_Connected)}", ex);
            }
        }
Пример #3
0
        private async Task SetStateOnline()
        {
            Dispatcher.VerifyAccess();

            ProfileTab.IsEnabled = true;
            await ProfileTabContent.Load(Program.LobbyClient.Me);

            if (Program.LobbyClient.Me.DisplayName.Contains(" "))
            {
                TopMostMessageBox.Show(
                    "WARNING: You have a space in your username. This will cause a host of problems on here. If you don't have a subscription, it would be best to make yourself a new account.",
                    "WARNING",
                    MessageBoxButton.OK,
                    MessageBoxImage.Warning);
            }
        }
Пример #4
0
 /// <summary>
 /// The set state online.
 /// </summary>
 private void SetStateOnline()
 {
     Dispatcher.BeginInvoke(
         new Action(
             () => {
         ProfileTab.IsEnabled = true;
         ProfileTabContent.Load(Program.LobbyClient.Me);
         if (Program.LobbyClient.Me.UserName.Contains(" "))
         {
             TopMostMessageBox.Show(
                 "WARNING: You have a space in your username. This will cause a host of problems on here. If you don't have a subscription, it would be best to make yourself a new account.",
                 "WARNING",
                 MessageBoxButton.OK,
                 MessageBoxImage.Warning);
         }
     }));
 }