public void AddBehavior(string userName, UserBehavior behavior) { if (behaviors.ContainsKey(userName)) behaviors[userName] = behavior; else behaviors.Add(userName, behavior); }
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; }
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); }
public bool HasBehavior(string userName, UserBehavior behavior) { return GetBehavior(userName) == behavior; }
private bool HasBehavior(Tweet tweet, UserBehavior behavior) { return AppSettings.UserBehaviorManager.HasBehavior(tweet.User.Name, behavior); }