Esempio n. 1
0
 public void AddBehavior(string userName, UserBehavior behavior)
 {
     if (behaviors.ContainsKey(userName))
         behaviors[userName] = behavior;
     else
         behaviors.Add(userName, behavior);
 }
Esempio n. 2
0
 public UserEvent(string userName, string IP, int? categoryID, int? productID, Guid orderID,
     UserBehavior behavior)
 {
     this.DateCreated = DateTime.Now;
     UserName = userName;
     this.IP = IP;
     this.CategoryID = categoryID;
     this.ProductID = productID;
     this.OrderID = orderID;
     this.Behavior = behavior;
 }
Esempio n. 3
0
 private void UpdateStatus(User user, UserBehavior behavior)
 {
     if (user == null) return;
     AppSettings.UserBehaviorManager.AddBehavior(user.Name, behavior);
     UpdateUserBehaviorAppSetting();
     FriendIgnoreCheckBox.IsChecked = (behavior == UserBehavior.Ignore);
     FriendAlwaysAlertCheckbox.IsChecked = (behavior == UserBehavior.AlwaysAlert);
     FriendNeverAlertCheckbox.IsChecked = (behavior == UserBehavior.NeverAlert);
 }
Esempio n. 4
0
 public bool HasBehavior(string userName, UserBehavior behavior)
 {
     return GetBehavior(userName) == behavior;
 }
Esempio n. 5
0
 private bool HasBehavior(Tweet tweet, UserBehavior behavior)
 {
     return AppSettings.UserBehaviorManager.HasBehavior(tweet.User.Name, behavior);
 }