Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
添加项目文件。
Browse files Browse the repository at this point in the history
  • Loading branch information
lzghzr committed Oct 11, 2017
1 parent 65235e5 commit dce3b1d
Show file tree
Hide file tree
Showing 9 changed files with 563 additions and 0 deletions.
282 changes: 282 additions & 0 deletions BilibiliDM_PluginFramework/BilibiliDM_PluginFramework.XML

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
50 changes: 50 additions & 0 deletions GoldSilver/GoldSilver.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System;
using BilibiliDM_PluginFramework;

namespace GoldSilver
{
public class GoldSilver : DMPlugin
{
public GoldSilver()
{
ReceivedDanmaku += B_ReceivedDanmaku;
PluginAuth = "lzblzr";
PluginName = "金银礼物";
PluginDesc = "在礼物后添加金银标识";
PluginCont = "[email protected]";
PluginVer = "v1.0.0";
Start();
}
private void B_ReceivedDanmaku(object sender, ReceivedDanmakuArgs e)
{
if (e.Danmaku.MsgType == MsgTypeEnum.GiftSend)
{
string rawData = e.Danmaku.RawData;
bool isGold = rawData.Contains("\"silver\":\"");
bool isSilver = rawData.Contains("\"gold\":\"");
e.Danmaku.GiftName += string.Format("({0})", isGold ? "金" : isSilver ? "银" : "包");
}
}
public override void Admin()
{
base.Admin();
Console.WriteLine("不要点啦, 没用的");
Log("不要点啦, 没用的");
AddDM("不要点啦, 没用的", true);
}
public override void Start()
{
base.Start();
Console.WriteLine("插件已启用");
Log("插件已启用");
AddDM("插件已启用", true);
}
public override void Stop()
{
base.Stop();
Console.WriteLine("插件已禁用");
Log("插件已禁用");
AddDM("插件已禁用", true);
}
}
}
44 changes: 44 additions & 0 deletions GoldSilver/GoldSilver.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1B1AAED6-3040-4E49-AAF5-AE144F7A277B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GoldSilver</RootNamespace>
<AssemblyName>GoldSilver</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="BilibiliDM_PluginFramework">
<HintPath>..\BilibiliDM_PluginFramework\BilibiliDM_PluginFramework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="GoldSilver.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Loading

0 comments on commit dce3b1d

Please sign in to comment.