-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathSDRPluginSteps.htm
More file actions
89 lines (65 loc) · 2.72 KB
/
Copy pathSDRPluginSteps.htm
File metadata and controls
89 lines (65 loc) · 2.72 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<html><body>
<h1>Creating a blank plugin for SDR# in Visual Studio</h1>
<ol>
<li>Start Visual Studio 2017, select in the menu: File / New / Project. In the New Project dialog, click on Visual C# / Windows Desktop / Class Library. Enter parameters:
<ul>
<li>Name: SDRSharp.BlankPlugin
<li>Location: C:\Projects\
<li>Solution: Create New Solution
<li>Solution name: SDRSharpPlugins
<li>Framework: .NET Framework 4.6
</ul>
Click on OK.
<br><br><li>In the C:\Projects\SDRSharpPlugins folder, create a subfolder named Vendor.
Copy these files from the SDR# installation folder to the Vendor folder:
<ul>
<li>SDRSharp.Common.dll
<li>SDRSharp.PanView.dll
<li>SDRSharp.Radio.dll
</ul>
<br><br><li>In the Solution Explorer panel, right-click on References, click on Add Reference. In the Reference Manager dialog, click on Browse, navigate to the C:\Projects\SDRSharpPlugins\Vendor folder, select all three dll's and click on Add. Click on OK.
<br><br><li>In the Solution Explorer panel, right-click on Class1.cs, click on Rename, enter new name: BlankPlugin. Click on the Yes button to rename the references.
<br><br><li>Right-click on SDRSharp.BlankPlugin in the Solution Explorer panel, click on Add / New Item. In the Add New Item dialog, click on Visual C# Items / User Control. Enter parameter:
Name: BlankPluginPanel. Click on OK.
<br><br><li>Double-click on BlankPlugin.cs in the Solution Exlporer panel. Enter this code in the BlankPlugin.cs file:
<pre>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SDRSharp.Common;
namespace SDRSharp.BlankPlugin
{
public class BlankPlugin : ISharpPlugin
{
private const string _displayName = "Blank Plugin";
private ISharpControl _control;
private BlankPluginPanel _guiControl;
public UserControl Gui
{
get { return _guiControl; }
}
public string DisplayName
{
get { return _displayName; }
}
public void Close()
{
}
public void Initialize(ISharpControl control)
{
_control = control;
_guiControl = new BlankPluginPanel();
}
}
}
</pre>
<br><li>Click on Build / Rebuild Solution in the Visual Studio menu.
<br><br><li>Copy C:\Projects\SDRSharpPlugins\SDRSharp.BlankPlugin\bin\Debug\SDRSharp.BlankPlugin.dll to the SDR# installation directory.
<br><br><li>In the SDR# installation directory, add this line to the Plugins.xml file before </sharpPlugins>:
<pre>
<add key="Blank Plugin" value="SDRSharp.BlankPlugin.BlankPlugin,SDRSharp.BlankPlugin" />
</pre>
<li>Start SDR#, verify that the plugin appears in the sidebar.
</body></html>