-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added grand master, fixed save/load bug
- Loading branch information
1 parent
a143181
commit 73a79ed
Showing
10 changed files
with
244 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using org.dmxc.lumos.Kernel.Resource; | ||
using org.dmxc.lumos.Kernel.Run; | ||
using org.dmxc.lumos.Kernel.Master; | ||
using LumosLIB.Tools; | ||
using System.Collections.ObjectModel; | ||
using org.dmxc.lumos.Kernel.Messaging; | ||
using org.dmxc.lumos.Kernel.Messaging.Producer; | ||
using org.dmxc.lumos.Kernel.Messaging.Message; | ||
|
||
namespace MidiKernelHelper | ||
{ | ||
public sealed class MasterManagerPatch : AbstractManagerAndService, IMasterManager, IIntensityMaster, ILumosProjectManager, ILumosManager, IManager, IMessageProducer | ||
{ | ||
private static readonly MasterManagerPatch instance = new MasterManagerPatch(); | ||
private double _intensity = 1.0; | ||
public string Name | ||
{ | ||
get | ||
{ | ||
return "Grand Master Patch"; | ||
} | ||
set | ||
{ | ||
} | ||
} | ||
public event LumosMessageEvent IntensityChanged; | ||
public double MasterIntensity | ||
{ | ||
get | ||
{ | ||
return this._intensity; | ||
} | ||
set | ||
{ | ||
this._intensity = value.Limit(0.0, 1.0); | ||
var message = new GenericMessage("MasterIntensityChanged",this._intensity); | ||
if (IntensityChanged != null) IntensityChanged(message); | ||
} | ||
} | ||
ELoadTime ILumosProjectManager.LoadTime | ||
{ | ||
get | ||
{ | ||
return ELoadTime.AFTER_CONTAINERS; | ||
} | ||
} | ||
bool ILumosProjectManager.Dirty | ||
{ | ||
get | ||
{ | ||
return false; | ||
} | ||
} | ||
ReadOnlyCollection<Type> IManager.ManagerDependencies | ||
{ | ||
get | ||
{ | ||
List<Type> t = new List<Type>(); | ||
return t.AsReadOnly(); | ||
} | ||
} | ||
public MasterManagerPatch() | ||
{ | ||
} | ||
|
||
void ILumosProjectManager.closeProject(LumosIOContext context) | ||
{ | ||
} | ||
void ILumosProjectManager.loadProject(LumosIOContext context) | ||
{ | ||
} | ||
void ILumosProjectManager.saveProject(LumosIOContext context) | ||
{ | ||
} | ||
void IManager.initialize() | ||
{ | ||
this.initializeManager(); | ||
} | ||
void IManager.shutdown() | ||
{ | ||
this.shutdownManager(); | ||
} | ||
bool IManager.IsInitialized | ||
{ | ||
get | ||
{ | ||
return base.IsInitialized; | ||
} | ||
} | ||
|
||
string IMessageProducer.ProducerID | ||
{ | ||
get | ||
{ | ||
return "GrandMaster"; | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" 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>{FC2A4D0D-94E9-4634-8C0D-26B71EE7938B}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>MidiKernelHelper</RootNamespace> | ||
<AssemblyName>MidiKernelHelper</AssemblyName> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</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> | ||
<PropertyGroup> | ||
<RunPostBuildEvent>Always</RunPostBuildEvent> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Lumos"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\DMXControl3\Kernel\Lumos.exe</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="LumosLIB"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\DMXControl3\Kernel\LumosLIB.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="GrandMasterPatch.cs" /> | ||
<Compile Include="MidiKernelPlugin.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<PropertyGroup> | ||
<PostBuildEvent>copy /Y "$(TargetDir)$(TargetFileName)" "C:\Program Files (x86)\DMXControl3\Kernel\Plugins"</PostBuildEvent> | ||
</PropertyGroup> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("MidiKernelHelper")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("MidiKernelHelper")] | ||
[assembly: AssemblyCopyright("Copyright © 2015")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("fc2a4d0d-94e9-4634-8c0d-26b71ee7938b")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.