Example #1
0
		void navigate(object sender, HistoryEventArgs e)
		{
			if (e.State[view.clientId + "_SearchType"] != null ||
				e.State[view.clientId + "_Key"] != null ||
				e.State[view.clientId + "_Spotter"] != null ||
				e.State[view.clientId + "_Brand"] != null ||
				e.State[view.clientId + "_Country"] != null ||
				e.State[view.clientId + "_Place"] != null ||
				e.State[view.clientId + "_Venue"] != null ||
				e.State[view.clientId + "_Music"] != null ||
				e.State[view.clientId + "_Date"] != null ||
				e.State[view.clientId + "_Event"] != null)
			{
				navigateSearchType(getVal(e, "SearchType"));
				navigateKey(getVal(e, "Key"));
				navigateSpotter(getVal(e, "Spotter"));
				navigateBrand(getVal(e, "Brand"));
				navigateCountry(getVal(e, "Country"));
				navigatePlace(getVal(e, "Place"));
				navigateVenue(getVal(e, "Venue"));
				navigateMusic(getVal(e, "Music"));
				navigateDate(getVal(e, "Date"));
				navigateEvent(getVal(e, "Event"));

				if (firstEverNavigate)
				{
					firstEverNavigate = false;
					updateUI();

					if (EventSelectionSepcificationChanged != null)	EventSelectionSepcificationChanged(this, new EventSelectionArgs(GetCurrentEventSelectionSepcification()));

					if (Event != null && (SearchType == SearchTypes.Key || SearchType == SearchTypes.Brand || SearchType == SearchTypes.Venue) && SelectedEventChanged != null) SelectedEventChanged(this, new ObjectArgs(Event));
					if (Venue != null && SearchType == SearchTypes.Venue && SelectedVenueChanged != null) SelectedVenueChanged(this, new ObjectArgs(Venue));
					if (Place != null && (SearchType == SearchTypes.Venue || SearchType == SearchTypes.Music) && SelectedPlaceChanged != null) SelectedPlaceChanged(this, new ObjectArgs(Place));
					if (Country != null && (SearchType == SearchTypes.Venue || SearchType == SearchTypes.Music) && SelectedCountryChanged != null) SelectedCountryChanged(this, new ObjectArgs(Country));
					if (Brand != null && SearchType == SearchTypes.Brand && SelectedBrandChanged != null) SelectedBrandChanged(this, new ObjectArgs(Brand));
					if (Spotter != null && Spotter.Length > 0 && SearchType == SearchTypes.Spotter && SelectedSpotterChanged != null) SelectedSpotterChanged(this, new StringArgs(Spotter));
					if (Key != null && Key.Length > 0 && SearchType == SearchTypes.Key && SelectedKeyChanged != null) SelectedKeyChanged(this, new StringArgs(Key));
				}
			}
		}
Example #2
0
		void Application_Navigate(object sender, HistoryEventArgs e)
		{
			if (e.State["EventBox_PageKey"] != null && e.State["EventBox_PageKey"].ToString().Length > 0)
				restorePageState(e.State["EventBox_PageKey"].ToString());
			else
				restorePageState(null);
		}
Example #3
0
		string getVal(HistoryEventArgs e, string item) { return e.State[view.clientId + "_" + item] == null ? "" : e.State[view.clientId + "_" + item].ToString().DecodeURI(); }