HamBook – Diff between revs 61 and 62

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 61 Rev 62
Line 10... Line 10...
10 using HamBook.Radios; 10 using HamBook.Radios;
11 using HamBook.Radios.Generic; 11 using HamBook.Radios.Generic;
12 using RJCP.IO.Ports; 12 using RJCP.IO.Ports;
13 using Serilog; 13 using Serilog;
14 using Toasts; 14 using Toasts;
15 using static System.Windows.Forms.AxHost; -  
16 using Toasts = Toasts.Toasts; -  
Line 17... Line 15...
17   15  
18 namespace HamBook 16 namespace HamBook
19 { 17 {
20 public class BandScan 18 public class BandScan
Line 26... Line 24...
26 private readonly SerialPortStream _serialPort; 24 private readonly SerialPortStream _serialPort;
27 private int _currentFrequency; 25 private int _currentFrequency;
28 private CancellationToken _scanningCancellationToken; 26 private CancellationToken _scanningCancellationToken;
29 private CancellationTokenSource _scanningCancellationTokenSource; 27 private CancellationTokenSource _scanningCancellationTokenSource;
30 private Thread _scanThread; 28 private Thread _scanThread;
31 private global::Toasts.Toasts _toasts; 29 private ToastDisplay _toastDisplay;
Line 32... Line 30...
32   30  
33 private BandScan() 31 private BandScan()
Line 34... Line 32...
34 { 32 {
Line 56... Line 54...
56 } 54 }
Line 57... Line 55...
57   55  
58 _scanningCancellationTokenSource = new CancellationTokenSource(); 56 _scanningCancellationTokenSource = new CancellationTokenSource();
Line 59... Line 57...
59 _scanningCancellationToken = _scanningCancellationTokenSource.Token; 57 _scanningCancellationToken = _scanningCancellationTokenSource.Token;
Line 60... Line 58...
60   58  
61 _toasts = new global::Toasts.Toasts(_scanningCancellationToken); 59 _toastDisplay = new ToastDisplay(_scanningCancellationToken);
62   60  
Line 72... Line 70...
72   70  
73 _scanThread.Join(); 71 _scanThread.Join();
74 _scanThread = null; 72 _scanThread = null;
Line 75... Line 73...
75 } 73 }
76   74  
77 if (_toasts != null) 75 if (_toastDisplay != null)
78 { 76 {
79 _toasts.Dispose(); 77 _toastDisplay.Dispose();
80 _toasts = null; 78 _toastDisplay = null;
Line 81... Line 79...
81 } 79 }
82 } 80 }