示例#1
0
 public UserDetail(TwitterAccountSetting item)
 {
     this.Id               = item.UserId;
     this._userName        = item.ScreenName;
     this._name            = item.Name;
     this._isProtected     = item.IsProtected;
     this._profileImageUrl = item.ProfileImageUrl;
 }
示例#2
0
        public TwitterAccount(TwitterAccountSetting setting)
            : base(false)
        {
            this._setting  = setting.Clone();
            this.ItemId    = setting.ItemId;
            this.Api       = setting.CreateApi();
            this.DataStore = _dataFactory;
            this.Info      = this.DataStore.GetAccount(setting);
            this.Validator = new TwitterValidator(this);
            this.Timeline  = new TwitterTimeline(this);
            this.Commands  = new AccountCommandGroup(this);

            ((INotifyPropertyChanged)this.Info).PropertyChanged += this.OnProfileUpdated;
        }
示例#3
0
        public TwitterAccount(string itemId, TwitterApi api, User account)
            : base(true)
        {
            this._setting = new()
            {
                ItemId = itemId,
                UserId = api.UserId,
            };
            this.ItemId = itemId;
            this.SetApiTokens(api);
            this.DataStore = _dataFactory;
            this.Info      = this.DataStore.RegisterAccount(account);
            this.Validator = new TwitterValidator(this);
            this.Timeline  = new TwitterTimeline(this);
            this.Commands  = new AccountCommandGroup(this);
            this.OnProfileUpdated(this.Info, new(null));

            ((INotifyPropertyChanged)this.Info).PropertyChanged += this.OnProfileUpdated;
        }