コード例 #1
0
 public AccountSelectWindow()
 {
     InitializeComponent();
     composite = new LivetCompositeDisposable();
     ctxlistener = new PropertyChangedWeakEventListener((INotifyPropertyChanged)DataContext);
     ctxlistener.Add("StartNewAccount", ExpandNewAccount);
     ctxlistener.Add("FinishNewAccount", CollapseNewAccount);
 }
コード例 #2
0
 public AccountSelectWindow()
 {
     InitializeComponent();
     composite   = new LivetCompositeDisposable();
     ctxlistener = new PropertyChangedWeakEventListener((INotifyPropertyChanged)DataContext);
     ctxlistener.Add("StartNewAccount", ExpandNewAccount);
     ctxlistener.Add("FinishNewAccount", CollapseNewAccount);
 }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: kb10uy/Kbtter3
        public MainWindow()
        {
            InitializeComponent();

            vm        = DataContext as MainWindowViewModel;
            composite = new LivetCompositeDisposable();

            ctxlistener = new PropertyChangedWeakEventListener(vm);
            ctxlistener.Add("AccessTokenRequest", StartAccountSelect);
            ctxlistener.Add("ReplyStart", ExpandNewTweet);
            ctxlistener.Add("ToggleNewStatus", ToggleNewTweet);
            ctxlistener.Add("StatusAction", (s, e) => RequestAction(vm.StatusAction.Type, vm.StatusAction.Information));
            ctxlistener.Add("UserTimeline", (s, e) =>
                            AddTab("ユーザー定義タブ1",
                                   new Frame
            {
                NavigationUIVisibility = NavigationUIVisibility.Hidden,
                Content = new UserCustomizableTimelinePage(vm.UserTimelineViewModel)
            }, vm.UserTimelineViewModel));

            ctxlistener.Add("StatusUpdate", (s, e) =>
            {
                DispatcherHelper.UIDispatcher.BeginInvoke(new Action(() =>
                {
                    if (TabControlMain.SelectedIndex != 0 && setting.MainWindow.NotifyNewStatus)
                    {
                        EmphasisTextBlock(TextBlockTimeline);
                        urs++;
                        TextBlockUnreadStatuses.Text = String.Format(" {0}", urs);
                    }
                }));
            });

            ctxlistener.Add("EventUpdate", (s, e) =>
            {
                DispatcherHelper.UIDispatcher.BeginInvoke(new Action(() =>
                {
                    if (TabControlMain.SelectedIndex != 1 && setting.MainWindow.NotifyNewNotification)
                    {
                        EmphasisTextBlock(TextBlockNotification);
                        urn++;
                        TextBlockUnreadNotifications.Text = String.Format(" {0}", urn);
                    }
                }));
            });

            composite.Add(ctxlistener);

            setting = Kbtter3Extension.LoadJson <Kbtter3Setting>(App.ConfigurationFileName);
            if (!setting.MainWindow.AllowJokeCommands)
            {
                ToolBarJokes.Visibility = Visibility.Collapsed;
            }

            SetShortcuts();
        }
コード例 #4
0
ファイル: MainWindow.xaml.cs プロジェクト: kb10uy/Kbtter3
        public MainWindow()
        {
            InitializeComponent();

            vm = DataContext as MainWindowViewModel;
            composite = new LivetCompositeDisposable();

            ctxlistener = new PropertyChangedWeakEventListener(vm);
            ctxlistener.Add("AccessTokenRequest", StartAccountSelect);
            ctxlistener.Add("ReplyStart", ExpandNewTweet);
            ctxlistener.Add("ToggleNewStatus", ToggleNewTweet);
            ctxlistener.Add("StatusAction", (s, e) => RequestAction(vm.StatusAction.Type, vm.StatusAction.Information));
            ctxlistener.Add("UserTimeline", (s, e) =>
                AddTab("ユーザー定義タブ1",
                new Frame
            {
                NavigationUIVisibility = NavigationUIVisibility.Hidden,
                Content = new UserCustomizableTimelinePage(vm.UserTimelineViewModel)
            }, vm.UserTimelineViewModel));

            ctxlistener.Add("StatusUpdate", (s, e) =>
            {
                DispatcherHelper.UIDispatcher.BeginInvoke(new Action(() =>
                {
                    if (TabControlMain.SelectedIndex != 0 && setting.MainWindow.NotifyNewStatus)
                    {

                        EmphasisTextBlock(TextBlockTimeline);
                        urs++;
                        TextBlockUnreadStatuses.Text = String.Format(" {0}", urs);

                    }
                }));
            });

            ctxlistener.Add("EventUpdate", (s, e) =>
            {
                DispatcherHelper.UIDispatcher.BeginInvoke(new Action(() =>
                {
                    if (TabControlMain.SelectedIndex != 1 && setting.MainWindow.NotifyNewNotification)
                    {

                        EmphasisTextBlock(TextBlockNotification);
                        urn++;
                        TextBlockUnreadNotifications.Text = String.Format(" {0}", urn);

                    }
                }));
            });

            composite.Add(ctxlistener);

            setting = Kbtter3Extension.LoadJson<Kbtter3Setting>(App.ConfigurationFileName);
            if (!setting.MainWindow.AllowJokeCommands) ToolBarJokes.Visibility = Visibility.Collapsed;

            SetShortcuts();
        }
コード例 #5
0
ファイル: StatusPage.xaml.cs プロジェクト: kb10uy/Kbtter3
        public StatusPage(StatusViewModel vm)
        {
            statvm = vm;
            DataContext = vm;
            InitializeComponent();
            elm = vm.TextElements;
            stsn = vm.ScreenName;

            if (vm.Via == "") StackPanelBlockVia.Visibility = Visibility.Collapsed;
            SetMainText();

            composite = new LivetCompositeDisposable();
            ctxlistener = new PropertyChangedWeakEventListener((INotifyPropertyChanged)DataContext);
            ctxlistener.Add("Delete", DeleteContent);
        }
コード例 #6
0
ファイル: StatusPage.xaml.cs プロジェクト: kb10uy/Kbtter3
        public StatusPage(StatusViewModel vm)
        {
            statvm      = vm;
            DataContext = vm;
            InitializeComponent();
            elm  = vm.TextElements;
            stsn = vm.ScreenName;

            if (vm.Via == "")
            {
                StackPanelBlockVia.Visibility = Visibility.Collapsed;
            }
            SetMainText();

            composite   = new LivetCompositeDisposable();
            ctxlistener = new PropertyChangedWeakEventListener((INotifyPropertyChanged)DataContext);
            ctxlistener.Add("Delete", DeleteContent);
        }