-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
2,711 additions
and
1,070 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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(); | ||
} | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.