Exemplo n.º 1
0
		public void SetVenue(VenueInfo venueInfo)
		{
			if (venueInfo != null)
			{
				this.view.uiSelectedItemPanel.Style.Display = "";
				
				this.view.uiSelectedItemPanel.InnerHTML = Suggestion.GetPicTitleDetailTemplateHtml(
					venueInfo.picPath,
					venueInfo.name,
					PlaceInfo.NameWithCountry(venueInfo.place)
				);
				
				this.view.uiAuto.Text = venueInfo.name + ", " + venueInfo.place.name + ", " + venueInfo.place.country.name;
				this.view.uiAuto.Value = JavaScriptSerializer.Serialize(venueInfo);
				this.view.uiAuto.input.Style.Display = "none";
				this.view.uiSelectedItemPanel.Style.Display = "";

			}
			else
			{
				this.view.uiAuto.input.Style.Display = "";
				this.view.uiSelectedItemPanel.Style.Display = "none";
				this.view.uiAuto.Text = "";
				this.view.uiAuto.Value = "";
			}

		}
Exemplo n.º 2
0
		public void ShowPopup(DateTime date, VenueInfo info, string text, EventInfoCallback callback)
		{
			this.view.uiContainer.Style.Display = "";//TODO: popup
			this.callback = callback;
			this.view.uiEventName.Text = text != null ? text : "";
			this.view.uiEventName.Focus();
			if (info != null)
			{
				this.view.uiVenueGetter.SetVenue(info);
			}
			else
			{
				this.view.uiVenueGetter.Focus();
			}
			if (date != null)
			{
				this.view.uiCal.SetDate(date);
			}
			else
			{
				this.view.uiCal.Focus();
			}
			if (date != null && info != null && callback != null)
			{
				this.view.uiEventName.RequestSuggestions();
			}
		}