Ejemplo n.º 1
0
        public App()
        {
            // The root page of your application

            ILocalNotifications localNotifications = DependencyService.Get <ILocalNotifications>();

            Button showNotificationButton = new Button();

            showNotificationButton.Text     = "Show Local Notification";
            showNotificationButton.Clicked += (sender, e) => localNotifications.Show("Test", "Local notification alert", 1);

            Button cancelNotificationButton = new Button();

            cancelNotificationButton.Text     = "Cancel Local Notification";
            cancelNotificationButton.Clicked += (sender, e) => localNotifications.Cancel(1);

            MainPage = new ContentPage
            {
                Content = new StackLayout
                {
                    VerticalOptions = LayoutOptions.Center,
                    Children        =
                    {
                        showNotificationButton,
                        cancelNotificationButton
                    }
                }
            };
        }
Ejemplo n.º 2
0
        public App()
        {
            //pokazuje na pasku
            ILocalNotifications localNotifications = DependencyService.Get <ILocalNotifications>();
            Button showNotificationButton          = new Button();

            showNotificationButton.Text     = "Pokaż lokalne powiadomienia";
            showNotificationButton.Clicked +=
                (sender, e) => localNotifications.Show("Test", "Lokalne powiadomienie", 1);
            Button cancelNotificationButton = new Button();

            cancelNotificationButton.Text     = "Przerwij lokalne powiadomienia";
            cancelNotificationButton.Clicked += (sender, e) => localNotifications.Cancel(1);
            MainPage = new ContentPage
            {
                Content = new StackLayout
                {
                    VerticalOptions = LayoutOptions.Center,
                    Children        =
                    {
                        showNotificationButton,
                        cancelNotificationButton
                    }
                }
            };
        }
Ejemplo n.º 3
0
 public LocationService(IPermissions permissions, IGeolocator geolocator, IWorkManager workManager, ISettingStorage settingStorage, IVibrate vibrate,
                        ILocalNotifications localNotifications)
 {
     _permissions        = permissions;
     _geolocator         = geolocator;
     _workManager        = workManager;
     _settingStorage     = settingStorage;
     _vibrate            = vibrate;
     _localNotifications = localNotifications;
 }
Ejemplo n.º 4
0
        public SaveStateService(ILocalNotifications notificationService, ILocalizationService localizationService)
        {
            NotificationService = notificationService;
            LocalizationService = localizationService;

            GetSubfolderAsync(FileSystem.Current.LocalStorage, SaveStatesFolderName).ContinueWith(d =>
            {
                SaveStatesFolder = d.Result;
            });

            GameId = null;
        }
Ejemplo n.º 5
0
        public EmulationService(IFileSystem fileSystem, IUserDialogs dialogsService, ILocalizationService localizationService, IPlatformService platformService, ISaveStateService saveStateService, ILocalNotifications notificationService, ICryptographyService cryptographyService, IInputManager inputManager)
        {
            FileSystem          = fileSystem;
            LocalizationService = localizationService;
            PlatformService     = platformService;
            SaveStateService    = saveStateService;
            NotificationService = notificationService;
            InputManager        = inputManager;

            RootFrame.Navigated += OnNavigated;

            var CDImageExtensions = new HashSet <string> {
                ".bin", ".cue", ".iso", ".mds", ".mdf"
            };

            systems = new GameSystemVM[]
            {
                new GameSystemVM(LibRetriX.FCEUMM.Core.Instance, FileSystem, LocalizationService, "SystemNameNES", "ManufacturerNameNintendo", "\uf118"),
                new GameSystemVM(LibRetriX.Snes9X.Core.Instance, FileSystem, LocalizationService, "SystemNameSNES", "ManufacturerNameNintendo", "\uf119"),
                //new GameSystemVM(LibRetriX.ParallelN64.Core.Instance, FileSystem, LocalizationService, "SystemNameNintendo64", "ManufacturerNameNintendo", "\uf116"),
                new GameSystemVM(LibRetriX.Gambatte.Core.Instance, FileSystem, LocalizationService, "SystemNameGameBoy", "ManufacturerNameNintendo", "\uf11b"),
                new GameSystemVM(LibRetriX.VBAM.Core.Instance, FileSystem, LocalizationService, "SystemNameGameBoyAdvance", "ManufacturerNameNintendo", "\uf115"),
                new GameSystemVM(LibRetriX.MelonDS.Core.Instance, FileSystem, LocalizationService, "SystemNameDS", "ManufacturerNameNintendo", "\uf117"),
                new GameSystemVM(LibRetriX.GPGX.Core.Instance, FileSystem, LocalizationService, "SystemNameSG1000", "ManufacturerNameSega", "\uf102", true, new HashSet <string> {
                    ".sg"
                }),
                new GameSystemVM(LibRetriX.GPGX.Core.Instance, FileSystem, LocalizationService, "SystemNameMasterSystem", "ManufacturerNameSega", "\uf118", true, new HashSet <string> {
                    ".sms"
                }),
                new GameSystemVM(LibRetriX.GPGX.Core.Instance, FileSystem, LocalizationService, "SystemNameGameGear", "ManufacturerNameSega", "\uf129", true, new HashSet <string> {
                    ".gg"
                }),
                new GameSystemVM(LibRetriX.GPGX.Core.Instance, FileSystem, LocalizationService, "SystemNameMegaDrive", "ManufacturerNameSega", "\uf124", true, new HashSet <string> {
                    ".mds", ".md", ".smd", ".gen"
                }),
                new GameSystemVM(LibRetriX.GPGX.Core.Instance, FileSystem, LocalizationService, "SystemNameMegaCD", "ManufacturerNameSega", "\uf124", false, new HashSet <string> {
                    ".bin", ".cue", ".iso", ".chd"
                }, CDImageExtensions),
                //new GameSystemVM(LibRetriX.BeetleSaturn.Core.Instance, FileSystem, LocalizationService, "SystemNameSaturn", "ManufacturerNameSega", "\uf124", false, null, CDImageExtensions),
                new GameSystemVM(LibRetriX.BeetlePSX.Core.Instance, FileSystem, LocalizationService, "SystemNamePlayStation", "ManufacturerNameSony", "\uf128", false, null, CDImageExtensions),
                new GameSystemVM(LibRetriX.BeetlePCEFast.Core.Instance, FileSystem, LocalizationService, "SystemNamePCEngine", "ManufacturerNameNEC", "\uf124", true, new HashSet <string> {
                    ".pce"
                }),
                new GameSystemVM(LibRetriX.BeetlePCEFast.Core.Instance, FileSystem, LocalizationService, "SystemNamePCEngineCD", "ManufacturerNameNEC", "\uf124", false, new HashSet <string> {
                    ".cue", ".ccd", ".chd"
                }, CDImageExtensions),
                new GameSystemVM(LibRetriX.BeetlePCFX.Core.Instance, FileSystem, LocalizationService, "SystemNamePCFX", "ManufacturerNameNEC", "\uf124", false, null, CDImageExtensions),
                new GameSystemVM(LibRetriX.BeetleWswan.Core.Instance, FileSystem, LocalizationService, "SystemNameWonderSwan", "ManufacturerNameBandai", "\uf129"),
                new GameSystemVM(LibRetriX.FBAlpha.Core.Instance, FileSystem, LocalizationService, "SystemNameNeoGeo", "ManufacturerNameSNK", "\uf102", false),
                new GameSystemVM(LibRetriX.BeetleNGP.Core.Instance, FileSystem, LocalizationService, "SystemNameNeoGeoPocket", "ManufacturerNameSNK", "\uf129"),
                new GameSystemVM(LibRetriX.FBAlpha.Core.Instance, FileSystem, LocalizationService, "SystemNameArcade", "ManufacturerNameFBAlpha", "\uf102", true),
            };

            foreach (var i in systems.Select(d => d.Core).Distinct())
            {
                i.SystemRootPath  = VFSSystemPath;
                i.SaveRootPath    = VFSSavePath;
                i.OpenFileStream  = OnCoreOpenFileStream;
                i.CloseFileStream = OnCoreCloseFileStream;
            }
        }