public InputBlockViewModel(MainWindowViewModel parent) { this.Parent = parent; this._imageStackingViewViewModel = new ImageStackingViewViewModel(); this._userSelectorViewModel = new UserSelectorViewModel(); this._userSelectorViewModel.LinkChanged += () => this.LinkUserChanged(this.UserSelectorViewModel.LinkElements); this._inputUserSelectorViewModel = new UserSelectorViewModel(); this._inputUserSelectorViewModel.LinkChanged += this.inputLinkUserChanged; this._intelliSenseTextBoxViewModel = new IntelliSenseTextBoxViewModel(); this._intelliSenseTextBoxViewModel.TextChanged += (o, e) => invalidateTagBindState(); this._intelliSenseTextBoxViewModel.TextChanged += (o, e) => RaisePropertyChanged(() => IsDirectMessage); this._intelliSenseTextBoxViewModel.TextChanged += (o, e) => RaisePropertyChanged(() => DirectMessageTarget); this._intelliSenseTextBoxViewModel.TextChanged += (o, e) => RaisePropertyChanged(() => IsInReplyToEnabled); this._intelliSenseTextBoxViewModel.ItemsOpening += (o, e) => _intelliSenseTextBoxViewModel_OnItemsOpening(); this._intelliSenseTextBoxViewModel.FileDrop += (o, e) => AttachImage(e.FilePath); // Listen changing tab this.Parent.ColumnOwnerViewModel.CurrentTabChanged += new Action <TabViewModel>(CurrentTabChanged); RegisterKeyAssign(); ViewModelHelper.BindNotification(Setting.SettingValueChangedEvent, this, (o, e) => { RaisePropertyChanged(() => WorkerViewDockOrientation); RaisePropertyChanged(() => PostBoxOpenForeground); RaisePropertyChanged(() => PostBoxOpenBackground); RaisePropertyChanged(() => PostBoxCloseForeground); RaisePropertyChanged(() => PostBoxCloseBackground); RaisePropertyChanged(() => PostBoxBorder); }); }
public MainWindowViewModel() { KernelService.MainWindowViewModel = this; this._columnOwnerViewModel = new ColumnOwnerViewModel(this); this._notifierViewModel = new NotifierViewModel(this); this._notifyBlockViewModel = new NotifyBlockViewModel(this); // Input block dependents ColumnOwnerViewModel this._inputBlockViewModel = new InputBlockViewModel(this); this._userSelectionViewModel = new UserSelectionViewModel(); this._userSelectionViewModel.Finished += () => { this._isVisibleUserSelection = false; RaisePropertyChanged(() => IsVisibleUserSelection); RaisePropertyChanged(() => IsActivateMain); }; ViewModelHelper.BindNotification(Setting.SettingValueChangedEvent, this, (o, e) => { RaisePropertyChanged(() => IsNotifierBarBottom); RaisePropertyChanged(() => NotifierBarColumn); RaisePropertyChanged(() => IsInputBlockBottom); RaisePropertyChanged(() => InputBlockColumn); RaisePropertyChanged(() => FontFamily); RaisePropertyChanged(() => FontSize); RaisePropertyChanged(() => BackgroundImagePath); }); }
public IntelliSenseTextBoxViewModel() { ViewModelHelper.BindNotification(Setting.SettingValueChangedEvent, this, (_, __) => { RaisePropertyChanged(() => Foreground); RaisePropertyChanged(() => Background); }); }
public InputDescription(IntelliSenseTextBoxViewModel intelliSenseTextBoxViewModel) { this.isTextBoxVM = intelliSenseTextBoxViewModel; ViewModelHelper.BindNotification(intelliSenseTextBoxViewModel.TextChangedEvent, this, (o, e) => { this.InputText = this.isTextBoxVM.TextBoxText; }); // Initialize this.isTextBoxVM.TextBoxText = String.Empty; }
public TabViewModel(ColumnViewModel parent, TabProperty property = null) { this.Parent = parent; this.IsAlive = true; this.TabProperty = property ?? new TabProperty(); // 初期TLとしてnullを this.AddTopTimeline(null); ViewModelHelper.BindNotification(Setting.SettingValueChangedEvent, this, (o, e) => UpdateSettingValue()); }
public UserPageViewModel(TabViewModel parent, string userId) { this.Parent = parent; this._timelineListCoreViewModel = new TimelineListCoreViewModel(parent, new IFilter[0]); this.SetUser(userId); ViewModelHelper.BindNotification(Setting.SettingValueChangedEvent, this, (_, __) => { RaisePropertyChanged(() => UserProfileBackground); RaisePropertyChanged(() => UserProfileDarkBackground); }); }
public TimelineListCoreViewModel(TabViewModel parent, IEnumerable <IFilter> sources) { if (parent == null) { throw new ArgumentNullException("parent"); } this._tweetsSource = new CachedConcurrentObservableCollection <TabDependentTweetViewModel>(); this.Parent = parent; this.sources = sources; UpdateReacceptionChain(sources, true); // binding nortifications ViewModelHelper.BindNotification(TweetStorage.TweetStorageChangedEvent, this, TweetStorageChanged); ViewModelHelper.BindNotification(Setting.SettingValueChangedEvent, this, SettingValueChanged); // Generate timeline Task.Factory.StartNew(() => this.InvalidateCache()); }
public AccountViewModel(AccountInfo info) { this.Info = info; this._profileImageProvider = new Common.ProfileImageProvider(info); Task.Factory.StartNew(() => UpdatePostChunk()); ViewModelHelper.BindNotification(info.ConnectionStateChangedEvent, this, (o, e) => RaisePropertyChanged(() => ConnectState)); ViewModelHelper.BindNotification(TimeTickCall, this, (o, e) => { Task.Factory.StartNew(() => UpdatePostChunk()); }); ViewModelHelper.BindNotification(PostOffice.OnUnderControlChangedEvent, this, (o, e) => { RaisePropertyChanged(() => IsAccountUnderControlled); RaisePropertyChanged(() => AccountControlReleaseTime); }); }
public NotifyBlockViewModel(MainWindowViewModel parent) { this.Parent = parent; // InformServer.EventRegistered += new InformServer.NotifyEventHandler(InformServer_EventRegistered); // InformServer.ReportRegistered += new InformServer.ReportRegisterHandler(InformServer_ReportRegistered); ViewModelHelper.BindNotification(NotifyStorage.NotifyTextChangedEvent, this, (o, e) => { RaisePropertyChanged(() => StatusText); RaisePropertyChanged(() => IsLongRunning); }); ViewModelHelper.BindNotification(ExceptionStorage.ExceptionUpdatedEvent, this, (o, e) => RaisePropertyChanged(() => State)); ViewModelHelper.BindNotification(Statistics.WakeupTimeUpdatedEvent, this, (o, e) => RaisePropertyChanged(() => WakeupTime)); ViewModelHelper.BindNotification(Statistics.TweetSpeedUpdatedEvent, this, (o, e) => { RaisePropertyChanged(() => TweetSpeed); RaisePropertyChanged(() => TweetSpeedRank); }); ViewModelHelper.BindNotification(PostOffice.OnUnderControlChangedEvent, this, (o, e) => RaisePropertyChanged(() => State)); ViewModelHelper.BindNotification(TweetStorage.TweetStorageChangedEvent, this, (o, e) => RaisePropertyChanged(() => Tweets)); ViewModelHelper.BindNotification(ConnectionManager.ConnectionStateChangedEvent, this, (o, e) => RaisePropertyChanged(() => State)); ViewModelHelper.BindNotification(Setting.SettingValueChangedEvent, this, (_, __) => RaisePropertyChanged(() => StatusBarBackground)); ImageCacheStorage.DownloadingChanged += () => RaisePropertyChanged(() => ImageDownloading); }
public AccountConfigViewModel() { IsAccountModified = false; ViewModelHelper.BindNotification(AccountStorage.AccountsChangedEvent, this, (o, e) => RaisePropertyChanged(() => Accounts)); }
public ColumnViewModel(ColumnOwnerViewModel parent) { this.Parent = parent; ViewModelHelper.BindNotification(Setting.SettingValueChangedEvent, this, (o, e) => RaisePropertyChanged(() => TabColumn)); }
public UserSelectorViewModel() { ViewModelHelper.BindNotification(AccountStorage.AccountsChangedEvent, this, (o, e) => MakeTargets()); }
public NotifierViewModel(MainWindowViewModel parent) { this.Parent = parent; ViewModelHelper.BindNotification(EventStorage.EventRegisteredEvent, this, OnEventRegistered); }
public TwitterEventInfoViewModel() { ViewModelHelper.BindNotification(EventStorage.EventChangedEvent, this, (o, e) => TwitterEventInfoChanged()); }
public SystemInfoViewModel() { ViewModelHelper.BindNotification(AccountStorage.AccountsChangedEvent, this, (o, e) => RaisePropertyChanged(() => Accounts)); ViewModelHelper.BindNotification(ExceptionStorage.ExceptionUpdatedEvent, this, (o, e) => RaisePropertyChanged(() => Exceptions)); }