public AboutViewModel(IWebBrowserService webBrowserService, IMarketplaceReviewService marketplaceReviewService, IMarketplaceSearchService marketplaceSearchService, IShareLinkService shareLinkService) { _webBrowserService = webBrowserService; _marketplaceReviewService = marketplaceReviewService; _marketplaceSearchService = marketplaceSearchService; _shareLinkService = shareLinkService; OpenHomepageCommand = new RelayCommand(() => { _webBrowserService.Show("http://www.pedrolamas.com"); }); OpenTwitterCommand = new RelayCommand(() => { _webBrowserService.Show("http://twitter.com/pedrolamas"); }); RateApplicationCommand = new RelayCommand(() => { _marketplaceReviewService.Show(); }); ShareApplicationCommand = new RelayCommand(() => { _shareLinkService.Show("O meu Salário", "O meu Salário: descubra quanto realmente ganha! via @pedrolamas", "http://windowsphone.com/s?appid=0efd4c52-4398-4e39-a484-fec50748a1c1"); }); MarketplaceSearchCommand = new RelayCommand(() => { _marketplaceSearchService.Show("Pedro Lamas"); }); }
public AboutViewModel(IWebBrowserService webBrowserService, IMarketplaceReviewService marketplaceReviewService, IMarketplaceSearchService marketplaceSearchService, IShareLinkService shareLinkService) { _webBrowserService = webBrowserService; _marketplaceReviewService = marketplaceReviewService; _marketplaceSearchService = marketplaceSearchService; _shareLinkService = shareLinkService; OpenHomepageCommand = new RelayCommand(() => { _webBrowserService.Show("http://www.pedrolamas.com"); }); OpenTwitterCommand = new RelayCommand(() => { _webBrowserService.Show("http://twitter.com/pedrolamas"); }); RateApplicationCommand = new RelayCommand(() => { _marketplaceReviewService.Show(); }); ShareApplicationCommand = new RelayCommand(() => { _shareLinkService.Show("Quadratic Solver", "Quadratic Solver: step by step quadratic solver! via @pedrolamas", "http://windowsphone.com/s?appid=d20a5ada-053e-4f4a-8669-2685e2da9e78"); }); MarketplaceSearchCommand = new RelayCommand(() => { _marketplaceSearchService.Show("Pedro Lamas"); }); }
public AboutViewModel(IWebBrowserService webBrowserService, IMarketplaceReviewService marketplaceReviewService, IMarketplaceSearchService marketplaceSearchService, IShareLinkService shareLinkService) { _webBrowserService = webBrowserService; _marketplaceReviewService = marketplaceReviewService; _marketplaceSearchService = marketplaceSearchService; _shareLinkService = shareLinkService; OpenHomepageCommand = new RelayCommand(() => { _webBrowserService.Show("http://www.pedrolamas.com"); }); OpenTwitterCommand = new RelayCommand(() => { _webBrowserService.Show("http://twitter.com/pedrolamas"); }); RateApplicationCommand = new RelayCommand(() => { _marketplaceReviewService.Show(); }); ShareApplicationCommand = new RelayCommand(() => { _shareLinkService.Show("The Bro Code", "The Bro Code: Legen- wait for it -dary, legendary! via @pedrolamas", "http://windowsphone.com/s?appid=2f575845-7f15-4de2-acc8-cb68bcf954a7"); }); MarketplaceSearchCommand = new RelayCommand(() => { _marketplaceSearchService.Show("Pedro Lamas"); }); }
public AboutViewModel(IWebBrowserService webBrowserService, IMarketplaceReviewService marketplaceReviewService, IMarketplaceSearchService marketplaceSearchService, IShareLinkService shareLinkService) { _webBrowserService = webBrowserService; _marketplaceReviewService = marketplaceReviewService; _marketplaceSearchService = marketplaceSearchService; _shareLinkService = shareLinkService; OpenHomepageCommand = new RelayCommand(() => { _webBrowserService.Show("http://www.pedrolamas.com"); }); OpenTwitterCommand = new RelayCommand(() => { _webBrowserService.Show("http://twitter.com/pedrolamas"); }); RateApplicationCommand = new RelayCommand(() => { _marketplaceReviewService.Show(); }); ShareApplicationCommand = new RelayCommand(() => { _shareLinkService.Show("Totojogos", "Totojogos: porque hoje pode ser o seu dia de sorte! via @pedrolamas", "http://windowsphone.com/s?appid=bba5b571-13d3-49e9-841e-0e2bf0009fd3"); }); MarketplaceSearchCommand = new RelayCommand(() => { _marketplaceSearchService.Show("Pedro Lamas"); }); }
public AboutViewModel(IWebBrowserService webBrowserService, IMarketplaceReviewService marketplaceReviewService, IMarketplaceSearchService marketplaceSearchService, IShareLinkService shareLinkService) { _webBrowserService = webBrowserService; _marketplaceReviewService = marketplaceReviewService; _marketplaceSearchService = marketplaceSearchService; _shareLinkService = shareLinkService; OpenHomepageCommand = new RelayCommand(() => { _webBrowserService.Show("http://www.pedrolamas.com"); }); OpenTwitterCommand = new RelayCommand(() => { _webBrowserService.Show("http://twitter.com/pedrolamas"); }); RateApplicationCommand = new RelayCommand(() => { _marketplaceReviewService.Show(); }); ShareApplicationCommand = new RelayCommand(() => { _shareLinkService.Show("CTT Objectos", "Siga as suas encomendas com CTT Objectos via @pedrolamas", "http://windowsphone.com/s?appid=f600b583-b1ba-4398-84aa-e52358c40532"); }); MarketplaceSearchCommand = new RelayCommand(() => { _marketplaceSearchService.Show("Pedro Lamas"); }); }
public ShareLinkPartDriver(IOrchardServices orchardServices, ITokenizer tokenizer, IContentManager contentManager, IShareLinkService sharelinkService) { _orchardServices = orchardServices; Logger = NullLogger.Instance; T = NullLocalizer.Instance; _tokenizer = tokenizer; _contentManager = contentManager; _sharelinkservice = sharelinkService; }
public MainViewModel(IMainModel mainModel, ISettingsModel settingsModel, IHereMapsService hereMapsService, IKnownCitiesService knownCitiesService, INavigationService navigationService, ILocationService locationService, IMessageBoxService messageBoxService, ISystemTrayService systemTrayService, ISmsComposeService smsComposeService, IShareLinkService shareLinkService, IEmailComposeService emailComposeService) { _mainModel = mainModel; _settingsModel = settingsModel; _hereMapsService = hereMapsService; _knownCitiesService = knownCitiesService; _navigationService = navigationService; _locationService = locationService; _messageBoxService = messageBoxService; _systemTrayService = systemTrayService; _smsComposeService = smsComposeService; _shareLinkService = shareLinkService; _emailComposeService = emailComposeService; UseCurrentLocationCommand = new RelayCommand(UseCurrentLocation); UseAntipodeLocationCommand = new RelayCommand(UseAntipodeLocation); ShareByEmailCommand = new RelayCommand(() => { _emailComposeService.Show("The Other Side", CurrentPosition.ToString()); }); ShareBySmsCommand = new RelayCommand(() => { _smsComposeService.Show(string.Empty, "The Other Side: " + CurrentPosition.ToString()); }); ShareOnSocialNetworkCommand = new RelayCommand(() => { var coordinate = CurrentPosition; var hereMapsUrl = "http://here.com/{0},14".FormatWithInvariantCulture(coordinate); _shareLinkService.Show("The Other Side", CurrentPosition.ToString(), hereMapsUrl); }); PinToStartCommand = new RelayCommand(PinToStart); FindNearestLandMassCommand = new RelayCommand(FindNearestLandMass); FindNearestCityCommand = new RelayCommand(FindNearestCity); ShowLocationInfoCommand = new RelayCommand(ShowLocationInfo); ShowSettingsCommand = new RelayCommand(() => { _navigationService.NavigateTo("/View/SettingsPage.xaml"); }); ShowAboutCommand = new RelayCommand(() => { _navigationService.NavigateTo("/View/AboutPage.xaml"); }); }
/// <summary> /// Initializes a new instance of the <see cref="MainViewModel"/> class. /// </summary> /// <param name="emailComposeService"> /// The email Compose Service. /// </param> /// <param name="marketplaceReviewService"> /// The marketplace review service /// </param> /// <param name="shareLinkService"> /// The share Link Service. /// </param> public MainViewModel( IEmailComposeService emailComposeService, IMarketplaceReviewService marketplaceReviewService, IShareLinkService shareLinkService) { _emailComposeService = emailComposeService; _marketplaceReviewService = marketplaceReviewService; _shareLinkService = shareLinkService; RateCommand = new RelayCommand(this.Rate); SendFeedbackCommand = new RelayCommand(this.SendFeedback); ShareToMailCommand = new RelayCommand(this.ShareToMail); ShareSocialNetworkCommand = new RelayCommand(this.ShareSocialNetwork); _appUrl = string.Concat("http://windowsphone.com/s?appid=8df00038-1b7a-406b-b33f-37a78b17348c"); }
/// <summary> /// Initializes a new instance of the <see cref="AboutViewModel"/> class. /// </summary> /// <param name="emailComposeService"> /// The email Compose Service. /// </param> /// <param name="applicationManifestService"> /// The application Manifest Service. /// </param> /// <param name="marketplaceReviewService"> /// The marketplace review service /// </param> /// <param name="shareLinkService"> /// The share Link Service. /// </param> public AboutViewModel( IEmailComposeService emailComposeService, IApplicationManifestService applicationManifestService, IMarketplaceReviewService marketplaceReviewService, IShareLinkService shareLinkService) { _emailComposeService = emailComposeService; _marketplaceReviewService = marketplaceReviewService; _shareLinkService = shareLinkService; RateCommand = new RelayCommand(this.Rate); SendFeedbackCommand = new RelayCommand(this.SendFeedback); ShareToMailCommand = new RelayCommand(this.ShareToMail); ShareSocialNetworkCommand = new RelayCommand(this.ShareSocialNetwork); _applicationManifest = applicationManifestService.GetApplicationManifest(); _appUrl = string.Concat("http://windowsphone.com/s?appid=", _applicationManifest.App.ProductId); }
public AboutViewModel(IWebBrowserService webBrowserService, IMarketplaceReviewService marketplaceReviewService, IMarketplaceSearchService marketplaceSearchService, IShareLinkService shareLinkService) { _webBrowserService = webBrowserService; _marketplaceReviewService = marketplaceReviewService; _marketplaceSearchService = marketplaceSearchService; _shareLinkService = shareLinkService; OpenHomepageCommand = new RelayCommand(OnOpenHomepageCommand); OpenTwitterCommand = new RelayCommand(OnOpenTwitterCommand); RateApplicationCommand = new RelayCommand(OnRateApplicationCommand); ShareApplicationCommand = new RelayCommand(OnShareApplicationCommand); MarketplaceSearchCommand = new RelayCommand(OnMarketplaceSearchCommand); }
public AboutViewModel(INavigationService navigationService, IWebBrowserService webBrowserService, IMarketplaceReviewService marketplaceReviewService, IMarketplaceSearchService marketplaceSearchService, IShareLinkService shareLinkService) { _navigationService = navigationService; _webBrowserService = webBrowserService; _marketplaceReviewService = marketplaceReviewService; _marketplaceSearchService = marketplaceSearchService; _shareLinkService = shareLinkService; OpenHomepageCommand = new RelayCommand(() => { _webBrowserService.Show("http://www.pedrolamas.com"); }); OpenTwitterCommand = new RelayCommand(() => { _webBrowserService.Show("http://twitter.com/pedrolamas"); }); RateApplicationCommand = new RelayCommand(() => { _marketplaceReviewService.Show(); }); ShareApplicationCommand = new RelayCommand(() => { _shareLinkService.Show("GDrive", "GDrive: Google Drive on your Windows Phone! via @pedrolamas", "http://windowsphone.com/s?appid=c945c809-5e5d-4db3-b4c9-70c8cebd5235"); }); MarketplaceSearchCommand = new RelayCommand(() => { _marketplaceSearchService.Show("Pedro Lamas"); }); PageLoadedCommand = new RelayCommand(() => { PivotSelectedIndex = string.IsNullOrEmpty(_navigationService.QueryString.GetValue("disclaimer")) ? 0 : 1; }); }
public ShareLinkController(IShareLinkService shareLinkService, IMapper mapper) { _shareLinkService = shareLinkService; _mapper = mapper; }
public ShareLinkHandler( IRepository <ShareLinkPartRecord> repository, IOrchardServices orchardServices, IShareLinkService sharelinkService, IEnumerable <IShareLinkPriorityProvider> priorityProviders) { Filters.Add(StorageFilter.For(repository)); _orchardServices = orchardServices; _sharelinkService = sharelinkService; _priorityProviders = priorityProviders; processedPriority = int.MinValue; OnGetDisplayShape <ShareLinkPart>((context, part) => { if (context.DisplayType == "Detail") { _sharelinkService.FillPart(part); //GetPriority may use info from the part var thisPriority = _priorityProviders.Any() ? _priorityProviders.Max(pp => pp.GetPriority(part)) : 0; if (thisPriority > processedPriority) { var urlHelper = new UrlHelper(_orchardServices.WorkContext.HttpContext.Request.RequestContext); var description = part.SharedBody ?? ""; if (description.Length > 290) { description = TruncateAtWord(part.SharedBody ?? "", 290) + " ..."; } var getpart = _orchardServices.WorkContext.CurrentSite.As <ShareLinkModuleSettingPart>(); string fbappid = ""; if (getpart != null) { fbappid = getpart.Fb_App; } var openGraphVM = new OpenGraphVM { Title = part.SharedText, Image = part.SharedImage, Url = _orchardServices.WorkContext.CurrentSite.BaseUrl + urlHelper.ItemDisplayUrl(part.ContentItem), Site_name = _orchardServices.WorkContext.CurrentSite.SiteName, Description = description, Fbapp_id = fbappid, //Your page will appear in the "Likes and Interests" section of the user's profile, and you have the ability to publish updates to the user #region Twitter TwitterTitle = part.SharedText, TwitterDescription = part.SharedBody, TwitterImage = part.SharedImage, TwitterSite = _orchardServices.WorkContext.CurrentSite.BaseUrl #endregion }; //remove previous sharelink metas var layout = (dynamic)context.Layout; if (layout.Head?.Items != null) { var headShapes = (List <object>)layout.Head.Items; headShapes.RemoveAll(sha => ((Shape)sha) .Metadata .Type == "ShareLinkMeta"); } layout.Head.Add(context.New.ShareLinkMeta(OpenGraphVM: openGraphVM)); processedPriority = thisPriority; } } }); }