Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BrickController2/BrickController2/BrickController2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>BrickController2</RootNamespace>
<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
xmlns:converters="clr-namespace:BrickController2.UI.Converters"
xmlns:controls="clr-namespace:BrickController2.UI.Controls"
xmlns:extensions="clr-namespace:BrickController2.UI.MarkupExtensions"
x:Class="BrickController2.UI.Controls.DeviceChannelSelector">
xmlns:viewModels="clr-namespace:BrickController2.UI.ViewModels"
x:Class="BrickController2.UI.Controls.DeviceChannelSelector"
x:DataType="viewModels:ControllerActionPageViewModel">

<ContentView.Resources>
<ResourceDictionary>
Expand Down
2 changes: 1 addition & 1 deletion BrickController2/BrickController2/UI/Controls/Dialogs.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
MinimumHeightRequest="40"
MaximumHeightRequest="200">
<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="x:String">
<Label Text="{Binding}" FontSize="{OnIdiom Large, Desktop=Medium}" FontAttributes="Bold" Margin="0,4"/>
</DataTemplate>
</CollectionView.ItemTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
xmlns:converters="clr-namespace:BrickController2.UI.Converters"
xmlns:extensions="clr-namespace:BrickController2.UI.MarkupExtensions"
xmlns:t="clr-namespace:BrickController2.UI.Templates"
xmlns:settingsVm="clr-namespace:BrickController2.UI.ViewModels.Settings"
x:Class="BrickController2.UI.Controls.SettingsControl"
x:DataType="settingsVm:SettingsPageViewModelBase"
x:Name="Control"
BackgroundColor="{DynamicResource PageBackgroundColor}">

Expand All @@ -31,7 +33,7 @@
</Style>
<t:DataTemplatesSelector x:Key="TemplatesSelector">
<t:DataTemplatesSelector.BoolDataTemplate>
<DataTemplate>
<DataTemplate x:DataType="settingsVm:BoolSettingViewModel">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
Expand All @@ -52,7 +54,7 @@
</t:DataTemplatesSelector.BoolDataTemplate>

<t:DataTemplatesSelector.EnumDataTemplate>
<DataTemplate>
<DataTemplate x:DataType="settingsVm:EnumSettingViewModel">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
Expand All @@ -69,7 +71,7 @@
</t:DataTemplatesSelector.EnumDataTemplate>

<t:DataTemplatesSelector.DoubleDataTemplate>
<DataTemplate>
<DataTemplate x:DataType="settingsVm:DoubleSettingViewModel">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
Expand All @@ -90,7 +92,7 @@
</t:DataTemplatesSelector.DoubleDataTemplate>

<t:DataTemplatesSelector.RgbColorDataTemplate>
<DataTemplate>
<DataTemplate x:DataType="settingsVm:RgbColorSettingViewModel">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
Expand Down Expand Up @@ -126,7 +128,7 @@
<GridItemsLayout Orientation="Vertical" VerticalItemSpacing="{OnIdiom Desktop=10, Default=20}" />
</CollectionView.ItemsLayout>
<CollectionView.GroupHeaderTemplate>
<DataTemplate>
<DataTemplate x:DataType="settingsVm:SettingGroupViewModel">
<SwipeView>
<SwipeView.RightItems>
<SwipeItems Mode="Reveal">
Expand Down
2 changes: 2 additions & 0 deletions BrickController2/BrickController2/UI/Pages/AboutPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
xmlns:extensions="clr-namespace:BrickController2.UI.MarkupExtensions"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:viewModels="clr-namespace:BrickController2.UI.ViewModels"
x:Class="BrickController2.UI.Pages.AboutPage"
x:DataType="viewModels:AboutPageViewModel"
Title="{extensions:Translate About}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
xmlns:extensions="clr-namespace:BrickController2.UI.MarkupExtensions"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:viewModels="clr-namespace:BrickController2.UI.ViewModels"
x:Class="BrickController2.UI.Pages.ChannelSetupPage"
x:DataType="viewModels:ChannelSetupPageViewModel"
Title="{extensions:Translate ChannelSetup}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
xmlns:gameController="clr-namespace:BrickController2.PlatformServices.InputDevice"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:viewModels="clr-namespace:BrickController2.UI.ViewModels"
x:Class="BrickController2.UI.Pages.ControllerActionPage"
x:DataType="viewModels:ControllerActionPageViewModel"
Title="{extensions:Translate ControllerAction}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
xmlns:extensions="clr-namespace:BrickController2.UI.MarkupExtensions"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:viewModels="clr-namespace:BrickController2.UI.ViewModels"
x:Class="BrickController2.UI.Pages.ControllerProfilePage"
x:Name="Page"
x:DataType="viewModels:ControllerProfilePageViewModel"
Title="{extensions:Translate ControllerProfile}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand Down Expand Up @@ -49,7 +51,7 @@

<!-- Controller event -->
<CollectionView.GroupHeaderTemplate>
<DataTemplate>
<DataTemplate x:DataType="viewModels:ControllerEventViewModel">
<SwipeView>
<SwipeView.LeftItems>
<SwipeItems Mode="Execute">
Expand Down Expand Up @@ -79,7 +81,7 @@

<!-- Controller actions -->
<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="viewModels:ControllerActionViewModel">
<SwipeView>
<SwipeView.LeftItems>
<SwipeItems Mode="Execute">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
xmlns:extensions="clr-namespace:BrickController2.UI.MarkupExtensions"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:viewModels="clr-namespace:BrickController2.UI.ViewModels"
xmlns:models="clr-namespace:BrickController2.CreationManagement"
x:Class="BrickController2.UI.Pages.CreationListPage"
x:Name="Page"
x:DataType="viewModels:CreationListPageViewModel"
Title="{extensions:Translate Creations}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand Down Expand Up @@ -39,7 +42,7 @@
<!-- Creation list -->
<CollectionView Grid.Row="0" ItemsSource="{Binding Creations}" SelectionMode="None">
<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="models:Creation">
<SwipeView>
<SwipeView.LeftItems>
<SwipeItems Mode="Execute">
Expand Down
5 changes: 4 additions & 1 deletion BrickController2/BrickController2/UI/Pages/CreationPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
xmlns:extensions="clr-namespace:BrickController2.UI.MarkupExtensions"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:viewModels="clr-namespace:BrickController2.UI.ViewModels"
xmlns:models="clr-namespace:BrickController2.CreationManagement"
x:Class="BrickController2.UI.Pages.CreationPage"
x:Name="Page"
x:DataType="viewModels:CreationPageViewModel"
Title="{extensions:Translate Creation}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand Down Expand Up @@ -42,7 +45,7 @@
<!-- Controller profile list -->
<CollectionView Grid.Row="1" ItemsSource="{Binding Creation.ControllerProfiles}" SelectionMode="None">
<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="models:ControllerProfile">
<SwipeView>
<SwipeView.LeftItems>
<SwipeItems Mode="Execute">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
xmlns:controls="clr-namespace:BrickController2.UI.Controls"
xmlns:extensions="clr-namespace:BrickController2.UI.MarkupExtensions"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:viewModels="clr-namespace:BrickController2.UI.ViewModels"
xmlns:zxing="clr-namespace:ZXing.Net.Maui.Controls;assembly=ZXing.Net.MAUI.Controls"
x:Class="BrickController2.UI.Pages.CreationSharePage"
x:Class="BrickController2.UI.Pages.CreationSharePage"
x:DataType="viewModels:CreationSharePageViewModel"
Comment on lines +8 to +12
Title="{extensions:Translate Share}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
xmlns:extensions="clr-namespace:BrickController2.UI.MarkupExtensions"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:viewModels="clr-namespace:BrickController2.UI.ViewModels"
xmlns:deviceManagement="clr-namespace:BrickController2.DeviceManagement"
x:Class="BrickController2.UI.Pages.DeviceListPage"
x:Name="Page"
x:DataType="viewModels:DeviceListPageViewModel"
Title="{extensions:Translate Devices}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand All @@ -26,7 +29,7 @@
<!-- Device list -->
<CollectionView ItemsSource="{Binding DeviceManager.Devices}" SelectionMode="None">
<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="deviceManagement:Device">
<SwipeView>
<SwipeView.LeftItems>
<SwipeItems Mode="Execute">
Expand Down
6 changes: 4 additions & 2 deletions BrickController2/BrickController2/UI/Pages/DevicePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
xmlns:extensions="clr-namespace:BrickController2.UI.MarkupExtensions"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:viewModels="clr-namespace:BrickController2.UI.ViewModels"
x:Class="BrickController2.UI.Pages.DevicePage"
x:DataType="viewModels:DevicePageViewModel"
Title="{extensions:Translate Device}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand Down Expand Up @@ -114,7 +116,7 @@
<BoxView Style="{StaticResource DividerBoxViewStyle}" Margin="10,20,10,8"/>
<VerticalStackLayout BindableLayout.ItemsSource="{Binding DeviceOutputs}">
<BindableLayout.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="viewModels:DeviceOutputViewModel">
<Grid Style="{StaticResource CollectionItemGridStyle}" Margin="5,0,5,0" RowDefinitions="*,*">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="25"/>
Expand All @@ -125,7 +127,7 @@
<controls:ExtendedSlider Grid.Column="1" Minimum="-100" Maximum="100" IsEnabled="{Binding Device.DeviceState, Converter={StaticResource DeviceConnectedToBool}}" Value="{Binding Output}" TouchUpCommand="{Binding TouchUpCommand}" VerticalOptions="Center"/>
<controls:FloatingActionButton Grid.Column="2" Style="{StaticResource InlineActionButtonStyle}" Icon="settings" ToolTipProperties.Text="{extensions:Translate TestDeviceChannel}"
Command="{Binding TestServoStepperCommand}" Margin="10,0,0,0"
IsVisible="{Binding x:DataType='bool', Source={RelativeSource AncestorType={x:Type VerticalStackLayout}}, Path=BindingContext.IsServoOrStepperSupported}"/>
IsVisible="{Binding IsServoOrStepperSupported}"/>
<BoxView Style="{StaticResource DividerBoxViewStyle}" Grid.Row="1" Grid.ColumnSpan="2" Margin="6,4,6,0"/>
</Grid>
</DataTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
xmlns:vm="clr-namespace:BrickController2.UI.ViewModels"
xmlns:t="clr-namespace:BrickController2.UI.Templates"
x:Class="BrickController2.UI.Pages.DeviceSettingsPage"
x:DataType="vm:DeviceSettingsPageViewModel"
Title="{extensions:Translate DeviceSettings}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:vm="clr-namespace:BrickController2.UI.ViewModels"
x:Class="BrickController2.UI.Pages.InputDeviceTesterPage"
x:DataType="vm:InputDeviceTesterPageViewModel"
Title="{extensions:Translate InputDeviceTester}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand All @@ -33,7 +34,7 @@
</OnIdiom>
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="vm:InputDeviceEventViewModel">
<VerticalStackLayout Padding="{OnIdiom '10,5,10,5', Desktop='10,0,10,0'}">
<HorizontalStackLayout>
<Label Text="{Binding EventCode}" FontSize="Large" FontAttributes="Bold"/>
Expand All @@ -48,7 +49,7 @@
<Label Text="{extensions:Translate PressButtonsOrMoveJoys}" Style="{StaticResource CollectionViewEmptyLabelStyle}"/>
</CollectionView.EmptyView>
<CollectionView.GroupHeaderTemplate>
<DataTemplate>
<DataTemplate x:DataType="vm:InputDeviceGroupViewModel">
<HorizontalStackLayout BackgroundColor="{DynamicResource CollectionViewHeaderBackgroundColor}"
Margin="0,0,0,5" Padding="10">
<controls:ColorImage Grid.Column="0" Icon="sports_esports" Color="{DynamicResource PrimaryColor}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
xmlns:extensions="clr-namespace:BrickController2.UI.MarkupExtensions"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:viewModels="clr-namespace:BrickController2.UI.ViewModels"
x:Class="BrickController2.UI.Pages.ManualDeviceListPage"
x:Name="Page"
x:DataType="viewModels:ManualDeviceListPageViewModel"
Title="{extensions:Translate AddDevicesManually}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand All @@ -30,7 +32,7 @@
<!-- Device list -->
<CollectionView ItemsSource="{Binding GroupedFactoryDatas}" IsGrouped="True">
<CollectionView.GroupHeaderTemplate>
<DataTemplate>
<DataTemplate x:DataType="viewModels:DeviceGroup">
<Grid Style="{StaticResource CollectionItemGridStyle}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
Expand All @@ -44,12 +46,12 @@
</DataTemplate>
</CollectionView.GroupHeaderTemplate>
<CollectionView.GroupFooterTemplate>
<DataTemplate>
<DataTemplate x:DataType="viewModels:DeviceGroup">
<BoxView Style="{StaticResource DividerBoxViewStyle}" Margin="6,6,6,0"/>
</DataTemplate>
</CollectionView.GroupFooterTemplate>
<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="viewModels:DeviceEntry">
<Grid Style="{StaticResource CollectionItemGridStyle}" Padding="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50"/>
Expand Down
4 changes: 3 additions & 1 deletion BrickController2/BrickController2/UI/Pages/PlayerPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
xmlns:extensions="clr-namespace:BrickController2.UI.MarkupExtensions"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:BrickController2.UI.Pages"
xmlns:viewModels="clr-namespace:BrickController2.UI.ViewModels"
x:Class="BrickController2.UI.Pages.PlayerPage"
x:DataType="viewModels:PlayerPageViewModel"
Title="{extensions:Translate Play}"
ios:Page.UseSafeArea="True"
BackgroundColor="{DynamicResource PageBackgroundColor}">
Expand Down Expand Up @@ -56,7 +58,7 @@
<!-- Controller profiles -->
<CollectionView Grid.Row="3" ItemsSource="{Binding ControllerProfiles}" SelectedItem="{Binding ActiveProfile, Mode=TwoWay}" SelectionMode="Single">
<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="viewModels:ControllerProfileViewModel">
<Grid Style="{StaticResource CollectionItemGridStyle}" ColumnDefinitions="*,Auto">
<Label Text="{Binding Name}" FontSize="Large" FontAttributes="Bold" Grid.Column="0"/>
<controls:CheckBox Grid.Column="1" Checked="{Binding IsActive, Mode=OneWay}" ReadOnly="True" IsVisible="{Binding ShowCurrentProfile, Mode=OneWay}" />
Expand Down
Loading
Loading