public EventIcs GetEventIcs(EventPart x) { var data = new EventIcs { IsAllDay = x.AllDayEvent, Id = x.Identifier, Title = x.Title, Start = Convert.ToDateTime(x.StartDate), //TimeZoneHelper.ConvertTZIDFromUTC(x.StartDate, x.TimeZone), End = Convert.ToDateTime(x.EndDate), //TimeZoneHelper.ConvertTZIDFromUTC(x.EndDate, x.TimeZone), CreateDateTime = Convert.ToDateTime(x.CreateUtc), ModifiedDateTime = Convert.ToDateTime(x.ModifiedUtc), PublishDateTime = Convert.ToDateTime(x.PublishedUtc), CategoriesCsv = string.Join(",", x.Categories.Select(y => y.CategoryName)), LocationName = x.AddressLocation, TimeZone = string.IsNullOrWhiteSpace(x.TimeZone) ? "America/New_York" : x.TimeZone, RecurrenceId = x.RecurrenceId, RecurrenceRule = x.RecurrenceRule, RecurrenceException = x.RecurrenceException, Url = x.Url }; if (!string.IsNullOrEmpty(x.Url)) { data.Url = x.Url; } else { var autoroute = x.ContentItem.As <AutoroutePart>(); if (autoroute != null) { data.Url = _siteService.GetSiteSettings().BaseUrl + "/" + autoroute.Path; } } return(data); }
public IEnumerable <EventPart> GetSubEvents(EventPart parentEvent) { var allEvents = GetAllEvents(VersionOptions.Latest); var subevents = allEvents.Where(x => x.ParentEventIdentifier == parentEvent.Identifier); return(subevents.FilterEventParts(_services.WorkContext.CurrentUser)); }
public SchedulerEventViewModel SchedulerEventViewModelFromEvent(EventPart x) { var categories = _categoryService.GetEventCategoriesByEvent(x.ContentItem).ToList(); var data = new SchedulerEventViewModel { Id = x.Id, Identifier = x.Identifier, Title = x.Title, Description = x.Description, IsAllDay = x.AllDayEvent, Start = Convert.ToDateTime(x.StartDate), End = Convert.ToDateTime(x.EndDate), Url = x.Url, EventCategoryIds = _categoryService.GetEventCategoryIdentifiers(categories.Select(y => y.Id)).ToArray(), EventCategoryNames = categories.Select(y => y.CategoryName).ToArray(), Timezone = x.TimeZone, RecurrenceId = x.RecurrenceId, RecurrenceRule = x.RecurrenceRule, RecurrenceException = x.RecurrenceException, Location = x.AddressLocation, ImportFromGoogleCalendar = x.ImportedFromGoogleCalendar, ImportUid = x.ImportUid }; return(data); }
//启动一个Action public bool StartAction(Action config, EventPart ep, bool high, SkillContext context = null) { ZWAction zwaction = new ZWAction(config, this, ep, high, context); this.actionList_.AddTail(zwaction); return(true); }
public EventPart GetParentEvent(EventPart subEvent) { var allEvents = GetAllEvents(VersionOptions.Latest); var parentEvent = allEvents.FilterEventParts(_services.WorkContext.CurrentUser).SingleOrDefault(x => x.Identifier == subEvent.ParentEventIdentifier); return(parentEvent); }
internal ConflictEvent(EventPart e) { this.Start = e.Event.Start; this.End = e.Event.End; this.Value = e.Event.Id; this.Position = e.EvColumn.Number; this.DataItem = new DataItemWrapper(e.Event.Source); }
public EventItemViewModel(EventPart part) { Identifier = part.Identifier; EventCategoryNamesCsv = string.Join(",", part.Categories); Title = part.Title; StartDate = part.StartDate != null ? Convert.ToDateTime(part.StartDate).ToShortDateString() : string.Empty; EndDate = part.EndDate != null ? Convert.ToDateTime(part.EndDate).ToShortDateString() : string.Empty; ; }
public EventItemViewModel(EventPart part) { Identifier = part.Identifier; EventCategoryNamesCsv = string.Join(",", part.Categories); Title = part.Title; StartDate = part.StartDate != null?Convert.ToDateTime(part.StartDate).ToShortDateString() : string.Empty; EndDate = part.EndDate != null?Convert.ToDateTime(part.EndDate).ToShortDateString() : string.Empty;; }
/// <summary> /// Footイベント実行 /// </summary> /// <param name="findEvent"></param> void FootEvent(EventPart findEvent) { Debug.Log("FootEvent"); if (findEvent.Type == EventType.Floor1) { Application.LoadLevel("Floor"); } }
internal void Add(EventPart e) { if (e.EvColumn != null) { throw new ApplicationException("This EventPart was already placed into a EventColumn."); } this.events.Add(e); e.EvColumn = this; }
internal bool CanAdd(EventPart e) { foreach (EventPart current in this.events) { if (current.OverlapsWith(e)) { return(false); } } return(true); }
/// <summary> /// Clickイベント実行 /// </summary> /// <param name="findEvent"></param> void ClickEvent(EventPart findEvent) { // PrefabよりSrioをインスタンス化する // Canvasは非表示にしておく // ScenarioManagerにファイル名登録 // (ScenarioManagerに終了イベントを登録) // 非表示のまま実行する(TextなどがあるごとにVisibleに変更する) // IF分岐のコマンドを作る(TRUEで別シナリオに飛ぶ)(NIFも作る) //======================= //MsgBoxも対応する (Messageとイベントを登録) Debug.Log("ClickEvent"); }
public ZWAction(Action config, ActionPerformer af, EventPart ep, bool high, SkillContext context = null) { this.High = high; this.startTime = GameTimer.time; this.config = config; this.LifeTime = this.config.LifeTime; this.eventpart = ep; this.ActionPerformer_ = af; this.actionEvents = new PList(); this.context = context; this.Initialize(af.owerObject); }
/// <summary> /// 移動発生のクリックか /// </summary> void CheckMove() { Vector2I Pos = GetMouseEnablePos(); if (Pos != null) { GoalPos = Pos.Clone(); Vector2I GoalPos2 = Pos.Clone(); EventPart findEvent = EventList.Find(i => i.Pos == GoalPos); if (findEvent != null) { if (findEvent.IsClickEvent()) { GoalPos2 = findEvent.SubPos.Clone(); } } // ルート検索 List <Vector2I> _PathList; bool result = A_Star.SearchPath(Grids, NowPos, GoalPos2, out _PathList); if (result == false) { return; } if (_PathList.Count <= 0) { return; } PathList = _PathList; if (result)// ルートあり、移動する { NextPos = PathList[0]; PathList.RemoveAt(0); // 移動指示 Player.ReqAutoMoving(NextPos.X, NextPos.Y, new ReportEndHandler(OnMoveEnd)); NowMoveing = true; } } }
/// <summary> /// 移動完了イベント /// </summary> void OnMoveEnd() { NowPos = NextPos; // 到着か if (NowPos == GoalPos) { NowMoveing = false; EventPart findEvent = EventList.Find(i => i.Pos == NowPos); if (findEvent != null) { if (findEvent.IsFootEvent()) { FootEvent(findEvent); } } return; } // ClickEventのSubPosに到着か if (PathList.Count <= 0) { NowMoveing = false; EventPart findEvent = EventList.Find(i => (i.Pos == GoalPos) && (i.SubPos == NowPos)); if (findEvent != null) { if (findEvent.IsClickEvent()) { ClickEvent(findEvent); } } return; } NextPos = PathList[0]; PathList.RemoveAt(0); // 移動指示 Player.ReqAutoMoving(NextPos.X, NextPos.Y, new ReportEndHandler(OnMoveEnd)); NowMoveing = true; }
public IEnumerable<EventPart> GetRelatedEvents(EventPart part) { List<EventPart> relatedEvents = new List<EventPart>(); if (!string.IsNullOrWhiteSpace(part.ParentEventIdentifier)) { //get parent event then get siblings var parentEvent = GetParentEvent(part); relatedEvents.Add(parentEvent); //get siblings - excluding current event var siblings = GetSubEvents(parentEvent).Where(x => x.Identifier != part.Identifier); relatedEvents.AddRange(siblings); } //get children and join the two lists var childEvents = GetSubEvents(part); relatedEvents.AddRange(childEvents); return relatedEvents; }
public IEnumerable <EventPart> GetRelatedEvents(EventPart part) { List <EventPart> relatedEvents = new List <EventPart>(); if (!string.IsNullOrWhiteSpace(part.ParentEventIdentifier)) { //get parent event then get siblings var parentEvent = GetParentEvent(part); relatedEvents.Add(parentEvent); //get siblings - excluding current event var siblings = GetSubEvents(parentEvent).Where(x => x.Identifier != part.Identifier); relatedEvents.AddRange(siblings); } //get children and join the two lists var childEvents = GetSubEvents(part); relatedEvents.AddRange(childEvents); return(relatedEvents); }
private void InitEvent() { // Event系を登録する // Event系はStart時に即非表示にするもの // MetaにEventの詳細を登録する EventList = new List <EventPart>(); GameObject[] Objs = GameObject.FindGameObjectsWithTag("RoomEvent"); foreach (GameObject obj in Objs) { RoomFootEvent fevent = obj.GetComponent(typeof(RoomFootEvent)) as RoomFootEvent; if (fevent != null) { EventPart EventData = new EventPart(); EventData.Pos = fevent._Postion.Vector2I; EventData.SubPos = EventData.Pos.Clone(); EventData.SrioFileName = fevent.SrioFileName; EventData.Type = fevent.Type; EventList.Add(EventData); } RoomClickEvent cevent = obj.GetComponent(typeof(RoomClickEvent)) as RoomClickEvent; if (cevent != null) { EventPart EventData = new EventPart(); EventData.Pos = cevent._Postion.Vector2I; EventData.SubPos = cevent.GetSubPos(); EventData.SrioFileName = cevent.SrioFileName; EventData.Type = cevent.Type; EventList.Add(EventData); } } }
/// <summary> /// Event発生のクリックか /// </summary> bool CheckEvent() { Vector2I Pos = GetMouseEnablePos(); if (Pos != null) { // 現在位置をクリック EventPart findEvent = null; findEvent = EventList.Find(i => (i.Pos == Pos) && (i.SubPos == NowPos)); if (findEvent != null) { if (findEvent.IsClickEvent()) { // ClickEventをクリック ClickEvent(findEvent); return(true); } } return(false); } return(false); }
private void stripAndAddEvent(Event e) { if (this.IsGantt) { if (this.Id != e.Id) { return; } } else if (this.IsResourcesView && this.Id != e.ResourceId) { return; } if (e.AllDay) { if (e.Start > e.End) { return; } if (e.Start > this.End) { return; } if (this.AllDayEnd == DateTimeSpec.DateTime) { if (e.End <= this.Start) { return; } } else if (e.End < this.Start) { return; } EventPart item = new EventPart(this, e); this.allDayEvents.Add(item); return; } else { if (e.End < this.Start) { return; } if (e.End == this.Start && e.Start != e.End) { return; } if (e.Start >= this.End) { return; } if (e.Start > e.End) { return; } EventPart item2 = new EventPart(this, e); this.eventParts.Add(item2); return; } }
public static string EventForAdmin(this UrlHelper urlHelper, EventPart eventPart) { return urlHelper.Action("Item", "EventAdmin", new { eventId = eventPart.Get<IdentityPart>().Identifier, area = "Orchard.CalendarEvents" }); }
public static string EventSubscribe(this UrlHelper urlHelper, EventPart eventPart) { return urlHelper.Action("Subscribe", "Event", new { eventId = eventPart.Get<IdentityPart>().Identifier, area = "Orchard.CalendarEvents" }); }
public EventDetails(EventPart eventPart) : this(eventPart.Record) { }
public EventIcs GetEventIcs(EventPart x) { var data = new EventIcs { IsAllDay = x.AllDayEvent, Id = x.Identifier, Title = x.Title, Start = Convert.ToDateTime(x.StartDate),//TimeZoneHelper.ConvertTZIDFromUTC(x.StartDate, x.TimeZone), End = Convert.ToDateTime(x.EndDate),//TimeZoneHelper.ConvertTZIDFromUTC(x.EndDate, x.TimeZone), CreateDateTime = Convert.ToDateTime(x.CreateUtc), ModifiedDateTime = Convert.ToDateTime(x.ModifiedUtc), PublishDateTime = Convert.ToDateTime(x.PublishedUtc), CategoriesCsv = string.Join(",", x.Categories.Select(y => y.CategoryName)), LocationName = x.AddressLocation, TimeZone = string.IsNullOrWhiteSpace(x.TimeZone) ? "America/New_York" : x.TimeZone, RecurrenceId = x.RecurrenceId, RecurrenceRule = x.RecurrenceRule, RecurrenceException = x.RecurrenceException, Url = x.Url }; if (!string.IsNullOrEmpty(x.Url)) { data.Url = x.Url; } else { var autoroute = x.ContentItem.As<AutoroutePart>(); if (autoroute != null) { data.Url = _siteService.GetSiteSettings().BaseUrl + "/" + autoroute.Path; } } return data; }
public IEnumerable<EventPart> GetSubEvents(EventPart parentEvent) { var allEvents = GetAllEvents(VersionOptions.Latest); var subevents = allEvents.Where(x => x.ParentEventIdentifier == parentEvent.Identifier); return subevents.FilterEventParts(_services.WorkContext.CurrentUser); }
public SchedulerEventViewModel SchedulerEventViewModelFromEvent(EventPart x) { var categories = _categoryService.GetEventCategoriesByEvent(x.ContentItem).ToList(); var data = new SchedulerEventViewModel { Id = x.Id, Identifier = x.Identifier, Title = x.Title, Description = x.Description, IsAllDay = x.AllDayEvent, Start = Convert.ToDateTime(x.StartDate), End = Convert.ToDateTime(x.EndDate), Url = x.Url, EventCategoryIds = _categoryService.GetEventCategoryIdentifiers(categories.Select(y => y.Id)).ToArray(), EventCategoryNames = categories.Select(y => y.CategoryName).ToArray(), Timezone = x.TimeZone, RecurrenceId = x.RecurrenceId, RecurrenceRule = x.RecurrenceRule, RecurrenceException = x.RecurrenceException, Location = x.AddressLocation, ImportFromGoogleCalendar = x.ImportedFromGoogleCalendar, ImportUid = x.ImportUid }; return data; }
public EventDetails(EventPart eventPart) : this(eventPart.Record) { }
internal bool OverlapsWith(EventPart e) { return(this.eventParts.Count != 0 && this.BoxStart < e.BoxEnd && this.BoxEnd > e.BoxStart); }
internal void Add(EventPart ev) { this.eventParts.Add(ev); this.ArrangeColumns(); }
public EventPart GetParentEvent(EventPart subEvent) { var allEvents = GetAllEvents(VersionOptions.Latest); var parentEvent = allEvents.FilterEventParts(_services.WorkContext.CurrentUser).SingleOrDefault(x => x.Identifier == subEvent.ParentEventIdentifier); return parentEvent; }
public static string Event(this UrlHelper urlHelper, EventPart eventPart) { return(urlHelper.Action("Item", "Event", new { eventId = eventPart.Get <IdentityPart>().Identifier, area = "Orchard.CalendarEvents" })); }