Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,36 @@
<data name="About" xml:space="preserve">
<value>About</value>
</data>
<data name="AddControllerEvent" xml:space="preserve">
<value>Add a new controller event</value>
</data>
<data name="AddControllerEvents" xml:space="preserve">
<value>Add controller events</value>
</data>
<data name="AddControllerProfile" xml:space="preserve">
<value>Add a new controller profile</value>
</data>
<data name="AddControllerProfiles" xml:space="preserve">
<value>Add controller profiles</value>
</data>
<data name="AddControlPoint" xml:space="preserve">
<value>Add a new control point</value>
</data>
<data name="AddControlPoints" xml:space="preserve">
<value>Add control points</value>
</data>
<data name="AddCreation" xml:space="preserve">
<value>Add a new creation</value>
</data>
<data name="AddCreations" xml:space="preserve">
<value>Add creations</value>
</data>
<data name="Address" xml:space="preserve">
<value>Address</value>
</data>
<data name="AddSequence" xml:space="preserve">
<value>Add a new sequence</value>
</data>
<data name="AddSequences" xml:space="preserve">
<value>Add sequences</value>
</data>
Expand Down Expand Up @@ -228,6 +243,9 @@
<data name="ConnectingTo" xml:space="preserve">
<value>Connecting to: </value>
</data>
<data name="ConnectToDevice" xml:space="preserve">
<value>Connect to the device</value>
</data>
<data name="Controller" xml:space="preserve">
<value>Controller</value>
</data>
Expand Down Expand Up @@ -276,6 +294,9 @@
<data name="DefaultProfile" xml:space="preserve">
<value>Default profile</value>
</data>
<data name="DeleteControlPoint" xml:space="preserve">
<value>Delete the control point</value>
</data>
<data name="Deleting" xml:space="preserve">
<value>Deleting...</value>
</data>
Expand Down Expand Up @@ -306,6 +327,9 @@
<data name="DurationMs" xml:space="preserve">
<value>Duration (ms)</value>
</data>
<data name="EditSequence" xml:space="preserve">
<value>Edit the sequence</value>
</data>
<data name="EnterControlPointDuration" xml:space="preserve">
<value>Enter the control point duration between 300 and 10000 ms.</value>
</data>
Expand Down Expand Up @@ -381,6 +405,9 @@
<data name="ImportSuccessful" xml:space="preserve">
<value>Import successful:</value>
</data>
<data name="ImportTheCreation" xml:space="preserve">
<value>Import the creation</value>
</data>
<data name="Information" xml:space="preserve">
<value>Information</value>
</data>
Expand Down Expand Up @@ -492,6 +519,9 @@
<data name="Saving" xml:space="preserve">
<value>Saving...</value>
</data>
<data name="Scan" xml:space="preserve">
<value>Scan for devices</value>
</data>
<data name="ScanForDevicesFirst" xml:space="preserve">
<value>Scan for devices before adding controller events!</value>
</data>
Expand Down Expand Up @@ -534,6 +564,9 @@
<data name="Settings" xml:space="preserve">
<value>Settings</value>
</data>
<data name="SetupChannel" xml:space="preserve">
<value>Set up the channel</value>
</data>
<data name="Share" xml:space="preserve">
<value>Share</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<Label Grid.Column="0" Text="{extensions:Translate Device}" VerticalOptions="Center"/>
<Button Grid.Column="1" Text="{Binding SelectedDevice.Name}" Command="{Binding SelectDeviceCommand}" Style="{StaticResource PickerButtonStyle}"/>
<controls:FloatingActionButton Grid.Column="2" Style="{StaticResource InlineActionButtonStyle}" Icon="contactless" Command="{Binding OpenDeviceDetailsCommand}" VerticalOptions="Center"/>
<controls:FloatingActionButton Grid.Column="2" Style="{StaticResource InlineActionButtonStyle}" Icon="contactless" Command="{Binding OpenDeviceDetailsCommand}" ToolTipProperties.Text="{extensions:Translate ConnectToDevice}" VerticalOptions="Center"/>
</Grid>

<BoxView Style="{StaticResource DividerBoxViewStyle}" Margin="5,8,5,8"/>
Expand Down Expand Up @@ -90,7 +90,7 @@
</Grid.ColumnDefinitions>

<Button Grid.Column="0" Text="{Binding Action.ChannelOutputType}" Command="{Binding SelectChannelOutputTypeCommand}" Style="{StaticResource PickerButtonStyle}"/>
<controls:FloatingActionButton Grid.Column="1" Style="{StaticResource InlineActionButtonStyle}" Icon="settings" Command="{Binding OpenChannelSetupCommand}" IsVisible="False">
<controls:FloatingActionButton Grid.Column="1" Style="{StaticResource InlineActionButtonStyle}" Icon="settings" Command="{Binding OpenChannelSetupCommand}" ToolTipProperties.Text="{extensions:Translate SetupChannel}" IsVisible="False">
<controls:FloatingActionButton.Triggers>
<DataTrigger TargetType="controls:FloatingActionButton" Binding="{Binding Action.ChannelOutputType}" Value="{x:Static creationManagement:ChannelOutputType.ServoMotor}">
<Setter Property="IsVisible" Value="True"/>
Expand Down Expand Up @@ -185,7 +185,7 @@
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Text="{Binding Action.SequenceName}" Command="{Binding SelectSequenceCommand}" Style="{StaticResource PickerButtonStyle}"/>
<controls:FloatingActionButton Grid.Column="1" Style="{StaticResource FloatingActionButtonStyle}" BackgroundColor="Gray" Icon="settings" Command="{Binding OpenSequenceEditorCommand}" VerticalOptions="Center"/>
<controls:FloatingActionButton Grid.Column="1" Style="{StaticResource FloatingActionButtonStyle}" BackgroundColor="Gray" Icon="settings" Command="{Binding OpenSequenceEditorCommand}" ToolTipProperties.Text="{extensions:Translate EditSequence}" VerticalOptions="Center"/>
</Grid>
</Grid>
</StackLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<TapGestureRecognizer Command="{Binding RenameProfileCommand}"/>
</Label.GestureRecognizers>
</Label>
<controls:FloatingActionButton Style="{StaticResource InlineActionButtonStyle}" Icon="play_arrow" Command="{Binding PlayCommand}" HorizontalOptions="End" VerticalOptions="Center"/>
<controls:FloatingActionButton Style="{StaticResource InlineActionButtonStyle}" Icon="play_arrow" Command="{Binding PlayCommand}" ToolTipProperties.Text="{extensions:Translate Play}" HorizontalOptions="End" VerticalOptions="Center"/>
</Grid>

<!-- Controller event list -->
Expand Down Expand Up @@ -107,7 +107,7 @@
</CollectionView.EmptyView>
</CollectionView>

<controls:FloatingActionButton Grid.Row="0" Grid.RowSpan="2" Style="{StaticResource FloatingActionButtonStyle}" Icon="add" Command="{Binding AddControllerEventCommand}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>
<controls:FloatingActionButton Grid.Row="0" Grid.RowSpan="2" Style="{StaticResource FloatingActionButtonStyle}" Icon="add" Command="{Binding AddControllerEventCommand}" ToolTipProperties.Text="{extensions:Translate AddControllerEvent}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>

</Grid>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Frame Grid.Column="0" WidthRequest="40" HeightRequest="40" BackgroundColor="{Binding Id, Converter={StaticResource IntToColor}}" CornerRadius="20" Padding="0" HasShadow="False" VerticalOptions="Center">
<Border Grid.Column="0" WidthRequest="40" HeightRequest="40" BackgroundColor="{Binding Id, Converter={StaticResource IntToColor}}" StrokeShape="RoundRectangle 20" Padding="0" VerticalOptions="Center">
<Label Text="{Binding Name, Converter={StaticResource TextToCapitalInitial}}" TextColor="White" FontSize="Medium" HorizontalOptions="Center" VerticalOptions="Center"/>
</Frame>
</Border>
<Label Grid.Column="1" Text="{Binding Name}" FontSize="Large" FontAttributes="Bold" VerticalOptions="CenterAndExpand"/>
</Grid>
</SwipeView>
Expand Down Expand Up @@ -113,7 +113,7 @@
</Frame>
</Grid>

<controls:FloatingActionButton Grid.Row="0" Style="{StaticResource FloatingActionButtonStyle}" Icon="add" Command="{Binding AddCreationCommand}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>
<controls:FloatingActionButton Grid.Row="0" Style="{StaticResource FloatingActionButtonStyle}" Icon="add" Command="{Binding AddCreationCommand}" ToolTipProperties.Text="{extensions:Translate AddCreation}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>
</Grid>

<controls:Dialogs x:Name="Dialogs" AbsoluteLayout.LayoutBounds="0, 0, 1, 1" AbsoluteLayout.LayoutFlags="All"/>
Expand Down
4 changes: 2 additions & 2 deletions BrickController2/BrickController2/UI/Pages/CreationPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<TapGestureRecognizer Command="{Binding RenameCreationCommand}"/>
</Label.GestureRecognizers>
</Label>
<controls:FloatingActionButton Style="{StaticResource InlineActionButtonStyle}" Icon="play_arrow" Command="{Binding PlayCommand}" HorizontalOptions="End" VerticalOptions="Center"/>
<controls:FloatingActionButton Style="{StaticResource InlineActionButtonStyle}" Icon="play_arrow" Command="{Binding PlayCommand}" ToolTipProperties.Text="{extensions:Translate Play}" HorizontalOptions="End" VerticalOptions="Center"/>
</Grid>

<!-- Controller profile list -->
Expand All @@ -62,7 +62,7 @@
</CollectionView.EmptyView>
</CollectionView>

<controls:FloatingActionButton Grid.Row="0" Grid.RowSpan="2" Style="{StaticResource FloatingActionButtonStyle}" Icon="add" Command="{Binding AddControllerProfileCommand}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>
<controls:FloatingActionButton Grid.Row="0" Grid.RowSpan="2" Style="{StaticResource FloatingActionButtonStyle}" Icon="add" Command="{Binding AddControllerProfileCommand}" ToolTipProperties.Text="{extensions:Translate AddControllerProfile}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>

</Grid>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" BackgroundColor="#80000000" ZIndex="1"/>
<zxing:BarcodeGeneratorView Grid.Row="1" Grid.Column="0" HorizontalOptions="Center" VerticalOptions="Center" HeightRequest="64" WidthRequest="64" Format="{Binding Format}" Value="{Binding CurrentValue}" BarcodeMargin="0" Margin="20" ZIndex="2" />

<controls:FloatingActionButton Grid.Row="3" Grid.Column="1" Style="{StaticResource InlineActionButtonStyle}" Icon="download" Command="{Binding ImportCommand}" HorizontalOptions="Center" VerticalOptions="Center" Margin="10" ZIndex="3">
<controls:FloatingActionButton Grid.Row="3" Grid.Column="1" Style="{StaticResource InlineActionButtonStyle}" Icon="download" Command="{Binding ImportCommand}" ToolTipProperties.Text="{extensions:Translate ImportTheCreation}" HorizontalOptions="Center" VerticalOptions="Center" Margin="10" ZIndex="3">
<controls:FloatingActionButton.Triggers>
<DataTrigger TargetType="controls:FloatingActionButton" Binding="{Binding IsCurrentValueValid}" Value="True">
<Setter Property="BackgroundColor" Value="{DynamicResource InlineButtonColor}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</CollectionView.EmptyView>
</CollectionView>

<controls:FloatingActionButton Style="{StaticResource FloatingActionButtonStyle}" Icon="search" Command="{Binding ScanCommand}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>
<controls:FloatingActionButton Style="{StaticResource FloatingActionButtonStyle}" Icon="search" Command="{Binding ScanCommand}" ToolTipProperties.Text="{extensions:Translate Scan}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>

</Grid>

Expand Down
2 changes: 1 addition & 1 deletion BrickController2/BrickController2/UI/Pages/DevicePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
</StackLayout>
</ScrollView>

<controls:FloatingActionButton Style="{StaticResource FloatingActionButtonStyle}" Icon="search" ImageColor="White" Command="{Binding ScanCommand}" IsVisible="{Binding CanBePowerSource}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>
<controls:FloatingActionButton Style="{StaticResource FloatingActionButtonStyle}" Icon="search" ImageColor="White" Command="{Binding ScanCommand}" ToolTipProperties.Text="{extensions:Translate Scan}" IsVisible="{Binding CanBePowerSource}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>
</Grid>

<controls:Dialogs x:Name="Dialogs" AbsoluteLayout.LayoutBounds="0, 0, 1, 1" AbsoluteLayout.LayoutFlags="All"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<Label Text="{Binding Value, Converter={StaticResource FloatValueToPercent}}" WidthRequest="35" HorizontalOptions="End" HorizontalTextAlignment="End" VerticalTextAlignment="Center"/>
</StackLayout>
<Button Grid.Column="1" Text="{Binding DurationMs}" Command="{Binding BindingContext.ChangeControlPointDurationCommand, Source={x:Reference Page}}" CommandParameter="{Binding .}" Style="{StaticResource PickerButtonStyle}" FontSize="Small"/>
<ImageButton Grid.Column="2" Command="{Binding BindingContext.DeleteControlPointCommand, Source={x:Reference Page}}" CommandParameter="{Binding .}" BackgroundColor="Transparent" WidthRequest="30" HeightRequest="30" VerticalOptions="Center" Margin="4,0,4,0">
<ImageButton Grid.Column="2" Command="{Binding BindingContext.DeleteControlPointCommand, Source={x:Reference Page}}" CommandParameter="{Binding .}" ToolTipProperties.Text="{extensions:Translate DeleteControlPoint}" BackgroundColor="Transparent" WidthRequest="30" HeightRequest="30" VerticalOptions="Center" Margin="4,0,4,0">
<ImageButton.Source>
<FontImageSource x:Name="ImageSource" FontFamily="Icons" Glyph="clear" Color="{DynamicResource NegativeColor}" />
</ImageButton.Source>
Expand All @@ -104,7 +104,7 @@
</CollectionView.EmptyView>
</CollectionView>

<controls:FloatingActionButton Grid.Row="0" Grid.RowSpan="4" Style="{StaticResource FloatingActionButtonStyle}" Icon="add" Command="{Binding AddControlPointCommand}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>
<controls:FloatingActionButton Grid.Row="0" Grid.RowSpan="4" Style="{StaticResource FloatingActionButtonStyle}" Icon="add" Command="{Binding AddControlPointCommand}" ToolTipProperties.Text="{extensions:Translate AddControlPoint}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>

</Grid>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Frame Grid.Column="0" WidthRequest="40" HeightRequest="40" BackgroundColor="{Binding Id, Converter={StaticResource IntToColor}}" CornerRadius="20" Padding="0" HasShadow="False" VerticalOptions="Center">
<Border Grid.Column="0" WidthRequest="40" HeightRequest="40" BackgroundColor="{Binding Id, Converter={StaticResource IntToColor}}" StrokeShape="RoundRectangle 20" Padding="0" VerticalOptions="Center">
<Label Text="{Binding Name, Converter={StaticResource TextToCapitalInitial}}" TextColor="White" FontSize="Medium" HorizontalOptions="Center" VerticalOptions="Center"/>
</Frame>
</Border>
<Label Grid.Column="1" Text="{Binding Name}" FontSize="Large" FontAttributes="Bold" VerticalOptions="CenterAndExpand"/>
</Grid>
</SwipeView>
Expand All @@ -60,7 +60,7 @@
</CollectionView.EmptyView>
</CollectionView>

<controls:FloatingActionButton Style="{StaticResource FloatingActionButtonStyle}" Icon="add" Command="{Binding AddSequenceCommand}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>
<controls:FloatingActionButton Style="{StaticResource FloatingActionButtonStyle}" Icon="add" Command="{Binding AddSequenceCommand}" ToolTipProperties.Text="{extensions:Translate AddSequence}" HorizontalOptions="End" VerticalOptions="End" Margin="10"/>

</Grid>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public ControllerProfilePageViewModel(
RenameProfileCommand = new SafeCommand(async () => await RenameControllerProfileAsync());
AddControllerEventCommand = new SafeCommand(async () => await AddControllerEventAsync());
PlayCommand = new SafeCommand(async () => await PlayAsync());
ControllerActionTappedCommand = new SafeCommand<ControllerActionViewModel>(async controllerActionViewModel => await NavigationService.NavigateToAsync<ControllerActionPageViewModel>(new NavigationParameters(("controlleraction", controllerActionViewModel.ControllerAction))));
ControllerActionTappedCommand = new SafeCommand<ControllerActionViewModel>(ShowActionAsync);
DeleteControllerEventCommand = new SafeCommand<ControllerEvent>(async controllerEvent => await DeleteControllerEventAsync(controllerEvent));
DeleteControllerActionCommand = new SafeCommand<ControllerAction>(async controllerAction => await DeleteControllerActionAsync(controllerAction));

Expand Down Expand Up @@ -234,6 +234,26 @@ await _dialogService.ShowProgressDialogAsync(
{
}
}
private async Task ShowActionAsync(ControllerActionViewModel controllerActionViewModel)
{
try
{
if (_deviceManager.Devices?.Count == 0)
{
await _dialogService.ShowMessageBoxAsync(
Translate("Warning"),
Translate("MissingDevices"),
Translate("Ok"),
_disappearingTokenSource.Token);
return;
}

await NavigationService.NavigateToAsync<ControllerActionPageViewModel>(new NavigationParameters(("controlleraction", controllerActionViewModel.ControllerAction)));
}
catch (OperationCanceledException)
{
}
}

private async Task PlayAsync()
{
Expand Down