1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Reworked XAML for profile and layer editor (some layer types tbd)

This commit is contained in:
SpoinkyNL 2017-03-01 17:15:41 +01:00
parent 809e38da7e
commit e729cfb960
26 changed files with 761 additions and 626 deletions

View File

@ -17,8 +17,7 @@
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
<!-- Accent and AppTheme setting -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Teal.xaml" />
<ResourceDictionary
Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
<ResourceDictionary Source="/Resources/Icons.xaml" />
<ResourceDictionary Source="Styles/ColorBox.xaml" />
<ResourceDictionary Source="Styles/MarkdownStyles.xaml" />

View File

@ -1,6 +1,7 @@
using System;
using System.Windows;
using System.Windows.Threading;
using Artemis.Utilities.Keyboard;
using NLog;
using WpfExceptionViewer;
@ -26,6 +27,9 @@ namespace Artemis
private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
// Get rid of the keyboard hook in case of a crash, otherwise input freezes up system wide until Artemis is gone
KeyboardHook.Dispose();
if (DoHandle)
{
GetArtemisExceptionViewer(e.Exception).ShowDialog();

View File

@ -151,16 +151,16 @@
<HintPath>..\packages\Caliburn.Micro.3.0.3\lib\net45\Caliburn.Micro.Platform.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.0.0\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Corale.Colore, Version=5.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Colore.5.1.0\lib\net35\Corale.Colore.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CSCore, Version=1.1.5992.18249, Culture=neutral, PublicKeyToken=5a08f2b6f4415dea, processorArchitecture=MSIL">
<HintPath>..\packages\CSCore.1.1.0\lib\net35-client\CSCore.dll</HintPath>
<Reference Include="CSCore, Version=1.1.6245.30570, Culture=neutral, PublicKeyToken=5a08f2b6f4415dea, processorArchitecture=MSIL">
<HintPath>..\packages\CSCore.1.2.0\lib\net35-client\CSCore.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CUE.NET, Version=1.1.2.1, Culture=neutral, processorArchitecture=MSIL">
@ -203,8 +203,8 @@
<HintPath>..\packages\log4net.2.0.7\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MahApps.Metro, Version=1.4.1.0, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
<HintPath>..\packages\MahApps.Metro.1.4.1\lib\net45\MahApps.Metro.dll</HintPath>
<Reference Include="MahApps.Metro, Version=1.4.3.0, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
<HintPath>..\packages\MahApps.Metro.1.4.3\lib\net45\MahApps.Metro.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
@ -248,7 +248,7 @@
<Private>True</Private>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.4.1\lib\net45\NLog.dll</HintPath>
<HintPath>..\packages\NLog.4.4.3\lib\net45\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Squirrel, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
@ -290,7 +290,7 @@
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MahApps.Metro.1.4.1\lib\net45\System.Windows.Interactivity.dll</HintPath>
<HintPath>..\packages\MahApps.Metro.1.4.3\lib\net45\System.Windows.Interactivity.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml" />
@ -502,7 +502,7 @@
</Compile>
<Compile Include="Profiles\Layers\Types\AmbientLight\AmbientLightPropertiesViewModel.cs" />
<Compile Include="Profiles\Layers\Types\AmbientLight\AmbientLightType.cs" />
<Compile Include="Profiles\Layers\Types\AmbientLight\Helper\CheckboxEnumFlagHelper.cs" />
<Compile Include="Profiles\Layers\Types\AmbientLight\Helper\ToggleSwitchButtonEnumFlagHelper.cs" />
<Compile Include="Profiles\Layers\Types\AmbientLight\Model\AmbienceCreatorType.cs" />
<Compile Include="Profiles\Layers\Types\AmbientLight\Model\BlackBarDetectionMode.cs" />
<Compile Include="Profiles\Layers\Types\AmbientLight\Model\Extensions\AvgColorExtension.cs" />

View File

@ -36,6 +36,14 @@ namespace Artemis
Initialize();
BindSpecialValues();
KeyboardHook.SetupKeyboardHook();
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
}
private void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs)
{
// Get rid of the keyboard hook in case of a crash, otherwise input freezes up system wide until Artemis is gone
KeyboardHook.Dispose();
}
private void BindSpecialValues()

View File

@ -14,7 +14,7 @@ namespace Artemis.DeviceProviders.Artemis
CantEnableText = "Waaaaah, this should not be happening!";
Height = 1;
Width = 1;
PreviewSettings = new PreviewSettings(984, 375, new Thickness(0, 0, 0, 0), Resources.none);
PreviewSettings = new PreviewSettings(new Thickness(0, 0, 0, 0), Resources.none);
}
public override void Disable()

View File

@ -28,7 +28,7 @@ namespace Artemis.DeviceProviders.CoolerMaster
Height = 6;
Width = 22;
PreviewSettings = new PreviewSettings(670, 189, new Thickness(-2, -5, 0, 0), Resources.masterkeys_pro_l);
PreviewSettings = new PreviewSettings(new Thickness(-2, -5, 0, 0), Resources.masterkeys_pro_l);
_generalSettings = SettingsProvider.Load<GeneralSettings>();
}

View File

@ -28,7 +28,7 @@ namespace Artemis.DeviceProviders.CoolerMaster
Height = 6;
Width = 18;
PreviewSettings = new PreviewSettings(683, 242, new Thickness(0, 0, 0, 0), Resources.masterkeys_pro_s);
PreviewSettings = new PreviewSettings(new Thickness(0, 0, 0, 0), Resources.masterkeys_pro_s);
_generalSettings = SettingsProvider.Load<GeneralSettings>();
}

View File

@ -55,7 +55,7 @@ namespace Artemis.DeviceProviders.Corsair
Height = 7;
Width = 25;
Slug = "corsair-k95-rgb";
PreviewSettings = new PreviewSettings(676, 190, new Thickness(0, -15, 0, 0), Resources.k95);
PreviewSettings = new PreviewSettings(new Thickness(0, -15, 0, 0), Resources.k95);
break;
case "K70 RGB":
case "K70 RGB RAPIDFIRE":
@ -63,7 +63,7 @@ namespace Artemis.DeviceProviders.Corsair
Height = 7;
Width = 21;
Slug = "corsair-k70-rgb";
PreviewSettings = new PreviewSettings(676, 210, new Thickness(0, -25, 0, 0), Resources.k70);
PreviewSettings = new PreviewSettings(new Thickness(0, -25, 0, 0), Resources.k70);
break;
case "K65 RGB":
case "CGK65 RGB":
@ -72,13 +72,13 @@ namespace Artemis.DeviceProviders.Corsair
Height = 7;
Width = 18;
Slug = "corsair-k65-rgb";
PreviewSettings = new PreviewSettings(610, 240, new Thickness(0, -30, 0, 0), Resources.k65);
PreviewSettings = new PreviewSettings(new Thickness(0, -30, 0, 0), Resources.k65);
break;
case "STRAFE RGB":
Height = 7;
Width = 22;
Slug = "corsair-strafe-rgb";
PreviewSettings = new PreviewSettings(665, 215, new Thickness(0, -5, 0, 0), Resources.strafe);
PreviewSettings = new PreviewSettings(new Thickness(0, -5, 0, 0), Resources.strafe);
break;
}

View File

@ -115,15 +115,11 @@ namespace Artemis.DeviceProviders
public struct PreviewSettings
{
public int Width { get; set; }
public int Height { get; set; }
public Thickness Margin { get; set; }
public Bitmap Image { get; set; }
public PreviewSettings(int width, int height, Thickness margin, Bitmap image)
public PreviewSettings(Thickness margin, Bitmap image)
{
Width = width;
Height = height;
Margin = margin;
Image = image;
}

View File

@ -22,7 +22,7 @@ namespace Artemis.DeviceProviders.Logitech
"If needed, you can select a different keyboard in Artemis under settings.";
Height = 6;
Width = 21;
PreviewSettings = new PreviewSettings(675, 185, new Thickness(0, 35, 0, 0), Resources.g810);
PreviewSettings = new PreviewSettings(new Thickness(0, 35, 0, 0), Resources.g810);
_generalSettings = SettingsProvider.Load<GeneralSettings>();
}

View File

@ -24,7 +24,7 @@ namespace Artemis.DeviceProviders.Logitech
"If needed, you can select a different keyboard in Artemis under settings.";
Height = 7;
Width = 22;
PreviewSettings = new PreviewSettings(570, 175, new Thickness(-10, -105, 0, 0), Resources.g910);
PreviewSettings = new PreviewSettings(new Thickness(10, -70, 10, 50), Resources.g910);
_generalSettings = SettingsProvider.Load<GeneralSettings>();
}

View File

@ -27,7 +27,7 @@ namespace Artemis.DeviceProviders.Razer
Height = Constants.MaxRows;
Width = Constants.MaxColumns;
PreviewSettings = new PreviewSettings(665, 175, new Thickness(0, -15, 0, 0), Resources.blackwidow);
PreviewSettings = new PreviewSettings(new Thickness(0, -15, 0, 0), Resources.blackwidow);
_generalSettings = SettingsProvider.Load<GeneralSettings>();
}

View File

@ -1,10 +1,13 @@
using System.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using Artemis.DAL;
using Artemis.Managers;
using Artemis.Modules.Abstract;
using Artemis.Settings;
using Artemis.Utilities;
using Artemis.Utilities.Memory;
using Newtonsoft.Json;
namespace Artemis.Modules.Games.RocketLeague
{
@ -20,21 +23,21 @@ namespace Artemis.Modules.Games.RocketLeague
ProcessNames.Add("RocketLeague");
// Generate a new offset when the game is updated
//var offset = new GamePointersCollection
//{
// Game = "RocketLeague",
// GameVersion = "1.27",
// GameAddresses = new List<GamePointer>
// {
// new GamePointer
// {
// Description = "Boost",
// BasePointer = new IntPtr(0x016D5084),
// Offsets = new[] {0xC4, 0x214, 0x320, 0x73C, 0x224}
// }
// }
//};
//var res = JsonConvert.SerializeObject(offset, Formatting.Indented);
var offset = new GamePointersCollection
{
Game = "RocketLeague",
GameVersion = "1.30",
GameAddresses = new List<GamePointer>
{
new GamePointer
{
Description = "Boost",
BasePointer = new IntPtr(0x016E00B4),
Offsets = new[] {0xC4, 0x18, 0x388, 0x73C, 0x224}
}
}
};
var res = JsonConvert.SerializeObject(offset, Formatting.Indented);
}
public override string Name => "RocketLeague";

View File

@ -250,9 +250,11 @@
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="batchSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="fullBatchSizeWriteLimit" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="overflowAction" minOccurs="0" maxOccurs="1" type="NLog.Targets.Wrappers.AsyncTargetWrapperOverflowAction" />
<xs:element name="queueLimit" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="timeToSleepBetweenBatches" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -264,6 +266,11 @@
<xs:documentation>Number of log events that should be processed in a batch by the lazy writer thread.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="fullBatchSizeWriteLimit" type="xs:integer">
<xs:annotation>
<xs:documentation>Limit of full s to write before yielding into Performance is better when writing many small batches, than writing a single large batch</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="overflowAction" type="NLog.Targets.Wrappers.AsyncTargetWrapperOverflowAction">
<xs:annotation>
<xs:documentation>Action to be taken when the lazy writer thread request queue count exceeds the set limit.</xs:documentation>
@ -279,6 +286,11 @@
<xs:documentation>Time in milliseconds to sleep between batches.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -295,6 +307,7 @@
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="condition" minOccurs="0" maxOccurs="1" type="Condition" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -306,6 +319,11 @@
<xs:documentation>Condition expression. Log events who meet this condition will cause a flush on the wrapped target.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -317,6 +335,7 @@
<xs:element name="bufferSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="flushTimeout" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="slidingTimeout" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -338,6 +357,11 @@
<xs:documentation>Indicates whether to use sliding timeout.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -353,19 +377,20 @@
<xs:element name="newLine" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="onConnectionOverflow" minOccurs="0" maxOccurs="1" type="NLog.Targets.NetworkTargetConnectionsOverflowAction" />
<xs:element name="onOverflow" minOccurs="0" maxOccurs="1" type="NLog.Targets.NetworkTargetOverflowAction" />
<xs:element name="maxConnections" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="keepConnection" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="connectionCacheSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="maxConnections" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="address" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="maxQueueSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="includeSourceInfo" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="ndcItemSeparator" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.NLogViewerParameterInfo" />
<xs:element name="includeMdc" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="includeSourceInfo" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="includeNLogData" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="includeNdc" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="includeCallSite" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="appInfo" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="includeNLogData" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="includeMdc" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="ndcItemSeparator" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -407,6 +432,11 @@
<xs:documentation>Action that should be taken if the message is larger than maxMessageSize.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="maxConnections" type="xs:integer">
<xs:annotation>
<xs:documentation>Maximum current connections. 0 = no maximum.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="keepConnection" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to keep connection open whenever possible.</xs:documentation>
@ -417,11 +447,6 @@
<xs:documentation>Size of the connection cache (number of connections which are kept alive).</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="maxConnections" type="xs:integer">
<xs:annotation>
<xs:documentation>Maximum current connections. 0 = no maximum.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="address" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Network address.</xs:documentation>
@ -432,14 +457,19 @@
<xs:documentation>Maximum queue size.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeMdc" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to include dictionary contents.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeSourceInfo" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to include source info (file name and line number) in the information sent over the network.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ndcItemSeparator" type="xs:string">
<xs:attribute name="includeNLogData" type="xs:boolean">
<xs:annotation>
<xs:documentation>NDC item separator.</xs:documentation>
<xs:documentation>Indicates whether to include NLog-specific extensions to log4j schema.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeNdc" type="xs:boolean">
@ -457,14 +487,14 @@
<xs:documentation>AppInfo field. By default it's the friendly name of the current AppDomain.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeNLogData" type="xs:boolean">
<xs:attribute name="ndcItemSeparator" type="xs:string">
<xs:annotation>
<xs:documentation>Indicates whether to include NLog-specific extensions to log4j schema.</xs:documentation>
<xs:documentation>NDC item separator.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeMdc" type="xs:boolean">
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to include dictionary contents.</xs:documentation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
@ -514,6 +544,7 @@
<xs:element name="detectConsoleAvailable" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="errorStream" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -555,6 +586,11 @@
<xs:documentation>Indicates whether the error stream (stderr) should be used instead of the output stream (stdout).</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -658,6 +694,7 @@
<xs:element name="error" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="detectConsoleAvailable" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -694,6 +731,11 @@
<xs:documentation>The encoding for writing messages to the .</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -702,77 +744,83 @@
<xs:extension base="Target">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="connectionString" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="connectionStringName" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="dbDatabase" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="dbHost" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="dbPassword" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="dbProvider" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="dbUserName" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="keepConnection" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="useTransactions" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="dbUserName" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="dbProvider" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="dbPassword" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="keepConnection" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="dbDatabase" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="connectionStringName" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="connectionString" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="dbHost" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="installConnectionString" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="install-command" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.DatabaseCommandInfo" />
<xs:element name="uninstall-command" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.DatabaseCommandInfo" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.DatabaseParameterInfo" />
<xs:element name="commandText" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="commandType" minOccurs="0" maxOccurs="1" type="System.Data.CommandType" />
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.DatabaseParameterInfo" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the target.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="connectionString" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="connectionStringName" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the connection string (as specified in &lt;connectionStrings&gt; configuration section.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbDatabase" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbHost" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbPassword" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbProvider" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the database provider.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbUserName" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="keepConnection" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to keep the database connection open between the log events.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="useTransactions" type="xs:boolean">
<xs:annotation>
<xs:documentation>Obsolete - value will be ignored! The logging code always runs outside of transaction. Gets or sets a value indicating whether to use database transactions. Some data providers require this.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbUserName" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbProvider" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the database provider.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbPassword" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="keepConnection" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to keep the database connection open between the log events.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbDatabase" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="connectionStringName" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the connection string (as specified in &lt;connectionStrings&gt; configuration section.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="connectionString" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbHost" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="installConnectionString" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="commandText" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Text of the SQL command to be run on each log level.</xs:documentation>
@ -864,6 +912,7 @@
<xs:element name="layout" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="header" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="footer" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -885,6 +934,11 @@
<xs:documentation>Footer.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -894,6 +948,7 @@
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="layout" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -905,6 +960,11 @@
<xs:documentation>Layout used to format log messages.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -922,6 +982,7 @@
<xs:element name="onOverflow" minOccurs="0" maxOccurs="1" type="NLog.Targets.EventLogTargetOverflowAction" />
<xs:element name="entryType" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="maxMessageLength" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -973,6 +1034,11 @@
<xs:documentation>Message length limit to write to the Event Log.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -989,6 +1055,7 @@
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="returnToFirstOnSuccess" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -1000,6 +1067,11 @@
<xs:documentation>Indicates whether to return to the first target after any successful write.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -1022,6 +1094,7 @@
<xs:element name="forceManaged" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="archiveFileKind" minOccurs="0" maxOccurs="1" type="NLog.Targets.FilePathKind" />
<xs:element name="cleanupFileName" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="discardAll" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="fileNameKind" minOccurs="0" maxOccurs="1" type="NLog.Targets.FilePathKind" />
<xs:element name="forceMutexConcurrentWrites" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="writeFooterOnArchivingOnly" minOccurs="0" maxOccurs="1" type="xs:boolean" />
@ -1039,6 +1112,7 @@
<xs:element name="networkWrites" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="openFileCacheSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="openFileCacheTimeout" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="bufferSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="autoFlush" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="concurrentWriteAttemptDelay" minOccurs="0" maxOccurs="1" type="xs:integer" />
@ -1119,6 +1193,11 @@
<xs:documentation>Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing gets written when the filename is wrong.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="discardAll" type="xs:boolean">
<xs:annotation>
<xs:documentation>Whether or not this target should just discard all data that its asked to write. Mostly used for when testing NLog Stack except final write</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="fileNameKind" type="NLog.Targets.FilePathKind">
<xs:annotation>
<xs:documentation>Is the an absolute or relative path?</xs:documentation>
@ -1204,6 +1283,11 @@
<xs:documentation>Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="bufferSize" type="xs:integer">
<xs:annotation>
<xs:documentation>Log file buffer size in bytes.</xs:documentation>
@ -1278,6 +1362,7 @@
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="condition" minOccurs="0" maxOccurs="1" type="Condition" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -1289,6 +1374,11 @@
<xs:documentation>Condition expression. Log events who meet this condition will be forwarded to the wrapped target.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -1304,6 +1394,7 @@
<xs:element name="password" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="revertToSelf" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="userName" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -1345,6 +1436,11 @@
<xs:documentation>Username to change context to.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -1378,6 +1474,7 @@
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="interval" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="messageLimit" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -1394,6 +1491,11 @@
<xs:documentation>Maximum allowed number of messages written per .</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -1409,6 +1511,7 @@
<xs:element name="includeEventProperties" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.MethodCallParameter" />
<xs:element name="useBinaryEncoding" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -1445,6 +1548,11 @@
<xs:documentation>Indicates whether to use binary message encoding.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -1487,9 +1595,10 @@
<xs:element name="body" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="subject" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="from" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="replaceNewlineWithBrTagInHtml" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="priority" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="timeout" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="priority" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="replaceNewlineWithBrTagInHtml" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="smtpServer" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="smtpAuthentication" minOccurs="0" maxOccurs="1" type="NLog.Targets.SmtpAuthenticationMode" />
<xs:element name="smtpUserName" minOccurs="0" maxOccurs="1" type="Layout" />
@ -1565,9 +1674,9 @@
<xs:documentation>Sender's email address (e.g. joe@domain.com).</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="replaceNewlineWithBrTagInHtml" type="xs:boolean">
<xs:attribute name="timeout" type="xs:integer">
<xs:annotation>
<xs:documentation>Indicates whether NewLine characters in the body should be replaced with tags.</xs:documentation>
<xs:documentation>Indicates the SMTP client timeout.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="priority" type="SimpleLayoutAttribute">
@ -1575,9 +1684,14 @@
<xs:documentation>Priority used for sending mails.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="timeout" type="xs:integer">
<xs:attribute name="replaceNewlineWithBrTagInHtml" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates the SMTP client timeout.</xs:documentation>
<xs:documentation>Indicates whether NewLine characters in the body should be replaced with tags.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="smtpServer" type="SimpleLayoutAttribute">
@ -1648,6 +1762,7 @@
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="layout" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -1659,6 +1774,11 @@
<xs:documentation>Layout used to format log messages.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -1671,6 +1791,7 @@
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="useXmlEncoding" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="checkIfQueueExists" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="createQueueIfNotExists" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="label" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="queue" minOccurs="0" maxOccurs="1" type="Layout" />
@ -1701,6 +1822,11 @@
<xs:documentation>Indicates whether to check if a queue exists before writing to it.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="createQueueIfNotExists" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to create the queue if it doesn't exists.</xs:documentation>
@ -1732,6 +1858,7 @@
<xs:element name="className" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="methodName" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.MethodCallParameter" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -1748,6 +1875,11 @@
<xs:documentation>Method name. The method must be public and static. Use the AssemblyQualifiedName , https://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx e.g.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -1768,6 +1900,7 @@
<xs:element name="keepConnection" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="maxConnections" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="maxQueueSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -1834,6 +1967,11 @@
<xs:documentation>Maximum queue size.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -1849,19 +1987,20 @@
<xs:element name="newLine" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="onConnectionOverflow" minOccurs="0" maxOccurs="1" type="NLog.Targets.NetworkTargetConnectionsOverflowAction" />
<xs:element name="onOverflow" minOccurs="0" maxOccurs="1" type="NLog.Targets.NetworkTargetOverflowAction" />
<xs:element name="maxConnections" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="keepConnection" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="connectionCacheSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="maxConnections" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="address" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="maxQueueSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="includeSourceInfo" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="ndcItemSeparator" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.NLogViewerParameterInfo" />
<xs:element name="includeMdc" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="includeSourceInfo" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="includeNLogData" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="includeNdc" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="includeCallSite" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="appInfo" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="includeNLogData" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="includeMdc" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="ndcItemSeparator" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -1903,6 +2042,11 @@
<xs:documentation>Action that should be taken if the message is larger than maxMessageSize.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="maxConnections" type="xs:integer">
<xs:annotation>
<xs:documentation>Maximum current connections. 0 = no maximum.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="keepConnection" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to keep connection open whenever possible.</xs:documentation>
@ -1913,11 +2057,6 @@
<xs:documentation>Size of the connection cache (number of connections which are kept alive).</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="maxConnections" type="xs:integer">
<xs:annotation>
<xs:documentation>Maximum current connections. 0 = no maximum.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="address" type="SimpleLayoutAttribute">
<xs:annotation>
<xs:documentation>Network address.</xs:documentation>
@ -1928,14 +2067,19 @@
<xs:documentation>Maximum queue size.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeMdc" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to include dictionary contents.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeSourceInfo" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to include source info (file name and line number) in the information sent over the network.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ndcItemSeparator" type="xs:string">
<xs:attribute name="includeNLogData" type="xs:boolean">
<xs:annotation>
<xs:documentation>NDC item separator.</xs:documentation>
<xs:documentation>Indicates whether to include NLog-specific extensions to log4j schema.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeNdc" type="xs:boolean">
@ -1953,14 +2097,14 @@
<xs:documentation>AppInfo field. By default it's the friendly name of the current AppDomain.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeNLogData" type="xs:boolean">
<xs:attribute name="ndcItemSeparator" type="xs:string">
<xs:annotation>
<xs:documentation>Indicates whether to include NLog-specific extensions to log4j schema.</xs:documentation>
<xs:documentation>NDC item separator.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeMdc" type="xs:boolean">
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to include dictionary contents.</xs:documentation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
@ -1973,6 +2117,7 @@
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="layout" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="formatMessage" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -1989,6 +2134,11 @@
<xs:documentation>Indicates whether to perform layout calculation.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -1998,6 +2148,7 @@
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="layout" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -2009,6 +2160,11 @@
<xs:documentation>Layout used to format log messages.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -2024,6 +2180,7 @@
<xs:element name="counterType" minOccurs="0" maxOccurs="1" type="System.Diagnostics.PerformanceCounterType" />
<xs:element name="incrementValue" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="instanceName" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -2065,6 +2222,11 @@
<xs:documentation>Performance counter instance name.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -2107,6 +2269,7 @@
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="defaultFilter" minOccurs="0" maxOccurs="1" type="Condition" />
<xs:element name="when" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.Wrappers.FilteringRule" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -2118,6 +2281,11 @@
<xs:documentation>Default filter to be applied when no specific rule matches.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -2142,12 +2310,18 @@
<xs:extension base="CompoundTargetBase">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the target.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -2156,6 +2330,7 @@
<xs:extension base="WrapperTargetBase">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="repeatCount" minOccurs="0" maxOccurs="1" type="xs:integer" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
@ -2163,6 +2338,11 @@
<xs:documentation>Name of the target.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="repeatCount" type="xs:integer">
<xs:annotation>
<xs:documentation>Number of times to repeat each log message.</xs:documentation>
@ -2176,6 +2356,7 @@
<xs:extension base="WrapperTargetBase">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="retryCount" minOccurs="0" maxOccurs="1" type="xs:integer" />
<xs:element name="retryDelayMilliseconds" minOccurs="0" maxOccurs="1" type="xs:integer" />
</xs:choice>
@ -2184,6 +2365,11 @@
<xs:documentation>Name of the target.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="retryCount" type="xs:integer">
<xs:annotation>
<xs:documentation>Number of retries that should be attempted on the wrapped target in case of a failure.</xs:documentation>
@ -2202,12 +2388,18 @@
<xs:extension base="CompoundTargetBase">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the target.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -2216,12 +2408,18 @@
<xs:extension base="CompoundTargetBase">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the target.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -2231,6 +2429,7 @@
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="layout" minOccurs="0" maxOccurs="1" type="Layout" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
</xs:choice>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
@ -2242,6 +2441,11 @@
<xs:documentation>Layout used to format log messages.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
@ -2252,6 +2456,7 @@
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="includeBOM" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.MethodCallParameter" />
<xs:element name="optimizeBufferReuse" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:element name="escapeDataNLogLegacy" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="escapeDataRfc3986" minOccurs="0" maxOccurs="1" type="xs:boolean" />
@ -2272,6 +2477,11 @@
<xs:documentation>Should we include the BOM (Byte-order-mark) for UTF? Influences the property. This will only work for UTF-8.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optimizeBufferReuse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="encoding" type="xs:string">
<xs:annotation>
<xs:documentation>Encoding.</xs:documentation>

View File

@ -1,15 +1,15 @@
<UserControl x:Class="Artemis.Profiles.Layers.Types.AmbientLight.AmbientLightPropertiesView"
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:converters="clr-namespace:Artemis.Utilities.Converters"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:model="clr-namespace:Artemis.Profiles.Layers.Types.AmbientLight.Model"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:helper="clr-namespace:Artemis.Profiles.Layers.Types.AmbientLight.Helper"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="500">
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:converters="clr-namespace:Artemis.Utilities.Converters"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:model="clr-namespace:Artemis.Profiles.Layers.Types.AmbientLight.Model"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:helper="clr-namespace:Artemis.Profiles.Layers.Types.AmbientLight.Helper"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="500">
<UserControl.Resources>
<converters:EnumDescriptionConverter x:Key="HEnumDescriptionConverter" />
@ -29,135 +29,101 @@
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- AmbienceCreatorType -->
<TextBlock Grid.Row="0" Grid.Column="0" Margin="10,13,10,10" FontSize="13.333" Text="Ambilight-Mode:"
VerticalAlignment="Top" Height="18" />
<ComboBox Grid.Row="0" Grid.Column="1"
ItemsSource="{Binding Source={StaticResource AmbienceCreatorTypeValues}}"
Margin="10,10,10,0" SelectedItem="{Binding Path=LayerModel.Properties.AmbienceCreatorType}"
VerticalAlignment="Top" Height="22">
<Label Grid.Row="0" Grid.Column="0" Content="Ambilight-Mode:" VerticalAlignment="Center" />
<ComboBox Grid.Row="0" Grid.Column="1" ItemsSource="{Binding Source={StaticResource AmbienceCreatorTypeValues}}" SelectedItem="{Binding Path=LayerModel.Properties.AmbienceCreatorType}" VerticalAlignment="Center">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource HEnumDescriptionConverter}}" />
<Label Content="{Binding Converter={StaticResource HEnumDescriptionConverter}}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<!-- MirrorAmount & Downsampling-->
<TextBlock Grid.Row="1" Grid.Column="0" Margin="10,13,10,10" FontSize="13.333" Text="Mirrored Amount (%):"
Height="18" VerticalAlignment="Top" />
<controls:NumericUpDown Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" Minimum="0" Maximum="100"
Value="{Binding Path=LayerModel.Properties.MirroredAmount, Mode=TwoWay}"
Margin="10,12,10,2" Height="24" />
<Label Grid.Row="1" Grid.Column="0" Content="Mirrored Amount (%):" VerticalAlignment="Center" />
<controls:NumericUpDown Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Minimum="0" Maximum="100" Value="{Binding Path=LayerModel.Properties.MirroredAmount, Mode=TwoWay}" Margin="0,5" />
<TextBlock Grid.Row="1" Grid.Column="2" Margin="10,13,10,10" FontSize="13.333" Text="Downsampling:"
Height="18" VerticalAlignment="Top" />
<controls:NumericUpDown Grid.Row="1" Grid.Column="3" VerticalAlignment="Top" Minimum="1" Maximum="20"
Value="{Binding Path=LayerModel.Properties.Downsampling, Mode=TwoWay}"
Margin="10,12,10,2" Height="24" />
<Label Grid.Row="1" Grid.Column="2" Content="Downsampling:" VerticalAlignment="Center" />
<controls:NumericUpDown Grid.Row="1" Grid.Column="3" VerticalAlignment="Center" Minimum="1" Maximum="20" Value="{Binding Path=LayerModel.Properties.Downsampling, Mode=TwoWay}" Margin="0,5" />
<!-- SmoothMode -->
<TextBlock Grid.Row="2" Grid.Column="0" Margin="10,13,10,10" FontSize="13.333" Text="Smoothing:"
VerticalAlignment="Top" Height="18" />
<ComboBox Grid.Row="2" Grid.Column="1" ItemsSource="{Binding Source={StaticResource SmoothModeEnumValues}}"
Margin="10,10,10,0" SelectedItem="{Binding Path=LayerModel.Properties.SmoothMode}"
VerticalAlignment="Top" Height="22">
<Label Grid.Row="2" Grid.Column="0" Content="Smoothing:" VerticalAlignment="Center" />
<ComboBox Grid.Row="2" Grid.Column="1" ItemsSource="{Binding Source={StaticResource SmoothModeEnumValues}}" SelectedItem="{Binding Path=LayerModel.Properties.SmoothMode}" VerticalAlignment="Center" Margin="0,5">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource HEnumDescriptionConverter}}" />
<Label Content="{Binding Converter={StaticResource HEnumDescriptionConverter}}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<!-- FlipMode -->
<TextBlock Grid.Row="3" Grid.Column="0" Margin="10,13,10,10" FontSize="13.333" Text="Flip Horizontal:"
Height="18" VerticalAlignment="Top" />
<CheckBox Grid.Row="3" Grid.Column="1" VerticalAlignment="Top" Margin="10,12,10,2" Height="24"
helper:CheckboxEnumFlagHelper.Value="{x:Static model:FlipMode.Horizontal}"
helper:CheckboxEnumFlagHelper.Flags="{Binding Path=LayerModel.Properties.FlipMode}" />
<Label Grid.Row="3" Grid.Column="0" Content="Flip Horizontal:" VerticalAlignment="Center" />
<controls:ToggleSwitchButton Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" HorizontalAlignment="Left" Margin="0,5"
helper:ToggleSwitchButtonEnumFlagHelper.Value="{x:Static model:FlipMode.Horizontal}"
helper:ToggleSwitchButtonEnumFlagHelper.Flags="{Binding Path=LayerModel.Properties.FlipMode}" />
<TextBlock Grid.Row="3" Grid.Column="2" Margin="10,13,10,10" FontSize="13.333" Text="Flip Vertical:"
Height="18" VerticalAlignment="Top" />
<CheckBox Grid.Row="3" Grid.Column="3" VerticalAlignment="Top" Margin="10,12,10,2" Height="24"
helper:CheckboxEnumFlagHelper.Value="{x:Static model:FlipMode.Vertical}"
helper:CheckboxEnumFlagHelper.Flags="{Binding Path=LayerModel.Properties.FlipMode}" />
<Label Grid.Row="3" Grid.Column="2" Content="Flip Vertical:" VerticalAlignment="Center" />
<controls:ToggleSwitchButton Grid.Row="3" Grid.Column="3" VerticalAlignment="Center" Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" HorizontalAlignment="Left" Margin="0,5"
helper:ToggleSwitchButtonEnumFlagHelper.Value="{x:Static model:FlipMode.Vertical}"
helper:ToggleSwitchButtonEnumFlagHelper.Flags="{Binding Path=LayerModel.Properties.FlipMode}" />
<!-- Horizontal offsets -->
<TextBlock Grid.Row="4" Grid.Column="0" Margin="10,20,10,3" FontSize="13.333" Text="Offset"
Height="18" VerticalAlignment="Top" FontWeight="Black" />
<Label Grid.Row="4" Grid.Column="0" Content="Offset" VerticalAlignment="Center" FontWeight="Black" />
<TextBlock Grid.Row="5" Grid.Column="0" Margin="10,13,10,10" FontSize="13.333" Text="Left:"
Height="18" VerticalAlignment="Top" />
<controls:NumericUpDown Grid.Row="5" Grid.Column="1" VerticalAlignment="Top" Minimum="0"
Value="{Binding Path=LayerModel.Properties.OffsetLeft, Mode=TwoWay}"
Margin="10,12,10,2" Height="24" />
<Label Grid.Row="5" Grid.Column="0" Content="Left:" VerticalAlignment="Center" />
<controls:NumericUpDown Grid.Row="5" Grid.Column="1" VerticalAlignment="Center" Minimum="0" Value="{Binding Path=LayerModel.Properties.OffsetLeft, Mode=TwoWay}" Margin="0,5" />
<TextBlock Grid.Row="5" Grid.Column="2" Margin="10,13,10,10" FontSize="13.333" Text="Right:"
Height="18" VerticalAlignment="Top" />
<controls:NumericUpDown Grid.Row="5" Grid.Column="3" VerticalAlignment="Top" Minimum="0"
Value="{Binding Path=LayerModel.Properties.OffsetRight, Mode=TwoWay}"
Margin="10,12,10,2" Height="24" />
<Label Grid.Row="5" Grid.Column="2" Content="Right:" VerticalAlignment="Center" />
<controls:NumericUpDown Grid.Row="5" Grid.Column="3" VerticalAlignment="Center" Minimum="0" Value="{Binding Path=LayerModel.Properties.OffsetRight, Mode=TwoWay}" Margin="0,5" />
<!-- Vertical offsets -->
<TextBlock Grid.Row="6" Grid.Column="0" Margin="10,13,10,10" FontSize="13.333" Text="Top:"
Height="18" VerticalAlignment="Top" />
<controls:NumericUpDown Grid.Row="6" Grid.Column="1" VerticalAlignment="Top" Minimum="0"
Value="{Binding Path=LayerModel.Properties.OffsetTop, Mode=TwoWay}" Margin="10,12,10,2"
Height="24" />
<Label Grid.Row="6" Grid.Column="0" Content="Top:" VerticalAlignment="Center" />
<controls:NumericUpDown Grid.Row="6" Grid.Column="1" VerticalAlignment="Center" Minimum="0" Value="{Binding Path=LayerModel.Properties.OffsetTop, Mode=TwoWay}" Margin="0,5" />
<TextBlock Grid.Row="6" Grid.Column="2" Margin="10,13,10,10" FontSize="13.333" Text="Bottom:"
Height="18" VerticalAlignment="Top" />
<controls:NumericUpDown Grid.Row="6" Grid.Column="3" VerticalAlignment="Top" Minimum="0"
Value="{Binding Path=LayerModel.Properties.OffsetBottom, Mode=TwoWay}"
Margin="10,12,10,2" Height="24" />
<Label Grid.Row="6" Grid.Column="2" Content="Bottom:" VerticalAlignment="Center" />
<controls:NumericUpDown Grid.Row="6" Grid.Column="3" VerticalAlignment="Center" Minimum="0" Value="{Binding Path=LayerModel.Properties.OffsetBottom, Mode=TwoWay}" Margin="0,5" />
<!-- Horizontal BlackBar-detection -->
<TextBlock Grid.Row="7" Grid.Column="0" Margin="10,20,10,3" FontSize="13.333" Text="Black-Bar detection"
Height="18" VerticalAlignment="Top" FontWeight="Black" />
<Label Grid.Row="7" Grid.Column="0" Content="Black-Bar detection" VerticalAlignment="Center" FontWeight="Black" />
<TextBlock Grid.Row="8" Grid.Column="0" Margin="10,13,10,10" FontSize="13.333" Text="Left:"
Height="18" VerticalAlignment="Top" />
<CheckBox Grid.Row="8" Grid.Column="1" VerticalAlignment="Top" Margin="10,12,10,2" Height="24"
helper:CheckboxEnumFlagHelper.Value="{x:Static model:BlackBarDetectionMode.Left}"
helper:CheckboxEnumFlagHelper.Flags="{Binding Path=LayerModel.Properties.BlackBarDetectionMode}" />
<TextBlock Grid.Row="8" Grid.Column="2" Margin="10,13,10,10" FontSize="13.333" Text="Right:"
Height="18" VerticalAlignment="Top" />
<CheckBox Grid.Row="8" Grid.Column="3" VerticalAlignment="Top" Margin="10,12,10,2" Height="24"
helper:CheckboxEnumFlagHelper.Value="{x:Static model:BlackBarDetectionMode.Right}"
helper:CheckboxEnumFlagHelper.Flags="{Binding Path=LayerModel.Properties.BlackBarDetectionMode}" />
<Label Grid.Row="8" Grid.Column="0" Content="Left:" VerticalAlignment="Center" />
<controls:ToggleSwitchButton Grid.Row="8" Grid.Column="1" VerticalAlignment="Center" Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" Margin="0,5"
helper:ToggleSwitchButtonEnumFlagHelper.Value="{x:Static model:BlackBarDetectionMode.Left}"
helper:ToggleSwitchButtonEnumFlagHelper.Flags="{Binding Path=LayerModel.Properties.BlackBarDetectionMode}" />
<Label Grid.Row="8" Grid.Column="2" Content="Right:" VerticalAlignment="Center" />
<controls:ToggleSwitchButton Grid.Row="8" Grid.Column="3" VerticalAlignment="Center" Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" HorizontalAlignment="Left" Margin="0,5"
helper:ToggleSwitchButtonEnumFlagHelper.Value="{x:Static model:BlackBarDetectionMode.Right}"
helper:ToggleSwitchButtonEnumFlagHelper.Flags="{Binding Path=LayerModel.Properties.BlackBarDetectionMode}" />
<!-- Vertical BlackBar-detection -->
<TextBlock Grid.Row="9" Grid.Column="0" Margin="10,13,10,10" FontSize="13.333" Text="Top:"
Height="18" VerticalAlignment="Top" />
<CheckBox Grid.Row="9" Grid.Column="1" VerticalAlignment="Top" Margin="10,12,10,2" Height="24"
helper:CheckboxEnumFlagHelper.Value="{x:Static model:BlackBarDetectionMode.Top}"
helper:CheckboxEnumFlagHelper.Flags="{Binding Path=LayerModel.Properties.BlackBarDetectionMode}" />
<TextBlock Grid.Row="9" Grid.Column="2" Margin="10,13,10,10" FontSize="13.333" Text="Bottom:"
Height="18" VerticalAlignment="Top" />
<CheckBox Grid.Row="9" Grid.Column="3" VerticalAlignment="Top" Margin="10,12,10,2" Height="24"
helper:CheckboxEnumFlagHelper.Value="{x:Static model:BlackBarDetectionMode.Bottom}"
helper:CheckboxEnumFlagHelper.Flags="{Binding Path=LayerModel.Properties.BlackBarDetectionMode}" />
<Label Grid.Row="9" Grid.Column="0" Content="Top:" VerticalAlignment="Center" />
<controls:ToggleSwitchButton Grid.Row="9" Grid.Column="1" VerticalAlignment="Center" Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" HorizontalAlignment="Left" Margin="0,5"
helper:ToggleSwitchButtonEnumFlagHelper.Value="{x:Static model:BlackBarDetectionMode.Top}"
helper:ToggleSwitchButtonEnumFlagHelper.Flags="{Binding Path=LayerModel.Properties.BlackBarDetectionMode}" />
<Label Grid.Row="9" Grid.Column="2" Content="Bottom:" VerticalAlignment="Center" />
<controls:ToggleSwitchButton Grid.Row="9" Grid.Column="3" VerticalAlignment="Center" Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" HorizontalAlignment="Left" Margin="0,5"
helper:ToggleSwitchButtonEnumFlagHelper.Value="{x:Static model:BlackBarDetectionMode.Bottom}"
helper:ToggleSwitchButtonEnumFlagHelper.Flags="{Binding Path=LayerModel.Properties.BlackBarDetectionMode}" />
</Grid>
</UserControl>

View File

@ -1,18 +1,18 @@
using System;
using System.Windows;
using System.Windows.Controls;
using Artemis.Profiles.Layers.Types.AmbientLight.Model.Extensions;
using MahApps.Metro.Controls;
namespace Artemis.Profiles.Layers.Types.AmbientLight.Helper
{
public class CheckboxEnumFlagHelper
public class ToggleSwitchButtonEnumFlagHelper
{
#region DependencyProperties
// ReSharper disable InconsistentNaming
public static readonly DependencyProperty FlagsProperty = DependencyProperty.RegisterAttached(
"Flags", typeof(Enum), typeof(CheckboxEnumFlagHelper),
"Flags", typeof(Enum), typeof(ToggleSwitchButtonEnumFlagHelper),
new FrameworkPropertyMetadata(default(Enum), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
FlagsChanged));
@ -27,7 +27,7 @@ namespace Artemis.Profiles.Layers.Types.AmbientLight.Helper
}
public static readonly DependencyProperty ValueProperty = DependencyProperty.RegisterAttached(
"Value", typeof(Enum), typeof(CheckboxEnumFlagHelper), new PropertyMetadata(default(Enum), ValueChanged));
"Value", typeof(Enum), typeof(ToggleSwitchButtonEnumFlagHelper), new PropertyMetadata(default(Enum), ValueChanged));
public static void SetValue(DependencyObject element, Enum value)
{
@ -48,50 +48,54 @@ namespace Artemis.Profiles.Layers.Types.AmbientLight.Helper
private static void FlagsChanged(DependencyObject dependencyObject,
DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
{
UpdateTarget(dependencyObject as CheckBox, dependencyPropertyChangedEventArgs.NewValue as Enum);
UpdateTarget(dependencyObject as ToggleSwitchButton, dependencyPropertyChangedEventArgs.NewValue as Enum);
}
private static void ValueChanged(DependencyObject dependencyObject,
DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
{
var checkbox = dependencyObject as CheckBox;
if (checkbox == null) return;
var toggleSwitchButton = dependencyObject as ToggleSwitchButton;
if (toggleSwitchButton == null)
return;
checkbox.Checked -= UpdateSource;
checkbox.Unchecked -= UpdateSource;
toggleSwitchButton.Checked -= UpdateSource;
toggleSwitchButton.Unchecked -= UpdateSource;
if (dependencyPropertyChangedEventArgs.NewValue != null)
{
checkbox.Checked += UpdateSource;
checkbox.Unchecked += UpdateSource;
toggleSwitchButton.Checked += UpdateSource;
toggleSwitchButton.Unchecked += UpdateSource;
}
UpdateTarget(checkbox, GetFlags(checkbox));
UpdateTarget(toggleSwitchButton, GetFlags(toggleSwitchButton));
}
private static void UpdateTarget(CheckBox checkbox, Enum flags)
private static void UpdateTarget(ToggleSwitchButton toggleSwitchButton, Enum flags)
{
if (checkbox == null) return;
if (toggleSwitchButton == null)
return;
var value = GetValue(checkbox);
checkbox.IsChecked = value != null && (flags?.HasFlag(value) ?? false);
var value = GetValue(toggleSwitchButton);
toggleSwitchButton.IsChecked = value != null && (flags?.HasFlag(value) ?? false);
}
private static void UpdateSource(object sender, RoutedEventArgs routedEventArgs)
{
var checkbox = sender as CheckBox;
if (checkbox == null) return;
var toggleSwitchButton = sender as ToggleSwitchButton;
if (toggleSwitchButton == null)
return;
var flags = GetFlags(checkbox);
var value = GetValue(checkbox);
if (value == null) return;
var flags = GetFlags(toggleSwitchButton);
var value = GetValue(toggleSwitchButton);
if (value == null)
return;
if (checkbox.IsChecked ?? false)
SetFlags(checkbox, flags == null ? value : flags.SetFlag(value, true, flags.GetType()));
if (toggleSwitchButton.IsChecked ?? false)
SetFlags(toggleSwitchButton, flags == null ? value : flags.SetFlag(value, true, flags.GetType()));
else
SetFlags(checkbox, flags?.SetFlag(value, false, flags.GetType()));
SetFlags(toggleSwitchButton, flags?.SetFlag(value, false, flags.GetType()));
}
#endregion
}
}
}

View File

@ -1,26 +1,26 @@
<UserControl x:Class="Artemis.Profiles.Layers.Types.Audio.AudioPropertiesView"
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:ncore="http://schemas.ncore.com/wpf/xaml/colorbox"
xmlns:properties="clr-namespace:Artemis.Profiles.Layers.Types.Audio"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:converters="clr-namespace:Artemis.Utilities.Converters"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="500">
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:ncore="http://schemas.ncore.com/wpf/xaml/colorbox"
xmlns:properties="clr-namespace:Artemis.Profiles.Layers.Types.Audio"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:converters="clr-namespace:Artemis.Utilities.Converters"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="500">
<UserControl.Resources>
<converters:EnumDescriptionConverter x:Key="HEnumDescriptionConverter" />
<ObjectDataProvider MethodName="GetValues"
ObjectType="{x:Type system:Enum}"
x:Key="MmDeviceTypeEnumValues">
ObjectType="{x:Type system:Enum}"
x:Key="MmDeviceTypeEnumValues">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="properties:MmDeviceType" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider MethodName="GetValues"
ObjectType="{x:Type system:Enum}"
x:Key="DirectionEnumValues">
ObjectType="{x:Type system:Enum}"
x:Key="DirectionEnumValues">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="properties:Direction" />
</ObjectDataProvider.MethodParameters>
@ -28,25 +28,22 @@
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Animation -->
<TextBlock Grid.Row="0" Grid.Column="0" Margin="10" FontSize="13.333" Text="Animation:"
VerticalAlignment="Center"
Height="18" />
<ComboBox Grid.Row="0" Grid.Column="1" Margin="10,10,10,0" x:Name="LayerAnimations" VerticalAlignment="Top"
Height="22">
<Label Grid.Row="0" Grid.Column="0" Content="Animation:" VerticalAlignment="Center" />
<ComboBox Grid.Row="0" Grid.Column="1" x:Name="LayerAnimations" VerticalAlignment="Center" Margin="0,5">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name, Mode=OneWay}" />
@ -55,53 +52,38 @@
</ComboBox>
<!-- Animation Speed -->
<TextBlock Grid.Row="0" Grid.Column="2" Margin="10" FontSize="13.333" Text="Animation speed:"
VerticalAlignment="Center" Height="18" />
<Slider Grid.Row="0" Grid.Column="3" VerticalAlignment="Center"
TickPlacement="None" TickFrequency="0.05"
Value="{Binding Path=LayerModel.Properties.AnimationSpeed, Mode=TwoWay}" Minimum="0.05" Maximum="3"
SmallChange="0" IsSnapToTickEnabled="True" Margin="10,12,10,2" Height="24" />
<Label Grid.Row="0" Grid.Column="2" Content="Animation speed:" VerticalAlignment="Center" Margin="5,0,0,0" />
<Slider Grid.Row="0" Grid.Column="3" VerticalAlignment="Center" TickPlacement="None" TickFrequency="0.05"
Value="{Binding Path=LayerModel.Properties.AnimationSpeed, Mode=TwoWay}" Minimum="0.05" Maximum="3" SmallChange="0" IsSnapToTickEnabled="True" Margin="0,5" />
<!-- Device type -->
<TextBlock Grid.Row="1" Grid.Column="0" Margin="10,13,10,10" FontSize="13.333" Text="Device type:"
Height="18" VerticalAlignment="Top" />
<ComboBox Grid.Row="1" Grid.Column="1" ItemsSource="{Binding Source={StaticResource MmDeviceTypeEnumValues}}"
Margin="10,10,10,0" SelectedItem="{Binding Path=DeviceType}"
VerticalAlignment="Top" Height="22">
<Label Grid.Row="1" Grid.Column="0" Content="Device type:" VerticalAlignment="Center" />
<ComboBox Grid.Row="1" Grid.Column="1" ItemsSource="{Binding Source={StaticResource MmDeviceTypeEnumValues}}" SelectedItem="{Binding Path=DeviceType}" VerticalAlignment="Center" Margin="0,5">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource HEnumDescriptionConverter}}" />
<Label Content="{Binding Converter={StaticResource HEnumDescriptionConverter}}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<!-- Device -->
<TextBlock Grid.Row="1" Grid.Column="2" Margin="10,13,10,10" FontSize="13.333" Text="Device:"
VerticalAlignment="Top" Height="18" />
<ComboBox Grid.Row="1" Grid.Column="3" x:Name="Devices" Margin="10,10,10,0" VerticalAlignment="Top" />
<Label Grid.Row="1" Grid.Column="2" Content="Device:" VerticalAlignment="Center" Margin="5,0,0,0" />
<ComboBox Grid.Row="1" Grid.Column="3" x:Name="Devices" VerticalAlignment="Center" Margin="0,5" />
<!-- Colors -->
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" x:Name="ShowBrush">
<TextBlock Margin="10,13,10,0" FontSize="13.333" Text="Color(s):"
VerticalAlignment="Top" Height="18" Width="130" />
<Border Margin="10" BorderBrush="{StaticResource ControlBorderBrush}"
BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit">
<ncore:ColorBox Brush="{Binding Path=Brush, Mode=TwoWay}" ShowNone="False" Height="24" Width="134"
VerticalAlignment="Top" />
</Border>
</StackPanel>
<Label Grid.Row="2" Grid.Column="0" Content="Color(s):" VerticalAlignment="Center" />
<Border Grid.Row="2" Grid.Column="1" BorderBrush="{StaticResource ControlBorderBrush}" BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit" Height="26" Margin="0,5">
<ncore:ColorBox Brush="{Binding Path=Brush, Mode=TwoWay}" ShowNone="False" VerticalAlignment="Stretch" />
</Border>
<!-- Bar direction -->
<TextBlock Grid.Row="2" Grid.Column="2" Margin="10,13,10,10" FontSize="13.333" Text="Bar direction:"
VerticalAlignment="Top" Height="18" />
<ComboBox Grid.Row="2" Grid.Column="3" ItemsSource="{Binding Source={StaticResource DirectionEnumValues}}"
Margin="10,10,10,0" SelectedItem="{Binding Path=LayerModel.Properties.Direction}"
VerticalAlignment="Top" Height="22">
<Label Grid.Row="2" Grid.Column="2" Content="Bar direction:" VerticalAlignment="Center" Margin="5,0,0,0" />
<ComboBox Grid.Row="2" Grid.Column="3" ItemsSource="{Binding Source={StaticResource DirectionEnumValues}}" SelectedItem="{Binding Path=LayerModel.Properties.Direction}" VerticalAlignment="Center" Margin="0,5">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource HEnumDescriptionConverter}}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</UserControl>

View File

@ -1,36 +1,33 @@
<UserControl x:Class="Artemis.Profiles.Layers.Types.Keyboard.KeyboardPropertiesView"
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:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:ncore="http://schemas.ncore.com/wpf/xaml/colorbox"
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="500">
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:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:ncore="http://schemas.ncore.com/wpf/xaml/colorbox"
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="500">
<Grid>
<!-- Colors -->
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Animation -->
<TextBlock Grid.Row="0" Grid.Column="0" Margin="10" FontSize="13.333" Text="Animation:"
VerticalAlignment="Center"
Height="18" />
<ComboBox Grid.Row="0" Grid.Column="1" Margin="10,10,10,0" x:Name="LayerAnimations" VerticalAlignment="Top"
Height="22">
<Label Grid.Row="0" Grid.Column="0" Content="Animation:" VerticalAlignment="Center" Margin="0,0,5,0" />
<ComboBox Grid.Row="0" Grid.Column="1" x:Name="LayerAnimations" VerticalAlignment="Center">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name, Mode=OneWay}" />
@ -39,32 +36,19 @@
</ComboBox>
<!-- Animation Speed -->
<TextBlock Grid.Row="0" Grid.Column="2" Margin="10" FontSize="13.333" Text="Animation speed:"
VerticalAlignment="Center" Height="18" />
<Slider x:Name="RotationSpeed" Grid.Row="0" Grid.Column="3" VerticalAlignment="Center"
TickPlacement="None" TickFrequency="0.05"
Value="{Binding Path=LayerModel.Properties.AnimationSpeed, Mode=TwoWay}" Minimum="0.05" Maximum="3"
SmallChange="0" IsSnapToTickEnabled="True" Margin="10,12,10,2" Height="24" />
<Label Grid.Row="0" Grid.Column="2" Content="Animation speed:" VerticalAlignment="Center" Margin="5,0" />
<Slider x:Name="RotationSpeed" Grid.Row="0" Grid.Column="3" VerticalAlignment="Center" TickPlacement="None" TickFrequency="0.05" Value="{Binding Path=LayerModel.Properties.AnimationSpeed, Mode=TwoWay}"
Minimum="0.05" Maximum="3" SmallChange="0" IsSnapToTickEnabled="True" />
<!-- ClippingType -->
<TextBlock Grid.Row="1" Grid.Column="0" Margin="10, 13, 10, 10" FontSize="13.333" Text="Clipping type:"
VerticalAlignment="Center" Height="23" />
<controls:ToggleSwitch IsChecked="{Binding Path=LayerModel.Properties.Contain, Mode=TwoWay}"
Grid.Row="1"
Grid.Column="1" OnLabel="Contain" OffLabel="Cut-off" Margin="10,1,5,1"
VerticalAlignment="Center"
Height="36" />
<Label Grid.Row="1" Grid.Column="0" Content="Clipping type:" VerticalAlignment="Center" Margin="0,0,5,0" />
<controls:ToggleSwitch Grid.Row="1" Grid.Column="1" IsChecked="{Binding Path=LayerModel.Properties.Contain, Mode=TwoWay}" OnLabel="Contain" OffLabel="Cut-off" VerticalAlignment="Center" Style="{StaticResource MahApps.Metro.Styles.ToggleSwitch.Win10}" Margin="0,10" />
<!-- Colors -->
<StackPanel Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Orientation="Horizontal" x:Name="ShowBrush">
<TextBlock Margin="10,13,10,0" FontSize="13.333" Text="Color(s):"
VerticalAlignment="Top" Height="18" Width="130" />
<Border Margin="10" BorderBrush="{StaticResource ControlBorderBrush}"
BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit">
<ncore:ColorBox Brush="{Binding Path=Brush, Mode=TwoWay}" ShowNone="False" Height="24" Width="134"
VerticalAlignment="Top" />
</Border>
</StackPanel>
<Label Grid.Row="1" Grid.Column="2" Content="Color(s):" VerticalAlignment="Center" Margin="5,0" />
<Border Grid.Row="1" Grid.Column="3" BorderBrush="{StaticResource ControlBorderBrush}" BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit" Height="26">
<ncore:ColorBox Brush="{Binding Path=Brush, Mode=TwoWay}" ShowNone="False" VerticalAlignment="Stretch" />
</Border>
<!-- GIF settings -->
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" x:Name="ShowGif">
@ -78,28 +62,25 @@
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Margin="10,5,10,0" FontSize="13.333" Text="GIF file:"
VerticalAlignment="Top" Height="18" />
<Grid Grid.Row="0" Grid.Column="1" ColumnSpan="3" Margin="5,2,10,0" VerticalAlignment="Top">
<TextBox Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
Text="{Binding Path=LayerModel.Properties.GifFile, Mode=TwoWay}" />
<Button x:Name="BrowseGif" Content="..." RenderTransformOrigin="-0.039,-0.944"
HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="25" />
<Label Grid.Row="0" Grid.Column="0" Content="GIF file:" VerticalAlignment="Center" />
<Grid Grid.Row="0" Grid.Column="1" ColumnSpan="3" VerticalAlignment="Top">
<TextBox TextWrapping="Wrap" Text="{Binding Path=LayerModel.Properties.GifFile, Mode=TwoWay}" />
<Button x:Name="BrowseGif" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="25" />
</Grid>
<TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4" Margin="10,2,10,10" FontSize="13.333"
Foreground="{DynamicResource HighlightBrush}"
VerticalAlignment="Top" Height="Auto" TextWrapping="Wrap" ><Run Text="Note: It is recommended to use very tiny gifs (25x7 per example, for size per keyboard see FAQ). "/><LineBreak/><Run Text="Any higher will degrade performance without any noticeable quality difference."/></TextBlock>
<TextBlock Margin="5" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4" Foreground="{DynamicResource HighlightBrush}" VerticalAlignment="Top" Height="Auto" TextWrapping="Wrap">
<Run Text="Note: It is recommended to use very tiny gifs (25x7 per example, for size per keyboard see FAQ). " /><LineBreak /><Run Text="Any higher will degrade performance without any noticeable quality difference." />
</TextBlock>
</Grid>
<!-- Dynamic -->
<Label Grid.Row="3" Grid.Column="0" FontSize="20" HorizontalAlignment="Left"
Content="Dynamic" Width="97" VerticalAlignment="Bottom" />
<Label Grid.Row="3" Grid.Column="0" FontSize="20" Content="Dynamic" />
<!-- Dynamic property views -->
<ContentControl Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="4" x:Name="HeightProperties" />
<ContentControl Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4" x:Name="WidthProperties" />
<ContentControl Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="4" x:Name="OpacityProperties" />
<!-- Tweening -->
<ContentControl Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="4" x:Name="LayerTweenViewModel" />
</Grid>
</UserControl>

View File

@ -45,5 +45,18 @@ namespace Artemis.Utilities.Keyboard
public static event KeyCallbackHandler KeyUpCallback;
public static event MouseCallbackHandler MouseDownCallback;
public static event MouseCallbackHandler MouseUpCallback;
public static void Dispose()
{
if (_globalHook == null)
return;
_globalHook.KeyDown -= GlobalHookOnKeyDown;
_globalHook.KeyUp -= GlobalHookOnKeyUp;
_globalHook.MouseDown -= GlobalHookOnMouseDown;
_globalHook.MouseUp -= GlobalHookOnMouseUp;
_globalHook.Dispose();
_globalHook = null;
}
}
}

View File

@ -128,7 +128,8 @@ namespace Artemis.ViewModels
get { return _profileNames; }
set
{
if (Equals(value, _profileNames)) return;
if (Equals(value, _profileNames))
return;
_profileNames = value;
NotifyOfPropertyChange(() => ProfileNames);
}
@ -139,7 +140,8 @@ namespace Artemis.ViewModels
get { return _layers; }
set
{
if (Equals(value, _layers)) return;
if (Equals(value, _layers))
return;
_layers = value;
NotifyOfPropertyChange(() => Layers);
}
@ -151,7 +153,8 @@ namespace Artemis.ViewModels
get { return _keyboardPreview; }
set
{
if (Equals(value, _keyboardPreview)) return;
if (Equals(value, _keyboardPreview))
return;
_keyboardPreview = value;
NotifyOfPropertyChange(() => KeyboardPreview);
}
@ -162,7 +165,8 @@ namespace Artemis.ViewModels
get { return _showAll; }
set
{
if (value == _showAll) return;
if (value == _showAll)
return;
_showAll = value;
NotifyOfPropertyChange();
}
@ -626,13 +630,8 @@ namespace Artemis.ViewModels
if (_draggingLayer != null)
return;
var keyboard = _deviceManager.ActiveKeyboard;
var pos = e.GetPosition((Image) e.OriginalSource);
var x = pos.X / ((double) keyboard.PreviewSettings.Width / keyboard.Width);
var y = pos.Y / ((double) keyboard.PreviewSettings.Height / keyboard.Height);
var hoverLayer = GetLayers().Where(l => l.MustDraw())
.FirstOrDefault(l => l.Properties.PropertiesRect(1).Contains(x, y));
var hoverLayer = GetLayers().Where(l => l.MustDraw()).FirstOrDefault(l => l.Properties.PropertiesRect(1).Contains(pos.X, pos.Y));
if (hoverLayer != null)
SelectedLayer = hoverLayer;
@ -648,13 +647,9 @@ namespace Artemis.ViewModels
return;
var pos = e.GetPosition((Image) e.OriginalSource);
var keyboard = _deviceManager.ActiveKeyboard;
var x = pos.X / ((double) keyboard.PreviewSettings.Width / keyboard.Width);
var y = pos.Y / ((double) keyboard.PreviewSettings.Height / keyboard.Height);
var hoverLayer = GetLayers().Where(l => l.MustDraw())
.FirstOrDefault(l => l.Properties.PropertiesRect(1).Contains(x, y));
var hoverLayer = GetLayers().Where(l => l.MustDraw()).FirstOrDefault(l => l.Properties.PropertiesRect(1).Contains(pos.X, pos.Y));
HandleDragging(e, x, y, hoverLayer);
HandleDragging(e, pos.X, pos.Y, hoverLayer);
if (hoverLayer == null)
{
@ -666,10 +661,9 @@ namespace Artemis.ViewModels
if (hoverLayer == SelectedLayer)
{
var rect = hoverLayer.Properties.PropertiesRect(1);
KeyboardPreviewCursor =
Math.Sqrt(Math.Pow(x - rect.BottomRight.X, 2) + Math.Pow(y - rect.BottomRight.Y, 2)) < 0.6
? Cursors.SizeNWSE
: Cursors.SizeAll;
KeyboardPreviewCursor = Math.Sqrt(Math.Pow(pos.X - rect.BottomRight.X, 2) + Math.Pow(pos.Y - rect.BottomRight.Y, 2)) < 0.6
? Cursors.SizeNWSE
: Cursors.SizeAll;
}
else
{
@ -682,7 +676,8 @@ namespace Artemis.ViewModels
get { return _keyboardPreviewCursor; }
set
{
if (Equals(value, _keyboardPreviewCursor)) return;
if (Equals(value, _keyboardPreviewCursor))
return;
_keyboardPreviewCursor = value;
NotifyOfPropertyChange(() => KeyboardPreviewCursor);
}
@ -878,4 +873,4 @@ namespace Artemis.ViewModels
#endregion
}
}
}

View File

@ -1,18 +1,17 @@
<controls:MetroWindow x:Class="Artemis.Views.LayerEditorView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:utilities="clr-namespace:Artemis.Utilities"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
Title="Artemis | Edit Layer" Height="860" Width="630"
xmlns:cal="http://www.caliburnproject.org"
xmlns:converters="clr-namespace:Artemis.Utilities.Converters"
xmlns:models="clr-namespace:Artemis.Profiles.Layers.Models"
GlowBrush="{DynamicResource AccentColorBrush}" Icon="../../Resources/bow.png"
ResizeMode="NoResize">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
Title="Artemis | Edit Layer" Height="600" Width="1100"
xmlns:cal="http://www.caliburnproject.org"
xmlns:converters="clr-namespace:Artemis.Utilities.Converters"
xmlns:models="clr-namespace:Artemis.Profiles.Layers.Models"
GlowBrush="{DynamicResource AccentColorBrush}" Icon="../../Resources/bow.png"
ResizeMode="CanResizeWithGrip">
<controls:MetroWindow.Resources>
<converters:EnumDescriptionConverter x:Key="HEnumDescriptionConverter" />
<ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type sys:Enum}" x:Key="ConditionTypeValues">
@ -24,111 +23,97 @@
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid Margin="10,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="*" />
<RowDefinition Height="60" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Row="0">
<!-- Header -->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="65" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="65" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.ColumnSpan="4" FontSize="20" Content="Basics" />
<!-- First column -->
<StackPanel Grid.Column="0" Grid.Row="0">
<!-- Basic -->
<Label FontSize="20" Content="Basics" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Layer name -->
<TextBlock Grid.Row="1" Grid.Column="0" Margin="10,12" FontSize="13.333" Text="Name:"
VerticalAlignment="Center" Height="18" />
<TextBox Grid.Row="1" Grid.Column="1" x:Name="Name" Margin="10" Width="200"
Text="{Binding Path=ProposedLayer.Name}" />
<!-- Layer name -->
<Label Grid.Row="0" Grid.Column="0" Content="Name:" VerticalAlignment="Center" HorizontalAlignment="Left" />
<TextBox Grid.Row="0" Grid.Column="1" x:Name="Name" Margin="10" Text="{Binding Path=ProposedLayer.Name}" VerticalAlignment="Center" />
<!-- Layer type -->
<TextBlock Grid.Row="1" Grid.Column="2" Margin="10,12" FontSize="13.333" Text="Type:"
VerticalAlignment="Center" Height="18" />
<!-- Layer type -->
<Label Grid.Row="0" Grid.Column="2" Content="Type:" VerticalAlignment="Center" />
<ComboBox Grid.Row="0" Grid.Column="3" Margin="10" x:Name="LayerTypes" VerticalAlignment="Center">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name, Mode=OneWay}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<ComboBox Grid.Row="1" Grid.Column="3" Margin="10" Width="120" x:Name="LayerTypes">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name, Mode=OneWay}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<!-- Event toggle -->
<Label Grid.Row="0" Grid.Column="4" Content="Is event: " VerticalAlignment="Center" />
<controls:ToggleSwitchButton Grid.Row="0" Grid.Column="5" VerticalAlignment="Center" IsChecked="{Binding Path=ProposedLayer.IsEvent, Mode=TwoWay}" cal:Message.Attach="[Event Click] = [Action ToggleIsEvent]"
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" HorizontalAlignment="Left" Margin="10" />
</Grid>
<!-- Event toggle -->
<Label Grid.Row="1" Grid.Column="4" Content="Is event: " Margin="0 3 0 0" HorizontalAlignment="Right"
VerticalAlignment="Center" />
<ToggleButton Grid.Row="1" Grid.Column="5" Margin="0,4,6,0" Width="25" Height="25"
IsChecked="{Binding Path=ProposedLayer.IsEvent}"
Style="{DynamicResource MetroCircleToggleButtonStyle}" VerticalAlignment="Center"
cal:Message.Attach="[Event Click] = [Action ToggleIsEvent]" />
</Grid>
<!-- Advanced -->
<Label FontSize="20" Content="Advanced" />
<!-- Properties -->
<ContentControl x:Name="LayerPropertiesViewModel" />
</StackPanel>
<!-- Condition editor -->
<Grid Grid.Row="2" Grid.Column="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label FontSize="20" Content="Display if.." Grid.Column="0" />
<ComboBox SelectedItem="{Binding Path=ProposedLayer.Properties.ConditionType}" Grid.Column="1"
ItemsSource="{Binding Source={StaticResource ConditionTypeValues}}" Margin="10,0"
VerticalAlignment="Center" Height="22">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource HEnumDescriptionConverter}}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<Border Grid.Row="3" Grid.Column="0" BorderThickness="1" BorderBrush="{StaticResource GrayBrush7}"
Margin="10,0" SnapsToDevicePixels="True">
<ListBox Height="138" x:Name="LayerConditionVms" ScrollViewer.VerticalScrollBarVisibility="Visible">
<ListBox.Template>
<ControlTemplate>
<ScrollViewer>
<ItemsPresenter />
</ScrollViewer>
</ControlTemplate>
</ListBox.Template>
</ListBox>
</Border>
<Button Grid.Row="4" x:Name="AddCondition" Content="Add condition" VerticalAlignment="Center"
Style="{DynamicResource SquareButtonStyle}" Width="95" HorizontalAlignment="Right" Height="30"
Margin="0,10,10,10" ScrollViewer.VerticalScrollBarVisibility="Auto" />
<!-- Second column -->
<StackPanel Grid.Column="1" Grid.Row="0">
<Label FontSize="20" Content="Conditions" />
<!-- Conditions -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label FontSize="16" Content="Display if.." Grid.Column="0" />
<ComboBox SelectedItem="{Binding Path=ProposedLayer.Properties.ConditionType}" Grid.Column="1" ItemsSource="{Binding Source={StaticResource ConditionTypeValues}}" Margin="10,0" VerticalAlignment="Center" Height="22">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource HEnumDescriptionConverter}}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<Border BorderThickness="1" BorderBrush="{StaticResource GrayBrush7}" Margin="10,0" SnapsToDevicePixels="True">
<ListBox Height="138" x:Name="LayerConditionVms" ScrollViewer.VerticalScrollBarVisibility="Visible">
<ListBox.Template>
<ControlTemplate>
<ScrollViewer>
<ItemsPresenter />
</ScrollViewer>
</ControlTemplate>
</ListBox.Template>
</ListBox>
</Border>
<Button x:Name="AddCondition" Content="Add condition" VerticalAlignment="Center" Style="{DynamicResource SquareButtonStyle}" Width="95" HorizontalAlignment="Right" Height="30" Margin="0,10,10,10" ScrollViewer.VerticalScrollBarVisibility="Auto" />
<!-- Advanced -->
<Label Grid.Row="4" Grid.Column="0" FontSize="20" HorizontalAlignment="Left"
Content="Advanced" Width="97" VerticalAlignment="Bottom" />
<!-- Event settings -->
<ContentControl x:Name="EventPropertiesViewModel" />
</StackPanel>
<!-- Advanced settings -->
<ContentControl Grid.Row="5" Grid.Column="0" x:Name="LayerPropertiesViewModel" />
<!-- Event settings -->
<ContentControl Grid.Row="6" Grid.Column="0" x:Name="EventPropertiesViewModel" />
<StackPanel Grid.Row="7" Grid.Column="0" Orientation="Horizontal">
<Button x:Name="Apply" Content="Apply" VerticalAlignment="Bottom"
Style="{DynamicResource SquareButtonStyle}" Width="95" HorizontalAlignment="Left"
Margin="10,0,0,20"
Height="30" />
<Button x:Name="PreSelect" Content="Reset" VerticalAlignment="Bottom"
Style="{DynamicResource SquareButtonStyle}" Width="95" HorizontalAlignment="Left"
Margin="10,0,0,20"
Height="30" />
<!-- Buttons -->
<StackPanel Grid.Column="0" Grid.Row="1" Orientation="Horizontal">
<Button x:Name="Apply" Content="Apply" VerticalAlignment="Bottom" Style="{DynamicResource SquareButtonStyle}" Width="95" HorizontalAlignment="Left" Margin="10,0,0,20" Height="30" />
<Button x:Name="PreSelect" Content="Reset" VerticalAlignment="Bottom" Style="{DynamicResource SquareButtonStyle}" Width="95" HorizontalAlignment="Left" Margin="10,0,0,20" Height="30" />
</StackPanel>
</Grid>
</ScrollViewer>

View File

@ -34,8 +34,10 @@
</Border.Effect>
<Grid>
<Image Grid.Column="0" Grid.Row="0" Source="{Binding Path=KeyboardImage}" MinHeight="10" MinWidth="10" Stretch="Uniform" />
<Image Grid.Column="0" Grid.Row="0" Source="{Binding Path=KeyboardPreview}" Opacity="0.8" Stretch="Uniform" Cursor="{Binding Path=KeyboardPreviewCursor}" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
cal:Message.Attach="[Event MouseMove] = [Action MouseMoveKeyboardPreview($eventArgs)]; [Event MouseDown] = [Action MouseDownKeyboardPreview($eventArgs)]; [Event MouseUp] = [Action MouseUpKeyboardPreview($eventArgs)]" />
<Image Grid.Column="0" Grid.Row="0" Source="{Binding Path=KeyboardPreview}" Opacity="0.8" Stretch="Uniform" Cursor="{Binding Path=KeyboardPreviewCursor}"
IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}" Margin="{Binding Path=PreviewSettings.Margin}"
cal:Message.Attach="[Event MouseMove] = [Action MouseMoveKeyboardPreview($eventArgs)]; [Event MouseDown] = [Action MouseDownKeyboardPreview($eventArgs)];
[Event MouseUp] = [Action MouseUpKeyboardPreview($eventArgs)]" />
</Grid>
</Border>
</Border>
@ -153,7 +155,7 @@
<Border Grid.Column="1" Grid.Row="1" Background="#FF232323" BorderBrush="{DynamicResource HighlightBrush}" BorderThickness="3" Margin="5,0,-5,0" Width="235">
<TreeView x:Name="ProfileTree" dragDrop:DragDrop.IsDragSource="True" dragDrop:DragDrop.IsDropTarget="True" dragDrop:DragDrop.DropHandler="{Binding}"
ItemsSource="{Binding Path=Layers, Converter={StaticResource LayerOrderConverter}, ConverterParameter=Order}" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
cal:Message.Attach="[Event MouseDoubleClick] = [Action EditLayerFromDoubleClick]">
cal:Message.Attach="[Event MouseDoubleClick] = [Action EditLayerFromDoubleClick]">
<i:Interaction.Behaviors>
<itemBehaviours:BindableSelectedItemBehavior
SelectedItem="{Binding SelectedLayer, Mode=TwoWay}" />

View File

@ -1,12 +1,10 @@
<UserControl x:Class="Artemis.Views.Profiles.LayerConditionView"
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:cal="http://www.caliburnproject.org"
xmlns:utilities="clr-namespace:Artemis.Utilities"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
mc:Ignorable="d" d:DesignWidth="613.296" Height="46">
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:controls="http://metro.mahapps.com/winfx/xaml/controls"
mc:Ignorable="d" d:DesignWidth="600">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
@ -14,66 +12,58 @@
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid Margin="10">
<Grid Margin="1,5,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="30" />
<ColumnDefinition Name="Col1" Width="2*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Left -->
<ComboBox x:Name="DataModelProps" Grid.Column="0" Width="210" MaxDropDownHeight="400"
HorizontalAlignment="Center" VerticalAlignment="Top">
<ComboBox Grid.Column="0" x:Name="DataModelProps" Width="{Binding ElementName=WidthLabel, Path=ActualWidth}" MaxDropDownHeight="400" VerticalAlignment="Top" Panel.ZIndex="2">
<ComboBox.ItemTemplate>
<DataTemplate>
<Grid MinWidth="522">
<Grid Width="512">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Path=Display}" HorizontalAlignment="Left" />
<TextBlock Grid.Column="1" FontWeight="Bold" Text="{Binding Path=DisplayType}"
HorizontalAlignment="Right" />
<TextBlock Grid.Column="1" FontWeight="Bold" Text="{Binding Path=DisplayType}" HorizontalAlignment="Right" Margin="10,0,0,0" />
</Grid>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Label Grid.Column="0" Name="WidthLabel" Panel.ZIndex="1"></Label>
<!-- Center -->
<TextBlock Grid.Column="1" Text="is" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,3,0,0" />
<ComboBox x:Name="Operators" Grid.Column="2" Width="150" MaxDropDownHeight="125" HorizontalAlignment="Center"
VerticalAlignment="Top" DisplayMemberPath="Display" />
<TextBlock Grid.Column="1" Text="is" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5,0" />
<ComboBox x:Name="Operators" Grid.Column="2" MaxDropDownHeight="125" VerticalAlignment="Top" DisplayMemberPath="Display" />
<!-- Right -->
<Grid Grid.Column="3" HorizontalAlignment="Left" Margin="10,0,0,0" Width="148">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" x:Name="KeybindIsVisible" HorizontalAlignment="Left" VerticalAlignment="Top">
<controls:HotKeyBox HotKey="{Binding Path=HotKey}" VerticalAlignment="Center" HorizontalAlignment="Left" Width="110" Watermark="Enter keybind" />
<Grid Grid.Column="3" Margin="10,0,0,0">
<StackPanel Grid.Column="0" x:Name="KeybindIsVisible" VerticalAlignment="Top">
<controls:HotKeyBox HotKey="{Binding Path=HotKey}" VerticalAlignment="Center" Watermark="Enter keybind" />
</StackPanel>
<StackPanel Grid.Column="0" x:Name="UserValueIsVisible" HorizontalAlignment="Left" VerticalAlignment="Top">
<TextBox x:Name="UserValue" VerticalAlignment="Center" HorizontalAlignment="Left" Width="110" controls:TextBoxHelper.Watermark="Enter value" />
<StackPanel Grid.Column="0" x:Name="UserValueIsVisible" VerticalAlignment="Top">
<TextBox x:Name="UserValue" VerticalAlignment="Center" controls:TextBoxHelper.Watermark="Enter value" />
</StackPanel>
<StackPanel Grid.Column="0" x:Name="UserDropdownValueIsVisible" HorizontalAlignment="Left" VerticalAlignment="Top">
<ComboBox x:Name="DropdownValues" Width="110" MaxDropDownHeight="125" HorizontalAlignment="Center"
VerticalAlignment="Top" />
<StackPanel Grid.Column="0" x:Name="UserDropdownValueIsVisible" VerticalAlignment="Top">
<ComboBox x:Name="DropdownValues" MaxDropDownHeight="125" VerticalAlignment="Top" />
</StackPanel>
<Button Grid.Column="1" x:Name="Delete" Width="26" Height="26" Style="{DynamicResource SquareButtonStyle}"
VerticalAlignment="Top" HorizontalAlignment="Right">
<Button.Content>
<Rectangle
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
Width="12" Height="12">
<Rectangle.OpacityMask>
<VisualBrush Visual="{StaticResource appbar_delete}" Stretch="Fill" />
</Rectangle.OpacityMask>
</Rectangle>
</Button.Content>
</Button>
</Grid>
<!-- Delete button -->
<Button Grid.Column="4" x:Name="Delete" Width="22" Height="22" Style="{DynamicResource SquareButtonStyle}" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="10,0,0,0">
<Button.Content>
<Rectangle
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
<Rectangle.OpacityMask>
<VisualBrush Visual="{StaticResource appbar_delete}" Stretch="Fill" />
</Rectangle.OpacityMask>
</Rectangle>
</Button.Content>
</Button>
</Grid>
</UserControl>

View File

@ -1,16 +1,14 @@
<UserControl x:Class="Artemis.Views.Profiles.LayerDynamicPropertiesView"
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:utilities="clr-namespace:Artemis.Utilities"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:models="clr-namespace:Artemis.Profiles.Layers.Models"
xmlns:converters="clr-namespace:Artemis.Utilities.Converters"
mc:Ignorable="d"
d:DesignHeight="40" d:DesignWidth="500">
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:sys="clr-namespace:System;assembly=mscorlib"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:models="clr-namespace:Artemis.Profiles.Layers.Models"
xmlns:converters="clr-namespace:Artemis.Utilities.Converters"
mc:Ignorable="d"
d:DesignWidth="500">
<UserControl.Resources>
<converters:EnumDescriptionConverter x:Key="HEnumDescriptionConverter" />
<ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type sys:Enum}" x:Key="DynamicPropertyValues">
@ -19,20 +17,19 @@
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
</UserControl.Resources>
<Grid>
<Grid Margin="0,5">
<!-- Height -->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="70" />
<ColumnDefinition Width="86*" />
<ColumnDefinition Width="65*" />
<ColumnDefinition Width="86*" />
<ColumnDefinition Width="75*" />
</Grid.ColumnDefinitions>
<TextBlock x:Name="Name" Grid.Column="0" Margin="10" FontSize="13.333" VerticalAlignment="Center" Height="18" />
<Label x:Name="Name" Grid.Column="0" VerticalAlignment="Center" />
<!-- Target property -->
<ComboBox x:Name="Targets" Grid.Column="1" Margin="10,0" MaxDropDownHeight="300" VerticalAlignment="Center"
Height="22">
<ComboBox x:Name="Targets" Grid.Column="1" Margin="10,0,0,0" MaxDropDownHeight="300" VerticalAlignment="Center">
<ComboBox.ItemTemplate>
<DataTemplate>
<Grid MinWidth="482">
@ -41,18 +38,14 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Path=Display}" HorizontalAlignment="Left" />
<TextBlock Grid.Column="1" FontWeight="Bold" Text="{Binding Path=DisplayType}"
HorizontalAlignment="Right" />
<TextBlock Grid.Column="1" FontWeight="Bold" Text="{Binding Path=DisplayType}" HorizontalAlignment="Right" />
</Grid>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<!-- Dynamic type -->
<ComboBox SelectedItem="{Binding Path=LayerPropertyType}" Grid.Column="2"
ItemsSource="{Binding Source={StaticResource DynamicPropertyValues}}"
Margin="10,0" VerticalAlignment="Center" Height="22"
IsEnabled="{Binding Path=ControlsEnabled}">
<ComboBox SelectedItem="{Binding Path=LayerPropertyType}" Grid.Column="2" ItemsSource="{Binding Source={StaticResource DynamicPropertyValues}}" Margin="10,0,0,0" VerticalAlignment="Center" IsEnabled="{Binding Path=ControlsEnabled}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource HEnumDescriptionConverter}}" />
@ -62,8 +55,7 @@
<!-- PercentageOfProperty -->
<StackPanel Grid.Column="3" x:Name="SourcesIsVisible" VerticalAlignment="Center">
<ComboBox x:Name="Sources" Margin="10,0" MaxDropDownHeight="300" Height="22"
IsEnabled="{Binding Path=ControlsEnabled}">
<ComboBox x:Name="Sources" Margin="10,0,0,0" MaxDropDownHeight="300" IsEnabled="{Binding Path=ControlsEnabled}">
<ComboBox.ItemTemplate>
<DataTemplate>
<Grid MinWidth="522">
@ -72,8 +64,7 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Path=Display}" HorizontalAlignment="Left" />
<TextBlock Grid.Column="1" FontWeight="Bold" Text="{Binding Path=DisplayType}"
HorizontalAlignment="Right" />
<TextBlock Grid.Column="1" FontWeight="Bold" Text="{Binding Path=DisplayType}" HorizontalAlignment="Right" />
</Grid>
</DataTemplate>
</ComboBox.ItemTemplate>
@ -82,16 +73,11 @@
<!-- PercentageOf -->
<StackPanel Grid.Column="3" x:Name="UserSourceIsVisible" VerticalAlignment="Center">
<controls:NumericUpDown Margin="10,0" Height="22"
Value="{Binding Path=Proposed.PercentageSource, Mode=TwoWay}"
IsEnabled="{Binding Path=ControlsEnabled}" />
<controls:NumericUpDown Margin="10,0,0,0" Value="{Binding Path=Proposed.PercentageSource, Mode=TwoWay}" IsEnabled="{Binding Path=ControlsEnabled}" />
</StackPanel>
<!-- Extra option -->
<ComboBox SelectedItem="{Binding Path=Proposed.LayerPropertyOptions}" Grid.Column="4"
ItemsSource="{Binding Path=LayerPropertyOptions}"
Margin="10,0" VerticalAlignment="Center" Height="22"
IsEnabled="{Binding Path=ControlsEnabled}">
<ComboBox SelectedItem="{Binding Path=Proposed.LayerPropertyOptions}" Grid.Column="4" ItemsSource="{Binding Path=LayerPropertyOptions}" Margin="10,0,0,0" VerticalAlignment="Center" IsEnabled="{Binding Path=ControlsEnabled}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource HEnumDescriptionConverter}}" />

View File

@ -1,47 +1,58 @@
<UserControl x:Class="Artemis.Views.Profiles.LayerTweenView"
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:local="clr-namespace:Artemis.Views.Profiles"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="900">
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:local="clr-namespace:Artemis.Views.Profiles"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="900">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="84" />
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="84" />
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" FontSize="20" HorizontalAlignment="Left" Content="Easing"
VerticalAlignment="Bottom" />
<Label Grid.Row="0" Grid.Column="0" FontSize="20" HorizontalAlignment="Left" Content="Easing" />
<!-- Width -->
<TextBlock Grid.Row="1" Grid.Column="0" Margin="10" FontSize="13.333" Text="Width:" VerticalAlignment="Center" Height="18" />
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
<ComboBox Margin="10,10,10,0" VerticalAlignment="Top" Height="22" Width="86" ItemsSource="{Binding EaseFunctions}" SelectedItem="{Binding Path=LayerModel.Properties.WidthEase}" />
<controls:NumericUpDown Margin="0,10,10,0" Height="22" Width="105" Value="{Binding Path=LayerModel.Properties.WidthEaseTime}" />
</StackPanel>
<Label Grid.Row="1" Grid.Column="0" Content="Width:" VerticalAlignment="Center" />
<Grid Grid.Row="1" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ComboBox Grid.Column="0" Margin="10,10,10,0" VerticalAlignment="Center" Height="22" ItemsSource="{Binding EaseFunctions}" SelectedItem="{Binding Path=LayerModel.Properties.WidthEase}" />
<controls:NumericUpDown Grid.Column="1" Margin="0,10,10,0" Height="22" Value="{Binding Path=LayerModel.Properties.WidthEaseTime}" VerticalAlignment="Center" />
</Grid>
<!-- Height -->
<TextBlock Grid.Row="1" Grid.Column="2" Margin="10" FontSize="13.333" Text="Height:" VerticalAlignment="Center" Height="18" />
<StackPanel Grid.Row="1" Grid.Column="3" Orientation="Horizontal">
<ComboBox Margin="10,10,10,0" VerticalAlignment="Top" Height="22" Width="86" ItemsSource="{Binding EaseFunctions}" SelectedItem="{Binding Path=LayerModel.Properties.HeightEase}" />
<controls:NumericUpDown Margin="0,10,10,0" Height="22" Width="105" Value="{Binding Path=LayerModel.Properties.HeightEaseTime}" />
</StackPanel>
<Label Grid.Row="1" Grid.Column="2" Content="Height:" VerticalAlignment="Center" />
<Grid Grid.Row="1" Grid.Column="3">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ComboBox Grid.Column="0" Margin="10,10,10,0" VerticalAlignment="Center" Height="22" ItemsSource="{Binding EaseFunctions}" SelectedItem="{Binding Path=LayerModel.Properties.HeightEase}" />
<controls:NumericUpDown Grid.Column="1" Margin="0,10,0,0" Height="22" Value="{Binding Path=LayerModel.Properties.HeightEaseTime}" VerticalAlignment="Center" />
</Grid>
<!-- Opacity -->
<TextBlock Grid.Row="2" Grid.Column="0" Margin="10" FontSize="13.333" Text="Opacity:" VerticalAlignment="Center" Height="18" />
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<ComboBox Margin="10,10,10,0" VerticalAlignment="Top" Height="22" Width="86" ItemsSource="{Binding EaseFunctions}" SelectedItem="{Binding Path=LayerModel.Properties.OpacityEase}" />
<controls:NumericUpDown Margin="0,10,10,0" Height="22" Width="105" Value="{Binding Path=LayerModel.Properties.OpacityEaseTime}" />
</StackPanel>
<Label Grid.Row="2" Grid.Column="0" Content="Opacity:" VerticalAlignment="Center" />
<Grid Grid.Row="2" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ComboBox Grid.Column="0" Margin="10,10,10,0" VerticalAlignment="Center" Height="22" ItemsSource="{Binding EaseFunctions}" SelectedItem="{Binding Path=LayerModel.Properties.OpacityEase}" />
<controls:NumericUpDown Grid.Column="1" Margin="0,10,10,0" Height="22" Value="{Binding Path=LayerModel.Properties.OpacityEaseTime}" VerticalAlignment="Center" />
</Grid>
</Grid>
</UserControl>

View File

@ -3,16 +3,16 @@
<package id="Betwixt" version="1.4.1" targetFramework="net461" />
<package id="Caliburn.Micro" version="3.0.3" targetFramework="net461" />
<package id="Caliburn.Micro.Core" version="3.0.3" targetFramework="net461" />
<package id="Castle.Core" version="3.3.3" targetFramework="net452" />
<package id="Castle.Core" version="4.0.0" targetFramework="net461" />
<package id="Colore" version="5.1.0" targetFramework="net461" />
<package id="CSCore" version="1.1.0" targetFramework="net461" />
<package id="CSCore" version="1.2.0" targetFramework="net461" />
<package id="CUE.NET" version="1.1.2.1" targetFramework="net461" />
<package id="DeltaCompressionDotNet" version="1.1.0" targetFramework="net461" />
<package id="DynamicExpresso.Core" version="1.3.3.5" targetFramework="net461" />
<package id="gong-wpf-dragdrop" version="0.1.4.3" targetFramework="net461" />
<package id="Hardcodet.NotifyIcon.Wpf" version="1.0.8" targetFramework="net452" />
<package id="log4net" version="2.0.7" targetFramework="net461" />
<package id="MahApps.Metro" version="1.4.1" targetFramework="net461" />
<package id="MahApps.Metro" version="1.4.3" targetFramework="net461" />
<package id="MahApps.Metro.Resources" version="0.6.1.0" targetFramework="net452" />
<package id="Mono.Cecil" version="0.9.6.4" targetFramework="net461" />
<package id="MoonSharp" version="2.0.0.0" targetFramework="net461" />
@ -22,8 +22,8 @@
<package id="Ninject.Extensions.Conventions" version="3.2.0.0" targetFramework="net461" />
<package id="Ninject.Extensions.Logging" version="3.2.3.0" targetFramework="net452" />
<package id="Ninject.Extensions.Logging.nlog4" version="3.2.3.0" targetFramework="net452" />
<package id="NLog" version="4.4.1" targetFramework="net461" />
<package id="NLog.Schema" version="4.4.1" targetFramework="net461" />
<package id="NLog" version="4.4.3" targetFramework="net461" />
<package id="NLog.Schema" version="4.4.3" targetFramework="net461" />
<package id="Process.NET" version="1.0.8" targetFramework="net461" />
<package id="SharpDX" version="3.1.1" targetFramework="net461" />
<package id="SharpDX.Direct3D9" version="3.1.1" targetFramework="net461" />