/// <summary> /// Initializes ManagedShell with a custom configuration. /// </summary> /// <param name="config">A ShellConfig struct containing desired initialization parameters.</param> public ShellManager(ShellConfig config) { if (config.EnableTrayService) { TrayService = new TrayService(); ExplorerTrayService = new ExplorerTrayService(); NotificationArea = new NotificationArea(config.PinnedNotifyIcons, TrayService, ExplorerTrayService); } if (config.EnableTasksService) { TasksService = new TasksService(config.TaskIconSize); Tasks = new Tasks(TasksService); } FullScreenHelper = new FullScreenHelper(); ExplorerHelper = new ExplorerHelper(NotificationArea); AppBarManager = new AppBarManager(ExplorerHelper); if (config.EnableTrayService && config.AutoStartTrayService) { NotificationArea.Initialize(); } if (config.EnableTasksService && config.AutoStartTasksService) { Tasks.Initialize(); } }
public DesktopOverlay(IDesktopManager manager, AppBarManager appBarManager) { InitializeComponent(); _desktopManager = manager; _appBarManager = appBarManager; ResetPosition(); }
public void Dispose() { IconHelper.DisposeIml(); AppBarManager.Dispose(); FullScreenHelper.Dispose(); NotificationArea?.Dispose(); Tasks?.Dispose(); }
public Desktop(DesktopManager desktopManager, AppBarManager appBarManager, FullScreenHelper fullScreenHelper) { InitializeComponent(); _appBarManager = appBarManager; _desktopManager = desktopManager; _fullScreenHelper = fullScreenHelper; if (_desktopManager.ShellWindow != null) { AllowsTransparency = false; } setSize(); setGridPosition(); setBackground(); Settings.Instance.PropertyChanged += Settings_PropertyChanged; _fullScreenHelper.FullScreenApps.CollectionChanged += FullScreenApps_CollectionChanged; }