예제 #1
0
 public VideoPlayerViewModel(INavigationService navigationService, MediaPlayerService playerService,
                             IVideoLibrary videoLibrary, IVolumeService volumeController, IBrightnessService brightnessController,
                             IOrientationService orientationService, IStatusBarService statusBarService)
 {
     App.DebugLog("");
     this.navigationService          = navigationService;
     this.playerService              = playerService;
     this.videoLibrary               = videoLibrary;
     this.volumeController           = volumeController;
     this.brightnessController       = brightnessController;
     this.orientationService         = orientationService;
     this.statusBarService           = statusBarService;
     PlayPauseCommand                = new DelegateCommand(TogglePlayPause);
     ToggleFavoriteCommand           = new DelegateCommand(ToggleFavorite);
     ToggleControlsVisibilityCommand = new DelegateCommand(ToggleControlsVisibility);
     ToggleAudioTracksCommand        = new DelegateCommand(ToggleAudioTracks);
     ToggleSubtitlesCommand          = new DelegateCommand(ToggleSubtitles);
     ToggleMediaInfoCommand          = new DelegateCommand(ToggleMediaInfo);
     SelectSubtitlesCommand          = new DelegateCommand <object>(SelectSubtitles, (e) => canChangeSubtitles);
     SelectAudioTrackCommand         = new DelegateCommand <object>(SelectAudioTrack, (e) => canChangeAudioTrack);
     MaxVolume = volumeController.GetMaxVolume();
     Volume    = volumeController.GetVolume();
     volumeController.VolumeChanged += VolumeController_VolumeChanged;
     Brightness     = Settings.VideoBrightness;
     favoriteScenes = new FavoritesCollection(favoriteSceneDuration);
 }
예제 #2
0
        public InfoViewModel()
        {
            LoadedCommand = new RelayCommand(PageLoaded);
            OrientationChangeCommand = new RelayCommand(PhoneApplicationPage_OrientationChanged);
            var navigationService = GetService<INavigationService>();
            _orientation = GetService<IOrientationService>();

            Game = (FrezoutGame) navigationService.GetLastNavigationData();
            if (Game == null)
                return;

            if (Game is RebuyGame)
            {
                var g = (RebuyGame) Game;
                RebuyNumber = g.RebuyNumber;
                RebuyVisibility = true;

                if (Game is RebuyAddonGame)
                {
                    var g1 = (RebuyAddonGame) Game;
                    AddonNumber = g1.AddonNumber;
                    AddonVisibility = true;
                }
            }
        }
예제 #3
0
        public RootViewController(IOrientationService orientationService)
        {
            _orientationService = orientationService;

            _orientationService.OrientationChanged += _orientationService_OrientationChanged;
            _orientationService.SupportedOrientationChanged += _orientationService_SupportedOrientationChanged;
        }
예제 #4
0
        public RootViewController(IOrientationService orientationService)
        {
            _orientationService = orientationService;

            _orientationService.OrientationChanged          += _orientationService_OrientationChanged;
            _orientationService.SupportedOrientationChanged += _orientationService_SupportedOrientationChanged;
        }
예제 #5
0
 public InfanteryMindProcessor(IOrientationService orientationService, IPathfindingService pathfindingService, IEventAgent eventAgent, IHeatMapService heatMapService)
 {
     _orientationService = orientationService;
     _pathfindingService = pathfindingService;
     _eventAgent = eventAgent;
     _heatMapService = heatMapService;
 }
        public VideoPlayerViewModel(MediaPlayerBuilder playerService,
                                    IVideoLibrary videoLibrary, IVolumeService volumeController, IBrightnessService brightnessController,
                                    IOrientationService orientationService, IStatusBarService statusBarService, IFileService fileService)
        {
            App.DebugLog("");
            this.videoLibrary       = videoLibrary;
            this.orientationService = orientationService;
            this.statusBarService   = statusBarService;
            FilePickerVM            = new FilePickerViewModel(fileService);
            FilePickerVM.SubtitleFileTappedCommand = new Command <object>(o => SubtitleFileTapped(o));
            ToggleFavoriteCommand           = new Command(ToggleFavorite);
            ToggleControlsVisibilityCommand = new Command(ToggleControlsVisibility);
            ToggleAudioTracksCommand        = new Command(ToggleAudioTracks);
            ToggleSubtitlesCommand          = new Command(ToggleSubtitles);
            ToggleMediaInfoCommand          = new Command(ToggleMediaInfo);
            SelectSubtitlesCommand          = new Command <object>(SelectSubtitles, (e) => canChangeSubtitles);
            SelectAudioTrackCommand         = new Command <object>(SelectAudioTrack, (e) => canChangeAudioTrack);
            OpenSubtitlesFromFileCommand    = new Command(OpenSubtitlesFilePicker);

            volumeViewModel     = new VolumeViewModel(volumeController);
            brightnessViewModel = new BrightnessViewModel(brightnessController);

            favoriteScenes = new FavoritesCollection(favoriteSceneDuration);

            VlcPlayerHelper = new VlcPlayerHelper(playerService);
        }
예제 #7
0
 public BuildBarrackRule(ComponentService componentService, AIDto ai, IOrientationService orientationService, IVector2Service vector2Service, IRepository<GameEnvironment> gameEnvironmentRepository, IEventStoreService eventStoreService)
 {
     _componentService = componentService;
     _ai = ai;
     _orientationService = orientationService;
     _vector2Service = vector2Service;
     _eventStoreService = eventStoreService;
     _gameEnvironment = gameEnvironmentRepository.Get();
 }
예제 #8
0
 public ProductionServiceBase(string senderId,IProductionFacilityProvider productionFacilityProvider, IComponentService componentService,IOrientationService orientationService, IEventAgent eventAgent)
 {
     SenderId = senderId;
     ProductionFacilityProvider = productionFacilityProvider;
     ComponentService = componentService;
     OrientationService = orientationService;
     EventAgent = eventAgent;
     ProductionRules = new List<IProductionRule>();
 }
예제 #9
0
 public ControlViewModel(IOrientationService orientationService,
                         INavigationService navigationService,
                         IAppSettingsManager appSettingsManager, IUserDialogs userDialogs) : base(navigationService)
 {
     _orientationService = orientationService;
     _appSettingsManager = appSettingsManager;
     _userDialogs        = userDialogs;
     LoadSites();
 }
예제 #10
0
 public ProductionManager(IComponentService componentService, IProductionFacilityProvider productionFacilityProvider,IOrientationService orientationService, IEventAgent eventAgent, string senderId)
 {
     EventAgent = eventAgent;
     ComponentService = componentService;
     OrientationService = orientationService;
     ProductionServices = new List<IProductionService>() {
                                                             new BarrackProductionService(senderId,productionFacilityProvider,ComponentService,OrientationService,eventAgent),
                                                             new InfanteryProductionService(senderId,productionFacilityProvider,ComponentService,OrientationService,eventAgent)
                                                         };
 }
예제 #11
0
        public MovementService(IComponentService componentService, IEventAgent eventAgent
            , IOrientationService orientationService, InfanteryMindStateService infanteryMindStateService, IHeatMapService heatMapService)
        {
            _componentService = componentService;

            _eventAgent = eventAgent;
            _orientationService = orientationService;
            _infanteryMindStateService =infanteryMindStateService;
            _heatMapService = heatMapService;
            _infanteryMindProcessor = new InfanteryMindProcessor(_orientationService, new PathfindingService(), _eventAgent,_heatMapService);
        }
예제 #12
0
        public OrientationViewModel(IOrientationService orientationService)
        {
            Title = "Orientation";
            
            _orientationService = orientationService;

            PortraitCommand = new Command(_onPortrait);
            LandscapeCommand = new Command(_onLandscape);
            BothCommand = new Command(_onBoth);
            PopCommand = new Command(_onPop);
            PushCommand = new Command(_onPush);
        }
예제 #13
0
        public OrientationViewModel(IOrientationService orientationService)
        {
            Title = "Orientation";

            _orientationService = orientationService;

            PortraitCommand  = new Command(_onPortrait);
            LandscapeCommand = new Command(_onLandscape);
            BothCommand      = new Command(_onBoth);
            PopCommand       = new Command(_onPop);
            PushCommand      = new Command(_onPush);
        }
예제 #14
0
 public ArtificialIntelligenceNhu(IEventAgent eventAgent, string id)
     : base(eventAgent, id)
 {
     ComponentService = new ComponentService();
     EventProcessor = new AiEventProcessor(ComponentService);
     OrientationService = new OrientationService(new Vector2(0,0),ComponentService);
     var productionManager = new ProductionManager(ComponentService, new ProductionFacilityProvider(ComponentService), OrientationService,eventAgent, id);
     HeatMapService = new HeatMapService(new HeatPortionCalculationService(),new Vector2(800,800));
     HeatMapService.Initialize();
     InfanteryMindStateService = new InfanteryMindStateService(EventProcessor as AiEventProcessor,HeatMapService,ComponentService);
     var movementService = new MovementService(ComponentService, EventAgent, OrientationService, InfanteryMindStateService,HeatMapService);
     Agent = new AiAgent(ComponentService, productionManager, movementService, InfanteryMindStateService, HeatMapService);
 }
예제 #15
0
        public App()
        {
            InitializeComponent();

            MainPage = new SignUpUserPage();

            LocalDataService   = DependencyService.Get <ILocalDataService>();
            OrientationService = DependencyService.Get <IOrientationService>();

            LocalDataService.InitializeFiles(true);

            DataService = new NSSDatabaseService <NSSDatabaseContext>();
        }
예제 #16
0
        protected XFrame(
            ILifetimeScope c,
            ILoadStatusService systemTrayService,
            IOrientationService orientationService,
            ILocalisationService localisationService,
            IXNavigation xNavigationService,
            IDispatcher dispatcher)
        {
            _loadStatusService   = systemTrayService;
            _orientationService  = orientationService;
            _localisationService = localisationService;
            _navigation          = xNavigationService;
            Dispatcher           = dispatcher;
            Container            = c;

            Id = Guid.NewGuid();
        }
 public iOSNavigationPageRenderer()
 {
     _orientationService = ContainerHost.Container.Resolve<IOrientationService>();
 }
예제 #18
0
 public XRootFrame(ILifetimeScope c, ILoadStatusService systemTrayService, IOrientationService orientationService, ILocalisationService localisationService, IXNavigation xNavigationService, IDispatcher dispatcher) : base(c, systemTrayService, orientationService, localisationService, xNavigationService, dispatcher)
 {
 }
예제 #19
0
 public InfanteryProductionService(string senderId, IProductionFacilityProvider productionFacilityProvider, IComponentService componentService, IOrientationService orientationService, IEventAgent eventAgent)
     : base(senderId, productionFacilityProvider, componentService, orientationService, eventAgent)
 {
     ProductionRules = new List<IProductionRule>() { new BarrackAvailableRule(ComponentService), new LessThandNeededInfanteryRule(ComponentService) };
 }
예제 #20
0
 public BarrackProductionService(string senderId, IProductionFacilityProvider productionFacilityProvider, IComponentService componentService, IOrientationService orientationService, IEventAgent eventAgent)
     : base(senderId, productionFacilityProvider, componentService, orientationService, eventAgent)
 {
     ProductionRules = new List<IProductionRule>() { new NoBarracksAvailableRule(ComponentService) };
 }
예제 #21
0
        protected override void PageLoaded()
        {
            if (Appbar != null)
                return;

            Appbar = GetService<IApplicationBarService>();
            Appbar.AddButton(AppResources.Check, "/Assets/AppBar/check.png", SaveClick);
            Appbar.AddButton(AppResources.Cancel, "/Assets/AppBar/cancel.png", CancelClick);

            _orientation = GetService<IOrientationService>();
            IsVisibleSystemTray =! _orientation.IsLandscape();
        }
 public iOSNavigationPageRenderer()
 {
     _orientationService = ContainerHost.Container.Resolve <IOrientationService>();
 }