internal void UpdateContent(User user) { this.User = user; this.User = user; UserNameLB.Content = User.Name; UserStatusLB.Content = StatusToString.Convert(User.Status); if (User.Status == Status.Online) { if (this.IsMouseOver) { Content.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF81D650")); Content.BorderBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF225305")); } else { Content.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF58CD15")); Content.BorderBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF225305")); } } else { if (this.IsMouseOver) { Content.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFF2FF6F")); Content.BorderBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFFFFF00")); } else { Content.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFCDE200")); Content.BorderBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFFFFF00")); } } }
private void SetTopInformations(Label TopInfoLB, Label ConnectionStatusLB) { string roomName = Connection.Rooms.Where(x => x.Id == Connection.Client.RoomId).First().Name; TopInfoLB.Content = String.Format("Zalogowano jako: {0} IP Serwera: {1}{2}Pokój: {3}", Connection.Client.Name, Connection.Ip, Environment.NewLine, roomName); ConnectionStatusLB.Content = String.Format("Twój status: {0}", StatusToString.Convert(Connection.Client.Status)); }