mirror of
https://github.com/DarthAffe/KeyboardAudioVisualizer.git
synced 2025-12-12 07:08:30 +00:00
Added tons of basic stuff
This commit is contained in:
parent
b6afc56524
commit
1cfc7a3b31
63
.gitattributes
vendored
Normal file
63
.gitattributes
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
###############################################################################
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
* text=auto
|
||||
|
||||
###############################################################################
|
||||
# Set default behavior for command prompt diff.
|
||||
#
|
||||
# This is need for earlier builds of msysgit that does not have it on by
|
||||
# default for csharp files.
|
||||
# Note: This is only used by command line
|
||||
###############################################################################
|
||||
#*.cs diff=csharp
|
||||
|
||||
###############################################################################
|
||||
# Set the merge driver for project and solution files
|
||||
#
|
||||
# Merging from the command prompt will add diff markers to the files if there
|
||||
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||
# the diff markers are never inserted). Diff markers may cause the following
|
||||
# file extensions to fail to load in VS. An alternative would be to treat
|
||||
# these files as binary and thus will always conflict and require user
|
||||
# intervention with every merge. To do so, just uncomment the entries below
|
||||
###############################################################################
|
||||
#*.sln merge=binary
|
||||
#*.csproj merge=binary
|
||||
#*.vbproj merge=binary
|
||||
#*.vcxproj merge=binary
|
||||
#*.vcproj merge=binary
|
||||
#*.dbproj merge=binary
|
||||
#*.fsproj merge=binary
|
||||
#*.lsproj merge=binary
|
||||
#*.wixproj merge=binary
|
||||
#*.modelproj merge=binary
|
||||
#*.sqlproj merge=binary
|
||||
#*.wwaproj merge=binary
|
||||
|
||||
###############################################################################
|
||||
# behavior for image files
|
||||
#
|
||||
# image files are treated as binary by default.
|
||||
###############################################################################
|
||||
#*.jpg binary
|
||||
#*.png binary
|
||||
#*.gif binary
|
||||
|
||||
###############################################################################
|
||||
# diff behavior for common document formats
|
||||
#
|
||||
# Convert binary document formats to text before diffing them. This feature
|
||||
# is only available from the command line. Turn it on by uncommenting the
|
||||
# entries below.
|
||||
###############################################################################
|
||||
#*.doc diff=astextplain
|
||||
#*.DOC diff=astextplain
|
||||
#*.docx diff=astextplain
|
||||
#*.DOCX diff=astextplain
|
||||
#*.dot diff=astextplain
|
||||
#*.DOT diff=astextplain
|
||||
#*.pdf diff=astextplain
|
||||
#*.PDF diff=astextplain
|
||||
#*.rtf diff=astextplain
|
||||
#*.RTF diff=astextplain
|
||||
22
KeyboardAudioVisualizer.sln
Normal file
22
KeyboardAudioVisualizer.sln
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26430.15
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyboardAudioVisualizer", "KeyboardAudioVisualizer\KeyboardAudioVisualizer.csproj", "{0AC4E8B1-4D4D-447F-B9FD-38A74ED1F243}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0AC4E8B1-4D4D-447F-B9FD-38A74ED1F243}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0AC4E8B1-4D4D-447F-B9FD-38A74ED1F243}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0AC4E8B1-4D4D-447F-B9FD-38A74ED1F243}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0AC4E8B1-4D4D-447F-B9FD-38A74ED1F243}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
6
KeyboardAudioVisualizer/App.config
Normal file
6
KeyboardAudioVisualizer/App.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
</startup>
|
||||
</configuration>
|
||||
27
KeyboardAudioVisualizer/App.xaml
Normal file
27
KeyboardAudioVisualizer/App.xaml
Normal file
@ -0,0 +1,27 @@
|
||||
<Application x:Class="KeyboardAudioVisualizer.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:tb="http://www.hardcodet.net/taskbar"
|
||||
xmlns:keyboardAudioVisualizer="clr-namespace:KeyboardAudioVisualizer"
|
||||
xmlns:styles="clr-namespace:KeyboardAudioVisualizer.Styles"
|
||||
ShutdownMode="OnExplicitShutdown">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/KeyboardAudioVisualizer;component/Resources/KeyboardAudioVisualizer.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<tb:TaskbarIcon x:Key="TaskbarIcon"
|
||||
IconSource="Resources/Icon.ico"
|
||||
ToolTip="Keyboard Audio-Visualizer"
|
||||
MenuActivation="RightClick">
|
||||
<tb:TaskbarIcon.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="Open configuration" Command="{Binding Source={x:Static keyboardAudioVisualizer:ApplicationManager.Instance}, Path=OpenConfigurationCommand}" />
|
||||
<MenuItem Header="Exit" Command="{Binding Source={x:Static keyboardAudioVisualizer:ApplicationManager.Instance}, Path=ExitCommand}" />
|
||||
</ContextMenu>
|
||||
</tb:TaskbarIcon.ContextMenu>
|
||||
</tb:TaskbarIcon>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
62
KeyboardAudioVisualizer/App.xaml.cs
Normal file
62
KeyboardAudioVisualizer/App.xaml.cs
Normal file
@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using Hardcodet.Wpf.TaskbarNotification;
|
||||
using KeyboardAudioVisualizer.Helper;
|
||||
|
||||
namespace KeyboardAudioVisualizer
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
#region Constants
|
||||
|
||||
private const string PATH_SETTINGS = "Settings.xaml";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties & Fields
|
||||
|
||||
private TaskbarIcon _taskbarIcon;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
base.OnStartup(e);
|
||||
|
||||
try
|
||||
{
|
||||
_taskbarIcon = (TaskbarIcon)FindResource("TaskbarIcon");
|
||||
|
||||
Settings settings = SerializationHelper.LoadObjectFromFile<Settings>(PATH_SETTINGS);
|
||||
if (settings == null)
|
||||
{
|
||||
settings = new Settings();
|
||||
_taskbarIcon.ShowBalloonTip("Keyboard Audio-Visualizer is starting in the tray!", "Click on the icon to open the configuration.", BalloonIcon.Info);
|
||||
}
|
||||
ApplicationManager.Instance.Settings = settings;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
File.WriteAllText("error.log", $"[{DateTime.Now:G}] Exception!\r\n\r\nMessage:\r\n{ex.GetFullMessage()}\r\n\r\nStackTrace:\r\n{ex.StackTrace}\r\n\r\n");
|
||||
MessageBox.Show("An error occured while starting the Keyboard Audio-Visualizer.\r\nPlease double check if SDK-support for your devices is enabled.\r\nMore information can be found in the error.log file in the application directory.", "Can't start Keyboard Audio-Visualizer.");
|
||||
Shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnExit(ExitEventArgs e)
|
||||
{
|
||||
base.OnExit(e);
|
||||
|
||||
SerializationHelper.SaveObjectToFile(ApplicationManager.Instance.Settings, PATH_SETTINGS);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
48
KeyboardAudioVisualizer/ApplicationManager.cs
Normal file
48
KeyboardAudioVisualizer/ApplicationManager.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using System.Windows;
|
||||
using KeyboardAudioVisualizer.Helper;
|
||||
using KeyboardAudioVisualizer.UI;
|
||||
|
||||
namespace KeyboardAudioVisualizer
|
||||
{
|
||||
public class ApplicationManager
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
public static ApplicationManager Instance { get; } = new ApplicationManager();
|
||||
|
||||
private ConfigurationWindow _configurationWindow;
|
||||
|
||||
public Settings Settings { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Commands
|
||||
|
||||
private ActionCommand _openConfiguration;
|
||||
public ActionCommand OpenConfigurationCommand => _openConfiguration ?? (_openConfiguration = new ActionCommand(OpenConfiguration));
|
||||
|
||||
private ActionCommand _exitCommand;
|
||||
public ActionCommand ExitCommand => _exitCommand ?? (_exitCommand = new ActionCommand(Exit));
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
private ApplicationManager()
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
private void OpenConfiguration()
|
||||
{
|
||||
if (_configurationWindow == null) _configurationWindow = new ConfigurationWindow();
|
||||
_configurationWindow.Show();
|
||||
}
|
||||
|
||||
private void Exit() => Application.Current.Shutdown();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
91
KeyboardAudioVisualizer/Controls/BlurredDecorationWindow.cs
Normal file
91
KeyboardAudioVisualizer/Controls/BlurredDecorationWindow.cs
Normal file
@ -0,0 +1,91 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace KeyboardAudioVisualizer.Controls
|
||||
{
|
||||
[TemplatePart(Name = "PART_Decoration", Type = typeof(FrameworkElement))]
|
||||
[TemplatePart(Name = "PART_Content", Type = typeof(FrameworkElement))]
|
||||
[TemplatePart(Name = "PART_CloseButton", Type = typeof(Button))]
|
||||
[TemplatePart(Name = "PART_MinimizeButton", Type = typeof(Button))]
|
||||
[TemplatePart(Name = "PART_IconButton", Type = typeof(Button))]
|
||||
public class BlurredDecorationWindow : System.Windows.Window
|
||||
{
|
||||
#region DependencyProperties
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
public static readonly DependencyProperty BackgroundImageProperty = DependencyProperty.Register(
|
||||
"BackgroundImage", typeof(ImageSource), typeof(BlurredDecorationWindow), new PropertyMetadata(default(ImageSource)));
|
||||
|
||||
public ImageSource BackgroundImage
|
||||
{
|
||||
get => (ImageSource)GetValue(BackgroundImageProperty);
|
||||
set => SetValue(BackgroundImageProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty DecorationHeightProperty = DependencyProperty.Register(
|
||||
"DecorationHeight", typeof(double), typeof(BlurredDecorationWindow), new PropertyMetadata(20.0));
|
||||
|
||||
public double DecorationHeight
|
||||
{
|
||||
get => (double)GetValue(DecorationHeightProperty);
|
||||
set => SetValue(DecorationHeightProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IconToolTipProperty = DependencyProperty.Register(
|
||||
"IconToolTip", typeof(string), typeof(BlurredDecorationWindow), new PropertyMetadata(default(string)));
|
||||
|
||||
public string IconToolTip
|
||||
{
|
||||
get => (string)GetValue(IconToolTipProperty);
|
||||
set => SetValue(IconToolTipProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IconCommandProperty = DependencyProperty.Register(
|
||||
"IconCommand", typeof(ICommand), typeof(BlurredDecorationWindow), new PropertyMetadata(default(ICommand)));
|
||||
|
||||
public ICommand IconCommand
|
||||
{
|
||||
get => (ICommand)GetValue(IconCommandProperty);
|
||||
set => SetValue(IconCommandProperty, value);
|
||||
}
|
||||
|
||||
// ReSharper restore InconsistentNaming
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
static BlurredDecorationWindow()
|
||||
{
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(BlurredDecorationWindow), new FrameworkPropertyMetadata(typeof(BlurredDecorationWindow)));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public override void OnApplyTemplate()
|
||||
{
|
||||
base.OnApplyTemplate();
|
||||
|
||||
FrameworkElement decoration = GetTemplateChild("PART_Decoration") as FrameworkElement;
|
||||
if (decoration != null)
|
||||
decoration.MouseLeftButtonDown += (sender, args) => DragMove();
|
||||
|
||||
Button closeButton = GetTemplateChild("PART_CloseButton") as Button;
|
||||
if (closeButton != null)
|
||||
closeButton.Click += (sender, args) => Application.Current.Shutdown();
|
||||
|
||||
Button minimizeButton = GetTemplateChild("PART_MinimizeButton") as Button;
|
||||
if (minimizeButton != null)
|
||||
minimizeButton.Click += (sender, args) => Application.Current.MainWindow.WindowState = WindowState.Minimized;
|
||||
|
||||
Button iconButton = GetTemplateChild("PART_IconButton") as Button;
|
||||
if (iconButton != null)
|
||||
iconButton.Click += (sender, args) => IconCommand?.Execute(null);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
51
KeyboardAudioVisualizer/Controls/ImageButton.cs
Normal file
51
KeyboardAudioVisualizer/Controls/ImageButton.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace KeyboardAudioVisualizer.Controls
|
||||
{
|
||||
public class ImageButton : Button
|
||||
{
|
||||
#region Properties & Fields
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
public static readonly DependencyProperty ImageProperty = DependencyProperty.Register(
|
||||
"Image", typeof(ImageSource), typeof(ImageButton), new PropertyMetadata(default(ImageSource)));
|
||||
|
||||
public ImageSource Image
|
||||
{
|
||||
get => (ImageSource)GetValue(ImageProperty);
|
||||
set => SetValue(ImageProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty HoverImageProperty = DependencyProperty.Register(
|
||||
"HoverImage", typeof(ImageSource), typeof(ImageButton), new PropertyMetadata(default(ImageSource)));
|
||||
|
||||
public ImageSource HoverImage
|
||||
{
|
||||
get => (ImageSource)GetValue(HoverImageProperty);
|
||||
set => SetValue(HoverImageProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty PressedImageProperty = DependencyProperty.Register(
|
||||
"PressedImage", typeof(ImageSource), typeof(ImageButton), new PropertyMetadata(default(ImageSource)));
|
||||
|
||||
public ImageSource PressedImage
|
||||
{
|
||||
get => (ImageSource)GetValue(PressedImageProperty);
|
||||
set => SetValue(PressedImageProperty, value);
|
||||
}
|
||||
|
||||
// ReSharper restore InconsistentNaming
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
static ImageButton()
|
||||
{
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(ImageButton), new FrameworkPropertyMetadata(typeof(ImageButton)));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
50
KeyboardAudioVisualizer/Helper/ActionCommand.cs
Normal file
50
KeyboardAudioVisualizer/Helper/ActionCommand.cs
Normal file
@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace KeyboardAudioVisualizer.Helper
|
||||
{
|
||||
public class ActionCommand : ICommand
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
private readonly Func<bool> _canExecute;
|
||||
private readonly Action _command;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
|
||||
public event EventHandler CanExecuteChanged;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public ActionCommand(Action command, Func<bool> canExecute = null)
|
||||
{
|
||||
this._command = command;
|
||||
this._canExecute = canExecute;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public bool CanExecute(object parameter)
|
||||
{
|
||||
return _canExecute?.Invoke() ?? true;
|
||||
}
|
||||
|
||||
public void Execute(object parameter)
|
||||
{
|
||||
_command?.Invoke();
|
||||
}
|
||||
|
||||
public void RaiseCanExecuteChanged()
|
||||
{
|
||||
CanExecuteChanged?.Invoke(this, new EventArgs());
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
21
KeyboardAudioVisualizer/Helper/ExceptionExtension.cs
Normal file
21
KeyboardAudioVisualizer/Helper/ExceptionExtension.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace KeyboardAudioVisualizer.Helper
|
||||
{
|
||||
public static class ExceptionExtension
|
||||
{
|
||||
#region Methods
|
||||
|
||||
public static string GetFullMessage(this Exception ex, string message = "")
|
||||
{
|
||||
if (ex == null) return string.Empty;
|
||||
|
||||
if (ex.InnerException != null)
|
||||
message += "\r\nInnerException: " + GetFullMessage(ex.InnerException);
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
54
KeyboardAudioVisualizer/Helper/SerializationHelper.cs
Normal file
54
KeyboardAudioVisualizer/Helper/SerializationHelper.cs
Normal file
@ -0,0 +1,54 @@
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace KeyboardAudioVisualizer.Helper
|
||||
{
|
||||
public static class SerializationHelper
|
||||
{
|
||||
#region Methods
|
||||
|
||||
public static void SaveObjectToFile<T>(T serializableObject, string path)
|
||||
{
|
||||
if (serializableObject == null) return;
|
||||
|
||||
try
|
||||
{
|
||||
XmlDocument xmlDocument = new XmlDocument();
|
||||
XmlSerializer serializer = new XmlSerializer(serializableObject.GetType());
|
||||
using (MemoryStream stream = new MemoryStream())
|
||||
{
|
||||
serializer.Serialize(stream, serializableObject);
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
xmlDocument.Load(stream);
|
||||
xmlDocument.Save(path);
|
||||
}
|
||||
}
|
||||
catch {/* Catch'em all */}
|
||||
}
|
||||
|
||||
public static T LoadObjectFromFile<T>(string fileName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(fileName)) return default(T);
|
||||
|
||||
try
|
||||
{
|
||||
XmlDocument xmlDocument = new XmlDocument();
|
||||
xmlDocument.Load(fileName);
|
||||
string xmlString = xmlDocument.OuterXml;
|
||||
|
||||
using (StringReader sr = new StringReader(xmlString))
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(T));
|
||||
using (XmlReader reader = new XmlTextReader(sr))
|
||||
return (T)serializer.Deserialize(reader);
|
||||
}
|
||||
}
|
||||
catch {/* Catch'em all */}
|
||||
|
||||
return default(T);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
177
KeyboardAudioVisualizer/KeyboardAudioVisualizer.csproj
Normal file
177
KeyboardAudioVisualizer/KeyboardAudioVisualizer.csproj
Normal file
@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{0AC4E8B1-4D4D-447F-B9FD-38A74ED1F243}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>KeyboardAudioVisualizer</RootNamespace>
|
||||
<AssemblyName>KeyboardAudioVisualizer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Resources\Icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CSCore, Version=1.2.1.1, Culture=neutral, PublicKeyToken=5a08f2b6f4415dea, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CSCore.1.2.1.1\lib\net35-client\CSCore.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Hardcodet.Wpf.TaskbarNotification, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Hardcodet.NotifyIcon.Wpf.1.0.8\lib\net451\Hardcodet.Wpf.TaskbarNotification.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MathNet.Numerics, Version=3.20.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MathNet.Numerics.3.20.0\lib\net40\MathNet.Numerics.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RGB.NET.Brushes, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RGB.NET.Brushes.1.0.0\lib\net45\RGB.NET.Brushes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RGB.NET.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RGB.NET.Core.1.0.0\lib\net45\RGB.NET.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RGB.NET.Devices.Corsair, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RGB.NET.Devices.Corsair.1.0.0\lib\net45\RGB.NET.Devices.Corsair.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RGB.NET.Groups, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RGB.NET.Groups.1.0.0\lib\net45\RGB.NET.Groups.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ApplicationManager.cs" />
|
||||
<Compile Include="Controls\ImageButton.cs" />
|
||||
<Compile Include="Helper\ActionCommand.cs" />
|
||||
<Compile Include="Helper\ExceptionExtension.cs" />
|
||||
<Compile Include="Settings.cs" />
|
||||
<Compile Include="Controls\BlurredDecorationWindow.cs" />
|
||||
<Compile Include="Styles\CachedResourceDictionary.cs" />
|
||||
<Compile Include="UI\ConfigurationWindow.xaml.cs">
|
||||
<DependentUpon>ConfigurationWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\ConfigurationViewModel.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Helper\SerializationHelper.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Resource Include="Resources\font.ttf" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\Icon.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="Resources\KeyboardAudioVisualizer.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\BlurredDecorationWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\FrameworkElement.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\ImageButton.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\Theme.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\ToolTip.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="UI\ConfigurationWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\background.png" />
|
||||
<Resource Include="Resources\close.png" />
|
||||
<Resource Include="Resources\minimize.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\RGB.NET.Devices.Corsair.1.0.0\build\net45\RGB.NET.Devices.Corsair.targets" Condition="Exists('..\packages\RGB.NET.Devices.Corsair.1.0.0\build\net45\RGB.NET.Devices.Corsair.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Corsair.1.0.0\build\net45\RGB.NET.Devices.Corsair.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Corsair.1.0.0\build\net45\RGB.NET.Devices.Corsair.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
55
KeyboardAudioVisualizer/Properties/AssemblyInfo.cs
Normal file
55
KeyboardAudioVisualizer/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,55 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("KeyboardAudioVisualizer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("KeyboardAudioVisualizer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//In order to begin building localizable applications, set
|
||||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
||||
//inside a <PropertyGroup>. For example, if you are using US english
|
||||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
||||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
||||
//the line below to match the UICulture setting in the project file.
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
71
KeyboardAudioVisualizer/Properties/Resources.Designer.cs
generated
Normal file
71
KeyboardAudioVisualizer/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace KeyboardAudioVisualizer.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("KeyboardAudioVisualizer.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
KeyboardAudioVisualizer/Properties/Resources.resx
Normal file
117
KeyboardAudioVisualizer/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
30
KeyboardAudioVisualizer/Properties/Settings.Designer.cs
generated
Normal file
30
KeyboardAudioVisualizer/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace KeyboardAudioVisualizer.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
KeyboardAudioVisualizer/Properties/Settings.settings
Normal file
7
KeyboardAudioVisualizer/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
BIN
KeyboardAudioVisualizer/Resources/Icon.ico
Normal file
BIN
KeyboardAudioVisualizer/Resources/Icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 361 KiB |
@ -0,0 +1,21 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:window="clr-namespace:KeyboardAudioVisualizer.Controls"
|
||||
xmlns:ui="clr-namespace:KeyboardAudioVisualizer.UI"
|
||||
xmlns:styles="clr-namespace:KeyboardAudioVisualizer.Styles">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/KeyboardAudioVisualizer;component/Styles/BlurredDecorationWindow.xaml" />
|
||||
<styles:CachedResourceDictionary Source="/KeyboardAudioVisualizer;component/Styles/ImageButton.xaml" />
|
||||
<styles:CachedResourceDictionary Source="/KeyboardAudioVisualizer;component/Styles/ToolTip.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="{x:Type window:BlurredDecorationWindow}" BasedOn="{StaticResource StyleBlurredDecorationWindow}" />
|
||||
<Style TargetType="{x:Type ui:ConfigurationWindow}" BasedOn="{StaticResource StyleBlurredDecorationWindow}" />
|
||||
<Style TargetType="{x:Type window:ImageButton}" BasedOn="{StaticResource StyleImageButton}" />
|
||||
<Style TargetType="ToolTip" BasedOn="{StaticResource StyleToolTip}" />
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
|
||||
|
||||
BIN
KeyboardAudioVisualizer/Resources/background.png
Normal file
BIN
KeyboardAudioVisualizer/Resources/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 273 KiB |
BIN
KeyboardAudioVisualizer/Resources/close.png
Normal file
BIN
KeyboardAudioVisualizer/Resources/close.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
BIN
KeyboardAudioVisualizer/Resources/font.ttf
Normal file
BIN
KeyboardAudioVisualizer/Resources/font.ttf
Normal file
Binary file not shown.
BIN
KeyboardAudioVisualizer/Resources/minimize.png
Normal file
BIN
KeyboardAudioVisualizer/Resources/minimize.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
6
KeyboardAudioVisualizer/Settings.cs
Normal file
6
KeyboardAudioVisualizer/Settings.cs
Normal file
@ -0,0 +1,6 @@
|
||||
namespace KeyboardAudioVisualizer
|
||||
{
|
||||
public class Settings
|
||||
{
|
||||
}
|
||||
}
|
||||
126
KeyboardAudioVisualizer/Styles/BlurredDecorationWindow.xaml
Normal file
126
KeyboardAudioVisualizer/Styles/BlurredDecorationWindow.xaml
Normal file
@ -0,0 +1,126 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:KeyboardAudioVisualizer.Controls"
|
||||
xmlns:styles="clr-namespace:KeyboardAudioVisualizer.Styles">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/KeyboardAudioVisualizer;component/Styles/ImageButton.xaml" />
|
||||
<styles:CachedResourceDictionary Source="/KeyboardAudioVisualizer;component/Styles/Theme.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleImageButtonWindow"
|
||||
BasedOn="{StaticResource StyleImageButtonWithOpacity}"
|
||||
TargetType="{x:Type controls:ImageButton}">
|
||||
<Setter Property="Padding" Value="4" />
|
||||
<Setter Property="Margin" Value="4" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="Width" Value="24" />
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleBlurredDecorationWindow"
|
||||
TargetType="{x:Type controls:BlurredDecorationWindow}">
|
||||
<Setter Property="WindowStyle" Value="None" />
|
||||
<Setter Property="ResizeMode" Value="CanResize" />
|
||||
<Setter Property="AllowsTransparency" Value="True" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="BorderThickness" Value="1,0,1,1" />
|
||||
<Setter Property="DecorationHeight" Value="80" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BrushWindowBorder}" />
|
||||
<Setter Property="Background" Value="{StaticResource BrushWindowBackground}" />
|
||||
<Setter Property="BackgroundImage" Value="pack://application:,,,/Resources/background.png" />
|
||||
<Setter Property="MinWidth" Value="256" />
|
||||
<Setter Property="MinHeight" Value="144" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeDefault}" />
|
||||
<Setter Property="FontFamily" Value="pack://application:,,,/Resources/#Cinzel" />
|
||||
|
||||
<Setter Property="WindowChrome.WindowChrome">
|
||||
<Setter.Value>
|
||||
<WindowChrome CaptionHeight="0" ResizeBorderThickness="5" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:BlurredDecorationWindow}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<Grid Margin="-12,-12,-12,0">
|
||||
<Viewbox HorizontalAlignment="Center" Stretch="UniformToFill">
|
||||
<Image Source="{TemplateBinding BackgroundImage}" />
|
||||
</Viewbox>
|
||||
|
||||
<Border Name="BlurImage">
|
||||
<Border.OpacityMask>
|
||||
<VisualBrush TileMode="None" Stretch="None" AlignmentX="Center" AlignmentY="Center">
|
||||
<VisualBrush.Visual>
|
||||
<Grid Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=Border}}"
|
||||
Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType=Border}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="12" />
|
||||
<RowDefinition Height="92" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle Fill="Black" Grid.Row="0" Grid.RowSpan="2" />
|
||||
<Rectangle Fill="Transparent" Grid.Row="2" />
|
||||
</Grid>
|
||||
</VisualBrush.Visual>
|
||||
</VisualBrush>
|
||||
</Border.OpacityMask>
|
||||
|
||||
<Border.Effect>
|
||||
<BlurEffect Radius="30" />
|
||||
</Border.Effect>
|
||||
|
||||
<Viewbox HorizontalAlignment="Center" Stretch="UniformToFill">
|
||||
<Image Source="{TemplateBinding BackgroundImage}" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</Viewbox>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<DockPanel LastChildFill="True">
|
||||
<Border x:Name="PART_Decoration"
|
||||
DockPanel.Dock="Top"
|
||||
HorizontalAlignment="Stretch"
|
||||
Height="{TemplateBinding DecorationHeight}"
|
||||
Background="{TemplateBinding BorderBrush}">
|
||||
<DockPanel HorizontalAlignment="Stretch" Margin="4" LastChildFill="False">
|
||||
<controls:ImageButton x:Name="PART_CloseButton"
|
||||
DockPanel.Dock="Right"
|
||||
Style="{StaticResource StyleImageButtonWindow}"
|
||||
Image="pack://application:,,,/Resources/close.png"
|
||||
ToolTip="Close" />
|
||||
|
||||
<controls:ImageButton x:Name="PART_MinimizeButton"
|
||||
DockPanel.Dock="Right"
|
||||
Style="{StaticResource StyleImageButtonWindow}"
|
||||
Image="pack://application:,,,/Resources/minimize.png"
|
||||
ToolTip="Minimize" />
|
||||
|
||||
<controls:ImageButton x:Name="PART_IconButton"
|
||||
DockPanel.Dock="Left"
|
||||
VerticalAlignment="Center"
|
||||
Margin="8"
|
||||
Style="{StaticResource StyleImageButtonWithOpacity}"
|
||||
Image="{TemplateBinding Icon}"
|
||||
ToolTip="https://github.com/DarthAffe/KeyboardAudioVisualizer" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<ContentPresenter x:Name="PART_Content" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
|
||||
|
||||
|
||||
56
KeyboardAudioVisualizer/Styles/CachedResourceDictionary.cs
Normal file
56
KeyboardAudioVisualizer/Styles/CachedResourceDictionary.cs
Normal file
@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
|
||||
namespace KeyboardAudioVisualizer.Styles
|
||||
{
|
||||
public class CachedResourceDictionary : ResourceDictionary
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
private static readonly List<string> _cachedDictionaries = new List<string>();
|
||||
private static readonly ResourceDictionary _innerDictionary = new ResourceDictionary();
|
||||
// ReSharper restore
|
||||
|
||||
public new Uri Source
|
||||
{
|
||||
get => null;
|
||||
set
|
||||
{
|
||||
lock (_innerDictionary)
|
||||
{
|
||||
UpdateCache(value);
|
||||
|
||||
MergedDictionaries.Clear();
|
||||
MergedDictionaries.Add(_innerDictionary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
private static void UpdateCache(Uri source)
|
||||
{
|
||||
string uriPath = source.OriginalString;
|
||||
if (_cachedDictionaries.Contains(uriPath)) return;
|
||||
|
||||
_cachedDictionaries.Add(uriPath);
|
||||
|
||||
ResourceDictionary newDictionary = new ResourceDictionary { Source = new Uri(uriPath, source.IsAbsoluteUri ? UriKind.Absolute : UriKind.Relative) };
|
||||
CopyDictionaryEntries(newDictionary, _innerDictionary);
|
||||
}
|
||||
|
||||
private static void CopyDictionaryEntries(IDictionary source, IDictionary target)
|
||||
{
|
||||
foreach (object key in source.Keys)
|
||||
if (!target.Contains(key))
|
||||
target.Add(key, source[key]);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
13
KeyboardAudioVisualizer/Styles/FrameworkElement.xaml
Normal file
13
KeyboardAudioVisualizer/Styles/FrameworkElement.xaml
Normal file
@ -0,0 +1,13 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:styles="clr-namespace:KeyboardAudioVisualizer.Styles">
|
||||
|
||||
<Style x:Key="StyleFrameworkElement" TargetType="FrameworkElement">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="UseLayoutRounding" Value="True" />
|
||||
<Setter Property="Validation.ErrorTemplate" Value="{x:Null}" />
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
119
KeyboardAudioVisualizer/Styles/ImageButton.xaml
Normal file
119
KeyboardAudioVisualizer/Styles/ImageButton.xaml
Normal file
@ -0,0 +1,119 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:buttons="clr-namespace:KeyboardAudioVisualizer.Controls"
|
||||
xmlns:styles="clr-namespace:KeyboardAudioVisualizer.Styles">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/KeyboardAudioVisualizer;component/Styles/FrameworkElement.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleImageButton"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="{x:Type buttons:ImageButton}">
|
||||
<Setter Property="Padding" Value="0" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type buttons:ImageButton}">
|
||||
<Grid Background="Transparent">
|
||||
<Image x:Name="ImageNormal" Margin="{TemplateBinding Padding}"
|
||||
Source="{TemplateBinding Image}" Stretch="Uniform" />
|
||||
<Image x:Name="ImageHover" Margin="{TemplateBinding Padding}"
|
||||
Opacity="0"
|
||||
Source="{TemplateBinding HoverImage}" Stretch="Uniform" />
|
||||
<Image x:Name="ImagePressed" Margin="{TemplateBinding Padding}"
|
||||
Opacity="0"
|
||||
Source="{TemplateBinding PressedImage}" Stretch="Uniform" />
|
||||
</Grid>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetName="ImageHover">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1.0" Duration="0:0:0.150" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetName="ImageHover">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.250" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetName="ImagePressed">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1.0" Duration="0:0:0.150" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetName="ImagePressed">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.250" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleImageButtonWithOpacity"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="{x:Type buttons:ImageButton}">
|
||||
<Setter Property="Opacity" Value="0.66" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type buttons:ImageButton}">
|
||||
<Grid Background="Transparent">
|
||||
<Image x:Name="ImageNormal" Margin="{TemplateBinding Padding}"
|
||||
Source="{TemplateBinding Image}" Stretch="Uniform" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1.0" Duration="0:0:0.150" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.250" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleImageButtonMenu"
|
||||
BasedOn="{StaticResource StyleImageButton}"
|
||||
TargetType="{x:Type buttons:ImageButton}">
|
||||
<Setter Property="Width" Value="180" />
|
||||
<Setter Property="Height" Value="90" />
|
||||
<Setter Property="Margin" Value="0,16" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
|
||||
|
||||
|
||||
28
KeyboardAudioVisualizer/Styles/Theme.xaml
Normal file
28
KeyboardAudioVisualizer/Styles/Theme.xaml
Normal file
@ -0,0 +1,28 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:presentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options">
|
||||
|
||||
<!-- ### Colors ### -->
|
||||
<Color x:Key="ColorTelegrey">#FFD0D0D0</Color>
|
||||
<Color x:Key="ColorJetBlack">#111111</Color>
|
||||
<Color x:Key="ColorJetBlackTransparent">#A0111111</Color>
|
||||
<Color x:Key="ColorBlackTransparent">#50000000</Color>
|
||||
|
||||
<!-- ### Brushes ### -->
|
||||
<SolidColorBrush x:Key="BrushBackground" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlack}" />
|
||||
|
||||
<!-- Window -->
|
||||
<SolidColorBrush x:Key="BrushWindowBorder" presentationOptions:Freeze="True" Color="{StaticResource ColorBlackTransparent}" />
|
||||
<SolidColorBrush x:Key="BrushWindowBackground" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlack}" />
|
||||
|
||||
<!-- ToolTip -->
|
||||
<SolidColorBrush x:Key="BrushTooltipForeground" presentationOptions:Freeze="True" Color="{StaticResource ColorTelegrey}" />
|
||||
<SolidColorBrush x:Key="BrushTooltipBorder" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlack}" />
|
||||
<SolidColorBrush x:Key="BrushTooltipBackground" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlackTransparent}" />
|
||||
|
||||
|
||||
<!-- ### Fonts ### -->
|
||||
<sys:Double x:Key="FontSizeDefault">13</sys:Double>
|
||||
<sys:Double x:Key="FontSizeTooltip">14</sys:Double>
|
||||
</ResourceDictionary>
|
||||
36
KeyboardAudioVisualizer/Styles/ToolTip.xaml
Normal file
36
KeyboardAudioVisualizer/Styles/ToolTip.xaml
Normal file
@ -0,0 +1,36 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:styles="clr-namespace:KeyboardAudioVisualizer.Styles">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/KeyboardAudioVisualizer;component/Styles/FrameworkElement.xaml" />
|
||||
<styles:CachedResourceDictionary Source="/KeyboardAudioVisualizer;component/Styles/Theme.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleToolTip"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="ToolTip">
|
||||
<Style.Setters>
|
||||
<Setter Property="Foreground" Value="{StaticResource BrushTooltipForeground}" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeTooltip}" />
|
||||
<Setter Property="FontFamily" Value="pack://application:,,,/Resources/#Cinzel" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToolTip">
|
||||
<Border BorderThickness="1"
|
||||
BorderBrush="{StaticResource BrushTooltipBorder}"
|
||||
Background="{StaticResource BrushTooltipBackground}">
|
||||
<ContentPresenter Margin="6,4" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style.Setters>
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
|
||||
|
||||
|
||||
29
KeyboardAudioVisualizer/UI/ConfigurationViewModel.cs
Normal file
29
KeyboardAudioVisualizer/UI/ConfigurationViewModel.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System.Diagnostics;
|
||||
using KeyboardAudioVisualizer.Helper;
|
||||
|
||||
namespace KeyboardAudioVisualizer.UI
|
||||
{
|
||||
public class ConfigurationViewModel
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
#endregion
|
||||
|
||||
#region Commands
|
||||
|
||||
private ActionCommand _openHomepageCommand;
|
||||
public ActionCommand OpenHomepageCommand => _openHomepageCommand ?? (_openHomepageCommand = new ActionCommand(OpenHomepage));
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
private void OpenHomepage() => Process.Start("https://github.com/DarthAffe/KeyboardAudioVisualizer");
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
20
KeyboardAudioVisualizer/UI/ConfigurationWindow.xaml
Normal file
20
KeyboardAudioVisualizer/UI/ConfigurationWindow.xaml
Normal file
@ -0,0 +1,20 @@
|
||||
<controls:BlurredDecorationWindow x:Class="KeyboardAudioVisualizer.UI.ConfigurationWindow"
|
||||
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:ui="clr-namespace:KeyboardAudioVisualizer.UI"
|
||||
xmlns:controls="clr-namespace:KeyboardAudioVisualizer.Controls"
|
||||
mc:Ignorable="d"
|
||||
Title="Keyboard Audio-Visualizer # Configuration"
|
||||
Icon="pack://application:,,,/KeyboardAudioVisualizer;component/Resources/Icon.ico"
|
||||
IconCommand="{Binding OpenHomepageCommand}"
|
||||
Width="1280" Height="720">
|
||||
|
||||
<controls:BlurredDecorationWindow.DataContext>
|
||||
<ui:ConfigurationViewModel />
|
||||
</controls:BlurredDecorationWindow.DataContext>
|
||||
|
||||
<Grid></Grid>
|
||||
|
||||
</controls:BlurredDecorationWindow>
|
||||
9
KeyboardAudioVisualizer/UI/ConfigurationWindow.xaml.cs
Normal file
9
KeyboardAudioVisualizer/UI/ConfigurationWindow.xaml.cs
Normal file
@ -0,0 +1,9 @@
|
||||
using KeyboardAudioVisualizer.Controls;
|
||||
|
||||
namespace KeyboardAudioVisualizer.UI
|
||||
{
|
||||
public partial class ConfigurationWindow : BlurredDecorationWindow
|
||||
{
|
||||
public ConfigurationWindow() => InitializeComponent();
|
||||
}
|
||||
}
|
||||
10
KeyboardAudioVisualizer/packages.config
Normal file
10
KeyboardAudioVisualizer/packages.config
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="CSCore" version="1.2.1.1" targetFramework="net461" />
|
||||
<package id="Hardcodet.NotifyIcon.Wpf" version="1.0.8" targetFramework="net461" />
|
||||
<package id="MathNet.Numerics" version="3.20.0" targetFramework="net461" />
|
||||
<package id="RGB.NET.Brushes" version="1.0.0" targetFramework="net461" />
|
||||
<package id="RGB.NET.Core" version="1.0.0" targetFramework="net461" />
|
||||
<package id="RGB.NET.Devices.Corsair" version="1.0.0" targetFramework="net461" />
|
||||
<package id="RGB.NET.Groups" version="1.0.0" targetFramework="net461" />
|
||||
</packages>
|
||||
13
NuGet.Config
Normal file
13
NuGet.Config
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
|
||||
<packageSources>
|
||||
<remove key="RGB.NET package source" />
|
||||
<add key="RGB.NET package source" value="C:\Users\Darth Affe\Source\Repos\RGB.NET\NuGet" />
|
||||
</packageSources>
|
||||
|
||||
<activePackageSource>
|
||||
<add key="All" value="(Aggregate source)" />
|
||||
</activePackageSource>
|
||||
|
||||
</configuration>
|
||||
Loading…
x
Reference in New Issue
Block a user