Пример #1
0
        private void RibbonSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var tab = Ribbon.SelectedItem as RibbonTab;

            if (tab == null)
            {
                return;
            }
            switch ((String)tab.Header)
            {
            case "Lobby":
                LobbyTab();
                break;

            case "Host/Join":
                HostJoinTab();
                break;

            case "Games":
                var gl = new GameList();
                gl.OnGameClick += gl_OnGameDoubleClick;
                frame1.Navigate(gl);
                break;

            case "Alerts":
                frame1.Navigate(new NotificationList());
                NotificationTab.HeaderStyle = Resources["NormalHeaderColor"] as Style;
                NotificationTab.InvalidateVisual();
                break;
            }
        }
Пример #2
0
 private void LobbyClientOnOnFriendRequest(object sender, Jid user)
 {
     Dispatcher.Invoke(new Action(() =>
     {
         if (frame1.Content as NotificationList != null)
         {
             return;
         }
         NotificationTab.HeaderStyle =
             Resources["AlertHeaderColor"] as Style;
         NotificationTab.InvalidateVisual();
     }));
 }
Пример #3
0
 private void notification_Changed(object sender, FileSystemEventArgs e)
 {
     if (!cvFormClosing)
     {
         while (IsFileLocked(Global.NotificationXml))
         {
             Thread.Sleep(1000);
         }
         if (!cvFormClosing)
         {
             Invoke((MethodInvoker) delegate()
             {
                 this.tabPageNotifications.Controls.Clear();
                 NotificationTab lvNotificationTab = new NotificationTab();
                 lvNotificationTab.Width           = 723;
                 lvNotificationTab.Height          = 341;
                 this.tabPageNotifications.Controls.Add(lvNotificationTab);
             });
         }
     }
 }
        public void Notifications()
        {
            NotificationTab.Click();

            Assert.That(NotificationsText.Text, Is.EqualTo("Notifications"));
        }