コード例 #1
0
 public PermissionController(IPermissionService permissionService, IScreenService screenService,
                             IDictionaryAllService dictionaryAllService)
 {
     _permissionService    = permissionService;
     _screenService        = screenService;
     _dictionaryAllService = dictionaryAllService;
 }
コード例 #2
0
        //ToanTXSE
        //Get screen List by location ID
        public static List <Models.ScreenVM> GetScreenIdByBrandId()
        {
            IScreenService   screenService   = DependencyUtils.Resolve <IScreenService>();
            ILocationService locationService = DependencyUtils.Resolve <ILocationService>();
            var ScreenVM   = new List <Models.ScreenVM>();
            var user       = Helper.GetCurrentUser();
            var screenList = screenService.GetScreenIdByBrandId(user.BrandID);

            foreach (var item in screenList)
            {
                var location       = locationService.Get(item.LocationID);
                var locationString = location.Address + ", Quận " + location.District + ", TP." + location.Province;
                var m = new Models.ScreenVM
                {
                    Name         = item.ScreenName,
                    Description  = item.Description,
                    ScreenId     = item.ScreenID,
                    isHorizontal = item.isHorizontal,
                    LocationId   = item.LocationID,
                    Location     = locationString,
                };
                ScreenVM.Add(m);
            }
            return(ScreenVM);
        }
コード例 #3
0
ファイル: ClientGameService.cs プロジェクト: zunath/Ceriyo
 public ClientGameService(
     Microsoft.Xna.Framework.Game game,
     EntityWorld world,
     SpriteBatch spriteBatch,
     Camera2D camera,
     IGraphicsService graphicsService,
     IScriptService scriptService,
     IScreenService screenService,
     IDataService dataService,
     IAppService appService,
     IInputService inputService,
     IUIService uiService,
     IClientNetworkService networkService)
 {
     _game            = game;
     _world           = world;
     _spriteBatch     = spriteBatch;
     _camera          = camera;
     _graphicsService = graphicsService;
     _scriptService   = scriptService;
     _screenService   = screenService;
     _dataService     = dataService;
     _appService      = appService;
     _inputService    = inputService;
     _uiService       = uiService;
     _networkService  = networkService;
 }
コード例 #4
0
        public void Initialize(IServiceProvider serviceProvider)
        {
            var provider = serviceProvider;

            ScreenService = (IScreenService)provider.GetService(typeof(IScreenService));

            // Setup resource manager
            var translationService = (ITranslationService)provider.GetService(typeof(ITranslationService));

            if (translationService != null)
            {
                translationService.SetResourceManagerTo <Resources>();
            }

            // Register new panel item types
            var factoryManager = (IPanelItemFactoryManager)provider.GetService(typeof(IPanelItemFactoryManager));

            if (factoryManager != null)
            {
                factoryManager.RegisterFactory <UserRoot>(new PanelItemRootFactory <UserRoot>());
                factoryManager.RegisterFactory <UserPanelItem>(new UserFactory());

                factoryManager.RegisterFactory <WorkspaceRoot>(new PanelItemRootFactory <WorkspaceRoot>());
                factoryManager.RegisterFactory <WorkspacePanelItem>(new WorkspaceFactory());
            }

            // Register new panel fillers
            var fillerManager = (IPanelFillerManager)provider.GetService(typeof(IPanelFillerManager));

            if (fillerManager != null)
            {
                fillerManager.RegisterFiller <UserPanelItem>(new UserFiller());
                fillerManager.RegisterFiller <WorkspacePanelItem>(new WorkspaceFiller());
            }
        }
コード例 #5
0
 public MenuService(IMenuRepository menuRepository, IRoleWiseScreenPermissionService roleWiseScreenPermissionService, IScreenService screenService)
     : base(menuRepository)
 {
     _menuRepository = menuRepository;
     _roleWiseScreenPermissionService = roleWiseScreenPermissionService;
     _screenService = screenService;
 }
コード例 #6
0
ファイル: RootPane.cs プロジェクト: ryancheung/Steropes.UI
        public RootPane(IScreenService screen, IUIStyle style) : base(style)
        {
            Screen    = screen;
            glassPane = new GlassPane(UIStyle);

            AddInternalHelper(glassPane, InsertPosition.Front, GlassPaneLayer);
            GlassPaneForPopups = true;
        }
コード例 #7
0
    public void ReplaceScreenService(IScreenService newCurrent)
    {
        var index     = MetaComponentsLookup.ScreenService;
        var component = CreateComponent <ScreenServiceComponent>(index);

        component.current = newCurrent;
        ReplaceComponent(index, component);
    }
コード例 #8
0
        public RepeatKeysEventFilter(IEventSource <KeyEventData> source, IScreenService screen)
        {
            this.source = source;
            this.screen = screen;

            keysDown   = new Dictionary <Keys, double>();
            eventQueue = new EventQueue <KeyEventData>();
        }
コード例 #9
0
ファイル: PhiddleCore.cs プロジェクト: jensbrak/Phiddle
        /// <summary>
        /// Initialize Phiddle to run. This means creating all UI compontents and make
        /// the service provider ready to serve.
        /// </summary>
        public void Initialize()
        {
            lastPos = SKPoint.Empty;

            // Setup services
            InitializeServices(Services);
            ServiceProvider = Services.BuildServiceProvider();
            screenService   = ServiceProvider.GetRequiredService <IScreenService>();
            logService      = ServiceProvider.GetRequiredService <ILogService>();

            appSettingsService = ServiceProvider.GetRequiredService <SettingsService <AppSettings> >();
            appStateService    = ServiceProvider.GetRequiredService <SettingsService <AppState> >();

            // Actions
            appActions = InitializeActions();

            // Screen
            var s = screenService.Dimensions();

            // Tools
            appTools  = new AppTools(s, appStateService.Settings, appSettingsService.Settings);
            helpLines = new HelpLines(s, appStateService.Settings, appSettingsService.Settings.PaintHelpLines);

            WindowsSizeFactor = appSettingsService.Settings.WindowSizeFactor;
            WindowZoomFactor  = appSettingsService.Settings.WindowZoomFactor;

            // Windows
            windowApp  = new Window(SKPoint.Empty, ToolWindowSize, appSettingsService.Settings.WindowApp);
            windowInfo = new WindowTextInfo(SKPoint.Empty, InfoWindowSize, appSettingsService.Settings.WindowInfo);
            windowZoom = new WindowZoom(SKPoint.Empty, ZoomWindowSize, appSettingsService.Settings.WindowZoom)
            {
                CrosshairVisible = !helpLines.Visible
            }
            ;

            // Calculate initial locations of windows with relative positions
#if DEBUG
            var wm = appSettingsService.Settings.WindowMargin + windowApp.PaintBorder.StrokeWidth;
#else
            var wm = appSettingsService.Settings.WindowMargin;
#endif
            var zx = s.Right - windowZoom.Bounds.Width - wm * 2;
            var zy = s.Bottom - windowZoom.Bounds.Height - wm * 2;
            ZoomWindowLocation = new SKPoint(zx, zy);

            var ix = s.Right - windowInfo.Bounds.Width - wm * 2;
            var iy = s.Bottom - windowInfo.Bounds.Height - windowZoom.Bounds.Height - wm * 4;
            InfoWindowLocation = new SKPoint(ix, iy);

            // Setup refresh timer
            timer = new Timer(50)
            {
                AutoReset = true
            };
            timer.Elapsed += new ElapsedEventHandler(TimerElapsed);

            logService.Debug("Initialize", $"Core initialized with refresh rate = {1000 / timer.Interval:0} FPS");
        }
コード例 #10
0
        public Game1()
        {
            Input = new InputService();

            _screenService   = new ScreenService();
            _gameTimeService = new GameTimeService();
            _graphics        = new GraphicsDeviceManager(this);
            IsMouseVisible   = false;
        }
コード例 #11
0
 public ScreensController(IScreenService screenService, IKiosksService kiosksService,
                          IHubContext <KiosksHub> kiosksHub,
                          IOnlineScreenService onlineScreenService)
 {
     this.kiosksHub           = kiosksHub;
     this.onlineScreenService = onlineScreenService;
     this.screenService       = screenService;
     this.kiosksService       = kiosksService;
 }
コード例 #12
0
        public ScreenController()
        {
            var kernel = GlobalConfiguration.Configuration.DependencyResolver as NinjectResolver;

            if (kernel != null)
            {
                _screenService = kernel.GetService(typeof(ScreenService)) as ScreenService;
                _moduleService = kernel.GetService(typeof(ModuleService)) as ModuleService;
            }
        }
コード例 #13
0
        private void InitializePhiddleCore()
        {
            phiddle = new PhiddleCore();
            screen  = new ScreenServiceMac(Window);
            phiddle.Services.AddSingleton(screen);
            phiddle.Services.AddSingleton <SettingsService <AppInputMac> >();

            phiddle.Initialize();
            Window.Phiddle = phiddle;
        }
コード例 #14
0
ファイル: MainMenuScreen.cs プロジェクト: zunath/Ceriyo
        public MainMenuScreen(IUIViewModelFactory viewModelFactory,
                              IUIService uiService,
                              IClientNetworkService networkService,
                              IScreenService screenService)
        {
            _uiViewModelFactory = viewModelFactory;
            _uiService          = uiService;
            _screenService      = screenService;

            networkService.BindPacketAction <CharacterAddedToWorldPacket>(OnCharacterAddedToWorldPacket);
        }
コード例 #15
0
 internal HomeTheaterFacade(
     IAmplifierService amplifierService,
     IDvdPlayerService dvdPlayerService,
     IProjectorService projectorService,
     IScreenService screenService)
 {
     _amplifierService = amplifierService;
     _dvdPlayerService = dvdPlayerService;
     _projectorService = projectorService;
     _screenService    = screenService;
 }
コード例 #16
0
        public void ServiceClosed(object sender, EventArgs e)
        {
            IScreenService service = (IScreenService)sender;

            service.ServiceClosed -= ServiceClosed;
            currentServices.Remove(service);
            if (service == currentService)
            {
                currentService = null;
            }
        }
コード例 #17
0
ファイル: ContactService.cs プロジェクト: yuanjianjiang/boghe
        public bool Start()
        {
            this.screenService        = this.manager.ScreenService;
            this.xcapService          = this.manager.XcapService;
            this.sipService           = this.manager.SipService;
            this.configurationService = this.manager.ConfigurationService;
            this.stateMonitorService  = this.manager.StateMonitorService;

            this.sipService.onRegistrationEvent += this.sipService_onRegistrationEvent;

            return(true);
        }
コード例 #18
0
    public MetaEntity SetScreenService(IScreenService newCurrent)
    {
        if (hasScreenService)
        {
            throw new Entitas.EntitasException("Could not set ScreenService!\n" + this + " already has an entity with ScreenServiceComponent!",
                                               "You should check if the context already has a screenServiceEntity before setting it or use context.ReplaceScreenService().");
        }
        var entity = CreateEntity();

        entity.AddScreenService(newCurrent);
        return(entity);
    }
コード例 #19
0
        private void InitializePhiddleForm()
        {
            screen = new ScreenServiceForms()
            {
                PhiddleForm = this
            };
            StartPosition = FormStartPosition.Manual;
            var bounds = screen.Dimensions().ToDrawingRect();

            Size     = bounds.Size;
            Location = bounds.Location;
        }
コード例 #20
0
    public void ReplaceScreenService(IScreenService newCurrent)
    {
        var entity = screenServiceEntity;

        if (entity == null)
        {
            entity = SetScreenService(newCurrent);
        }
        else
        {
            entity.ReplaceScreenService(newCurrent);
        }
    }
コード例 #21
0
 public ScreenViewModel(IScreenService screenService, IDialogService dialogService, IUniqueWithFinderService uniqueWithFinderService)
 {
     _screenService           = screenService;
     _dialogService           = dialogService;
     _uniqueWithFinderService = uniqueWithFinderService;
     ShouldShowInfoMessage    = true;
     MessengerInstance.Register <DumpMessage>(this, OnNewDump);
     MessengerInstance.Register <StartedDumpScreenMessage>(this, OnStartedDumpingScreen);
     MessengerInstance.Register <StoppedDumpScreenMessage>(this, OnStoppedDumpingScreen);
     MessengerInstance.Register <SelectedHierarchyNodeMesssage>(this, OnSelectedHierarchyNode);
     MessengerInstance.Register <AddNodeMessage>(this, OnAddNode);
     MessengerInstance.Register <UiObjectInfoRemovedMessage>(this, OnUiObjectInfoRemoved);
 }
コード例 #22
0
 public ToolsetGameService(
     EntityWorld world,
     SpriteBatch spriteBatch,
     Camera2D camera,
     IScreenService screenService,
     IInputService inputService)
 {
     _world         = world;
     _camera        = camera;
     _screenService = screenService;
     _spriteBatch   = spriteBatch;
     _inputService  = inputService;
 }
コード例 #23
0
        public AdditionalScreenPermissionController()
        {
            var kernel = GlobalConfiguration.Configuration.DependencyResolver as NinjectResolver;

            if (kernel != null)
            {
                _additionalScreenPermissionService = kernel.GetService(typeof(AdditionalScreenPermissionService)) as AdditionalScreenPermissionService;
                _roleWiseScreenPermissionService   = kernel.GetService(typeof(RoleWiseScreenPermissionService)) as RoleWiseScreenPermissionService;
                _screenService          = kernel.GetService(typeof(ScreenService)) as ScreenService;
                _userInformationService = kernel.GetService(typeof(UserInformationService)) as UserInformationService;
                _moduleService          = kernel.GetService(typeof(ModuleService)) as ModuleService;
            }
        }
コード例 #24
0
ファイル: ContactService.cs プロジェクト: sarandogou/boghe
        public bool Start()
        {
            this.screenService = this.manager.ScreenService;
#if !WINRT
            this.xcapService = this.manager.XcapService;
            this.sipService = this.manager.SipService;
#endif
            this.configurationService = this.manager.ConfigurationService;
            this.stateMonitorService = this.manager.StateMonitorService;
#if !WINRT
            this.sipService.onRegistrationEvent += this.sipService_onRegistrationEvent;
#endif

            return true;
        }
コード例 #25
0
        private void ServiceClosed(object sender, EventArgs e)
        {
            IScreenService service = (IScreenService)sender;

            service.ServiceClosed -= ServiceClosed;

            currentServices.Remove(service);

            //service.Visual.Close();

            if (service == currentService)
            {
                currentService = null;
            }
        }
コード例 #26
0
        public ScreenEventHandling(IScreenService screenService, IWidget root, IInputManager rawInputs)
        {
            this.screenService = screenService;
            this.root          = root;

            mousePostProcessors   = new List <IComponentEventSink <MouseEventData> >();
            mousePreProcessors    = new List <IComponentEventSink <MouseEventData> >();
            touchPreProcessors    = new List <IComponentEventSink <TouchEventData> >();
            touchPostProcessors   = new List <IComponentEventSink <TouchEventData> >();
            keyPostProcessors     = new List <IComponentEventSink <KeyEventData> >();
            keyPreProcessors      = new List <IComponentEventSink <KeyEventData> >();
            gamePadPostProcessors = new List <IComponentEventSink <GamePadEventData> >();
            gamePadPreProcessors  = new List <IComponentEventSink <GamePadEventData> >();

            mouseInputs   = ConfigureMouseInput(rawInputs.MouseSource);
            keyInputs     = ConfigureKeyInput(rawInputs.KeySource);
            gamePadInputs = ConfigureGamePadInput(rawInputs.GamePadSource);
            touchInputs   = ConfigureTouchInput(rawInputs.TouchSource);
        }
コード例 #27
0
        // GET: Location/Delete/:id
        public ActionResult Delete(int id)
        {
            var            location         = this.locationService.Get(id);
            IBoxService    boxService       = DependencyUtils.Resolve <IBoxService>();
            IScreenService screenService    = DependencyUtils.Resolve <IScreenService>();
            var            boxInLocation    = boxService.Get(a => a.LocationID == id).FirstOrDefault();
            var            screenInLocation = screenService.Get(a => a.LocationID == id).FirstOrDefault();
            bool           result           = false;

            if (location != null && boxInLocation == null && screenInLocation == null)
            {
                this.locationService.Delete(location);
                result = true;
            }
            return(Json(new
            {
                success = result,
            }, JsonRequestBehavior.AllowGet));
        }
コード例 #28
0
ファイル: ServerGameService.cs プロジェクト: zunath/Ceriyo
 public ServerGameService(
     EntityWorld world,
     IServerSettingsService settingsService,
     IScriptService scriptService,
     IDataService dataService,
     IAppService appService,
     IServerNetworkService networkService,
     IScreenService screenService,
     IObjectMapper objectMapper,
     ISystemLoader systemLoader)
 {
     _world = world;
     _settingsService = settingsService;
     _scriptService = scriptService;
     _dataService = dataService;
     _appService = appService;
     _networkService = networkService;
     _screenService = screenService;
     _objectMapper = objectMapper;
     _systemLoader = systemLoader;
 }
コード例 #29
0
        private void ServiceClosed(object sender, EventArgs e)
        {
            IScreenService service = (IScreenService)sender;

            service.ServiceClosed -= ServiceClosed;

            currentServices.Remove(service);
            ContentRoot.Children.Remove(service.Visual);
            //service.Visual.Close();

            if (service == currentService)
            {
                currentService = null;
            }

            foreach (UIElement child in Toggles.Children)
            {
                ToggleButton tb = child as ToggleButton;
                if (tb != null)
                {
                    tb.IsChecked = false;
                }
            }
        }
コード例 #30
0
        public JsonResult ReceiveLocationId(string id)
        {
            int locationId = Int32.Parse(id);

            try
            {
                //get box list by location ID
                IBoxService    boxService    = DependencyUtils.Resolve <IBoxService>();
                IDeviceService deviceService = DependencyUtils.Resolve <IDeviceService>();
                IMapper        mapper        = DependencyUtils.Resolve <IMapper>();
                var            boxs          = boxService.Get().ToList();
                var            boxVMs        = new List <Models.AndroidBoxVM>();

                foreach (var item in boxs)
                {
                    //check boxID is being matched
                    if (deviceService.Get(a => a.BoxID == item.BoxID).FirstOrDefault() == null)
                    {
                        if (item.LocationID == locationId)
                        {
                            var b = new Models.AndroidBoxVM
                            {
                                Name        = item.BoxName,
                                Description = item.Description,
                                BoxId       = item.BoxID,
                                LocationId  = item.LocationID,
                            };
                            boxVMs.Add(b);
                        }
                    }
                }
                IScreenService screenService = DependencyUtils.Resolve <IScreenService>();
                var            screens       = screenService.Get().ToList();
                var            screenVMs     = new List <Models.ScreenVM>();
                foreach (var item in screens)
                {
                    //check boxID is being matched
                    if (deviceService.Get(a => a.ScreenID == item.ScreenID).FirstOrDefault() == null)
                    {
                        if (item.LocationID == locationId)
                        {
                            var b = new Models.ScreenVM
                            {
                                Name         = item.ScreenName,
                                Description  = item.Description,
                                ScreenId     = item.ScreenID,
                                LocationId   = item.LocationID,
                                isHorizontal = item.isHorizontal,
                            };
                            screenVMs.Add(b);
                        }
                    }
                }
                return(Json(new
                {
                    boxListByLocationId = boxVMs,
                    screenListByLocationId = screenVMs
                }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #31
0
 public WelcomeViewModel(IScreenService screenService)
 {
   this.screenService = screenService;
 }
コード例 #32
0
 public ChatViewModel(IScreenService screenService)
 {
   this.screenService = screenService;
 }
コード例 #33
0
 public ScreensController(IScreenService screenService, IMemoryCache cache)
 {
     _pcsService = screenService;
     _cache      = cache;
 }
コード例 #34
0
ファイル: MainWindow.xaml.cs プロジェクト: peteblois/rooler
        private void ServiceClosed(object sender, EventArgs e)
        {
            IScreenService service = (IScreenService)sender;

            service.ServiceClosed -= this.ServiceClosed;

            this.currentServices.Remove(service);
            this.ContentRoot.Children.Remove(service.Visual);
            //service.Visual.Close();

            if (service == this.currentService)
                this.currentService = null;

            foreach (UIElement child in this.Toggles.Children) {
                ToggleButton tb = child as ToggleButton;
                if (tb != null)
                    tb.IsChecked = false;
            }
        }
コード例 #35
0
 public MainViewModel(IScreenService screenService)
 {
   this.screenService = screenService;
   this.screenService.Initialize();
 }