Add brightness/contrast sliders, input source switching, and 9-language localization
- Add VCP commands for brightness (10), contrast (12), input source (60)
- Fix UTF-16 encoding for monitor data parsing
- Add system tray app with monitor controls
- Add localization for en, es, fr, de, zh, ja, pt, it, hi
- Update to .NET 9.0
- Add LICENSE and README
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 22:11:35 -05:00
|
|
|
using Hardcodet.Wpf.TaskbarNotification;
|
2023-07-02 22:17:57 +08:00
|
|
|
using System.Windows;
|
|
|
|
|
|
|
|
|
|
namespace DellMonitorControl
|
|
|
|
|
{
|
|
|
|
|
public partial class App : Application
|
|
|
|
|
{
|
Add brightness/contrast sliders, input source switching, and 9-language localization
- Add VCP commands for brightness (10), contrast (12), input source (60)
- Fix UTF-16 encoding for monitor data parsing
- Add system tray app with monitor controls
- Add localization for en, es, fr, de, zh, ja, pt, it, hi
- Update to .NET 9.0
- Add LICENSE and README
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 22:11:35 -05:00
|
|
|
private TaskbarIcon? _trayIcon;
|
|
|
|
|
private MainWindow? _mainWindow;
|
|
|
|
|
|
|
|
|
|
private void Application_Startup(object sender, StartupEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
_trayIcon = (TaskbarIcon)FindResource("TrayIcon");
|
|
|
|
|
_trayIcon.TrayLeftMouseUp += TrayIcon_Click;
|
|
|
|
|
|
|
|
|
|
_mainWindow = new MainWindow();
|
|
|
|
|
_mainWindow.Show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void TrayIcon_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (_mainWindow == null) return;
|
|
|
|
|
|
|
|
|
|
if (_mainWindow.IsVisible)
|
|
|
|
|
_mainWindow.Hide();
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_mainWindow.Show();
|
|
|
|
|
_mainWindow.Activate();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnExit(ExitEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
_trayIcon?.Dispose();
|
|
|
|
|
base.OnExit(e);
|
|
|
|
|
}
|
2023-07-02 22:17:57 +08:00
|
|
|
}
|
|
|
|
|
}
|