Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 450d56b

Browse files
committed
files as shortcuts
1 parent eae8b42 commit 450d56b

File tree

6 files changed

+42
-2305
lines changed

6 files changed

+42
-2305
lines changed

Demo Plugin/NppManagedPluginDemo/Demo.cs

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,37 @@
55
using System.Threading;
66
using System.Windows.Forms;
77
using System.Drawing.Imaging;
8-
using System.Collections.Generic;
98
using System.Runtime.InteropServices;
109
using System.Text.RegularExpressions;
1110

12-
namespace NppPluginNET
11+
namespace Kbg.NppPluginNET
12+
{
13+
/// <summary>
14+
/// Integration layer as the demo app uses the pluginfiles as soft-links files.
15+
/// This is different to normal plugins that would use the project template and get the files directly.
16+
/// </summary>
17+
class Main
18+
{
19+
static internal void CommandMenuInit()
20+
{
21+
Kbg.Demo.Namespace.Main.CommandMenuInit();
22+
}
23+
24+
static internal void PluginCleanUp()
25+
{
26+
Kbg.Demo.Namespace.Main.PluginCleanUp();
27+
}
28+
29+
static internal void SetToolBarIcon()
30+
{
31+
Kbg.Demo.Namespace.Main.SetToolBarIcon();
32+
}
33+
34+
internal static string PluginName { get { return Kbg.Demo.Namespace.Main.PluginName; }}
35+
}
36+
}
37+
38+
namespace Kbg.Demo.Namespace
1339
{
1440
partial class PluginBase
1541
{
@@ -88,6 +114,7 @@ static internal void CommandMenuInit()
88114

89115
SetCommand(15, "Dockable Dialog Demo", DockableDlgDemo); idFrmGotToLine = 15;
90116
}
117+
91118
static internal void SetToolBarIcon()
92119
{
93120
toolbarIcons tbIcons = new toolbarIcons();
@@ -97,6 +124,7 @@ static internal void SetToolBarIcon()
97124
Win32.SendMessage(nppData._nppHandle, NppMsg.NPPM_ADDTOOLBARICON, _funcItems.Items[idFrmGotToLine]._cmdID, pTbIcons);
98125
Marshal.FreeHGlobal(pTbIcons);
99126
}
127+
100128
static internal void PluginCleanUp()
101129
{
102130
Win32.WritePrivateProfileString(sectionName, keyName, doCloseTag ? "1" : "0", iniFilePath);

Demo Plugin/NppManagedPluginDemo/DllExport/DllExportAttribute.cs

Lines changed: 0 additions & 34 deletions
This file was deleted.

Demo Plugin/NppManagedPluginDemo/NppManagedPluginDemo.VS2015.csproj

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,29 @@
4545
<Prefer32Bit>false</Prefer32Bit>
4646
</PropertyGroup>
4747
<ItemGroup>
48-
<Compile Include="DllExport\DllExportAttribute.cs" />
48+
<Compile Include="..\..\Visual Studio Project Template C#\DllExport\DllExportAttribute.cs">
49+
<Link>DllExport\DllExportAttribute.cs</Link>
50+
</Compile>
51+
<Compile Include="..\..\Visual Studio Project Template C#\NppPluginNETBase.cs">
52+
<Link>NppPluginNETBase.cs</Link>
53+
</Compile>
54+
<Compile Include="..\..\Visual Studio Project Template C#\NppPluginNETHelper.cs">
55+
<Link>NppPluginNETHelper.cs</Link>
56+
</Compile>
57+
<Compile Include="..\..\Visual Studio Project Template C#\UnmanagedExports.cs">
58+
<Link>UnmanagedExports.cs</Link>
59+
</Compile>
4960
<Compile Include="Forms\frmGoToLine.cs">
5061
<SubType>Form</SubType>
5162
</Compile>
5263
<Compile Include="Forms\frmGoToLine.designer.cs">
5364
<DependentUpon>frmGoToLine.cs</DependentUpon>
5465
</Compile>
5566
<Compile Include="Demo.cs" />
56-
<Compile Include="NppPluginNETBase.cs" />
57-
<Compile Include="NppPluginNETHelper.cs" />
5867
<Compile Include="Properties\AssemblyInfo.cs" />
5968
<Compile Include="Properties\Resources.Designer.cs">
6069
<DependentUpon>Resources.resx</DependentUpon>
6170
</Compile>
62-
<Compile Include="UnmanagedExports.cs" />
6371
</ItemGroup>
6472
<ItemGroup>
6573
<Reference Include="System" />

Demo Plugin/NppManagedPluginDemo/NppPluginNETBase.cs

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)