77using System . Threading ;
88using System . Threading . Tasks ;
99using System . Windows ;
10+ using System . Windows . Controls ;
1011using System . Windows . Forms ;
1112using System . Windows . Input ;
1213using Microsoft . Win32 ;
14+ using ContextMenu = System . Windows . Forms . ContextMenu ;
15+ using MenuItem = System . Windows . Forms . MenuItem ;
1316using MessageBox = System . Windows . Forms . MessageBox ;
1417
1518namespace DwmLutGUI
@@ -117,7 +120,6 @@ public MainWindow()
117120 App . KListener . KeyDown += MonitorLutToggle ;
118121 var keys = Enum . GetValues ( typeof ( Key ) ) . Cast < Key > ( ) . ToList ( ) ;
119122 ToggleKeyCombo . ItemsSource = keys ;
120- ToggleKeyCombo . SelectedItem = Key . NumPad1 ;
121123 }
122124
123125 protected override void OnStateChanged ( EventArgs e )
@@ -175,7 +177,7 @@ private void SdrLutBrowse_Click(object sender, RoutedEventArgs e)
175177
176178 private void SdrLutClear_Click ( object sender , RoutedEventArgs e )
177179 {
178- _viewModel . SdrLutPath = null ;
180+ _viewModel . SdrLutPath = "None" ;
179181 }
180182
181183 private void HdrLutBrowse_Click ( object sender , RoutedEventArgs e )
@@ -190,7 +192,7 @@ private void HdrLutBrowse_Click(object sender, RoutedEventArgs e)
190192
191193 private void HdrLutClear_Click ( object sender , RoutedEventArgs e )
192194 {
193- _viewModel . HdrLutPath = null ;
195+ _viewModel . HdrLutPath = "None" ;
194196 }
195197
196198 private void Disable_Click ( object sender , RoutedEventArgs e )
@@ -280,7 +282,7 @@ private void RemoveHdrLut_Click(object sender, RoutedEventArgs e)
280282 var monitor = _viewModel . SelectedMonitor ;
281283 if ( monitor == null ) return ;
282284 monitor . HdrLuts . Remove ( monitor . HdrLutPath ) ;
283- monitor . HdrLutPath = monitor . HdrLuts . FirstOrDefault ( ) ;
285+ monitor . HdrLutPath = monitor . HdrLuts . FirstOrDefault ( ) ?? "None" ;
284286 }
285287 }
286288}
0 commit comments