@@ -72,7 +72,7 @@ private void SetSaveImagePath()
7272 }
7373 }
7474
75- private async void ButtonLoad ( Image WPFElement , Label label , Channel channel , Channel sourceChannel , string path = null )
75+ private async Task ButtonLoad ( Image WPFElement , Label label , Channel channel , Channel sourceChannel , string path = null )
7676 {
7777 if ( path is null )
7878 path = GetImagePath ( ) ;
@@ -95,27 +95,27 @@ private async void ButtonLoad(Image WPFElement, Label label, Channel channel, Ch
9595 }
9696 }
9797
98- private void ButtonLoadR ( object sender , RoutedEventArgs e )
98+ private async void ButtonLoadR ( object sender , RoutedEventArgs e )
9999 {
100- ButtonLoad ( RedCh , redNoDataLabel , Channel . Red , Channel . Red ) ;
100+ await ButtonLoad ( RedCh , redNoDataLabel , Channel . Red , Channel . Red ) ;
101101 ShowRedSourceGrid ( ) ;
102102 }
103103
104- private void ButtonLoadG ( object sender , RoutedEventArgs e )
104+ private async void ButtonLoadG ( object sender , RoutedEventArgs e )
105105 {
106- ButtonLoad ( GreenCh , greenNoDataLabel , Channel . Green , Channel . Green ) ;
106+ await ButtonLoad ( GreenCh , greenNoDataLabel , Channel . Green , Channel . Green ) ;
107107 ShowGreenSourceGrid ( ) ;
108108 }
109109
110- private void ButtonLoadB ( object sender , RoutedEventArgs e )
110+ private async void ButtonLoadB ( object sender , RoutedEventArgs e )
111111 {
112- ButtonLoad ( BlueCh , blueNoDataLabel , Channel . Blue , Channel . Blue ) ;
112+ await ButtonLoad ( BlueCh , blueNoDataLabel , Channel . Blue , Channel . Blue ) ;
113113 ShowBlueSourceGrid ( ) ;
114114 }
115115
116- private void ButtonLoadA ( object sender , RoutedEventArgs e )
116+ private async void ButtonLoadA ( object sender , RoutedEventArgs e )
117117 {
118- ButtonLoad ( AlphaCh , alphaNoDataLabel , Channel . Alpha , Channel . Red ) ;
118+ await ButtonLoad ( AlphaCh , alphaNoDataLabel , Channel . Alpha , Channel . Red ) ;
119119 ShowAlphaSourceGrid ( ) ;
120120 }
121121
@@ -287,49 +287,49 @@ private void SaveImageNameChanged(object sender, TextChangedEventArgs e)
287287 hasEditedPath = true ;
288288 }
289289
290- private void RedDrop ( object sender , DragEventArgs e )
290+ private async void RedDrop ( object sender , DragEventArgs e )
291291 {
292292 if ( e . Data . GetDataPresent ( DataFormats . FileDrop ) )
293293 {
294294 string [ ] files = ( string [ ] ) e . Data . GetData ( DataFormats . FileDrop ) ;
295- ButtonLoad ( RedCh , redNoDataLabel , Channel . Red , Channel . Red , files [ 0 ] ) ;
295+ await ButtonLoad ( RedCh , redNoDataLabel , Channel . Red , Channel . Red , files [ 0 ] ) ;
296296 ShowRedSourceGrid ( ) ;
297297 }
298298 }
299299
300- private void GreenDrop ( object sender , DragEventArgs e )
300+ private async void GreenDrop ( object sender , DragEventArgs e )
301301 {
302302 if ( e . Data . GetDataPresent ( DataFormats . FileDrop ) )
303303 {
304304 string [ ] files = ( string [ ] ) e . Data . GetData ( DataFormats . FileDrop ) ;
305- ButtonLoad ( GreenCh , greenNoDataLabel , Channel . Green , Channel . Green , files [ 0 ] ) ;
305+ await ButtonLoad ( GreenCh , greenNoDataLabel , Channel . Green , Channel . Green , files [ 0 ] ) ;
306306 ShowGreenSourceGrid ( ) ;
307307 }
308308 }
309309
310- private void BlueDrop ( object sender , DragEventArgs e )
310+ private async void BlueDrop ( object sender , DragEventArgs e )
311311 {
312312 if ( e . Data . GetDataPresent ( DataFormats . FileDrop ) )
313313 {
314314 string [ ] files = ( string [ ] ) e . Data . GetData ( DataFormats . FileDrop ) ;
315- ButtonLoad ( BlueCh , blueNoDataLabel , Channel . Blue , Channel . Blue , files [ 0 ] ) ;
315+ await ButtonLoad ( BlueCh , blueNoDataLabel , Channel . Blue , Channel . Blue , files [ 0 ] ) ;
316316 ShowBlueSourceGrid ( ) ;
317317 }
318318 }
319319
320- private void AlphaDrop ( object sender , DragEventArgs e )
320+ private async void AlphaDrop ( object sender , DragEventArgs e )
321321 {
322322 if ( e . Data . GetDataPresent ( DataFormats . FileDrop ) )
323323 {
324324 string [ ] files = ( string [ ] ) e . Data . GetData ( DataFormats . FileDrop ) ;
325- ButtonLoad ( AlphaCh , alphaNoDataLabel , Channel . Alpha , Channel . Red , files [ 0 ] ) ;
325+ await ButtonLoad ( AlphaCh , alphaNoDataLabel , Channel . Alpha , Channel . Red , files [ 0 ] ) ;
326326 ShowAlphaSourceGrid ( ) ;
327327 }
328328 }
329329
330330 private void ShowRedSourceGrid ( )
331331 {
332- if ( false /* IsGrayScale()*/ )
332+ if ( merge . IsGrayScale ( Channel . Red ) )
333333 {
334334 srcGridGsR . Visibility = Visibility . Visible ;
335335 srcGridCR . Visibility = Visibility . Hidden ;
@@ -343,7 +343,7 @@ private void ShowRedSourceGrid()
343343
344344 private void ShowGreenSourceGrid ( )
345345 {
346- if ( false /* IsGrayScale()*/ )
346+ if ( merge . IsGrayScale ( Channel . Green ) )
347347 {
348348 srcGridGsG . Visibility = Visibility . Visible ;
349349 srcGridCG . Visibility = Visibility . Hidden ;
@@ -357,7 +357,7 @@ private void ShowGreenSourceGrid()
357357
358358 private void ShowBlueSourceGrid ( )
359359 {
360- if ( false /* IsGrayScale()*/ )
360+ if ( merge . IsGrayScale ( Channel . Blue ) )
361361 {
362362 srcGridGsB . Visibility = Visibility . Visible ;
363363 srcGridCB . Visibility = Visibility . Hidden ;
@@ -371,7 +371,7 @@ private void ShowBlueSourceGrid()
371371
372372 private void ShowAlphaSourceGrid ( )
373373 {
374- if ( false /* IsGrayScale()*/ )
374+ if ( merge . IsGrayScale ( Channel . Alpha ) )
375375 {
376376 srcGridGsA . Visibility = Visibility . Visible ;
377377 srcGridCA . Visibility = Visibility . Hidden ;
0 commit comments