File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed
FlashCap.Avalonia/FlashCap.Avalonia.UI Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 99
1010using Avalonia . Controls ;
1111using Epoxy ;
12- using FlashCap . Devices ;
1312using SkiaSharp ;
1413using System ;
1514using System . Collections . ObjectModel ;
@@ -188,8 +187,10 @@ private ValueTask OnDeviceChangedAsync(CaptureDeviceDescriptor? descriptor)
188187
189188 this . Characteristics = this . CharacteristicsList . FirstOrDefault ( ) ;
190189#endif
191-
192- this . UpdateCurrentState ( States . Ready ) ;
190+ if ( this . Characteristics != null )
191+ {
192+ this . UpdateCurrentState ( States . Ready ) ;
193+ }
193194 }
194195 else
195196 {
Original file line number Diff line number Diff line change 3737 SelectedItem =" {Binding Characteristics, Mode=TwoWay}" />
3838 </StackPanel >
3939 <StackPanel Orientation =" Horizontal" >
40- <Button IsEnabled =" {Binding IsEnabledStartCapture}"
40+ <Button BorderBrush =" White" BorderThickness =" 1"
41+ IsEnabled =" {Binding IsEnabledStartCapture}"
4142 Content =" Start capture"
4243 Command =" {Binding StartCapture}" />
43- <Button IsEnabled =" {Binding IsEnabledStopCapture}"
44+ <Button BorderBrush =" White" BorderThickness =" 1"
45+ IsEnabled =" {Binding IsEnabledStopCapture}"
4446 Content =" Stop capture"
4547 Command =" {Binding StopCapture}" />
46- <Button IsEnabled =" {Binding IsEnabledShowPropertyPage}"
48+ <Button BorderBrush =" White" BorderThickness =" 1"
49+ IsEnabled =" {Binding IsEnabledShowPropertyPage}"
4750 Content =" Show property page"
4851 Command =" {Binding ShowPropertyPage}" />
4952 </StackPanel >
Original file line number Diff line number Diff line change 88////////////////////////////////////////////////////////////////////////////
99
1010using Epoxy ;
11- using FlashCap . Devices ;
1211using SkiaSharp ;
1312using System ;
1413using System . Collections . ObjectModel ;
@@ -180,8 +179,10 @@ private ValueTask OnDeviceChangedAsync(CaptureDeviceDescriptor? descriptor)
180179
181180 this . Characteristics = this . CharacteristicsList . FirstOrDefault ( ) ;
182181#endif
183-
184- this . UpdateCurrentState ( States . Ready ) ;
182+ if ( this . Characteristics != null )
183+ {
184+ this . UpdateCurrentState ( States . Ready ) ;
185+ }
185186 }
186187 else
187188 {
You can’t perform that action at this time.
0 commit comments