Exemplo n.º 1
0
        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);
            });
        }
Exemplo n.º 2
0
        public IEnumerable <TweetWorker> ReadyUpdate(InputBlockViewModel ibvm, IEnumerable <string> bindTags, IEnumerable <AccountInfo> infos)
        {
            var containsTags = RegularExpressions.HashRegex.Matches(InputText)
                               .Cast <Match>().Select(m => m.Value).ToArray();
            var excepteds = bindTags.Except(containsTags).Distinct();

            return(infos
                   .Where(i => i != null)
                   .Select(i => new TweetWorker(ibvm, i, InputText, InReplyToId, AttachedImage, excepteds.ToArray())));
        }
Exemplo n.º 3
0
 public TweetWorker(InputBlockViewModel parent, AccountInfo info, string body, long inReplyToId, string attachedImage, string[] tag)
 {
     this.parent = parent;
     this.TweetSummary = info.ScreenName + ": " + body;
     this.accountInfo = info;
     this.body = body;
     this.inReplyToId = inReplyToId;
     this.attachImagePath = attachedImage;
     this.tags = tag;
 }
Exemplo n.º 4
0
 public TweetWorker(InputBlockViewModel parent, AccountInfo info, string body, long inReplyToId, string attachedImage, string[] tag)
 {
     isImageAttached = false;
     isBodyStandby = false;
     if (info == null)
         throw new ArgumentNullException("info");
     this.parent = parent;
     this.TweetSummary = info.ScreenName + ": " + body;
     this.accountInfo = info;
     this.body = body;
     this.inReplyToId = inReplyToId;
     this.attachImagePath = attachedImage;
     this.tags = tag;
 }
Exemplo n.º 5
0
 public TweetWorker(InputBlockViewModel parent, AccountInfo info, string body, long inReplyToId, string attachedImage, string[] tag)
 {
     isImageAttached = false;
     isBodyStandby   = false;
     if (info == null)
     {
         throw new ArgumentNullException("info");
     }
     this.parent          = parent;
     this.TweetSummary    = info.ScreenName + ": " + body;
     this.accountInfo     = info;
     this.body            = body;
     this.inReplyToId     = inReplyToId;
     this.attachImagePath = attachedImage;
     this.tags            = tag;
 }
Exemplo n.º 6
0
 public IEnumerable<TweetWorker> ReadyUpdate(InputBlockViewModel ibvm, IEnumerable<string> bindTags, IEnumerable<AccountInfo> infos)
 {
     var containsTags = RegularExpressions.HashRegex.Matches(InputText)
         .Cast<Match>().Select(m => m.Value).ToArray();
     var excepteds = bindTags.Except(containsTags).Distinct();
     return infos.Select(i => new TweetWorker(ibvm, i, InputText, InReplyToId, AttachedImage, excepteds.ToArray()));
 }