상속: LibraryBase.Wpf.ViewModel.BindableBase
예제 #1
0
        private void AddRule()
        {
            var rule = new NotifierRule(null, RuleType.Disabled, 0, ContextType.Buy, this);

            rule.RemoveRule += new EventHandler <RemoveRuleEventArgs>(rule_RemoveRule);
            Rules.Add(rule);
        }
        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;
        }
        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;
        }
        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
 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);
 }
예제 #6
0
 public void ActivateEventHandler(NotifierRule rule)
 {
     rule.RemoveRule += new EventHandler<NotifierCore.Notifier.Event.RemoveRuleEventArgs>(rule_RemoveRule);
 }
 private void AddRule()
 {
     var rule = new NotifierRule(null, RuleType.Disabled, 0, ContextType.Buy, this);
     rule.RemoveRule += new EventHandler<RemoveRuleEventArgs>(rule_RemoveRule);
     Rules.Add(rule);
 }