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 9
9
10
10
using Avalonia . Controls ;
11
11
using Epoxy ;
12
- using FlashCap . Devices ;
13
12
using SkiaSharp ;
14
13
using System ;
15
14
using System . Collections . ObjectModel ;
@@ -188,8 +187,10 @@ private ValueTask OnDeviceChangedAsync(CaptureDeviceDescriptor? descriptor)
188
187
189
188
this . Characteristics = this . CharacteristicsList . FirstOrDefault ( ) ;
190
189
#endif
191
-
192
- this . UpdateCurrentState ( States . Ready ) ;
190
+ if ( this . Characteristics != null )
191
+ {
192
+ this . UpdateCurrentState ( States . Ready ) ;
193
+ }
193
194
}
194
195
else
195
196
{
Original file line number Diff line number Diff line change 37
37
SelectedItem =" {Binding Characteristics, Mode=TwoWay}" />
38
38
</StackPanel >
39
39
<StackPanel Orientation =" Horizontal" >
40
- <Button IsEnabled =" {Binding IsEnabledStartCapture}"
40
+ <Button BorderBrush =" White" BorderThickness =" 1"
41
+ IsEnabled =" {Binding IsEnabledStartCapture}"
41
42
Content =" Start capture"
42
43
Command =" {Binding StartCapture}" />
43
- <Button IsEnabled =" {Binding IsEnabledStopCapture}"
44
+ <Button BorderBrush =" White" BorderThickness =" 1"
45
+ IsEnabled =" {Binding IsEnabledStopCapture}"
44
46
Content =" Stop capture"
45
47
Command =" {Binding StopCapture}" />
46
- <Button IsEnabled =" {Binding IsEnabledShowPropertyPage}"
48
+ <Button BorderBrush =" White" BorderThickness =" 1"
49
+ IsEnabled =" {Binding IsEnabledShowPropertyPage}"
47
50
Content =" Show property page"
48
51
Command =" {Binding ShowPropertyPage}" />
49
52
</StackPanel >
Original file line number Diff line number Diff line change 8
8
////////////////////////////////////////////////////////////////////////////
9
9
10
10
using Epoxy ;
11
- using FlashCap . Devices ;
12
11
using SkiaSharp ;
13
12
using System ;
14
13
using System . Collections . ObjectModel ;
@@ -180,8 +179,10 @@ private ValueTask OnDeviceChangedAsync(CaptureDeviceDescriptor? descriptor)
180
179
181
180
this . Characteristics = this . CharacteristicsList . FirstOrDefault ( ) ;
182
181
#endif
183
-
184
- this . UpdateCurrentState ( States . Ready ) ;
182
+ if ( this . Characteristics != null )
183
+ {
184
+ this . UpdateCurrentState ( States . Ready ) ;
185
+ }
185
186
}
186
187
else
187
188
{
You can’t perform that action at this time.
0 commit comments