public Event(Point p, Event prev, Event next, Enums.EventType eventType)
 {
     this.point     = p;
     this.prev      = prev;
     this.next      = next;
     this.eventType = eventType;
 }
Ejemplo n.º 2
0
        public static VO_Page CreatePage(Enums.EventType CurrentEvent, int PageNumber, Guid objectId)
        {
            VO_Page NewPage = new VO_Page(new Guid());

            NewPage.PageNumber    = PageNumber;
            NewPage.PageEventType = CurrentEvent;

            VO_Script Script = null;

            switch (CurrentEvent)
            {
            case Enums.EventType.Animation:
                Script = ObjectsFactory.CreateScript(Enums.ScriptType.AnimationEvents);
                NewPage.AnimationFrequency = GlobalConstants.ANIMATION_NORMAL_FREQUENCY;
                break;

            case Enums.EventType.Character:
                Script = ObjectsFactory.CreateScript(Enums.ScriptType.CharacterEvents);
                VO_Character character = GameCore.Instance.GetCharacterById(objectId);
                NewPage.CharacterAnimationFrequency = GlobalConstants.ANIMATION_NORMAL_FREQUENCY;
                NewPage.CharacterDirection          = Enums.Movement.Down;
                NewPage.CharacterSpeed        = GlobalConstants.CHARACTERS_NORMAL_SPEED;
                NewPage.CharacterStandingType = character.StandingAnim;
                NewPage.CharacterWalkingType  = character.WalkingAnim;
                NewPage.CharacterTalkingType  = character.TalkingAnim;
                break;

            case Enums.EventType.Event:
                Script = ObjectsFactory.CreateScript(Enums.ScriptType.Events);
                break;
            }

            NewPage.Script = Script;
            return(NewPage);
        }
 public Event(Point p, int index, int index_aux, Enums.EventType eventType)
 {
     this.point     = p;
     this.index     = index;
     this.index_aux = index_aux;
     this.eventType = eventType;
 }
Ejemplo n.º 4
0
 public void SendToApproverQueue(Enums.EventType eventType)
 {
     if (eventType == Enums.EventType.HiEvent)
     {
         _bus.Send("eventprocessing.eventapprover.service.input",
                   new ApproveEvent
         {
             EventId           = Guid.Parse("2f18c499-dfb0-49bf-8e7a-6a6ce8c2b674"),
             EventType         = "ITOperations.Treatment.HealthInterventionEvent",
             ValidationOutcome = ValidationResultFlag.Valid,
             EventSource       = "MindaPro"
         });
     }
     if (eventType == Enums.EventType.PdEvent)
     {
         _bus.Send("eventprocessing.eventapprover.service.input",
                   new ApproveEvent
         {
             EventId           = Guid.Parse("1ec69094-80cf-4597-a841-78873f462d5a"),
             EventType         = "ITOperations.Mating.PregnancyDiagnosisEvent",
             ValidationOutcome = ValidationResultFlag.Valid,
             EventSource       = "MindaPro"
         });
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Insère un event
        /// </summary>
        /// <returns></returns>
        public static VO_Event CreateEvent(Enums.EventType currentEvent, Guid objectId)
        {
            VO_Event newItem = new VO_Event();

            newItem.PageList = new List <VO_Page>();
            VO_Page FirstPage = CreatePage(currentEvent, 0, objectId);

            FirstPage.PageEventType = currentEvent;
            FirstPage.PageNumber    = newItem.PageList.Count + 1;

            VO_Script Script = null;

            switch (currentEvent)
            {
            case Enums.EventType.Animation:
                Script = ObjectsFactory.CreateScript(Enums.ScriptType.AnimationEvents);
                break;

            case Enums.EventType.Character:
                Script = ObjectsFactory.CreateScript(Enums.ScriptType.CharacterEvents);
                break;

            case Enums.EventType.Event:
                Script = ObjectsFactory.CreateScript(Enums.ScriptType.Events);
                break;
            }


            FirstPage.Script = Script;

            newItem.PageList.Add(FirstPage);
            return(newItem);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// 记录操作日志
 /// </summary>
 /// <param name="Event">操作事件</param>
 /// <param name="Description">描述</param>
 /// <returns></returns>
 public bool Log(Enums.EventType Event, string Description)
 {
     if (LoginType == Enums.LoginType.admin)  //后台写操作日志
     {
         return(DB.SysLogs.setAdminLog(Event, Description));
     }
     else if (LoginType == Enums.LoginType.member) //前台写操作日志
     {
         return(DB.SysLogs.setMemberLog(Event, Description));
     }
     return(false);
 }
Ejemplo n.º 7
0
        public static void Main(string[] args)
        {
            const Enums.EventType       eventType = Enums.EventType.PdEvent;
            const Enums.ServiceBoundary sb        = Enums.ServiceBoundary.Mating;

            //ITOpsUtils.SendToItOps();
            //new ReceiverQueueMsgSender().SendToReceiverQueue(eventType, sb);
            //new ValidatorQueueMsgSender().SendToValidatorQueue(eventType, sb);
            //new AggQueueMsgSender().SendToAggregatorQueue(eventType);
            //new ApproverQueueMsgSender().SendToApproverQueue(eventType);
            new WriterQueueMsgSender().SendToWriterQueue(eventType);
        }
Ejemplo n.º 8
0
        public List <int> SearchArtsit(string city, DateTime timeEvent, Enums.EventType eventType, Enums.ArtistType artistType)
        {
            int    idCity = applicationDbContext.Citys.Where(c => c.City == city).Select(c => c.Id).FirstOrDefault();
            var    idArtitsResultOfCitys = applicationDbContext.CictyWorks.Where(c => c.IdCity == idCity).Select(i => i.IdArtis).ToList();
            string daySelect             = timeEvent.DayOfWeek.ToString();
            var    idArtitsResultOfDay   = applicationDbContext.DaysWorks.FromSqlRaw($"select * from DaysWorks where {daySelect} = 1").Select(a => a.IdArtit).ToList();

            var oa = applicationDbContext.Orders.Where(o => o.DateEvent.DayOfYear == timeEvent.DayOfYear).Select(o => o.IdAtris).ToList();

            return(applicationDbContext.Artists.Where(i => idArtitsResultOfCitys.Any(b => b == i.Id) && idArtitsResultOfDay.Any(b => b == i.Id) && !oa.Any(o => o == i.Id)).
                   Where(a => (ArtistType)a.ArtistType == artistType &&
                         (EventType)a.EventType == eventType).Select(a => a.Id).ToList());
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 多条数据的操作
        /// </summary>
        /// <typeparam name="T">必须继承BaseModel的实体类</typeparam>
        /// <param name="t">实体信息</param>
        /// <param name="type">操作类型</param>
        /// <param name="remark">备注</param>
        /// <returns></returns>
        public async Task WriteOneEventLogAsync <T>(List <T> t, Enums.EventType type, string remark) where T : BaseModel
        {
            var log = new LogEvent();

            log.UserId    = Current.UserId.HasValue ? Current.UserId.Value : 0;
            log.UserName  = Current.UserJson.JsonToModelOrDefault <User>().Name;
            log.Content   = $"用户\"{log.UserName}\"批量{type.GetDisplayName()}了[{typeof(T).GetDisplayName()}]数据。";
            log.EventType = type;
            log.Remark    = remark;
            log.WriteDate = DateTime.Now;
            await Task.Run(() =>
            {
                Db.Insertable(log).ExecuteCommand();
            });
        }
Ejemplo n.º 10
0
        public void SendToReceiverQueue(Enums.EventType eventType, Enums.ServiceBoundary serviceBoundary)
        {
            if (eventType == Enums.EventType.HeatEvent || eventType == Enums.EventType.PdEvent)
            {
                switch (serviceBoundary)
                {
                case Enums.ServiceBoundary.Calendar:
                    SendToCalenderQueue();
                    break;

                case Enums.ServiceBoundary.Agm:
                    SendToAgmQueue();
                    break;

                case Enums.ServiceBoundary.Ai:
                    SendToAiQueue();
                    break;

                case Enums.ServiceBoundary.Arc:
                    SendToArcQueue();
                    break;

                case Enums.ServiceBoundary.Som:
                    SendToSomQueue();
                    break;

                case Enums.ServiceBoundary.AnimalCharacteristics:
                    SendToAcQueue();
                    break;

                case Enums.ServiceBoundary.Mating:
                    SendToMatingQueue();
                    break;
                }
            }
            if (eventType == Enums.EventType.EnrolEvent)
            {
                _bus.Send("treatment.service.input",
                          new Mating.ValidatePregnancyDiagnosisEvent
                {
                    AnimalKey = 20159657,
                    EventId   = new Guid("6aad2090-7e64-4668-b0b7-c06523058b4a"),
                    Date      = DateTime.Now
                });
            }
        }
Ejemplo n.º 11
0
        public VictimEvent(DateTime time, Enums.EventType type, KillerEvent pairEvent)
            : base(time, type)
        {
            PairEvent = pairEvent ?? throw new ArgumentNullException(nameof(pairEvent));

            Damage = pairEvent.Damage;

            KillerItem          = pairEvent.KillerItem;
            KillerProjectile    = pairEvent.KillerProjectile;
            HasKillerProjectile = pairEvent.HasKillerProjectile;

            KillerPlayer    = pairEvent.Player;
            KillerPositionX = pairEvent.EventPosX;
            KillerPositionY = pairEvent.EventPosY;

            Player    = pairEvent.VictimPlayer;
            EventPosX = pairEvent.VictimPositionX;
            EventPosY = pairEvent.VictimPositionY;
        }
Ejemplo n.º 12
0
 //"EventProcessing.ValidationAggregator.service.input@davidyhpw8"
 public void SendToWriterQueue(Enums.EventType eventType)
 {
     if (eventType == Enums.EventType.PdEvent)
     {
         _bus.Send("eventprocessing.eventwrite.service.input",
                   new InsertEvent
         {
             EventId   = Guid.Parse("A3A52979-313F-41E3-8628-1F0D7D9AD3F7"),
             EventType = "ITOperations.Mating.PregnancyDiagnosisEvent"
         });
     }
     if (eventType == Enums.EventType.HiEvent)
     {
         _bus.Send("eventprocessing.eventwrite.service.input",
                   new InsertEvent
         {
             EventId   = Guid.Parse("5DA4E958-04DF-44BA-BD80-45BDF03B52D5"),
             EventType = "ITOperations.Treatment.HealthInterventionEvent"
         });
     }
 }
 public void SendToValidatorQueue(Enums.EventType eventType, Enums.ServiceBoundary serviceBoundary)
 {
     if (eventType == Enums.EventType.HeatEvent)
     {
         if (serviceBoundary == Enums.ServiceBoundary.Arc)
         {
             _bus.Send("animalrecordscompliance.eventvalidator.service.input",
                       new ARC.ValidateAnimalEvents
             {
                 AnimalKey   = 20159657,
                 Date        = DateTime.Now,
                 EventId     = new Guid("6aad2090-7e64-4668-b0b7-c06523058b4a"),
                 EventType   = "ITOperations.Mating.HeatEvent",
                 EventSource = "MindaPro"
             });
         }
         if (serviceBoundary == Enums.ServiceBoundary.Som)
         {
             _bus.Send("salesordermanagement.eventvalidator.service.input",
                       new SOM.ValidateAnimalEvents
             {
                 AnimalKey   = 20159657,
                 Date        = DateTime.Now,
                 EventId     = new Guid("6aad2090-7e64-4668-b0b7-c06523058b4a"),
                 EventType   = "ITOperations.Mating.HeatEvent",
                 EventSource = "MindaPro"
             });
         }
     }
     if (eventType == Enums.EventType.PdEvent)
     {
         _bus.Send("mating.eventvalidator.service.input",
                   new Mating.ValidatePregnancyDiagnosisEvent
         {
             AnimalKey = 20159657,
             EventId   = new Guid("6aad2090-7e64-4668-b0b7-c06523058b4a"),
             Date      = DateTime.Now
         });
     }
 }
Ejemplo n.º 14
0
 public void SendToAggregatorQueue(Enums.EventType eventType)
 {
     if (eventType == Enums.EventType.HeatEvent)
     {
         _bus.Send("eventprocessing.validationaggregator.service.input",
                   new ValidationResult
         {
             EventID = Guid.Parse("12f9040f-50c3-4532-a1f5-7a876bd3aa8e"),
             EventServiceBoundary = "ITOperations.Mating",
             ValidationOutcome    = ValidationResultFlag.Valid,
             EventType            = "ITOperations.Mating.HeatEvent",
             EventSource          = "CalvingMobileApp"
         });
     }
     if (eventType == Enums.EventType.PdEvent)
     {
         _bus.Send("eventprocessing.validationaggregator.service.input",
                   new ValidationResult
         {
             EventID = Guid.Parse("A3A52979-313F-41E3-8628-1F0D7D9AD3F7"),
             EventServiceBoundary = "ITOperations.Mating",
             ValidationOutcome    = ValidationResultFlag.Valid,
             EventType            = "ITOperations.Mating.PregnancyDiagnosisEvent",
             EventSource          = "MindaPro"
         });
     }
     if (eventType == Enums.EventType.HiEvent)
     {
         _bus.Send("eventprocessing.validationaggregator.service.input",
                   new ValidationResult
         {
             EventID = Guid.Parse("1ec69094-80cf-4597-a841-78873f462d5a"),
             EventServiceBoundary = "Treatment",
             ValidationOutcome    = ValidationResultFlag.Valid,
             EventType            = "ITOperations.Treatment.HealthInterventionEvent",
             EventSource          = "MindaPro"
         });
     }
 }
Ejemplo n.º 15
0
 public bool setAdminLog(Enums.EventType Event, string Description)
 {
     return(setAdminLog(Event.ToString(), Description));
 }
Ejemplo n.º 16
0
 public VictimEvent(DateTime time, Enums.EventType type)
     : base(time, type)
 {
 }
Ejemplo n.º 17
0
 public BasicPWEvent(int eventId, DateTime dateTime, bool open, DateTime processedDateTime, Enums.EventType eventType,
                     Enums.EventSource eventSource, int actingPersonId, int affectedPersonId, int organizationId,
                     int geographyId, int parameterInt, string parameterText)
 {
     this.EventId           = eventId;
     this.DateTime          = dateTime;
     this.Open              = open;
     this.ProcessedDateTime = processedDateTime;
     this.EventType         = eventType;
     this.EventSource       = eventSource;
     this.ActingPersonId    = actingPersonId;
     this.AffectedPersonId  = affectedPersonId;
     this.OrganizationId    = organizationId;
     this.GeographyId       = geographyId;
     this.ParameterInt      = parameterInt;
     this.ParameterText     = parameterText;
 }