public void GetEventPageSuccessCallback(EventPageStub page, object userContext, string methodName) { if (page != null) { if (GotEventPage != null) GotEventPage(page, null); } }
public static string GetKeyStatic(EventPageStub data) { return ((int)data.parentObjectType).ToString() + "_" + data.parentObjectK.ToString() + "_" + ((int)data.tabType).ToString() + "_" + data.musicTypeK.ToString() + "_" + data.pageIndex.ToString(); }
public void gotEventPage(object o, EventArgs e) { if (o != null) { EventPageStub stub = (EventPageStub)o; { EventPageDetails newPage = new EventPageDetails(this, stub, false); updatePage(newPage); } if (stub.requestedPageIndex != stub.pageIndex) { //find requested page and mark it as empty... EventPageStub requestedStub = new EventPageStub( stub.parentObjectType, stub.parentObjectK, stub.tabType, stub.musicTypeK, stub.requestedPageIndex, stub.requestedPageIndex, null); EventPageDetails requestedPage = new EventPageDetails(this, requestedStub, false); updatePage(requestedPage); } } }
//#region GetKeyStatic //public static string GetKeyStatic( // ObjectType parentObjectType, // int parentObjectK, // DateType dateType, // int musicTypeK, // int pageIndex) //{ // return // ((int)parentObjectType).ToString() + "_" + // parentObjectK.ToString() + "_" + // ((int)dateType).ToString() + "_" + // musicTypeK.ToString() + "_" + // pageIndex.ToString(); //} //#endregion #region public EventPageDetails public EventPageDetails( #if SCRIPT Controller controller, #else string parentClientID, Bobs.EventSet es, #endif EventPageStub data, bool isLoading ) { Data = data; IsLoading = isLoading; #if SCRIPT Controller = controller; ParentClientID = Controller.ClientID; #else ParentClientID = parentClientID; #endif ClientID = ParentClientID + "_" + GetKey(); Events = new EventDetails[8]; #if SCRIPT #else Data.events = new EventStub[8]; #endif bool gotEvent = false; bool gotNullEvent = false; for (int i = 0; i < 8; i++) { #if SCRIPT Events[i] = new EventDetails(i, this, Data.events != null && Data.events.Length > i && Data.events[i] != null ? Data.events[i] : null, isLoading); if (Data.events == null || Data.events.Length <= i || Data.events[i] == null) gotNullEvent = true; else gotEvent = true; #else Events[i] = new EventDetails(i, this, es != null && es.Count > i && es[i] != null ? es[i] : null, isLoading); Data.events[i] = Events[i].Data; if (es == null || es.Count <= i || es[i] == null) gotNullEvent = true; else gotEvent = true; #endif } HasIncompleteEventData = gotNullEvent; IsEmpty = !gotEvent; Html = new EventPageHtml(this); }