/// <summary> /// Try to reconnect after a disconnection. /// </summary> private void Reconnect_Click(object sender, RoutedEventArgs e) { panels[_lastCheckedButton].Open(); UIController.HidePanel(_lostConnection); _lostConnection = null; }
/// <summary> /// Allows to work without a connection. /// </summary> private void WorkOffline_Click(object sender, RoutedEventArgs e) { UIController.Connected = false; _uiProfile.ExitButton.InternalImage.Source = new BitmapImage(new Uri("pack://application:,,,/It.Uniba.Di.Cdg.SocialTfs.Client;component/Images/Toolbar/Reconnect.png")); _uiProfile.ExitButton.ToolTip = "Reconnect"; UIController.HidePanel(_lostConnection); _lostConnection = null; }
/// <summary> /// Show a panel that manage the losing of the connection. /// </summary> internal void ShowLostConnection() { if (_lostConnection == null) { _lostConnection = new Popups.UILostConnection(); _lostConnection.WorkOffline.Click += WorkOffline_Click; _lostConnection.Reconnect.Click += Reconnect_Click; UIController.ShowPanel(_lostConnection); } }