diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-08 14:37:29 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-08 14:37:29 +0200 |
| commit | 0ec56a54ca0c64a2f7ba402a1b99b3c217cd5ae5 (patch) | |
| tree | fde0d6465b2246c297278904f666909c229b35dd /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI | |
| parent | f7cd23fa57b58bf86b71cae469f37c03913a9a80 (diff) | |
| download | Tango-0ec56a54ca0c64a2f7ba402a1b99b3c217cd5ae5.tar.gz Tango-0ec56a54ca0c64a2f7ba402a1b99b3c217cd5ae5.zip | |
Implemented auto scaling of machine studio to screen resolution.
Modified machine connection icons again.
Added Embedded device name to settings.
Added port USB and TCP to settings.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
5 files changed, 68 insertions, 58 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-tcp.png b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-tcp.png Binary files differindex 2d8c684b7..192cbcaa7 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-tcp.png +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-tcp.png diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-usb.png b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-usb.png Binary files differindex 62fab6225..414bbab04 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-usb.png +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-usb.png diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml index f07e7f476..83f41b785 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml @@ -8,27 +8,32 @@ xmlns:views="clr-namespace:Tango.MachineStudio.UI.Views" xmlns:sharedControls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" mc:Ignorable="d" - Title="Tango" Height="720" Width="1280" WindowStartupLocation="CenterOwner" WindowState="Maximized" Foreground="#494949"> + Title="Tango" Height="800" Width="1280" WindowStartupLocation="CenterOwner" WindowState="Maximized" Foreground="#494949" BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}"> + <Grid> - <sharedControls:MultiTransitionControl AlwaysFade="True" TransitionType="Zoom" x:Name="TransitionControl" x:FieldModifier="public"> - <sharedControls:MultiTransitionControl.Controls> - <ContentControl Tag="LoadingView"> - <views:LoadingView></views:LoadingView> - </ContentControl> - <ContentControl Tag="LoginView"> - <views:LoginView></views:LoginView> - </ContentControl> - <ContentControl Tag="MainView"> - <views:MainView></views:MainView> - </ContentControl> - <ContentControl Tag="ShutdownView"> - <views:ShutdownView></views:ShutdownView> - </ContentControl> - </sharedControls:MultiTransitionControl.Controls> - </sharedControls:MultiTransitionControl> + <Viewbox Stretch="Fill" UseLayoutRounding="True" SnapsToDevicePixels="True"> + <Grid Width="1920" Height="1145"> + <sharedControls:MultiTransitionControl AlwaysFade="True" TransitionType="Zoom" x:Name="TransitionControl" x:FieldModifier="public"> + <sharedControls:MultiTransitionControl.Controls> + <ContentControl Tag="LoadingView"> + <views:LoadingView></views:LoadingView> + </ContentControl> + <ContentControl Tag="LoginView"> + <views:LoginView></views:LoginView> + </ContentControl> + <ContentControl Tag="MainView"> + <views:MainView></views:MainView> + </ContentControl> + <ContentControl Tag="ShutdownView"> + <views:ShutdownView></views:ShutdownView> + </ContentControl> + </sharedControls:MultiTransitionControl.Controls> + </sharedControls:MultiTransitionControl> - <Grid Background="Black" Opacity="0.7" x:Name="shadowGrid" Visibility="Hidden"> + <Grid Background="Black" Opacity="0.7" x:Name="shadowGrid" Visibility="Hidden"> - </Grid> + </Grid> + </Grid> + </Viewbox> </Grid> </mahapps:MetroWindow> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index b21b23935..b08c259af 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -184,7 +184,7 @@ namespace Tango.MachineStudio.UI.ViewModels } else { - using (NotificationProvider.PushTaskItem("Connecting to machine " + x.SelectedMachine.Device + "...")) + using (NotificationProvider.PushTaskItem("Connecting to " + x.SelectedMachine.Device + "...")) { try { diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml index d7d0f8dc3..616187288 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -135,10 +135,10 @@ </Button.Background>--> <StackPanel Orientation="Horizontal"> <TextBlock Text="Machine Connection" VerticalAlignment="Center" Foreground="White"></TextBlock> - <materialDesign:PackIcon Margin="10 0 0 0" Width="16" Height="16"> + <materialDesign:PackIcon Margin="10 0 0 0" Width="24" Height="24"> <materialDesign:PackIcon.Style> <Style TargetType="materialDesign:PackIcon"> - <Setter Property="Foreground" Value="#FF6767"></Setter> + <Setter Property="Foreground" Value="#333333"></Setter> <Setter Property="Kind" Value="LanDisconnect"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding ApplicationManager.IsMachineConnected,Mode=OneWay}" Value="True"> @@ -175,43 +175,48 @@ <TextBlock HorizontalAlignment="Right" Margin="0 5 -130 0" FontStyle="Italic" Style="{StaticResource MaterialDesignSubheadingTextBlock}" Foreground="{StaticResource AccentColorBrush}">Select Your Studio Module...</TextBlock> </StackPanel> </Grid> - <ItemsControl ItemsSource="{Binding StudioModuleLoader.UserModules}" Grid.Row="2" Margin="10"> - <ItemsControl.ItemsPanel> - <ItemsPanelTemplate> - <WrapPanel IsItemsHost="True"></WrapPanel> - </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - <ItemsControl.ItemTemplate> - <DataTemplate> - <materialDesign:Card Width="300" Margin="10" Height="400"> - <Grid > - <Grid.RowDefinitions> - <RowDefinition Height="180" /> - <RowDefinition Height="*" /> - <RowDefinition Height="Auto" /> - </Grid.RowDefinitions> - <Image Source="{Binding Image,Mode=OneWay}" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" /> - <Button Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.StartModuleCommand}" CommandParameter="{Binding}" Grid.Row="0" Margin="0,0,20,-35" HorizontalAlignment="Right" Width="70" Height="70" VerticalAlignment="Bottom" Style="{StaticResource MaterialDesignFloatingActionMiniButton}" ToolTip="Start This Module"> - <materialDesign:PackIcon Kind="Play" Width="30" Height="30" /> - </Button> - <StackPanel Grid.Row="1" Margin="8,24,8,0"> - <TextBlock FontWeight="Bold" FontSize="20" Text="{Binding Name,Mode=OneWay}"></TextBlock> - <TextBlock VerticalAlignment="Center" Margin="0 5 0 0" FontSize="14" TextWrapping="Wrap" Text="{Binding Description,Mode=OneWay}"></TextBlock> - </StackPanel> - <StackPanel Grid.Row="2" Margin="8" HorizontalAlignment="Right" Orientation="Horizontal"> - <materialDesign:PopupBox Padding="2,0,2,0" Style="{StaticResource MaterialDesignToolPopupBox}"> - <StackPanel> - <Button Content="More" /> - <Button Content="Options" /> + <Grid Grid.Row="2"> + <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"> + <ItemsControl ItemsSource="{Binding StudioModuleLoader.UserModules}" Margin="10"> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <WrapPanel IsItemsHost="True"></WrapPanel> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + + <ItemsControl.ItemTemplate> + <DataTemplate> + <materialDesign:Card Width="300" Margin="10" Height="400"> + <Grid > + <Grid.RowDefinitions> + <RowDefinition Height="180" /> + <RowDefinition Height="*" /> + <RowDefinition Height="Auto" /> + </Grid.RowDefinitions> + <Image Source="{Binding Image,Mode=OneWay}" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" /> + <Button Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.StartModuleCommand}" CommandParameter="{Binding}" Grid.Row="0" Margin="0,0,20,-35" HorizontalAlignment="Right" Width="70" Height="70" VerticalAlignment="Bottom" Style="{StaticResource MaterialDesignFloatingActionMiniButton}" ToolTip="Start This Module"> + <materialDesign:PackIcon Kind="Play" Width="30" Height="30" /> + </Button> + <StackPanel Grid.Row="1" Margin="8,24,8,0"> + <TextBlock FontWeight="Bold" FontSize="20" Text="{Binding Name,Mode=OneWay}"></TextBlock> + <TextBlock VerticalAlignment="Center" Margin="0 5 0 0" FontSize="14" TextWrapping="Wrap" Text="{Binding Description,Mode=OneWay}"></TextBlock> + </StackPanel> + <StackPanel Grid.Row="2" Margin="8" HorizontalAlignment="Right" Orientation="Horizontal"> + <materialDesign:PopupBox Padding="2,0,2,0" Style="{StaticResource MaterialDesignToolPopupBox}"> + <StackPanel> + <Button Content="More" /> + <Button Content="Options" /> + </StackPanel> + </materialDesign:PopupBox> </StackPanel> - </materialDesign:PopupBox> - </StackPanel> - </Grid> - </materialDesign:Card> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> + </Grid> + </materialDesign:Card> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </ScrollViewer> + </Grid> </Grid> <Grid Grid.Row="1" RenderTransformOrigin="0.5,0.5"> @@ -289,7 +294,7 @@ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="20 0 0 0"> <mahapps:ProgressRing Width="24" Height="24" Foreground="White"></mahapps:ProgressRing> - <TextBlock Text="{Binding NotificationProvider.CurrentTaskItem.Message}" Foreground="White" VerticalAlignment="Center" Margin="10 0 0 0"></TextBlock> + <TextBlock Text="{Binding NotificationProvider.CurrentTaskItem.Message}" Foreground="White" VerticalAlignment="Center" Margin="10 0 0 0" TextWrapping="Wrap"></TextBlock> </StackPanel> </Border> </Grid> |
