public MemberPickerDlg(IFileTreeView globalFileTreeView, IFileTreeView newFileTreeView, IImageManager imageManager) {
			InitializeComponent();
			DataContextChanged += (s, e) => {
				var data = DataContext as MemberPickerVM;
				if (data != null) {
					data.OpenAssembly = new OpenAssembly(globalFileTreeView.FileManager);
					data.PropertyChanged += MemberPickerVM_PropertyChanged;
				}
			};
			openImage.Source = imageManager.GetImage(GetType().Assembly, "Open", BackgroundType.DialogWindow);

			var treeView = (Control)newFileTreeView.TreeView.UIObject;
			cpTreeView.Content = treeView;
			Validation.SetErrorTemplate(treeView, (ControlTemplate)FindResource("noRedBorderOnValidationError"));
			treeView.AllowDrop = false;
			treeView.BorderThickness = new Thickness(1);

			var binding = new Binding {
				ValidatesOnDataErrors = true,
				ValidatesOnExceptions = true,
				UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
				Path = new PropertyPath("SelectedItem"),
				Mode = BindingMode.TwoWay,
			};
			treeView.SetBinding(Selector.SelectedItemProperty, binding);

			var cmd = new RelayCommand(a => {
				searchTextBox.SelectAll();
				searchTextBox.Focus();
			});
			InputBindings.Add(new KeyBinding(cmd, Key.E, ModifierKeys.Control));
			InputBindings.Add(new KeyBinding(cmd, Key.F, ModifierKeys.Control));
		}
Exemple #2
0
 TreeViewManager(IThemeManager themeManager, IImageManager imageManager, [ImportMany] IEnumerable<Lazy<ITreeNodeDataCreator, ITreeNodeDataCreatorMetadata>> treeNodeDataCreators)
 {
     this.themeManager = themeManager;
     this.imageManager = imageManager;
     this.guidToCreator = new Dictionary<Guid, List<Lazy<ITreeNodeDataCreator, ITreeNodeDataCreatorMetadata>>>();
     InitializeGuidToCreator(treeNodeDataCreators);
 }
 FileSearcherCreator(IFileTreeView fileTreeView, IImageManager imageManager, DotNetImageManager dotNetImageManager, ILanguageManager languageManager)
 {
     this.fileTreeView = fileTreeView;
     this.imageManager = imageManager;
     this.dotNetImageManager = dotNetImageManager;
     this.languageManager = languageManager;
 }
        public ItemSpotlightViewModel(IImageManager imageManager, IApiClient apiClient)
        {
            _apiClient = apiClient;
            _urlsToItems = new Dictionary<string, BaseItemDto>();
            Images = new ImageSlideshowViewModel(imageManager, Enumerable.Empty<string>()) {
                ImageStretch = Stretch.UniformToFill
            };

            Images.PropertyChanged += (s, e) => {
                if (e.PropertyName == "CurrentImageUrl") {
                    BaseItemDto item = CurrentItem;
                    CurrentCaption = item != null ? item.Name : null;
                    OnPropertyChanged("CurrentItem");
                }
            };

            ItemSelectedCommand = new RelayCommand(o => {
                BaseItemDto item = CurrentItem;
                Action<BaseItemDto> action = ItemSelectedAction;

                if (action != null && item != null) {
                    action(item);
                }
            });
        }
Exemple #5
0
 CompletionBroker(IImageManager imageManager, Lazy <IIntellisenseSessionStackMapService> intellisenseSessionStackMapService, Lazy <ICompletionTextElementProviderService> completionTextElementProviderService, [ImportMany] IEnumerable <Lazy <ICompletionSourceProvider, IOrderableContentTypeMetadata> > completionSourceProviders)
 {
     this.imageManager = imageManager;
     this.intellisenseSessionStackMapService   = intellisenseSessionStackMapService;
     this.completionTextElementProviderService = completionTextElementProviderService;
     this.completionSourceProviders            = Orderer.Order(completionSourceProviders).ToArray();
 }
        public IImageManager Load(string resource)
        {
            IImageManager imageManager = null;

            if (!(string.IsNullOrWhiteSpace(resource)))
            {
                // See if the resource is a Folder
                if (Directory.Exists(resource))
                {
                    imageManager = new FolderImageManager(resource);
                }
                else if (File.Exists(resource))
                {
                    var fileExtension = Path.GetExtension(resource).ToLower();
                    if (CompressedFileImageManager.SUPPORTED_FILETYPES.Contains(fileExtension))
                    {
                        imageManager = new CompressedFileImageManager(resource);
                    }
                    else if (PDFImageManager.SUPPORTED_FILETYPES.Contains(fileExtension))
                    {
                        imageManager = new PDFImageManager(resource);
                    }
                    else if (FolderImageManager.SUPPORTED_FILETYPES.Contains(fileExtension))
                    {
                        imageManager = new FolderImageManager(resource);
                    }
                }
            }

            return(imageManager);
        }
        public FavoritesViewModel(IPresentationManager presentation, IImageManager imageManager, IApiClient apiClient, ISessionManager session, INavigationService nav, IPlaybackManager playback, ILogger logger, double tileWidth, double tileHeight, IServerEvents serverEvents)
            : base(presentation, apiClient)
        {
            _sessionManager = session;
            _playbackManager = playback;
            _imageManager = imageManager;
            _navService = nav;
            _logger = logger;
            _serverEvents = serverEvents;

            TileWidth = tileWidth;
            TileHeight = tileHeight;

            var spotlightTileWidth = TileWidth * 2 + TilePadding;
            var spotlightTileHeight = spotlightTileWidth * 9 / 16;

            SpotlightViewModel = new ImageViewerViewModel(_imageManager, new List<ImageViewerImage>())
            {
                Height = spotlightTileHeight,
                Width = spotlightTileWidth,
                CustomCommandAction = i => _navService.NavigateToItem(i.Item, ViewType.Tv)
            };

            LoadViewModels();

            NavigateToFavoriteMoviesCommand = new RelayCommand(o => NavigateToFavorites("Movie"));
        }
Exemple #8
0
        public SubscriptionFactory(IRepository da, IGateService gateService, IService serviceCharge, IImageManager passportManager, IPersonEditorService personEditorService, IPaymentService paymentService)
        {
            if (da == null)
            {
                throw new ArgumentNullException("da");
            }
            if (passportManager == null)
            {
                throw new ArgumentNullException("passportManager");
            }
            if (gateService == null)
            {
                throw new ArgumentNullException("gateService");
            }
            if (personEditorService == null)
            {
                throw new ArgumentNullException("personEditorService");
            }
            if (paymentService == null)
            {
                throw new ArgumentNullException("paymentService");
            }
            if (serviceCharge == null)
            {
                throw new ArgumentNullException("serviceCharge");
            }

            _da                  = da;
            _gateService         = gateService;
            _paymentService      = paymentService;
            _passportManager     = passportManager;
            _personEditorService = personEditorService;
            _serviceCharge       = serviceCharge;
        }
Exemple #9
0
 public RecipientController(IErrorLogManager errorLogManager, IImageManager imageManager, IRecipientManager recipientManager, IPaymentManager paymentManager)
     : base(errorLogManager)
 {
     _imageManager     = imageManager;
     _recipientManager = recipientManager;
     _paymentManager   = paymentManager;
 }
Exemple #10
0
 public CriticReviewListViewModel(IPresentationManager presentationManager, IApiClient apiClient, IImageManager imageManager, string itemId)
 {
     ImageManager        = imageManager;
     _itemId             = itemId;
     ApiClient           = apiClient;
     PresentationManager = presentationManager;
 }
Exemple #11
0
 public OpenSideMenuMenuCommand(INavigator navigator, ISessionManager sessionManager,IImageManager imageManager, IApiClient apiClient)
 {
     _sessionManager = sessionManager;
     _imageManager = imageManager;
     _apiClient = apiClient;
     ExecuteCommand = new RelayCommand(arg => navigator.Navigate(Go.To.SideMenu()));
 }
Exemple #12
0
 CodeToolTipManager(IImageManager imageManager, IDotNetImageManager dotNetImageManager, ICodeToolTipSettings codeToolTipSettings, [ImportMany] IEnumerable <Lazy <IToolTipContentCreator, IToolTipContentCreatorMetadata> > mefCreators)
 {
     this.imageManager        = imageManager;
     this.dotNetImageManager  = dotNetImageManager;
     this.codeToolTipSettings = codeToolTipSettings;
     this.creators            = mefCreators.OrderBy(a => a.Metadata.Order).ToArray();
 }
Exemple #13
0
		DnSpyLoaderManager(IImageManager imageManager, IThemeManager themeManager, ISettingsManager settingsManager, [ImportMany] IEnumerable<Lazy<IDnSpyLoader, IDnSpyLoaderMetadata>> mefLoaders) {
			this.imageManager = imageManager;
			this.themeManager = themeManager;
			this.settingsManager = settingsManager;
			this.loaders = mefLoaders.OrderBy(a => a.Metadata.Order).ToArray();
			this.windowLoader = new WindowLoader(this, imageManager, themeManager, settingsManager, loaders);
		}
Exemple #14
0
 public IconBarMargin(ITextEditorUIContext uiContext, ITextLineObjectManager textLineObjectManager, IImageManager imageManager, IThemeManager themeManager)
 {
     this.uiContext = uiContext;
     this.textLineObjectManager = textLineObjectManager;
     this.imageManager = imageManager;
     this.themeManager = themeManager;
 }
 public CriticReviewListViewModel(IPresentationManager presentationManager, IApiClient apiClient, IImageManager imageManager, string itemId)
 {
     ImageManager = imageManager;
     _itemId = itemId;
     ApiClient = apiClient;
     PresentationManager = presentationManager;
 }
 public MainPageViewModel(IImageManager imageManager)
 {
     _imageManager = imageManager;
     _pauseButtonTitle = "Paused";
     _isRunning = false;
     _imageManager.OnTimerTick += _imageManager_OnTimerTick;
 }
Exemple #17
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow" /> class.
        /// </summary>
        public MainWindow(ILogger logger, IPlaybackManager playbackManager, IImageManager imageManager, IApplicationHost appHost, IPresentationManager appWindow, IUserInputManager userInput, ITheaterConfigurationManager config, INavigationService nav, IScreensaverManager screensaverManager, IConnectionManager connectionManager)
            : base()
        {
            _logger           = logger;
            _appHost          = appHost;
            _appWindow        = appWindow;
            _config           = config;
            _playbackManager  = playbackManager;
            UserInputManager  = userInput;
            NavigationManager = nav;

            Loaded += MainWindow_Loaded;

            InitializeComponent();

            RotatingBackdrops = new RotatingBackdropsViewModel(_config, imageManager, playbackManager, logger, screensaverManager, connectionManager);

            _config.ConfigurationUpdated       += _config_ConfigurationUpdated;
            _playbackManager.PlaybackStarted   += _playbackManager_PlaybackStarted;
            _playbackManager.PlaybackCompleted += _playbackManager_PlaybackCompleted;

            //Timeline.DesiredFrameRateProperty.OverrideMetadata(
            //    typeof(Timeline),
            //    new FrameworkPropertyMetadata { DefaultValue = 30 }
            //);
        }
 /// <summary>
 /// Parametrized constructor to inject the reference object implicitly 
 /// M.S.Prakash
 /// </summary>
 /// <param name="pm"></param>
 /// <param name="um"></param>
 public ListDonorProgramController(IProgrammLevelManager pm, IUserLevelManager um,IImageManager mgr,IDollarManager dm)
 {
     this.dm = dm;
     this.pm = pm;
     this.um = um;
     this.mgr = mgr;
 }
 public UserListViewModel(IPresentationManager presentationManager, IConnectionManager connectionManager, IImageManager imageManager, ISessionManager sessionManager, INavigationService navigation)
 {
     SessionManager = sessionManager;
     ImageManager = imageManager;
     ConnectionManager = connectionManager;
     PresentationManager = presentationManager;
 }
 public ImagesCacheDbManager(IImageManager imageManager, DateTime dateBegin, DateTime dateEnd)
 {
     _imageManager = imageManager;
     _dateBegin    = dateBegin;
     _dateEnd      = dateEnd;
     _cacheManager = new LocalFileCacheManager();
 }
 public UserListViewModel(IPresentationManager presentationManager, IApiClient apiClient, IImageManager imageManager, ISessionManager sessionManager)
 {
     SessionManager      = sessionManager;
     ImageManager        = imageManager;
     ApiClient           = apiClient;
     PresentationManager = presentationManager;
 }
Exemple #22
0
 public HomeController(IUserManager userManager, IPhoneManager phoneManager, IImageManager imageManager)
 {
     this.userManager  = userManager;
     this.phoneManager = phoneManager;
     this.imageManager = imageManager;
     authHelper        = new AuthHelper(userManager);
 }
Exemple #23
0
 public IconBarMargin(ITextEditorUIContext uiContext, ITextLineObjectManager textLineObjectManager, IImageManager imageManager, IThemeManager themeManager)
 {
     this.uiContext             = uiContext;
     this.textLineObjectManager = textLineObjectManager;
     this.imageManager          = imageManager;
     this.themeManager          = themeManager;
 }
 public DocumentViewerToolTipService(IImageManager imageManager, IDotNetImageManager dotNetImageManager, ICodeToolTipSettings codeToolTipSettings, Lazy <IToolTipProvider, IToolTipProviderMetadata>[] toolTipProviders, IDocumentViewer documentViewer)
 {
     if (imageManager == null)
     {
         throw new ArgumentNullException(nameof(imageManager));
     }
     if (dotNetImageManager == null)
     {
         throw new ArgumentNullException(nameof(dotNetImageManager));
     }
     if (codeToolTipSettings == null)
     {
         throw new ArgumentNullException(nameof(codeToolTipSettings));
     }
     if (toolTipProviders == null)
     {
         throw new ArgumentNullException(nameof(toolTipProviders));
     }
     if (documentViewer == null)
     {
         throw new ArgumentNullException(nameof(documentViewer));
     }
     this.imageManager                   = imageManager;
     this.dotNetImageManager             = dotNetImageManager;
     this.codeToolTipSettings            = codeToolTipSettings;
     this.toolTipProviders               = toolTipProviders;
     this.documentViewer                 = documentViewer;
     documentViewer.TextView.Closed     += TextView_Closed;
     documentViewer.TextView.MouseHover += TextView_MouseHover;
 }
Exemple #25
0
 public MainPageViewModel(IImageManager imageManager)
 {
     _imageManager              = imageManager;
     _pauseButtonTitle          = "Paused";
     _isRunning                 = false;
     _imageManager.OnTimerTick += _imageManager_OnTimerTick;
 }
Exemple #26
0
        LocalsVM(IImageManager imageManager, IDebuggerSettings debuggerSettings, ILocalsSettings localsSettings, IMethodLocalProvider methodLocalProvider, IStackFrameManager stackFrameManager, ITheDebugger theDebugger, IAskUser askUser)
        {
            this.dispatcher          = Dispatcher.CurrentDispatcher;
            this.askUser             = askUser;
            this.methodLocalProvider = methodLocalProvider;
            this.debuggerSettings    = debuggerSettings;
            this.stackFrameManager   = stackFrameManager;
            this.theDebugger         = theDebugger;

            this.printerContext = new PrinterContext(imageManager)
            {
                SyntaxHighlight  = debuggerSettings.SyntaxHighlightLocals,
                UseHexadecimal   = debuggerSettings.UseHexadecimal,
                TypePrinterFlags = TypePrinterFlags.ShowArrayValueSizes,
            };
            this.printerContext.TypePrinterFlags = GetTypePrinterFlags(localsSettings, this.printerContext.TypePrinterFlags);
            this.printerContext.TypePrinterFlags = GetTypePrinterFlags(debuggerSettings, this.printerContext.TypePrinterFlags);

            methodLocalProvider.NewMethodInfoAvailable += MethodLocalProvider_NewMethodInfoAvailable;
            this.rootNode = new SharpTreeNode();
            stackFrameManager.StackFramesUpdated += StackFrameManager_StackFramesUpdated;
            stackFrameManager.PropertyChanged    += StackFrameManager_PropertyChanged;
            theDebugger.OnProcessStateChanged    += TheDebugger_OnProcessStateChanged;
            theDebugger.ProcessRunning           += TheDebugger_ProcessRunning;
            debuggerSettings.PropertyChanged     += DebuggerSettings_PropertyChanged;
            localsSettings.PropertyChanged       += LocalsSettings_PropertyChanged;
        }
 public IndexModel(IDataAccess dataAccess, IImageManager imageManager, IConfiguration configuration, ICaching caching)
 {
     this._dataAccess    = dataAccess;
     this._imageManager  = imageManager;
     this._configuration = configuration;
     this._caching       = caching;
 }
Exemple #28
0
 public AddConcertModel(IDataAccess dataAccess, IFestivalManager festivalManager, IImageManager blobStorageManager)
 {
     DataAccess         = dataAccess;
     FestivalManager    = festivalManager;
     BlobStorageManager = blobStorageManager;
     venues             = FestivalManager.Calendar.GetVenues();
 }
Exemple #29
0
 MenuManager(IImageManager imageManager, [ImportMany] IEnumerable <Lazy <IMenu, IMenuMetadata> > mefMenus, [ImportMany] IEnumerable <Lazy <IMenuItem, IMenuItemMetadata> > mefMenuItems)
 {
     this.imageManager = imageManager;
     this.guidToGroups = null;
     this.mefMenus     = mefMenus;
     this.mefMenuItems = mefMenuItems;
 }
 FileSearcherProvider(IFileTreeView fileTreeView, IImageManager imageManager, IDotNetImageManager dotNetImageManager, IDecompilerManager decompilerManager)
 {
     this.fileTreeView       = fileTreeView;
     this.imageManager       = imageManager;
     this.dotNetImageManager = dotNetImageManager;
     this.decompilerManager  = decompilerManager;
 }
Exemple #31
0
 BreakpointsVM(ILanguageManager languageManager, IImageManager imageManager, IThemeManager themeManager, IDebuggerSettings debuggerSettings, ITheDebugger theDebugger, IBreakpointManager breakpointManager, IBreakpointSettings breakpointSettings, Lazy<IModuleLoader> moduleLoader, IInMemoryModuleManager inMemoryModuleManager)
 {
     this.breakpointContext = new BreakpointContext(imageManager, moduleLoader) {
         Language = languageManager.Language,
         SyntaxHighlight = debuggerSettings.SyntaxHighlightBreakpoints,
         UseHexadecimal = debuggerSettings.UseHexadecimal,
         ShowTokens = breakpointSettings.ShowTokens,
         ShowModuleNames = breakpointSettings.ShowModuleNames,
         ShowParameterTypes = breakpointSettings.ShowParameterTypes,
         ShowParameterNames = breakpointSettings.ShowParameterNames,
         ShowOwnerTypes = breakpointSettings.ShowOwnerTypes,
         ShowReturnTypes = breakpointSettings.ShowReturnTypes,
         ShowNamespaces = breakpointSettings.ShowNamespaces,
         ShowTypeKeywords = breakpointSettings.ShowTypeKeywords,
     };
     this.breakpointManager = breakpointManager;
     this.theDebugger = theDebugger;
     this.breakpointList = new ObservableCollection<BreakpointVM>();
     breakpointSettings.PropertyChanged += BreakpointSettings_PropertyChanged;
     breakpointManager.OnListModified += BreakpointManager_OnListModified;
     debuggerSettings.PropertyChanged += DebuggerSettings_PropertyChanged;
     theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged;
     themeManager.ThemeChanged += ThemeManager_ThemeChanged;
     languageManager.LanguageChanged += LanguageManager_LanguageChanged;
     inMemoryModuleManager.DynamicModulesLoaded += InMemoryModuleManager_DynamicModulesLoaded;
     foreach (var bp in breakpointManager.Breakpoints)
         AddBreakpoint(bp);
 }
Exemple #32
0
 public ContactViewModel(IMessageService <bool> messageService, IDataServiceProxy dataServiceProxy,
                         IMailService mailService, IImageManager <ImageType> imageManager) : base(messageService)
 {
     _dataProxy    = dataServiceProxy;
     _mailService  = mailService;
     _imageManager = imageManager;
 }
 DocumentViewerToolTipServiceProvider(IImageManager imageManager, IDotNetImageManager dotNetImageManager, ICodeToolTipSettings codeToolTipSettings, [ImportMany] IEnumerable <Lazy <IToolTipProvider, IToolTipProviderMetadata> > toolTipProviders)
 {
     this.imageManager        = imageManager;
     this.dotNetImageManager  = dotNetImageManager;
     this.codeToolTipSettings = codeToolTipSettings;
     this.toolTipProviders    = toolTipProviders.OrderBy(a => a.Metadata.Order).ToArray();
 }
Exemple #34
0
 BreakpointsVM(ILanguageManager languageManager, IImageManager imageManager, IThemeManager themeManager, IDebuggerSettings debuggerSettings, ITheDebugger theDebugger, IBreakpointManager breakpointManager, IBreakpointSettings breakpointSettings, Lazy <IModuleLoader> moduleLoader, IInMemoryModuleManager inMemoryModuleManager)
 {
     this.breakpointContext = new BreakpointContext(imageManager, moduleLoader)
     {
         Language           = languageManager.Language,
         SyntaxHighlight    = debuggerSettings.SyntaxHighlightBreakpoints,
         UseHexadecimal     = debuggerSettings.UseHexadecimal,
         ShowTokens         = breakpointSettings.ShowTokens,
         ShowModuleNames    = breakpointSettings.ShowModuleNames,
         ShowParameterTypes = breakpointSettings.ShowParameterTypes,
         ShowParameterNames = breakpointSettings.ShowParameterNames,
         ShowOwnerTypes     = breakpointSettings.ShowOwnerTypes,
         ShowReturnTypes    = breakpointSettings.ShowReturnTypes,
         ShowNamespaces     = breakpointSettings.ShowNamespaces,
         ShowTypeKeywords   = breakpointSettings.ShowTypeKeywords,
     };
     this.breakpointManager                      = breakpointManager;
     this.theDebugger                            = theDebugger;
     this.breakpointList                         = new ObservableCollection <BreakpointVM>();
     breakpointSettings.PropertyChanged         += BreakpointSettings_PropertyChanged;
     breakpointManager.OnListModified           += BreakpointManager_OnListModified;
     debuggerSettings.PropertyChanged           += DebuggerSettings_PropertyChanged;
     theDebugger.OnProcessStateChanged          += TheDebugger_OnProcessStateChanged;
     themeManager.ThemeChanged                  += ThemeManager_ThemeChanged;
     languageManager.LanguageChanged            += LanguageManager_LanguageChanged;
     inMemoryModuleManager.DynamicModulesLoaded += InMemoryModuleManager_DynamicModulesLoaded;
     foreach (var bp in breakpointManager.Breakpoints)
     {
         AddBreakpoint(bp);
     }
 }
Exemple #35
0
 public EFRepositoryManager(ILogger <EFRepositoryManager> logger, IImageManager imageManager, IRepositoryMonitor repositoryMonitor, IPostsRepository postsRepository)
 {
     this.logger            = logger;
     this.imageManager      = imageManager;
     this.repositoryMonitor = repositoryMonitor;
     this.postsRepository   = postsRepository;
 }
        public UserProfileWindow(DefaultThemePageMasterCommandsViewModel masterCommands, ISessionManager session, IPresentationManager presentationManager, IImageManager imageManager, IApiClient apiClient, DisplayPreferences displayPreferences, ListPageConfig options)
        {
            _session = session;
            _options = options;
            _displayPreferencesViewModel = new DisplayPreferencesViewModel(displayPreferences, presentationManager);
            _previousFocus = "";

            InitializeComponent();

            Loaded += UserProfileWindow_Loaded;
            Unloaded += UserProfileWindow_Unloaded;
            masterCommands.PageNavigated += masterCommands_PageNavigated;
            BtnClose.Click += BtnClose_Click;

            //Display preferences
            RadioList.Click += radioList_Click;
            RadioPoster.Click += radioPoster_Click;
            RadioThumbstrip.Click += radioThumbstrip_Click;
            RadioPosterStrip.Click += radioPosterStrip_Click;

            //Sort preferences
            RadioSortAscending.Click += RadioSortAscending_Click;
            RadioSortDescending.Click += RadioSortDescending_Click;

            //Focus tracking
            BtnClose.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            HomeButton.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            DisplayPreferencesButton.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            SortButton.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            SettingsButton.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            LogoutButton.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            ShutdownAppButton.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            SleepButton.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            RestartButton.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            ShutdownButton.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;

            RadioList.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            RadioPosterStrip.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            RadioPoster.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            RadioThumbstrip.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;

            RadioSortAscending.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            RadioSortDescending.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;
            CheckBoxSortRemember.IsKeyboardFocusedChanged += Button_IsKeyboardFocusedChanged;

            ContentGrid.DataContext = new DefaultThemeUserDtoViewModel(masterCommands, apiClient, imageManager, session)
            {
                User = session.CurrentUser,
                ImageHeight = 54
            };

            MainGrid.DataContext = this;
            CheckBoxSortRemember.DataContext = _displayPreferencesViewModel;

            if (displayPreferences != null)
            {
                //Always set to false to begin with in case the user is just doing a quick sort and doesn't want it saved.
                _displayPreferencesViewModel.RememberSorting = false;
            }
        }
 public CodeToolTipProvider(IImageManager imageManager, IDotNetImageManager dotNetImageManager, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService, bool syntaxHighlight)
 {
     if (imageManager == null)
     {
         throw new ArgumentNullException(nameof(imageManager));
     }
     if (dotNetImageManager == null)
     {
         throw new ArgumentNullException(nameof(dotNetImageManager));
     }
     if (classificationFormatMap == null)
     {
         throw new ArgumentNullException(nameof(classificationFormatMap));
     }
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.imageManager                   = imageManager;
     this.dotNetImageManager             = dotNetImageManager;
     this.classificationFormatMap        = classificationFormatMap;
     this.themeClassificationTypeService = themeClassificationTypeService;
     this.syntaxHighlight                = syntaxHighlight;
     this.writers = new List <CodeToolTipWriter>();
     CreateNewOutput();
 }
Exemple #38
0
 CodeToolTipManager(IImageManager imageManager, IDotNetImageManager dotNetImageManager, ICodeToolTipSettings codeToolTipSettings, [ImportMany] IEnumerable<Lazy<IToolTipContentCreator, IToolTipContentCreatorMetadata>> mefCreators)
 {
     this.imageManager = imageManager;
     this.dotNetImageManager = dotNetImageManager;
     this.codeToolTipSettings = codeToolTipSettings;
     this.creators = mefCreators.OrderBy(a => a.Metadata.Order).ToArray();
 }
 FileSearcherProvider(IFileTreeView fileTreeView, IImageManager imageManager, IDotNetImageManager dotNetImageManager, ILanguageManager languageManager)
 {
     this.fileTreeView       = fileTreeView;
     this.imageManager       = imageManager;
     this.dotNetImageManager = dotNetImageManager;
     this.languageManager    = languageManager;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow" /> class.
        /// </summary>
        public MainWindow(ILogger logger, IPlaybackManager playbackManager, IApiClient apiClient, IImageManager imageManager, IApplicationHost appHost, IPresentationManager appWindow, IUserInputManager userInput, ITheaterConfigurationManager config, INavigationService nav, IScreensaverManager screensaverManager)
            : base()
        {
            _logger = logger;
            _appHost = appHost;
            _appWindow = appWindow;
            _config = config;
            _playbackManager = playbackManager;
            UserInputManager = userInput;
            NavigationManager = nav;

            Loaded += MainWindow_Loaded;

            InitializeComponent();

            RotatingBackdrops = new RotatingBackdropsViewModel(apiClient, _config, imageManager, playbackManager, logger, screensaverManager);

            _config.ConfigurationUpdated += _config_ConfigurationUpdated;
            _playbackManager.PlaybackStarted += _playbackManager_PlaybackStarted;
            _playbackManager.PlaybackCompleted += _playbackManager_PlaybackCompleted;

            //Timeline.DesiredFrameRateProperty.OverrideMetadata(
            //    typeof(Timeline),
            //    new FrameworkPropertyMetadata { DefaultValue = 30 }
            //);
        }
Exemple #41
0
 public ProductAdminAppService(
     IProductManager productManager,
     IImageManager imageManager)
 {
     ProductManager = productManager;
     ImageManager   = imageManager;
 }
 TreeViewManager(IThemeManager themeManager, IImageManager imageManager, [ImportMany] IEnumerable <Lazy <ITreeNodeDataProvider, ITreeNodeDataProviderMetadata> > treeNodeDataProviders)
 {
     this.themeManager   = themeManager;
     this.imageManager   = imageManager;
     this.guidToProvider = new Dictionary <Guid, List <Lazy <ITreeNodeDataProvider, ITreeNodeDataProviderMetadata> > >();
     InitializeGuidToProvider(treeNodeDataProviders);
 }
Exemple #43
0
        public TreeViewImpl(ITreeViewManager treeViewManager, IThemeManager themeManager, IImageManager imageManager, Guid guid, TreeViewOptions options)
        {
            this.guid = guid;
            this.treeViewManager = treeViewManager;
            this.imageManager = imageManager;
            this.treeViewListener = options.TreeViewListener;
            this.sharpTreeView = new SharpTreeView();
            this.sharpTreeView.SelectionChanged += SharpTreeView_SelectionChanged;
            this.sharpTreeView.CanDragAndDrop = options.CanDragAndDrop;
            this.sharpTreeView.AllowDrop = options.AllowDrop;
            this.sharpTreeView.AllowDropOrder = options.AllowDrop;
            VirtualizingStackPanel.SetIsVirtualizing(this.sharpTreeView, options.IsVirtualizing);
            VirtualizingStackPanel.SetVirtualizationMode(this.sharpTreeView, options.VirtualizationMode);
            this.sharpTreeView.SelectionMode = options.SelectionMode;
            this.sharpTreeView.BorderThickness = new Thickness(0);
            this.sharpTreeView.ShowRoot = false;
            this.sharpTreeView.ShowLines = false;

            if (options.IsGridView) {
                this.sharpTreeView.ItemContainerStyle = (Style)Application.Current.FindResource(SharpGridView.ItemContainerStyleKey);
                this.sharpTreeView.Style = (Style)Application.Current.FindResource("SharpTreeViewGridViewStyle");
            }
            else {
                // Clear the value set by the constructor. This is required or our style won't be used.
                this.sharpTreeView.ClearValue(ItemsControl.ItemContainerStyleProperty);
                this.sharpTreeView.Style = (Style)Application.Current.FindResource(typeof(SharpTreeView));
            }

            this.sharpTreeView.GetPreviewInsideTextBackground = () => themeManager.Theme.GetColor(ColorType.SystemColorsHighlight).Background;
            this.sharpTreeView.GetPreviewInsideForeground = () => themeManager.Theme.GetColor(ColorType.SystemColorsHighlightText).Foreground;

            // Add the root at the end since Create() requires some stuff to have been initialized
            this.root = Create(options.RootNode ?? new TreeNodeDataImpl(new Guid(FileTVConstants.ROOT_NODE_GUID)));
            this.sharpTreeView.Root = this.root.Node;
        }
 public UserListViewModel(IPresentationManager presentationManager, IImageManager imageManager, ISessionManager sessionManager, IApiClient apiClient)
 {
     ApiClient = apiClient;
     SessionManager = sessionManager;
     ImageManager = imageManager;
     PresentationManager = presentationManager;
 }
Exemple #45
0
        private IList <ImageFile> FindImages(IImageManager imageManager, IList <ImageFile> fileList)
        {
            //Find the images that resemble each other
            Parallel.ForEach(fileList, file =>
            {
                foreach (var imageFile in fileList)
                {
                    if (file.FullPath != imageFile.FullPath)
                    {
                        lock (file)
                        {
                            var comparisonResult = imageManager.CompareTwoImages(file.Image, imageFile.Image);
                            if (comparisonResult < 10)
                            {
                                file.SimilarImages.Add(imageFile);
                            }
                        }
                    }
                }
            });

            var imagesWithDuplicates = fileList.Where(f => f.SimilarImages.Count > 0).ToList();

            return(imagesWithDuplicates);
        }
Exemple #46
0
        public Player(
            ICastle castle,
            IHealthInvoker healthInvoker,
            IImageManager imageManager,
            IMovementDirectionManager movementDirectionManager,
            IMovementStrategyInvoker movementStrategyInvoker,
            IAllWeaponsFactory weaponsFactory
            )
        {
            _castle                   = castle;
            _healthInvoker            = healthInvoker;
            _imageManager             = imageManager;
            _movementDirectionManager = movementDirectionManager;
            _movementStrategyInvoker  = movementStrategyInvoker;
            _weaponsFactory           = weaponsFactory;

            behaviorType = BehaviorTypeEnum.Targeted;

            AllSwordSwingImages         = new List <System.Windows.Controls.Image>();
            AllMaceSwingImages          = new List <System.Windows.Controls.Image>();
            AllArrowShootingLeftImages  = new List <System.Windows.Controls.Image>();
            AllArrowShootingRightImages = new List <System.Windows.Controls.Image>();
            weaponsCarried_Observers    = new List <IWeapon>();
            allEnemies_Observers        = new List <IEnemy>();
            allTargets = new List <ITarget>();

            ShootingDirection_Player = Key.None;
            _speedMovement           = 5;
        }
 public ToolTipContentCreatorContext(IImageManager imageManager, IDotNetImageManager dotNetImageManager, ILanguage language, ICodeToolTipSettings codeToolTipSettings)
 {
     this.imageManager = imageManager;
     this.dotNetImageManager = dotNetImageManager;
     this.language = language;
     this.codeToolTipSettings = codeToolTipSettings;
 }
Exemple #48
0
        public CheckAvailabilityForm(IImageManager imageManager)
        {
            InitializeComponent();

            m_ImageManager = imageManager;
            m_Thread       = new Thread(ThreadProc);
        }
        public FavoritesViewModel(IPresentationManager presentation, IImageManager imageManager, IApiClient apiClient, ISessionManager session, INavigationService nav, IPlaybackManager playback, ILogger logger, double tileWidth, double tileHeight, IServerEvents serverEvents)
            : base(presentation, apiClient)
        {
            _sessionManager  = session;
            _playbackManager = playback;
            _imageManager    = imageManager;
            _navService      = nav;
            _logger          = logger;
            _serverEvents    = serverEvents;

            TileWidth  = tileWidth;
            TileHeight = tileHeight;

            var spotlightTileWidth  = TileWidth * 2 + TilePadding;
            var spotlightTileHeight = spotlightTileWidth * 9 / 16;

            SpotlightViewModel = new ImageViewerViewModel(_imageManager, new List <ImageViewerImage>())
            {
                Height = spotlightTileHeight,
                Width  = spotlightTileWidth,
                CustomCommandAction = i => _navService.NavigateToItem(i.Item, ViewType.Tv)
            };

            LoadViewModels();

            NavigateToFavoriteMoviesCommand = new RelayCommand(o => NavigateToFavorites("Movie"));
        }
 public UserListViewModel(IPresentationManager presentationManager, IApiClient apiClient, IImageManager imageManager, ISessionManager sessionManager, INavigationService navigation)
 {
     SessionManager = sessionManager;
     _navigation = navigation;
     ImageManager = imageManager;
     ApiClient = apiClient;
     PresentationManager = presentationManager;
 }
 public PlayExternalDiscAppFactory(ISessionManager sessionManager, IPlaybackManager playbackManager, ITheaterConfigurationManager theaterConfigurationManager, IImageManager imageManager, ILogManager logManager)
 {
     _playbackManager = playbackManager;
     _sessionManager = sessionManager;
     _imageManager = imageManager;
     _theaterConfigurationManager = theaterConfigurationManager;
     _logManager = logManager;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="UserDtoViewModel" /> class.
        /// </summary>
        /// <param name="apiClient">The API client.</param>
        /// <param name="imageManager">The image manager.</param>
        /// <param name="session">The session.</param>
        public UserDtoViewModel(IApiClient apiClient, IImageManager imageManager, ISessionManager session)
        {
            _apiClient = apiClient;
            _imageManager = imageManager;
            _session = session;

            LogoutCommand = new RelayCommand(Logout);
        }
 public CodeToolTipCreator(IImageManager imageManager, IDotNetImageManager dotNetImageManager, bool syntaxHighlight)
 {
     this.imageManager = imageManager;
     this.dotNetImageManager = dotNetImageManager;
     this.syntaxHighlight = syntaxHighlight;
     this.writers = new List<CodeToolTipWriter>();
     CreateNewOutput();
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="UserDtoViewModel" /> class.
        /// </summary>
        /// <param name="apiClient">The API client.</param>
        /// <param name="imageManager">The image manager.</param>
        /// <param name="session">The session.</param>
        public UserDtoViewModel(IApiClient apiClient, IImageManager imageManager, ISessionManager session)
        {
            ApiClient = apiClient;
            ImageManager = imageManager;
            Session = session;

            LogoutCommand = new RelayCommand(i => Logout());
        }
Exemple #55
0
 public HomeController(IProgrammLevelManager pm, IImageManager mgr,IDollarManager dm,IUserLevelManager uman,IDonationManager1 dom)
 {
     this.uman = uman;
     this.dm = dm;
     this.pm = pm;
     this.mgr = mgr;
     this.dom = dom;
 }
 /// <summary>
 /// Constructor for Program Controller
 /// </summary>
 /// <param name="pm"></param>
 /// <param name="mgr"></param>
 /// <param name="mg"></param>
 public ProgramController(IProgramManager pm, IImageManager mgr , IPatientMedicalDetailManager mg , ILocationManager locmng,IDollarManager dm)
 {
     this.pm = pm;
     this.mgr = mgr;
     this.mg = mg;
     this.locmng = locmng;
     this.dm = dm;
 }
        public FolderPage(BaseItemDto parent, DisplayPreferences displayPreferences, IApiClient apiClient, IImageManager imageManager, IPresentationManager presentation, INavigationService navigationManager, IPlaybackManager playbackManager, ILogger logger, ListPageConfig options)
        {
            _logger = logger;
            _presentationManager = presentation;
            _imageManager = imageManager;
            _apiClient = apiClient;
            _options = options;

            _parentItem = parent;

            InitializeComponent();

            Loaded += FolderPage_Loaded;

            SetDefaults(displayPreferences);

            var playAllFromHere = parent.IsType("playlist") || parent.IsType("musicalbum");

            _viewModel = new ItemListViewModel(vm => options.CustomItemQuery(vm, displayPreferences), _presentationManager, _imageManager, _apiClient, navigationManager, playbackManager, _logger)
            {
                ImageDisplayHeightGenerator = GetImageDisplayHeight,
                DisplayNameGenerator = options.DisplayNameGenerator ?? GetDisplayName,
                PreferredImageTypesGenerator = GetPreferredImageTypes,

                ShowSidebarGenerator = GetShowSidebar,
                ScrollDirectionGenerator = GetScrollDirection,

                AutoSelectFirstItem = true,

                ShowLoadingAnimation = true,

                PlayAllFromHereOnPlayCommand = playAllFromHere,
                PlayAllFromHereOnNavigateCommand = playAllFromHere
            };

            if (options.ShowTitle)
            {
                _viewModel.OnItemCreated = v =>
                {
                    v.DisplayNameVisibility = Visibility.Visible;
                };
            }

            _viewModel.AddIndexOptions(options.IndexOptions);

            _viewModel.PropertyChanged += _viewModel_PropertyChanged;

            _viewModel.DisplayPreferences = displayPreferences;

            if (!string.IsNullOrEmpty(options.IndexValue))
            {
                var index = options.IndexOptions.First(i => string.Equals(i.Name, options.IndexValue));
                _viewModel.IndexOptionsCollectionView.MoveCurrentTo(index);
            }

            DataContext = _viewModel;
        }
 public TeamsApiController(
     ITeamManager teamManager,
     IImageManager imageManager,
     INotificationManager notificationManager)
 {
     _teamManager = teamManager;
     _imageManager = imageManager;
     _notificationManager = notificationManager;
 }
 public RotatingBackdropsViewModel(IApiClient apiClient, ITheaterConfigurationManager config, IImageManager imageManager, IPlaybackManager playbackManager, ILogger logger)
 {
     _apiClient = apiClient;
     _config = config;
     _imageManager = imageManager;
     _playbackManager = playbackManager;
     _logger = logger;
     _dispatcher = Dispatcher.CurrentDispatcher;
 }
 public ProfileApiController(
     ApplicationUserManager userManager,
     IPlayerManager playerManager,
     IImageManager imageManager)
 {
     _userManager = userManager;
     _playerManager = playerManager;
     _imageManager = imageManager;
 }