Skip to content

Commit

Permalink
Merge branch 'test-branch'
Browse files Browse the repository at this point in the history
  • Loading branch information
SmokeyMcBong committed Sep 10, 2018
2 parents 263693e + 6fecdf4 commit 05365f5
Show file tree
Hide file tree
Showing 24 changed files with 2,711 additions and 1,070 deletions.
20 changes: 18 additions & 2 deletions Configurator/Configurator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\StreamDeckMonitor\libs\OpenHardwareMonitorLib.dll</HintPath>
</Reference>
<Reference Include="StreamDeckSharp, Version=0.1.8.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="OpenMacroBoard.SDK">
<HintPath>..\StreamDeckMonitor\libs\OpenMacroBoard.SDK.dll</HintPath>
</Reference>
<Reference Include="StreamDeckSharp">
<HintPath>..\StreamDeckMonitor\libs\StreamDeckSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
Expand All @@ -108,7 +110,17 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="RestoreConfigChoice.xaml.cs">
<DependentUpon>RestoreConfigChoice.xaml</DependentUpon>
</Compile>
<Compile Include="ThreadManager.cs" />
<Compile Include="DeviceChoice.xaml.cs">
<DependentUpon>DeviceChoice.xaml</DependentUpon>
</Compile>
<Page Include="RestoreConfigChoice.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand All @@ -121,6 +133,10 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="DeviceChoice.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
Expand Down
20 changes: 20 additions & 0 deletions Configurator/DeviceChoice.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Window x:Class="Configurator.DeviceChoice"
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:local="clr-namespace:Configurator"
mc:Ignorable="d"
Title="Device Selector" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Height="290" Width="315">

<Grid Background="White">
<Image VerticalAlignment="Top" Source="resources/SDMlogo.png" Margin="22,18,0,0" HorizontalAlignment="Left" Width="259" Height="48"/>
<Label Content=" Please choose the Stream Deck device you own .." HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,85,0,0" Width="302" VerticalContentAlignment="Center" Height="42"/>
<RadioButton x:Name="EnableStandard" Content="Stream Deck" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="93,147,0,0" Width="100" TabIndex="11" Height="15"/>
<RadioButton x:Name="EnableMini" Content="Stream Deck - Mini" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="93,167,0,0" Width="124" TabIndex="11" Height="15"/>
<Button x:Name="ButtonSave" Content="Save Device Choice" Click="ButtonSave_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Width="125" Margin="92,205,0,0" Height="22" TabIndex="20" >
</Button>

</Grid>

</Window>
43 changes: 43 additions & 0 deletions Configurator/DeviceChoice.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using SharedManagers;
using System.Windows;

namespace Configurator
{
public partial class DeviceChoice : Window
{
public DeviceChoice()
{
InitializeComponent();

//check for device setting
string deckDevice = SharedSettings.config.Read("selectedDevice", "StreamDeck_Device");
if (deckDevice == "1")
{
EnableStandard.IsChecked = true;
}
else
{
EnableMini.IsChecked = true;
}
}

private void ButtonSave_Click(object sender, RoutedEventArgs e)
{
if (EnableStandard.IsChecked == true)
{
SharedSettings.config.Write("selectedDevice", "1", "StreamDeck_Device");
}

if (EnableMini.IsChecked == true)
{
SharedSettings.config.Write("selectedDevice", "2", "StreamDeck_Device");
}

SharedSettings.config.Write("choiceMade", "true", "StreamDeck_Device");

MainWindow mainWindow = new MainWindow();
mainWindow.Show();
Close();
}
}
}
305 changes: 223 additions & 82 deletions Configurator/MainWindow.xaml

Large diffs are not rendered by default.

Loading

0 comments on commit 05365f5

Please sign in to comment.