public object Convert(object value, Type targetType, object parameter, string language) { string url = null; string websiteFormat = FormatsRsxAccessor.GetString("Website"); if (value is News) { News news = value as News; url = string.Format(websiteFormat, FormatsRsxAccessor.GetString("Page_News"), news.Id, news.Url); } else if (value is Conference) { Conference conference = value as Conference; url = string.Format(websiteFormat, FormatsRsxAccessor.GetString("Page_Conferences"), conference.Id, conference.Url); } else if (value is Show) { Show salon = value as Show; url = string.Format(websiteFormat, FormatsRsxAccessor.GetString("Page_Shows"), salon.Id, salon.Url); } else if (value is Member) { Member member = value as Member; url = string.Format(websiteFormat, FormatsRsxAccessor.GetString("Page_Members"), member.Id, member.Url); } Uri uri = null; if (url != null) { uri = new Uri(url); } return(uri); }
public object Convert(object value, Type targetType, object parameter, string language) { if (value is string) { return(string.Format(FormatsRsxAccessor.GetString("Search_PageTitle"), value)); } return(value); }
public object Convert(object value, Type targetType, object parameter, string language) { ShareableWin8Object shareableObject = null; string websiteFormat = FormatsRsxAccessor.GetString("Website"); if (value is News) { News news = value as News; shareableObject = new ShareableWin8Object { Title = news.Title, Message = string.Format(FormatsRsxAccessor.GetString("News"), news.Title, news.DateTime, news.Member.FirstName, news.Member.LastName), Uri = new Uri(string.Format(websiteFormat, FormatsRsxAccessor.GetString("Page_News"), news.Id, news.Url)) }; shareableObject.HTMLText = string.Format(FormatsRsxAccessor.GetString("News_HTML"), news.Member.FirstName, news.Member.LastName, news.DateTime, news.ImageUrl, news.Text, shareableObject.Uri); } else if (value is Conference) { Conference conference = value as Conference; shareableObject = new ShareableWin8Object { Title = conference.Name, Message = string.Format(FormatsRsxAccessor.GetString("Conference"), conference.Name, conference.Start_DateTime, conference.End_DateTime, conference.Place), Uri = new Uri(string.Format(websiteFormat, FormatsRsxAccessor.GetString("Page_Conferences"), conference.Id, conference.Url)) }; shareableObject.HTMLText = string.Format(FormatsRsxAccessor.GetString("Conference_HTML"), conference.Start_DateTime, conference.End_DateTime, conference.Place, conference.Campus.Place, conference.ImageUrl, conference.Description, shareableObject.Uri); } else if (value is Show) { Show salon = value as Show; shareableObject = new ShareableWin8Object { Title = salon.Name, Message = string.Format(FormatsRsxAccessor.GetString("Show"), salon.Name, salon.Start_DateTime, salon.End_DateTime, salon.Place), Uri = new Uri(string.Format(websiteFormat, FormatsRsxAccessor.GetString("Page_Shows"), salon.Id, salon.Url)) }; shareableObject.HTMLText = string.Format(FormatsRsxAccessor.GetString("Show_HTML"), salon.Start_DateTime, salon.End_DateTime, salon.Place, salon.Place, salon.ImageUrl, salon.Description, shareableObject.Uri); } return(shareableObject); }
public object Convert(object value, Type targetType, object parameter, string language) { if (value is News && parameter is string) { News news = value as News; if (parameter.ToString() == "Author") { return(string.Format(FormatsRsxAccessor.GetString("News_Author"), news.Member.FirstName, news.Member.LastName)); } } return(value); }
public object Convert(object value, Type targetType, object parameter, string language) { if (value is Project && parameter is string) { Project projet = value as Project; IDictionary <string, string> informations = new Dictionary <string, string> { { "Progress", string.Format(FormatsRsxAccessor.GetString("Project_Progress"), projet.Progression) }, { "Location", string.Format(FormatsRsxAccessor.GetString("Project_Location"), projet.Campus.Place) } }; return(informations[parameter.ToString()]); } return(null); }
public object Convert(object value, Type targetType, object parameter, string language) { if (value is Show && parameter is string) { Show salon = value as Show; IDictionary <string, string> informations = new Dictionary <string, string> { { "Start_DateTime", string.Format(FormatsRsxAccessor.GetString("Show_Start_DateTime"), salon.Start_DateTime) }, { "EndDate", string.Format(FormatsRsxAccessor.GetString("Show_EndDate"), salon.End_DateTime) }, { "Location", string.Format(FormatsRsxAccessor.GetString("Show_Location"), salon.Place, salon.Place) }, }; return(informations[parameter.ToString()]); } return(value); }
public object Convert(object value, Type targetType, object parameter, string language) { if (value is Conference && parameter is string) { Conference conference = value as Conference; IDictionary <string, string> informations = new Dictionary <string, string> { { "Start_DateTime", string.Format(FormatsRsxAccessor.GetString("Conference_Start_DateTime"), conference.Start_DateTime) }, { "EndDate", string.Format(FormatsRsxAccessor.GetString("Conference_EndDate"), conference.End_DateTime) }, { "Location", string.Format(FormatsRsxAccessor.GetString("Conference_Location"), conference.Place, conference.Campus.Place) } }; return(informations[parameter.ToString()]); } return(value); }
public object Convert(object value, Type targetType, object parameter, string language) { if (value is Member && parameter is string) { Member member = value as Member; IDictionary <string, string> informations = new Dictionary <string, string> { { "From", string.Format(FormatsRsxAccessor.GetString("Member_From"), member.CityFrom) }, { "CampusInfo", string.Format(FormatsRsxAccessor.GetString("Member_CampusInfo"), member.Promotion.GraduationYear, member.Campus.Place) }, { "Name", string.Format(FormatsRsxAccessor.GetString("Member_Name"), member.FirstName, member.LastName) } }; return(informations[parameter.ToString()]); } return(value); }