Skip to content

Commit e7a892d

Browse files
committed
添加项目文件。
1 parent afe4d31 commit e7a892d

File tree

5 files changed

+88
-0
lines changed

5 files changed

+88
-0
lines changed

ExamplePlugins.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.10.34607.79
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorldPlugin", "HelloWorldPlugin\HelloWorldPlugin.csproj", "{8CC8827D-2BAB-4436-8084-7A8A6208A574}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{8CC8827D-2BAB-4436-8084-7A8A6208A574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{8CC8827D-2BAB-4436-8084-7A8A6208A574}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{8CC8827D-2BAB-4436-8084-7A8A6208A574}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{8CC8827D-2BAB-4436-8084-7A8A6208A574}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {83776D0E-FC3A-485E-8A00-E719B1639D72}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0-windows</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<UseWPF>true</UseWPF>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<EnableDynamicLoading>True</EnableDynamicLoading>
9+
<PlatformTarget>x64</PlatformTarget>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="ClassIsland.PluginSdk" Version="1.0.0">
14+
<ExcludeAssets>runtime</ExcludeAssets>
15+
</PackageReference>
16+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
17+
</ItemGroup>
18+
19+
<ItemGroup>
20+
<None Update="manifest.yml">
21+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
22+
</None>
23+
</ItemGroup>
24+
25+
</Project>

HelloWorldPlugin/Plugin.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using ClassIsland.Core.Abstractions;
2+
using ClassIsland.Core.Attributes;
3+
using ClassIsland.Core.Controls.CommonDialog;
4+
using Microsoft.Extensions.DependencyInjection;
5+
using Microsoft.Extensions.Hosting;
6+
7+
namespace HelloWorldPlugin;
8+
9+
[PluginEntrance]
10+
public class Plugin : PluginBase
11+
{
12+
public override void Initialize(HostBuilderContext context, IServiceCollection services)
13+
{
14+
CommonDialog.ShowInfo("Hello world!");
15+
}
16+
17+
public override void OnShutdown()
18+
{
19+
}
20+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"profiles": {
3+
"HelloWorldPlugin": {
4+
"commandName": "Project"
5+
},
6+
"配置文件 1": {
7+
"commandName": "Executable",
8+
"executablePath": "E:\\Coding\\ClassIsland\\ClassIsland\\bin\\Debug\\net8.0-windows\\ClassIsland.exe",
9+
"commandLineArgs": "-epp E:\\Coding\\ExamplePlugins\\HelloWorldPlugin\\bin\\Debug\\net8.0-windows",
10+
"workingDirectory": "E:\\Coding\\ClassIsland\\ClassIsland\\bin\\Debug\\net8.0-windows\\"
11+
}
12+
}
13+
}

HelloWorldPlugin/manifest.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
id: examples.helloworld
2+
name: Hello world!
3+
description: 在启动时弹出一个 “Hello world” 提示框。
4+
entranceAssembly: "HelloWorldPlugin.dll"
5+
url: https://github.com/ClassIsland/ExamplePlugins

0 commit comments

Comments
 (0)