Skip to content

Commit

Permalink
Add device status to Tester application
Browse files Browse the repository at this point in the history
Updates #145
  • Loading branch information
Nicholas Martin committed Jun 19, 2016
1 parent 8f8693c commit dc62e9e
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
22 changes: 18 additions & 4 deletions Corale.Colore.Tester/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
xmlns:xckt="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:viewModels="clr-namespace:Corale.Colore.Tester.ViewModels"
mc:Ignorable="d"
Title="Colore Integration Testing Tool" Height="300" Width="679.577">
Title="Colore Integration Testing Tool" Height="340" Width="680">
<Grid>

<TabControl x:Name="DevicesTabControl" HorizontalAlignment="Left" Height="269" VerticalAlignment="Top"
Width="672">
<TabControl x:Name="DevicesTabControl" Height="309" VerticalAlignment="Top">
<TabItem Header="Keyboard">
<Grid Background="#FFE5E5E5">
<Grid.DataContext>
Expand Down Expand Up @@ -100,6 +99,9 @@
HorizontalAlignment="Center" Command="{Binding IndexerCommand}" />
</StackPanel>
</StackPanel>
<StatusBar HorizontalAlignment="Left" Height="20" Margin="0,241,-120,0" VerticalAlignment="Top" Width="786" Grid.ColumnSpan="3">
<TextBlock x:Name="KeyboardConnected" Text="{Binding Connected}" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StatusBar>

</Grid>
</TabItem>
Expand All @@ -120,7 +122,7 @@
<Button x:Name="SetAllButton1" Content="SetAll" VerticalAlignment="Top" Width="75"
Margin="0,6,0,0" Command="{Binding AllCommand, Mode=OneWay}" />
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button x:Name="SetBreathingColorMouseButton" Content="One Color Breathe" VerticalAlignment="Top"
<Button x:Name="SetBreathingColorMouseButton" Content="One Color Breathe" VerticalAlignment="Top"
Width="110" Margin="2,6,0,0" Command="{Binding BreathingOneColorCommand, Mode=OneWay}" />
<Button x:Name="SetBreathingColorsMouseButton" Content="Two Color Breathe" VerticalAlignment="Top"
Width="110" Margin="2,6,0,0" Command="{Binding BreathingTwoColorCommand, Mode=OneWay}" />
Expand Down Expand Up @@ -189,6 +191,9 @@
HorizontalAlignment="Center" Command="{Binding GridLedCommand}" />
</StackPanel>
</StackPanel>
<StatusBar HorizontalAlignment="Left" Height="20" Margin="0,241,-120,0" VerticalAlignment="Top" Width="786" Grid.ColumnSpan="3">
<TextBlock x:Name="MouseConnected" Text="{Binding Connected}" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StatusBar>
</Grid>
</Grid>
</TabItem>
Expand Down Expand Up @@ -252,6 +257,9 @@
Height="26" HorizontalAlignment="Center" Command="{Binding IndexerCommand}" />
</StackPanel>
</StackPanel>
<StatusBar HorizontalAlignment="Left" Height="20" Margin="0,241,-120,0" VerticalAlignment="Top" Width="786" Grid.ColumnSpan="3">
<TextBlock x:Name="MousepadConnected" Text="{Binding Connected}" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StatusBar>
</Grid>
</Grid>
</TabItem>
Expand Down Expand Up @@ -328,6 +336,9 @@
HorizontalAlignment="Center" Command="{Binding IndexerCommand}" />
</StackPanel>
</StackPanel>
<StatusBar HorizontalAlignment="Left" Height="20" Margin="0,241,-120,0" VerticalAlignment="Top" Width="786" Grid.ColumnSpan="3">
<TextBlock x:Name="KeypadConnected" Text="{Binding Connected}" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StatusBar>
</Grid>
</Grid>
</TabItem>
Expand Down Expand Up @@ -368,6 +379,9 @@

<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" />
</StackPanel>
<StatusBar HorizontalAlignment="Left" Height="20" Margin="0,241,-120,0" VerticalAlignment="Top" Width="786" Grid.ColumnSpan="3">
<TextBlock x:Name="HeadsetConnected" Text="{Binding Connected}" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StatusBar>
</Grid>
</TabItem>
<TabItem Header="Misc">
Expand Down
2 changes: 2 additions & 0 deletions Corale.Colore.Tester/ViewModels/HeadsetViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public ICommand BreathingCommand

public ICommand ClearCommand => new DelegateCommand(() => Core.Headset.Instance.Clear());

public string Connected => "Connected: " + Core.Headset.Instance.Connected.ToString();

[NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged(string propertyName)
{
Expand Down
2 changes: 2 additions & 0 deletions Corale.Colore.Tester/ViewModels/KeyboardViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ public IEnumerable<StarlightType> StarlightTypeValues

public IEnumerable<Duration> ReactiveDurationValues => Enum.GetValues(typeof(Duration)).Cast<Duration>();

public string Connected => "Connected: " + Core.Keyboard.Instance.Connected.ToString();

protected virtual void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
Expand Down
2 changes: 2 additions & 0 deletions Corale.Colore.Tester/ViewModels/KeypadViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ public ICommand IndexerCommand

public ICommand ClearCommand => new DelegateCommand(() => Core.Keypad.Instance.Clear());

public string Connected => "Connected: " + Core.Keypad.Instance.Connected.ToString();

[Annotations.NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged(string propertyName)
{
Expand Down
2 changes: 2 additions & 0 deletions Corale.Colore.Tester/ViewModels/MouseViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ public ICommand GridLedCommand

public IEnumerable<Duration> ReactiveDurationValues => Enum.GetValues(typeof(Duration)).Cast<Duration>();

public string Connected => "Connected: " + Core.Mouse.Instance.Connected.ToString();

[Annotations.NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged(string propertyName)
{
Expand Down
2 changes: 2 additions & 0 deletions Corale.Colore.Tester/ViewModels/MousepadViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public IEnumerable<Razer.Mouse.Led> LedValues

public IEnumerable<Direction> WaveDirectionValues => Enum.GetValues(typeof(Direction)).Cast<Direction>();

public string Connected => "Connected: " + Core.Mousepad.Instance.Connected.ToString();

[Annotations.NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged(string propertyName)
{
Expand Down

0 comments on commit dc62e9e

Please sign in to comment.