mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Moved skin designer from plugin to application. Implemented many things.
This commit is contained in:
parent
180e4bb9fd
commit
7ed85169e8
@ -1,38 +0,0 @@
|
|||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using RainmeterStudio.Core;
|
|
||||||
|
|
||||||
// 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("RainmeterStudio.SkinDesigner")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("RainmeterStudio.SkinDesigner")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
[assembly: RainmeterStudioPlugin]
|
|
||||||
|
|
||||||
// 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("d4aa7c80-76e6-484d-8766-7cd75f6d9e18")]
|
|
||||||
|
|
||||||
// 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")]
|
|
@ -1,118 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="12.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>{E8BD25E9-3055-4688-9E83-ECF684EF30C6}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>RainmeterStudio.SkinDesignerPlugin</RootNamespace>
|
|
||||||
<AssemblyName>RainmeterStudio.SkinDesignerPlugin</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>..\x32-Debug\StudioPlugins\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\StudioPlugins\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="PresentationCore" />
|
|
||||||
<Reference Include="PresentationFramework" />
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Xaml" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="WindowsBase" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="Resources\Graphics.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Graphics.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Resources\Icons.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Icons.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Resources\Strings.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Strings.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SkinDesigner.cs" />
|
|
||||||
<Compile Include="SkinDesignerControl.xaml.cs">
|
|
||||||
<DependentUpon>SkinDesignerControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SkinDesignerFactory.cs" />
|
|
||||||
<Compile Include="SkinDocument.cs" />
|
|
||||||
<Compile Include="SkinMetadata.cs" />
|
|
||||||
<Compile Include="SkinStorage.cs" />
|
|
||||||
<Compile Include="SkinDocumentTemplate.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Page Include="SkinDesignerControl.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\RainmeterStudio.Core\RainmeterStudio.Core.csproj">
|
|
||||||
<Project>{1d2a4896-af31-4e82-a84f-4e218067701f}</Project>
|
|
||||||
<Name>RainmeterStudio.Core</Name>
|
|
||||||
<Private>False</Private>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resources\Graphics\transparent_background.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="Resources\Graphics.resx">
|
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Graphics.Designer.cs</LastGenOutput>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="Resources\Icons.resx">
|
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Icons.Designer.cs</LastGenOutput>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="Resources\Strings.resx">
|
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Resources\Icons\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<!-- 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>
|
|
@ -1,73 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.34014
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace RainmeterStudio.SkinDesignerPlugin.Resources {
|
|
||||||
using System;
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
|
||||||
/// </summary>
|
|
||||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
|
||||||
// class via a tool like ResGen or Visual Studio.
|
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
|
||||||
// with the /str option, or rebuild your VS project.
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
public class Graphics {
|
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
|
||||||
internal Graphics() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
|
||||||
get {
|
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RainmeterStudio.SkinDesignerPlugin.Resources.Graphics", typeof(Graphics).Assembly);
|
|
||||||
resourceMan = temp;
|
|
||||||
}
|
|
||||||
return resourceMan;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
|
||||||
/// resource lookups using this strongly typed resource class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
|
||||||
get {
|
|
||||||
return resourceCulture;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
resourceCulture = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
public static System.Drawing.Bitmap TransparentBackground {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("TransparentBackground", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,124 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
|
||||||
<data name="TransparentBackground" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>graphics\transparent_background.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
@ -1,63 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.34014
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace RainmeterStudio.SkinDesignerPlugin.Resources {
|
|
||||||
using System;
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
|
||||||
/// </summary>
|
|
||||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
|
||||||
// class via a tool like ResGen or Visual Studio.
|
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
|
||||||
// with the /str option, or rebuild your VS project.
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
public class Icons {
|
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
|
||||||
internal Icons() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
|
||||||
get {
|
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RainmeterStudio.SkinDesignerPlugin.Resources.Icons", typeof(Icons).Assembly);
|
|
||||||
resourceMan = temp;
|
|
||||||
}
|
|
||||||
return resourceMan;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
|
||||||
/// resource lookups using this strongly typed resource class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
|
||||||
get {
|
|
||||||
return resourceCulture;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
resourceCulture = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,101 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 1.3
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">1.3</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1">this is my long string</data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
[base64 mime encoded serialized .NET Framework object]
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>1.3</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
@ -1,72 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.34014
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace RainmeterStudio.SkinDesignerPlugin.Resources {
|
|
||||||
using System;
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
|
||||||
/// </summary>
|
|
||||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
|
||||||
// class via a tool like ResGen or Visual Studio.
|
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
|
||||||
// with the /str option, or rebuild your VS project.
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
public class Strings {
|
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
|
||||||
internal Strings() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
|
||||||
get {
|
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RainmeterStudio.SkinDesignerPlugin.Resources.Strings", typeof(Strings).Assembly);
|
|
||||||
resourceMan = temp;
|
|
||||||
}
|
|
||||||
return resourceMan;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
|
||||||
/// resource lookups using this strongly typed resource class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
|
||||||
get {
|
|
||||||
return resourceCulture;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
resourceCulture = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Test value.
|
|
||||||
/// </summary>
|
|
||||||
public static string Test {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("Test", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,123 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<data name="Test" xml:space="preserve">
|
|
||||||
<value>Test value</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
@ -1,53 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
|
||||||
using RainmeterStudio.Core.Editor;
|
|
||||||
using RainmeterStudio.Core.Model;
|
|
||||||
using RainmeterStudio.Core.Editor.Features;
|
|
||||||
|
|
||||||
namespace RainmeterStudio.SkinDesignerPlugin
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Skin designer document editor
|
|
||||||
/// </summary>
|
|
||||||
public class SkinDesigner : IDocumentEditor //TODO: , ISelectionPropertiesProvider, IToolboxProvider, IUndoSupport
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the document attached to this editor instance
|
|
||||||
/// </summary>
|
|
||||||
public SkinDocument AttachedDocument { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the document attached to this editor instance
|
|
||||||
/// </summary>
|
|
||||||
IDocument IDocumentEditor.AttachedDocument
|
|
||||||
{
|
|
||||||
get { return AttachedDocument; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the UI control to display for this editor
|
|
||||||
/// </summary>
|
|
||||||
public SkinDesignerControl EditorUI { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the UI control to display for this editor
|
|
||||||
/// </summary>
|
|
||||||
UIElement IDocumentEditor.EditorUI
|
|
||||||
{
|
|
||||||
get { return EditorUI; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes this editor
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="document">The document</param>
|
|
||||||
public SkinDesigner(SkinDocument document)
|
|
||||||
{
|
|
||||||
AttachedDocument = document;
|
|
||||||
EditorUI = new SkinDesignerControl(document);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
<Page x:Class="RainmeterStudio.SkinDesignerPlugin.SkinDesignerControl"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:r="clr-namespace:RainmeterStudio.SkinDesignerPlugin.Resources"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignHeight="300" d:DesignWidth="500"
|
|
||||||
Title="SkinDesignerControl">
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="2*" />
|
|
||||||
<ColumnDefinition Width="5" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Border Grid.Column="0">
|
|
||||||
<Border.Background>
|
|
||||||
<ImageBrush ImageSource="/Resources/Graphics/transparent_background.png"
|
|
||||||
Stretch="None" TileMode="Tile" />
|
|
||||||
</Border.Background>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</Page>
|
|
@ -1,27 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace RainmeterStudio.SkinDesignerPlugin
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaction logic for SkinDesignerControl.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class SkinDesignerControl : Page
|
|
||||||
{
|
|
||||||
public SkinDesignerControl(SkinDocument document)
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using RainmeterStudio.Core;
|
|
||||||
using RainmeterStudio.Core.Editor;
|
|
||||||
using RainmeterStudio.Core.Model;
|
|
||||||
|
|
||||||
namespace RainmeterStudio.SkinDesignerPlugin
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Skin designer factory
|
|
||||||
/// </summary>
|
|
||||||
[PluginExport]
|
|
||||||
public class SkinDesignerFactory : IDocumentEditorFactory
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Creates a new editor object
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="document">Document to be edited by the editor</param>
|
|
||||||
/// <returns>A new document editor</returns>
|
|
||||||
public IDocumentEditor CreateEditor(IDocument document)
|
|
||||||
{
|
|
||||||
return new SkinDesigner((SkinDocument)document);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Tests if this editor can edit this document type
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="type">Document type</param>
|
|
||||||
/// <returns>True if the editor can edit the document type</returns>
|
|
||||||
public bool CanEdit(Type type)
|
|
||||||
{
|
|
||||||
return type.Equals(typeof(SkinDocument));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using RainmeterStudio.Core.Model;
|
|
||||||
|
|
||||||
namespace RainmeterStudio.SkinDesignerPlugin
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Skin document
|
|
||||||
/// </summary>
|
|
||||||
public class SkinDocument : IDocument
|
|
||||||
{
|
|
||||||
private Reference _reference;
|
|
||||||
|
|
||||||
public Reference Reference
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _reference;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_reference = value;
|
|
||||||
|
|
||||||
if (PropertyChanged != null)
|
|
||||||
PropertyChanged(this, new PropertyChangedEventArgs("Reference"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsDirty { get; set; }
|
|
||||||
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
|
||||||
|
|
||||||
public SkinMetadata Metadata { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes this skin document
|
|
||||||
/// </summary>
|
|
||||||
public SkinDocument()
|
|
||||||
{
|
|
||||||
IsDirty = false;
|
|
||||||
Metadata = new SkinMetadata();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using RainmeterStudio.Core;
|
|
||||||
using RainmeterStudio.Core.Editor;
|
|
||||||
using RainmeterStudio.Core.Model;
|
|
||||||
|
|
||||||
namespace RainmeterStudio.SkinDesignerPlugin
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Template of a skin which will be opened in the designer
|
|
||||||
/// </summary>
|
|
||||||
[PluginExport]
|
|
||||||
public class SkinDocumentTemplate : IDocumentTemplate
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the document template name
|
|
||||||
/// </summary>
|
|
||||||
public string Name
|
|
||||||
{
|
|
||||||
get { return "Skin"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the default extension of this template
|
|
||||||
/// </summary>
|
|
||||||
public string DefaultExtension
|
|
||||||
{
|
|
||||||
get { return "rsskin"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the properties of this template
|
|
||||||
/// </summary>
|
|
||||||
public IEnumerable<Property> Properties
|
|
||||||
{
|
|
||||||
get { return Enumerable.Empty<Property>(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Creates a new document using this template
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>Newly created document</returns>
|
|
||||||
public IDocument CreateDocument()
|
|
||||||
{
|
|
||||||
return new SkinDocument();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using RainmeterStudio.Core.Model;
|
|
||||||
using RainmeterStudio.Core.Model.Generic;
|
|
||||||
|
|
||||||
namespace RainmeterStudio.SkinDesignerPlugin
|
|
||||||
{
|
|
||||||
public class SkinMetadata : Property
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a property indicating the name of the skin
|
|
||||||
/// </summary>
|
|
||||||
public Property<string> SkinName { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a property indicating the author of the skin
|
|
||||||
/// </summary>
|
|
||||||
public Property<string> Author { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a property containing information about this skin (credits, usage instructions, setup etc)
|
|
||||||
/// </summary>
|
|
||||||
public Property<string> Information { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a property indicating the version of this skin
|
|
||||||
/// </summary>
|
|
||||||
public Property<Version> Version { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a property containing licensing information
|
|
||||||
/// </summary>
|
|
||||||
public Property<string> License { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes this metadata property
|
|
||||||
/// </summary>
|
|
||||||
public SkinMetadata() :
|
|
||||||
base("Metadata")
|
|
||||||
{
|
|
||||||
SkinName = new Property<string>("Name");
|
|
||||||
Author = new Property<string>("Author");
|
|
||||||
Information = new Property<string>("Information");
|
|
||||||
Version = new Property<Version>("Version");
|
|
||||||
License = new Property<string>("License");
|
|
||||||
|
|
||||||
Children.Add(SkinName);
|
|
||||||
Children.Add(Author);
|
|
||||||
Children.Add(Information);
|
|
||||||
Children.Add(Version);
|
|
||||||
Children.Add(License);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using RainmeterStudio.Core.Model;
|
|
||||||
using RainmeterStudio.Core.Storage;
|
|
||||||
|
|
||||||
namespace RainmeterStudio.SkinDesignerPlugin
|
|
||||||
{
|
|
||||||
public class SkinStorage : IDocumentStorage
|
|
||||||
{
|
|
||||||
public IDocument ReadDocument(string path)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WriteDocument(IDocument document, string path)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool CanReadDocument(string path)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool CanWriteDocument(Type documentType)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
48
RainmeterStudio/Editor/SkinDesigner/Controls/HoverAdorner.cs
Normal file
48
RainmeterStudio/Editor/SkinDesigner/Controls/HoverAdorner.cs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace RainmeterStudio.Editor.SkinDesigner.Controls
|
||||||
|
{
|
||||||
|
public class HoverAdorner : Adorner
|
||||||
|
{
|
||||||
|
public HoverAdorner(UIElement adornedElement)
|
||||||
|
: base(adornedElement)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnRender(DrawingContext drawingContext)
|
||||||
|
{
|
||||||
|
base.OnRender(drawingContext);
|
||||||
|
|
||||||
|
// Calculate DPI factor
|
||||||
|
Matrix matrix = PresentationSource.FromVisual(this).CompositionTarget.TransformToDevice;
|
||||||
|
double dpiFactor = 1.0 / matrix.M11;
|
||||||
|
|
||||||
|
// Rectangle
|
||||||
|
Rect rect = new Rect(AdornedElement.DesiredSize);
|
||||||
|
Rect selectionRect = new Rect(rect.X - 1, rect.Y - 1, rect.Width + 2, rect.Height + 2);
|
||||||
|
|
||||||
|
// Create pen
|
||||||
|
Pen pen = new Pen(Brushes.Gray, 1 * dpiFactor);
|
||||||
|
pen.DashStyle = DashStyles.Dash;
|
||||||
|
|
||||||
|
// Create a guidelines set for on-pixel drawing
|
||||||
|
GuidelineSet guidelines = new GuidelineSet();
|
||||||
|
guidelines.GuidelinesX.Add(selectionRect.Left + pen.Thickness / 2);
|
||||||
|
guidelines.GuidelinesX.Add(selectionRect.Right + pen.Thickness / 2);
|
||||||
|
guidelines.GuidelinesY.Add(selectionRect.Top + pen.Thickness / 2);
|
||||||
|
guidelines.GuidelinesY.Add(selectionRect.Bottom + pen.Thickness / 2);
|
||||||
|
|
||||||
|
// Draw
|
||||||
|
drawingContext.PushGuidelineSet(guidelines);
|
||||||
|
drawingContext.DrawRectangle(null, pen, selectionRect);
|
||||||
|
drawingContext.Pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
<UserControl x:Class="RainmeterStudio.Editor.SkinDesigner.Controls.MeterControl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="300" d:DesignWidth="300">
|
||||||
|
<Canvas Name="canvas">
|
||||||
|
|
||||||
|
</Canvas>
|
||||||
|
</UserControl>
|
@ -0,0 +1,82 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
using RainmeterStudio.Rainmeter;
|
||||||
|
|
||||||
|
namespace RainmeterStudio.Editor.SkinDesigner.Controls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for MeterControl.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class MeterControl : UserControl
|
||||||
|
{
|
||||||
|
private Skin _skin;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the skin being edited
|
||||||
|
/// </summary>
|
||||||
|
public Skin Skin
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Skin;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_skin = value;
|
||||||
|
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets an enumerable with the meter items
|
||||||
|
/// </summary>
|
||||||
|
public IEnumerable<Meter> Items { get { return Skin.Meters; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a collection with the currently selected items
|
||||||
|
/// </summary>
|
||||||
|
public ObservableCollection<Meter> SelectedItems { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the currently selected item
|
||||||
|
/// </summary>
|
||||||
|
public Meter SelectedItem { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the selected item index
|
||||||
|
/// </summary>
|
||||||
|
public int SelectedIndex { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes the meter control
|
||||||
|
/// </summary>
|
||||||
|
public MeterControl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Loaded += MeterControl_Loaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MeterControl_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
//AdornerLayer.GetAdornerLayer(ellipse).Add(new SelectAdorner(ellipse));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Reset()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace RainmeterStudio.Editor.SkinDesigner.Controls
|
||||||
|
{
|
||||||
|
public class SelectAdorner : Adorner
|
||||||
|
{
|
||||||
|
public SelectAdorner(UIElement adornedElement)
|
||||||
|
: base(adornedElement)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnRender(DrawingContext drawingContext)
|
||||||
|
{
|
||||||
|
base.OnRender(drawingContext);
|
||||||
|
|
||||||
|
// Calculate DPI factor
|
||||||
|
Matrix matrix = PresentationSource.FromVisual(this).CompositionTarget.TransformToDevice;
|
||||||
|
double dpiFactor = 1.0 / matrix.M11;
|
||||||
|
|
||||||
|
// Rectangle
|
||||||
|
Rect rect = new Rect(AdornedElement.DesiredSize);
|
||||||
|
Rect selectionRect = new Rect(rect.X - 1, rect.Y - 1, rect.Width + 2, rect.Height + 2);
|
||||||
|
|
||||||
|
// Create pen
|
||||||
|
Pen pen = new Pen(Brushes.Blue, 1 * dpiFactor);
|
||||||
|
|
||||||
|
// Create a guidelines set for on-pixel drawing
|
||||||
|
GuidelineSet guidelines = new GuidelineSet();
|
||||||
|
guidelines.GuidelinesX.Add(selectionRect.Left + pen.Thickness / 2);
|
||||||
|
guidelines.GuidelinesX.Add(selectionRect.Right + pen.Thickness / 2);
|
||||||
|
guidelines.GuidelinesY.Add(selectionRect.Top + pen.Thickness / 2);
|
||||||
|
guidelines.GuidelinesY.Add(selectionRect.Bottom + pen.Thickness / 2);
|
||||||
|
|
||||||
|
// Draw
|
||||||
|
drawingContext.PushGuidelineSet(guidelines);
|
||||||
|
drawingContext.DrawRectangle(null, pen, selectionRect);
|
||||||
|
drawingContext.Pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
RainmeterStudio/Editor/SkinDesigner/SkinDesignerFactory.cs
Normal file
30
RainmeterStudio/Editor/SkinDesigner/SkinDesignerFactory.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using RainmeterStudio.Core;
|
||||||
|
using RainmeterStudio.Core.Editor;
|
||||||
|
using RainmeterStudio.Core.Model;
|
||||||
|
|
||||||
|
namespace RainmeterStudio.Editor.SkinDesigner
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Creates skin designers
|
||||||
|
/// </summary>
|
||||||
|
[PluginExport]
|
||||||
|
public class SkinDesignerFactory : IDocumentEditorFactory
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public IDocumentEditor CreateEditor(IDocument document)
|
||||||
|
{
|
||||||
|
return new SkinDesignerUI((SkinDocument)document);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public bool CanEdit(Type type)
|
||||||
|
{
|
||||||
|
return type == typeof(SkinDocument);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
95
RainmeterStudio/Editor/SkinDesigner/SkinDesignerUI.xaml
Normal file
95
RainmeterStudio/Editor/SkinDesigner/SkinDesignerUI.xaml
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
<UserControl x:Class="RainmeterStudio.Editor.SkinDesigner.SkinDesignerUI"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:s="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:sd="clr-namespace:RainmeterStudio.Editor.SkinDesigner"
|
||||||
|
xmlns:sdcontrols="clr-namespace:RainmeterStudio.Editor.SkinDesigner.Controls"
|
||||||
|
xmlns:b="clr-namespace:RainmeterStudio.Business"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="300" d:DesignWidth="600">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<Style x:Key="MeasuresListViewStyle" TargetType="ListView">
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="HasItems" Value="False">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ListView">
|
||||||
|
<Grid>
|
||||||
|
<TextBlock TextAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Text="There are no measures in this skin. You can drag measures from the toolbox." />
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<b:ImageResourceConverter x:Key="ResourceConverter" />
|
||||||
|
|
||||||
|
</UserControl.Resources>
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="200" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!-- TODO: zoom -->
|
||||||
|
|
||||||
|
<ScrollViewer Grid.Column="0"
|
||||||
|
VerticalScrollBarVisibility="Auto"
|
||||||
|
HorizontalScrollBarVisibility="Auto" >
|
||||||
|
<ScrollViewer.Background>
|
||||||
|
<ImageBrush ImageSource="/Resources/Graphics/transparent_background.png"
|
||||||
|
Stretch="None" TileMode="Tile"
|
||||||
|
AlignmentX="Center" AlignmentY="Center"
|
||||||
|
Viewport="0,0,16,16"
|
||||||
|
ViewportUnits="Absolute" />
|
||||||
|
</ScrollViewer.Background>
|
||||||
|
<sdcontrols:MeterControl x:Name="meterControl" />
|
||||||
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<GridSplitter Grid.Column="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
Background="LightGray"/>
|
||||||
|
|
||||||
|
<Border Grid.Column="1" Background="#eee"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Padding="0,10,0,10"
|
||||||
|
CornerRadius="0,0,20,0">
|
||||||
|
<TextBlock Text="Meters">
|
||||||
|
<TextBlock.LayoutTransform>
|
||||||
|
<RotateTransform Angle="90" />
|
||||||
|
</TextBlock.LayoutTransform>
|
||||||
|
</TextBlock>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Grid.Column="1" Background="#eee"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
Padding="0,10,0,10"
|
||||||
|
CornerRadius="20,0,0,0">
|
||||||
|
<TextBlock Text="Measures">
|
||||||
|
<TextBlock.LayoutTransform>
|
||||||
|
<RotateTransform Angle="-90" />
|
||||||
|
</TextBlock.LayoutTransform>
|
||||||
|
</TextBlock>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<ListView Name="listMeasures" Grid.Column="2"
|
||||||
|
Style="{StaticResource MeasuresListViewStyle}">
|
||||||
|
|
||||||
|
</ListView>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
102
RainmeterStudio/Editor/SkinDesigner/SkinDesignerUI.xaml.cs
Normal file
102
RainmeterStudio/Editor/SkinDesigner/SkinDesignerUI.xaml.cs
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
using RainmeterStudio.Core.Editor;
|
||||||
|
using RainmeterStudio.Core.Editor.Features;
|
||||||
|
using RainmeterStudio.Core.Model;
|
||||||
|
|
||||||
|
namespace RainmeterStudio.Editor.SkinDesigner
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for SkinDesignerUI.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class SkinDesignerUI : UserControl, IDocumentEditor, IToolboxProvider
|
||||||
|
{
|
||||||
|
private SkinDocument _document;
|
||||||
|
|
||||||
|
#region IDocumentEditor
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the attached document
|
||||||
|
/// </summary>
|
||||||
|
public IDocument AttachedDocument
|
||||||
|
{
|
||||||
|
get { return _document; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the Editor UI
|
||||||
|
/// </summary>
|
||||||
|
public UIElement EditorUI
|
||||||
|
{
|
||||||
|
get { return this; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the attached skin document
|
||||||
|
/// </summary>
|
||||||
|
public SkinDocument Document
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _document;
|
||||||
|
}
|
||||||
|
protected set
|
||||||
|
{
|
||||||
|
_document = value;
|
||||||
|
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes the skin designer UI
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="document">Skin document to be edited</param>
|
||||||
|
public SkinDesignerUI(SkinDocument document)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
Document = document;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reloads everything
|
||||||
|
/// </summary>
|
||||||
|
private void Reset()
|
||||||
|
{
|
||||||
|
meterControl.Skin = Document.Skin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<ToolboxItem> ToolboxItems
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
yield return new ToolboxItem("Item 1");
|
||||||
|
yield return new ToolboxItem("Item 2");
|
||||||
|
yield return new ToolboxItem("Item 3");
|
||||||
|
yield return new ToolboxItem("Item 4");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public event EventHandler ToolboxItemsChanged;
|
||||||
|
|
||||||
|
public void ToolboxItemDrop(ToolboxItem item)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
92
RainmeterStudio/Editor/SkinDesigner/SkinDocument.cs
Normal file
92
RainmeterStudio/Editor/SkinDesigner/SkinDocument.cs
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using RainmeterStudio.Core.Model;
|
||||||
|
using RainmeterStudio.Rainmeter;
|
||||||
|
|
||||||
|
namespace RainmeterStudio.Editor.SkinDesigner
|
||||||
|
{
|
||||||
|
public class SkinDocument : IDocument
|
||||||
|
{
|
||||||
|
private Skin _skin;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Triggered when the value of a property changes
|
||||||
|
/// </summary>
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
#region IDocument
|
||||||
|
|
||||||
|
private Reference _reference;
|
||||||
|
private bool _isDirty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the reference to this document
|
||||||
|
/// </summary>
|
||||||
|
public Reference Reference
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _reference;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_reference = value;
|
||||||
|
|
||||||
|
if (PropertyChanged != null)
|
||||||
|
PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs("Reference"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating if this document has unsaved changes
|
||||||
|
/// </summary>
|
||||||
|
public bool IsDirty
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _isDirty;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_isDirty = value;
|
||||||
|
|
||||||
|
if (PropertyChanged != null)
|
||||||
|
PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs("IsDirty"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the skin
|
||||||
|
/// </summary>
|
||||||
|
public Skin Skin
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _skin;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_skin = value;
|
||||||
|
|
||||||
|
if (PropertyChanged != null)
|
||||||
|
PropertyChanged(this, new PropertyChangedEventArgs("Skin"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes this skin document
|
||||||
|
/// </summary>
|
||||||
|
public SkinDocument()
|
||||||
|
{
|
||||||
|
Skin = new Skin();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using RainmeterStudio.Core;
|
||||||
|
using RainmeterStudio.Core.Model;
|
||||||
|
|
||||||
|
namespace RainmeterStudio.Editor.SkinDesigner
|
||||||
|
{
|
||||||
|
[PluginExport]
|
||||||
|
public class SkinDocumentEmptyTemplate : IDocumentTemplate
|
||||||
|
{
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get { return "Skin"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string DefaultExtension
|
||||||
|
{
|
||||||
|
get { return "rsskin"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<Property> Properties
|
||||||
|
{
|
||||||
|
get { yield break; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public IDocument CreateDocument()
|
||||||
|
{
|
||||||
|
return new SkinDocument();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
34
RainmeterStudio/Editor/SkinDesigner/SkinStorage.cs
Normal file
34
RainmeterStudio/Editor/SkinDesigner/SkinStorage.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using RainmeterStudio.Core;
|
||||||
|
using RainmeterStudio.Core.Storage;
|
||||||
|
|
||||||
|
namespace RainmeterStudio.Editor.SkinDesigner
|
||||||
|
{
|
||||||
|
[PluginExport]
|
||||||
|
public class SkinStorage : IDocumentStorage
|
||||||
|
{
|
||||||
|
public Core.Model.IDocument ReadDocument(string path)
|
||||||
|
{
|
||||||
|
return new SkinDocument();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void WriteDocument(Core.Model.IDocument document, string path)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanReadDocument(string path)
|
||||||
|
{
|
||||||
|
return Path.GetExtension(path) == ".rsskin";
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanWriteDocument(Type documentType)
|
||||||
|
{
|
||||||
|
return documentType == typeof(SkinDocument);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -65,10 +65,19 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="UI\ViewModel\ToolboxItemViewModel.cs" />
|
||||||
<Page Include="Editor\ProjectEditor\ProjectEditorUI.xaml">
|
<Page Include="Editor\ProjectEditor\ProjectEditorUI.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Editor\SkinDesigner\Controls\MeterControl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Editor\SkinDesigner\SkinDesignerUI.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="UI\App.xaml">
|
<Page Include="UI\App.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@ -82,6 +91,18 @@
|
|||||||
<Compile Include="Editor\ProjectEditor\ProjectEditorUI.xaml.cs">
|
<Compile Include="Editor\ProjectEditor\ProjectEditorUI.xaml.cs">
|
||||||
<DependentUpon>ProjectEditorUI.xaml</DependentUpon>
|
<DependentUpon>ProjectEditorUI.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Editor\SkinDesigner\Controls\HoverAdorner.cs" />
|
||||||
|
<Compile Include="Editor\SkinDesigner\Controls\MeterControl.xaml.cs">
|
||||||
|
<DependentUpon>MeterControl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Editor\SkinDesigner\Controls\SelectAdorner.cs" />
|
||||||
|
<Compile Include="Editor\SkinDesigner\SkinDesignerFactory.cs" />
|
||||||
|
<Compile Include="Editor\SkinDesigner\SkinDesignerUI.xaml.cs">
|
||||||
|
<DependentUpon>SkinDesignerUI.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Editor\SkinDesigner\SkinDocument.cs" />
|
||||||
|
<Compile Include="Editor\SkinDesigner\SkinDocumentEmptyTemplate.cs" />
|
||||||
|
<Compile Include="Editor\SkinDesigner\SkinStorage.cs" />
|
||||||
<Compile Include="MainClass.cs" />
|
<Compile Include="MainClass.cs" />
|
||||||
<Compile Include="Interop\NativeLibrary.cs" />
|
<Compile Include="Interop\NativeLibrary.cs" />
|
||||||
<Compile Include="Rainmeter.cs" />
|
<Compile Include="Rainmeter.cs" />
|
||||||
@ -118,6 +139,9 @@
|
|||||||
<Compile Include="UI\Panels\ProjectPanel.xaml.cs">
|
<Compile Include="UI\Panels\ProjectPanel.xaml.cs">
|
||||||
<DependentUpon>ProjectPanel.xaml</DependentUpon>
|
<DependentUpon>ProjectPanel.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="UI\Panels\ToolboxPanel.xaml.cs">
|
||||||
|
<DependentUpon>ToolboxPanel.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="UI\UIManager.cs" />
|
<Compile Include="UI\UIManager.cs" />
|
||||||
<Compile Include="UI\ViewModel\DocumentTemplateViewModel.cs" />
|
<Compile Include="UI\ViewModel\DocumentTemplateViewModel.cs" />
|
||||||
<Compile Include="UI\ViewModel\ProjectTemplateViewModel.cs" />
|
<Compile Include="UI\ViewModel\ProjectTemplateViewModel.cs" />
|
||||||
@ -154,6 +178,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="UI\Panels\ToolboxPanel.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="UI\Styles\ButtonStyle.xaml">
|
<Page Include="UI\Styles\ButtonStyle.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@ -251,6 +279,10 @@
|
|||||||
<Project>{1d2a4896-af31-4e82-a84f-4e218067701f}</Project>
|
<Project>{1d2a4896-af31-4e82-a84f-4e218067701f}</Project>
|
||||||
<Name>RainmeterStudio.Core</Name>
|
<Name>RainmeterStudio.Core</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\RainmeterStudio.Rainmeter\RainmeterStudio.Rainmeter.csproj">
|
||||||
|
<Project>{c641d7f8-dddc-4ec6-8f5e-233520290642}</Project>
|
||||||
|
<Name>RainmeterStudio.Rainmeter</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Resources\Icons\32\project_empty.png" />
|
<None Include="Resources\Icons\32\project_empty.png" />
|
||||||
@ -265,7 +297,13 @@
|
|||||||
<Resource Include="Resources\Icons\16\disk.png" />
|
<Resource Include="Resources\Icons\16\disk.png" />
|
||||||
<Resource Include="Resources\Icons\16\disk_multiple.png" />
|
<Resource Include="Resources\Icons\16\disk_multiple.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup>
|
||||||
|
<Folder Include="Editor\LayoutDesigner\" />
|
||||||
|
<Folder Include="Editor\TextEditor\" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\Graphics\transparent_background.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
Before Width: | Height: | Size: 150 B After Width: | Height: | Size: 150 B |
18
RainmeterStudio/Resources/Strings.Designer.cs
generated
18
RainmeterStudio/Resources/Strings.Designer.cs
generated
@ -726,6 +726,24 @@ namespace RainmeterStudio.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to New empty skin.
|
||||||
|
/// </summary>
|
||||||
|
public static string DocumentTemplate_Skin_Description {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("DocumentTemplate_Skin_Description", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Skin.
|
||||||
|
/// </summary>
|
||||||
|
public static string DocumentTemplate_Skin_DisplayText {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("DocumentTemplate_Skin_DisplayText", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to _File.
|
/// Looks up a localized string similar to _File.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -366,4 +366,10 @@
|
|||||||
<data name="Command_ProjectOpen_DisplayText" xml:space="preserve">
|
<data name="Command_ProjectOpen_DisplayText" xml:space="preserve">
|
||||||
<value>O_pen Project</value>
|
<value>O_pen Project</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="DocumentTemplate_Skin_Description" xml:space="preserve">
|
||||||
|
<value>New empty skin</value>
|
||||||
|
</data>
|
||||||
|
<data name="DocumentTemplate_Skin_DisplayText" xml:space="preserve">
|
||||||
|
<value>Skin</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Loading…
Reference in New Issue
Block a user