예제 #1
0
		public void GetEventPageSuccessCallback(EventPageStub page, object userContext, string methodName)
		{
			if (page != null)
			{
				if (GotEventPage != null)
					GotEventPage(page, null);
			}
		}
예제 #2
0
		public static string GetKeyStatic(EventPageStub data)
		{
			return
				((int)data.parentObjectType).ToString() + "_" +
				data.parentObjectK.ToString() + "_" +
				((int)data.tabType).ToString() + "_" +
				data.musicTypeK.ToString() + "_" +
				data.pageIndex.ToString();
		}
예제 #3
0
		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);

				}

				


			}
		}
예제 #4
0
		//#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);
		}