コード例 #1
0
        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");
            });
        }
コード例 #2
0
        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");
            });
        }
コード例 #3
0
        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");
            });
        }
コード例 #4
0
        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");
            });
        }
コード例 #5
0
        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");
            });
        }
コード例 #6
0
        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");
            });
        }
コード例 #7
0
ファイル: AboutViewModel.cs プロジェクト: Hitchhikrr/GDrive
        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;
            });
        }
コード例 #8
0
 private void OnShareApplicationCommand()
 {
     _shareLinkService.Show("The Other Side", "The Other Side: view your antipode! via @pedrolamas", "http://www.windowsphone.com/s?appid=9e4d2183-9f54-494a-944f-39faae093622");
 }
コード例 #9
0
        /// <summary>
        /// The share social network.
        /// </summary>
        private void ShareSocialNetwork()
        {
            const string Message = "This application is amazing, should try it! See in";

            _shareLinkService.Show(_applicationManifest.App.Title, Message, new Uri(_appUrl, UriKind.Absolute));
        }