コード例 #1
0
        void Stream_StatusUpdated(object sender, StatusUpdateEventArgs e)
        {
            ShowViral = false;
            ReplyTo   = null;

            if (e.Action == StatusUpdateAction.Reply)
            {
                ReplyTo = e.Status;
            }

            SelectedChannels.Clear();
            SelectedChannels.Add(e.ChannelId);

            PART_StatusUpdateTextbox.Text = e.StatusText;

            FocusHelper.Focus(PART_StatusUpdateTextbox);

            // Move caret to end of textbox
            PART_StatusUpdateTextbox.SelectionStart = PART_StatusUpdateTextbox.Text.Length;

            OnPropertyChanged("AllStatusChannels");
            OnPropertyChanged("ReplyTo");
            OnPropertyChanged("ShowViral");
            OnPropertyChanged("HasTwitter");
        }
コード例 #2
0
        void ToggleChannelInstance(ChannelInstance channel)
        {
            if (SelectedChannels.Contains(channel.Configuration.ChannelId))
            {
                SelectedChannels.Remove(channel.Configuration.ChannelId);
            }
            else
            {
                SelectedChannels.Add(channel.Configuration.ChannelId);
            }

            // Forces a propertychanged event, which resets our toggle button
            channel.IsVisible = channel.IsVisible;

            OnPropertyChanged("HasTwitter");
        }