public TwitchSetting(SettingsPageControlleur a_settingcontrolleur, TwitchLive a_channel) { InitializeComponent(); m_settingcontrolleur = a_settingcontrolleur; if (a_channel != null) { m_BufferChannel = a_channel; ChannelLink.Text = a_channel.ChannelLink; ChannelImg.Text = a_channel.ChannelImageLink; } else { m_BufferChannel = new TwitchLive(); ChannelLink.Text = "http://twitchrss.appspot.com/vod/NAME"; } }
public Twitch_MediaBtn(Object a_Media, int a_Row, int a_Column) { InitializeComponent(); //Emplacement dans la grille ItemGrid.SetValue(Grid.RowProperty, a_Row); ItemGrid.SetValue(Grid.ColumnProperty, a_Column); if (a_Media is TwitchLive) { m_Live = (TwitchLive)a_Media; TitleComponent.Text = m_Live.Title; LiveThumbnailComponent.Source = m_Live.Thumbnail; ChannelNameComponent.Text = m_Live.ChannelName; ChannelLogoComponent.Source = m_Live.ChannelImage; var t_converter = new System.Windows.Media.BrushConverter(); LiveCircle.Foreground = (Brush)t_converter.ConvertFromString(m_Live.IsLive ? "#e91916" : "#9c7a6f"); DateComponent.Text = m_Live.PublicationDate.ToShortDateString(); SinceComponent.Text = m_Live.PublicatedSince; IsLiveTextComponent.Foreground = (Brush)t_converter.ConvertFromString(m_Live.IsLive ? "#FFF" : "#8f8f8f"); } }