コード例 #1
0
 public NotificationEventArgs(int id, HotItem item, NotifierRule rule, NotificationType type)
 {
     this.Id               = id;
     this.Item             = item;
     this.Rule             = rule;
     this.NotificationType = type;
 }
コード例 #2
0
 public NotificationEventArgs(int id, HotItem item, NotifierRule rule, NotificationType type)
 {
     this.Id = id;
     this.Item = item;
     this.Rule = rule;
     this.NotificationType = type;
 }
コード例 #3
0
        private void AddRule()
        {
            var rule = new NotifierRule(Item, RuleType.Disabled, 0, ContextType, this);

            rule.RemoveRule += new EventHandler <NotifierCore.Notifier.Event.RemoveRuleEventArgs>(rule_RemoveRule);
            Rules.Add(rule);
        }
コード例 #4
0
        public NotificationModel(HotItem item, NotifierRule rule, String message, DateTime timeStamp, NotificationType notificationType)
        {
            this.DataId           = item.DataId;
            this.NotificationType = notificationType;
            this.TimeStamp        = timeStamp;
            this.Message          = message;
            this.Item             = item;
            if (this.Item != null)
            {
                this.BuyMoney  = item.BuyMoney;
                this.SellMoney = item.SellMoney;
            }
            this.Rule = rule;

            ApplyItemValues(item);
            // TODO: Refactoring, someday NotifierRule and NotificationModel must be merged together
        }
コード例 #5
0
        public NotificationModel(HotItem item, NotifierRule rule, String message, DateTime timeStamp, NotificationType notificationType)
        {
            this.DataId = item.DataId;
            this.NotificationType = notificationType;
            this.TimeStamp = timeStamp;
            this.Message = message;
            this.Item = item;
            if (this.Item != null)
            {
                this.BuyMoney = item.BuyMoney;
                this.SellMoney = item.SellMoney;
            }

            if (NotificationType == NotificationType.Buy)
            {
                this.RuleBuy = rule;
            }
            else if (NotificationType == NotificationType.Sell)
            {
                this.RuleSell = rule;
            }
        }
コード例 #6
0
        public NotificationModel(GemManager gemManager, GemRuleViewModel item, NotifierRule rule, String message, DateTime timeStamp, NotificationType notificationType)
        {
            this.DataId = 0;
            this.IsGemNotification = true;
            this.NotificationType = notificationType;
            this.TimeStamp = timeStamp;
            this.Message = message;
            if (gemManager != null)
            {
                this.BuyMoney = gemManager.BuyGemPriceMoney;
                this.SellMoney = gemManager.BuyGoldPriceMoney;
            }

            if (NotificationType == NotificationType.BuyGems)
            {
                this.RuleBuy = rule;
            }
            else if (NotificationType == NotificationType.BuyGold)
            {
                this.RuleSell = rule;
                this.DataId = -1;
            }
        }
コード例 #7
0
        public NotificationModel(GemManager gemManager, GemRuleViewModel item, NotifierRule rule, String message, DateTime timeStamp, NotificationType notificationType)
        {
            this.DataId            = 0;
            this.IsGemNotification = true;
            this.NotificationType  = notificationType;
            this.TimeStamp         = timeStamp;
            this.Message           = message;
            if (gemManager != null)
            {
                this.BuyMoney  = gemManager.BuyGemPriceMoney;
                this.SellMoney = gemManager.BuyGoldPriceMoney;
            }

            this.Rule = rule;

            if (NotificationType == NotificationType.BuyGems)
            {
            }
            else if (NotificationType == NotificationType.BuyGold)
            {
                this.DataId = -1;
            }
            Name = message;
        }
コード例 #8
0
 public RemoveRuleEventArgs(NotifierRule rule)
 {
     this.Rule = rule;
 }
コード例 #9
0
 private void AddRule()
 {
     var rule = new NotifierRule(null, RuleType.Disabled, 0, false);
     rule.RemoveRule += new EventHandler<Scraper.Notifier.Event.RemoveRuleEventArgs>(rule_RemoveRule);
     Rules.Add(rule);
 }
コード例 #10
0
 public void ActivateEventHandler(NotifierRule rule)
 {
     rule.RemoveRule += new EventHandler <NotifierCore.Notifier.Event.RemoveRuleEventArgs>(rule_RemoveRule);
 }
コード例 #11
0
 private void AddRule()
 {
     var rule = new NotifierRule(Item, RuleType.Disabled, 0, IsSellContext);
     rule.RemoveRule += new EventHandler<Scraper.Notifier.Event.RemoveRuleEventArgs>(rule_RemoveRule);
     Rules.Add(rule);
 }
コード例 #12
0
 public void ActivateEventHandler(NotifierRule rule)
 {
     rule.RemoveRule += new EventHandler<Scraper.Notifier.Event.RemoveRuleEventArgs>(rule_RemoveRule);
 }