/// <summary>Constructs the <see cref="SettingsService"/>.</summary> public SettingsService(UIService ui, TreemapRendererFactory treemapFactory) { this.ui = ui; treemap = treemapFactory.Create(); Reset(); }
/// <summary>Constructs the <see cref="ImagesServiceBase"/>.</summary> public ImagesServiceBase(BitmapFactory bitmapFactory, UIService ui) { BitmapFactory = bitmapFactory; UI = ui; UI.Invoke(() => { // Load file type icons with a different method FileCollection = LoadFileIcon(nameof(FileCollection)); FreeSpace = LoadFileIcon(nameof(FreeSpace)); UnknownSpace = LoadFileIcon(nameof(UnknownSpace)); Missing = LoadFileIcon(nameof(Missing)); // Load all unassigned icons with reflection foreach (PropertyInfo propInfo in typeof(ImagesServiceBase).GetProperties()) { if (propInfo.PropertyType == typeof(ImageSource) && propInfo.CanWrite) { ImageSource value = (ImageSource)propInfo.GetValue(this); if (value != null) { continue; } value = LoadIcon(propInfo.Name); propInfo.SetValue(this, value); } } }); }
/// <summary>Constructs the <see cref="IconCacheService"/>.</summary> public IconCacheService(UIService ui, BitmapFactory bitmapFactory) { this.ui = ui; this.bitmapFactory = bitmapFactory; cachedIcons = new Dictionary <int, ImageSource>(); cachedSpecialFolders = new Dictionary <Environment.SpecialFolder, IconAndName>(); cachedFileTypes = new Dictionary <string, IconAndName>(); cachedIconList = new ObservableCollection <ImageSource>(); }
/// <summary>Constructs the <see cref="ScanningService"/>.</summary> public ScanningService(SettingsService settings, OSService os, UIService ui) { this.settings = settings; this.os = os; this.ui = ui; settings.PropertyChanged += OnSettingsPropertyChanged; Extensions = new ExtensionItems(this, settings); Drives = new DriveItems(this); validateTimer = new Timer(OnValidateTick, null, Timeout.Infinite, Timeout.Infinite); validateWatch = new Stopwatch(); scanWatch = new Stopwatch(); validationRequested = false; }
/// <summary>Constructs the <see cref="UIService"/>.</summary> public OSService(UIService ui) { this.ui = ui; }
/// <summary>Constructs the <see cref="BitmapFactory"/>.</summary> public BitmapFactory(UIService ui) { this.ui = ui; }