public PermissionController(IPermissionService permissionService, IScreenService screenService, IDictionaryAllService dictionaryAllService) { _permissionService = permissionService; _screenService = screenService; _dictionaryAllService = dictionaryAllService; }
//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); }
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; }
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()); } }
public MenuService(IMenuRepository menuRepository, IRoleWiseScreenPermissionService roleWiseScreenPermissionService, IScreenService screenService) : base(menuRepository) { _menuRepository = menuRepository; _roleWiseScreenPermissionService = roleWiseScreenPermissionService; _screenService = screenService; }
public RootPane(IScreenService screen, IUIStyle style) : base(style) { Screen = screen; glassPane = new GlassPane(UIStyle); AddInternalHelper(glassPane, InsertPosition.Front, GlassPaneLayer); GlassPaneForPopups = true; }
public void ReplaceScreenService(IScreenService newCurrent) { var index = MetaComponentsLookup.ScreenService; var component = CreateComponent <ScreenServiceComponent>(index); component.current = newCurrent; ReplaceComponent(index, component); }
public RepeatKeysEventFilter(IEventSource <KeyEventData> source, IScreenService screen) { this.source = source; this.screen = screen; keysDown = new Dictionary <Keys, double>(); eventQueue = new EventQueue <KeyEventData>(); }
/// <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"); }
public Game1() { Input = new InputService(); _screenService = new ScreenService(); _gameTimeService = new GameTimeService(); _graphics = new GraphicsDeviceManager(this); IsMouseVisible = false; }
public ScreensController(IScreenService screenService, IKiosksService kiosksService, IHubContext <KiosksHub> kiosksHub, IOnlineScreenService onlineScreenService) { this.kiosksHub = kiosksHub; this.onlineScreenService = onlineScreenService; this.screenService = screenService; this.kiosksService = kiosksService; }
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; } }
private void InitializePhiddleCore() { phiddle = new PhiddleCore(); screen = new ScreenServiceMac(Window); phiddle.Services.AddSingleton(screen); phiddle.Services.AddSingleton <SettingsService <AppInputMac> >(); phiddle.Initialize(); Window.Phiddle = phiddle; }
public MainMenuScreen(IUIViewModelFactory viewModelFactory, IUIService uiService, IClientNetworkService networkService, IScreenService screenService) { _uiViewModelFactory = viewModelFactory; _uiService = uiService; _screenService = screenService; networkService.BindPacketAction <CharacterAddedToWorldPacket>(OnCharacterAddedToWorldPacket); }
internal HomeTheaterFacade( IAmplifierService amplifierService, IDvdPlayerService dvdPlayerService, IProjectorService projectorService, IScreenService screenService) { _amplifierService = amplifierService; _dvdPlayerService = dvdPlayerService; _projectorService = projectorService; _screenService = screenService; }
public void ServiceClosed(object sender, EventArgs e) { IScreenService service = (IScreenService)sender; service.ServiceClosed -= ServiceClosed; currentServices.Remove(service); if (service == currentService) { currentService = null; } }
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); }
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); }
private void InitializePhiddleForm() { screen = new ScreenServiceForms() { PhiddleForm = this }; StartPosition = FormStartPosition.Manual; var bounds = screen.Dimensions().ToDrawingRect(); Size = bounds.Size; Location = bounds.Location; }
public void ReplaceScreenService(IScreenService newCurrent) { var entity = screenServiceEntity; if (entity == null) { entity = SetScreenService(newCurrent); } else { entity.ReplaceScreenService(newCurrent); } }
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); }
public ToolsetGameService( EntityWorld world, SpriteBatch spriteBatch, Camera2D camera, IScreenService screenService, IInputService inputService) { _world = world; _camera = camera; _screenService = screenService; _spriteBatch = spriteBatch; _inputService = inputService; }
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; } }
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; }
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; } }
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); }
// 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)); }
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; }
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; } } }
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; } }
public WelcomeViewModel(IScreenService screenService) { this.screenService = screenService; }
public ChatViewModel(IScreenService screenService) { this.screenService = screenService; }
public ScreensController(IScreenService screenService, IMemoryCache cache) { _pcsService = screenService; _cache = cache; }
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; } }
public MainViewModel(IScreenService screenService) { this.screenService = screenService; this.screenService.Initialize(); }