Skip to content

Commit

Permalink
Forwarded POST messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ChadNedzlek committed Jan 29, 2024
1 parent a55b954 commit 61ed3e2
Show file tree
Hide file tree
Showing 36 changed files with 795 additions and 334 deletions.
62 changes: 31 additions & 31 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Git Version
id: version
uses: codacy/[email protected]
with:
release-branch: main
- name: Restore dependencies
run: dotnet restore -p:IsLocal=false
- name: Build
run: dotnet build --no-restore --configuration Release -p:IsLocal=false -p:Version=${{ steps.version.outputs.version }} -p:PackageVersion=${{ steps.version.outputs.version }}
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release -p:IsLocal=false
- name: Tag the commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "Tagger"
git tag -a ${{ steps.version.outputs.version }} -m "Version ${{ steps.version.outputs.version }}"
git push --follow-tags
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: packages
path: |
.out/packages
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Git Version
id: version
uses: codacy/[email protected]
with:
release-branch: main
- name: Restore dependencies
run: dotnet restore -p:IsLocal=false
- name: Build
run: dotnet build --no-restore --configuration Release -p:IsLocal=false -p:Version=${{ steps.version.outputs.version }} -p:PackageVersion=${{ steps.version.outputs.version }}
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release -p:IsLocal=false
- name: Tag the commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "Tagger"
git tag -a ${{ steps.version.outputs.version }} -m "Version ${{ steps.version.outputs.version }}"
git push --follow-tags
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: packages
path: |
.out/packages
5 changes: 2 additions & 3 deletions BasicDiceMonitor/App.xaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Application x:Class="BasicDiceMonitor.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BasicDiceMonitor"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
</Application>
6 changes: 2 additions & 4 deletions BasicDiceMonitor/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System.Configuration;
using System.Data;
using System.Windows;
using System.Windows;

namespace BasicDiceMonitor;

/// <summary>
/// Interaction logic for App.xaml
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
Expand Down
2 changes: 1 addition & 1 deletion BasicDiceMonitor/BasicDiceMonitor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\VaettirNet.PixelsDice.Net\VaettirNet.PixelsDice.Net.csproj" />
<ProjectReference Include="..\VaettirNet.PixelsDice.Net\VaettirNet.PixelsDice.Net.csproj"/>
</ItemGroup>

</Project>
38 changes: 26 additions & 12 deletions BasicDiceMonitor/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ToggleButton Grid.Row="0" Grid.Column="0" Content="Scanning" Checked="StartScanning" Unchecked="StopScanning" />
<ItemsControl Grid.Row="1" Grid.Column="0" ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=local:MainWindow}, Path=Dice}">
<ItemsControl Grid.Row="1" Grid.Column="0"
ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=local:MainWindow}, Path=Dice}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
Expand All @@ -28,23 +29,36 @@
<Border Padding="5" BorderThickness="1" CornerRadius="4" BorderBrush="Gray">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="{Binding LedCount}" Margin="2"/>
<Label Grid.Row="0" Grid.Column="1" Content="..." Visibility="{Binding RollingVisibility}" Margin="2" />
<Label Grid.Row="0" Grid.Column="1" Content="{Binding FaceValue}" Visibility="{Binding ValueVisibility}" Margin="2"/>
<Button Grid.Row="1" Grid.Column="0" Command="{x:Static local:MainWindow.ForgetDieCommand}" CommandParameter="{Binding .}" Margin="2">Forget</Button>
<Button Grid.Row="1" Grid.Column="1" Visibility="{Binding ConnectVisibility}" Command="{x:Static local:MainWindow.ConnectDieCommand}" CommandParameter="{Binding .}" Margin="2">Connect</Button>
<Button Grid.Row="1" Grid.Column="1" Visibility="{Binding SaveVisibility}" Command="{x:Static local:MainWindow.SaveDieCommand}" CommandParameter="{Binding .}" Margin="2">Save</Button>
<Label Grid.Row="0" Grid.Column="0" Content="{Binding LedCount}" Margin="2" />
<Label Grid.Row="0" Grid.Column="1" Content="..." Visibility="{Binding RollingVisibility}"
Margin="2" />
<Label Grid.Row="0" Grid.Column="1" Content="{Binding FaceValue}"
Visibility="{Binding ValueVisibility}" Margin="2" />
<Button Grid.Row="1" Grid.Column="0" Command="{x:Static local:MainWindow.ForgetDieCommand}"
CommandParameter="{Binding .}" Margin="2">
Forget
</Button>
<Button Grid.Row="1" Grid.Column="1" Visibility="{Binding ConnectVisibility}"
Command="{x:Static local:MainWindow.ConnectDieCommand}"
CommandParameter="{Binding .}" Margin="2">
Connect
</Button>
<Button Grid.Row="1" Grid.Column="1" Visibility="{Binding SaveVisibility}"
Command="{x:Static local:MainWindow.SaveDieCommand}" CommandParameter="{Binding .}"
Margin="2">
Save
</Button>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</Window>
</Window>
Loading

0 comments on commit 61ed3e2

Please sign in to comment.