Skip to content

Commit

Permalink
添加项目文件。
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloWRC committed Jul 24, 2024
1 parent afe4d31 commit e7a892d
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ExamplePlugins.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.10.34607.79
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorldPlugin", "HelloWorldPlugin\HelloWorldPlugin.csproj", "{8CC8827D-2BAB-4436-8084-7A8A6208A574}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8CC8827D-2BAB-4436-8084-7A8A6208A574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8CC8827D-2BAB-4436-8084-7A8A6208A574}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8CC8827D-2BAB-4436-8084-7A8A6208A574}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8CC8827D-2BAB-4436-8084-7A8A6208A574}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {83776D0E-FC3A-485E-8A00-E719B1639D72}
EndGlobalSection
EndGlobal
25 changes: 25 additions & 0 deletions HelloWorldPlugin/HelloWorldPlugin.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<ImplicitUsings>enable</ImplicitUsings>
<EnableDynamicLoading>True</EnableDynamicLoading>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClassIsland.PluginSdk" Version="1.0.0">
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
<None Update="manifest.yml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
20 changes: 20 additions & 0 deletions HelloWorldPlugin/Plugin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using ClassIsland.Core.Abstractions;
using ClassIsland.Core.Attributes;
using ClassIsland.Core.Controls.CommonDialog;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace HelloWorldPlugin;

[PluginEntrance]
public class Plugin : PluginBase
{
public override void Initialize(HostBuilderContext context, IServiceCollection services)
{
CommonDialog.ShowInfo("Hello world!");
}

public override void OnShutdown()
{
}
}
13 changes: 13 additions & 0 deletions HelloWorldPlugin/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"profiles": {
"HelloWorldPlugin": {
"commandName": "Project"
},
"配置文件 1": {
"commandName": "Executable",
"executablePath": "E:\\Coding\\ClassIsland\\ClassIsland\\bin\\Debug\\net8.0-windows\\ClassIsland.exe",
"commandLineArgs": "-epp E:\\Coding\\ExamplePlugins\\HelloWorldPlugin\\bin\\Debug\\net8.0-windows",
"workingDirectory": "E:\\Coding\\ClassIsland\\ClassIsland\\bin\\Debug\\net8.0-windows\\"
}
}
}
5 changes: 5 additions & 0 deletions HelloWorldPlugin/manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id: examples.helloworld
name: Hello world!
description: 在启动时弹出一个 “Hello world” 提示框。
entranceAssembly: "HelloWorldPlugin.dll"
url: https://github.com/ClassIsland/ExamplePlugins

0 comments on commit e7a892d

Please sign in to comment.