-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSatControlPlugin.cs
60 lines (49 loc) · 1.45 KB
/
SatControlPlugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using SDRSharp.Common;
//using SDRSharp.Plugin.RigControl;
//using SDRSharp.Radio;
using System;
using System.Windows.Forms;
namespace SDRSharp.Plugin.SatControl
{
public class SatControlPlugin : ISharpPlugin, ICanLazyLoadGui
{
private const string _displayName = "Satellite Control";
private ISharpControl _control;
private SatControlPanel _configGui;
private RigControlProcess _radio;
private SatControlProcess _satellite;
private RotControlProcess _rotor;
public string DisplayName
{
get { return _displayName; }
}
public UserControl Gui
{
get
{
LoadGui();
return _configGui;
}
}
public void Initialize(ISharpControl control)
{
_control = control;
_radio = new RigControlProcess(_control); // load Rig Control Plugin
_satellite = new SatControlProcess(); // load Satelite Control Plugin
_rotor = new RotControlProcess(); // load Rotor Control Plugin
}
public void Close()
{
_control = null;
_radio = null;
_satellite = null;
}
public void LoadGui()
{
if (_configGui == null)
{
_configGui = new SatControlPanel(_radio, _satellite, _control, _rotor);
}
}
}
}