using System; using System.Threading.Tasks; using ThreadPilot.Models; namespace ThreadPilot.Services { /// /// Service for managing system tray functionality /// public interface ISystemTrayService : IDisposable { /// /// Event fired when quick apply is requested from tray /// event EventHandler? QuickApplyRequested; /// /// Event fired when show main window is requested from tray /// event EventHandler? ShowMainWindowRequested; /// /// Event fired when exit is requested from tray /// event EventHandler? ExitRequested; /// /// Event fired when monitoring enable/disable is requested from tray /// event EventHandler? MonitoringToggleRequested; /// /// Event fired when settings are requested from tray /// event EventHandler? SettingsRequested; /// /// Event fired when power plan change is requested from tray /// event EventHandler? PowerPlanChangeRequested; /// /// Event fired when profile application is requested from tray /// event EventHandler? ProfileApplicationRequested; /// /// Event fired when performance dashboard is requested from tray /// event EventHandler? PerformanceDashboardRequested; /// /// Initializes the system tray icon /// void Initialize(); /// /// Shows the system tray icon /// void Show(); /// /// Hides the system tray icon /// void Hide(); /// /// Updates the tray icon tooltip /// void UpdateTooltip(string tooltip); /// /// Shows a balloon tip notification /// void ShowBalloonTip(string title, string text, int timeoutMs = 3000); /// /// Updates the context menu with current process information /// void UpdateContextMenu(string? selectedProcessName = null, bool hasSelection = false); /// /// Updates the monitoring status in the context menu /// void UpdateMonitoringStatus(bool isMonitoring, bool isWmiAvailable = true); /// /// Updates the tray icon based on application state /// void UpdateTrayIcon(TrayIconState state); /// /// Shows a notification through the tray icon /// void ShowTrayNotification(string title, string message, NotificationType type = NotificationType.Information, int timeoutMs = 3000); /// /// Updates settings for the tray service /// void UpdateSettings(ApplicationSettingsModel settings); /// /// Updates the Game Boost status in the tray /// void UpdateGameBoostStatus(bool isGameBoostActive, string? currentGameName = null); /// /// Updates the available power plans in the context menu /// void UpdatePowerPlans(IEnumerable powerPlans, PowerPlanModel? activePlan); /// /// Updates the available profiles in the context menu /// void UpdateProfiles(IEnumerable profileNames); /// /// Updates the current system status in the tray /// void UpdateSystemStatus(string currentPowerPlan, double cpuUsage, double memoryUsage); } /// /// Event args for monitoring toggle events /// public class MonitoringToggleEventArgs : EventArgs { public bool EnableMonitoring { get; } public MonitoringToggleEventArgs(bool enableMonitoring) { EnableMonitoring = enableMonitoring; } } /// /// Event args for power plan change requests /// public class PowerPlanChangeRequestedEventArgs : EventArgs { public string PowerPlanGuid { get; } public string PowerPlanName { get; } public PowerPlanChangeRequestedEventArgs(string powerPlanGuid, string powerPlanName) { PowerPlanGuid = powerPlanGuid; PowerPlanName = powerPlanName; } } /// /// Event args for profile application requests /// public class ProfileApplicationRequestedEventArgs : EventArgs { public string ProfileName { get; } public ProfileApplicationRequestedEventArgs(string profileName) { ProfileName = profileName; } } /// /// Tray icon states /// public enum TrayIconState { Normal, Monitoring, Error, Disabled, GameBoost } }