예제 #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("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");
            });
        }
예제 #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("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("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("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 TrackViewModel(IMessenger messenger, IAlbumInfoService albumInfoService, IImageProcessingService imageProcessingService,
                              IWebBrowserService webBrowserService, IFileDialogService fileDialogService, List <Artist> artists, List <string> tags, Track track)
        {
            Artist = new ArtistViewModel(this, artists, track.Artist, webBrowserService);
            Disc   = new DiscViewModel(this, messenger, albumInfoService, imageProcessingService, fileDialogService, artists, track);

            RemoveTagCommand = new RelayCommand <string>(OnRemoveTag);

            AllTags = tags;

            Populate(track);

            Modified = false;
        }
        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);
        }
예제 #8
0
        public EditTrackViewModel(Common.Singletons.Library library, IMessenger messenger, IAlbumInfoService webAlbumInfoService,
                                  ITrackUpdateService trackUpdateService, IImageProcessingService imageProcessingService, IWebBrowserService webBrowserService,
                                  IFileDialogService fileDialogService, ILyricsService lyricsService)
            : base(TabType.EditTrack, IconType.Edit, "Edit Track", messenger, false)
        {
            _library = library;

            _fileDialogService      = fileDialogService;
            _imageProcessingService = imageProcessingService;
            _messenger           = messenger;
            _trackUpdateService  = trackUpdateService;
            _webAlbumInfoService = webAlbumInfoService;
            _webBrowserService   = webBrowserService;
            _lyricsService       = lyricsService;

            GetLyricsCommand       = new RelayCommand(OnGetLyrics);
            LyricsWebSearchCommand = new RelayCommand(OnLyricsWebSearch);
        }
예제 #9
0
        public ArtistViewModel(TrackViewModel parent, List <Artist> artists, Artist artist, IWebBrowserService webBrowserService)
        {
            _parent            = parent;
            _webBrowserService = webBrowserService;

            Artists = artists;

            TestWebsiteCommand     = new RelayCommand(OnTestWebsite, CanTestWebsite);
            TestFacebookCommand    = new RelayCommand(OnTestFacebook, CanTestFacebook);
            TestTwitterCommand     = new RelayCommand(OnTestTwitter, CanTestTwitter);
            TestWikipediaCommand   = new RelayCommand(OnTestWikipedia, CanTestWikipedia);
            TestLastFmCommand      = new RelayCommand(OnTestLastFm, CanTestLastFm);
            TestYouTubeCommand     = new RelayCommand(OnTestYouTube, CanTestYouTube);
            TestBandCampCommand    = new RelayCommand(OnTestBandCamp, CanTestBandCamp);
            TestBandsInTownCommand = new RelayCommand(OnTestBandsInTown, CanTestBandsInTown);

            Populate(artist);

            Modified = false;
        }
예제 #10
0
        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;
            });
        }
예제 #11
0
 public UserSettings(IMessenger messenger, ILastFmApiClientService lastFmApiClientService, IWebBrowserService browserService)
 {
     _browserService         = browserService;
     _lastFmApiClientService = lastFmApiClientService;
     _messenger = messenger;
 }
예제 #12
0
        public CustomScanPage(
            //  INavigationService navigationService
            ) : base()
        {
            _clip      = Xamarin.Forms.DependencyService.Get <IClipBoardService>();;
            webBrowser = Xamarin.Forms.DependencyService.Get <IWebBrowserService>();
            InitializeComponent();
            SizeChanged += (t, w) =>
            {
                var MIN_WIDTH  = 160;
                var MIN_HEIGHT = 40;
                var _width     = Width * 0.5;
                var _height    = Height * 0.2;
                if (zxing != null)
                {
                    zxing.WidthRequest  = _width < MIN_WIDTH ? MIN_WIDTH : _width;
                    zxing.HeightRequest = _height < MIN_HEIGHT ? MIN_HEIGHT : _height;
                    return;
                }

                zxing = new ZXingScannerView
                {
                    HorizontalOptions = LayoutOptions.CenterAndExpand,
                    VerticalOptions   = LayoutOptions.CenterAndExpand,
                    WidthRequest      = _width,
                    HeightRequest     = _height
                };
                zxing.OnScanResult += (result) => {
                    // 前回と同じ読み込みなら何もしない
                    if (result.Text == prevSearchText)
                    {
                        return;
                    }
                    prevSearchText = result.Text;

                    Device.BeginInvokeOnMainThread(() =>
                    {
                        // Stop analysis until we navigate away so we don't keep reading barcodes
                        zxing.IsAnalyzing = false;
                        // Show an alert
                        // await DisplayAlert("クリップボードにコピーしました", result.Text, "OK");
                        _clip.SetTextToClipBoard(result.Text);
                        // ラベルのテキストを更新
                        resultLabl.Text = "クリップボードに【" + result.Text + "】をコピーしました。";
                        // await navigationService.GoBackAsync();
                        OpenBrawser(result.Text);
                    });
                };
                var grid = new Grid
                {
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                };
                grid.Children.Add(zxing);
                // grid.Children.Add(overlay);

                // The root page of your application
                MainBoard.Children.Add(grid);
                MainBoard.Children.Add(resultLabl);
            };
        }