diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2019-09-03 09:51:32 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2019-09-03 09:51:32 +0300 |
| commit | 50b4615b65c7c4566637993868d24c9de939c8bb (patch) | |
| tree | fc3d54a3bb5dbc053275bf20cb15596f944ea9c5 /Software/Visual_Studio/MachineStudio | |
| parent | d07b62cf2e014da6f7c7226ce7ff017542161708 (diff) | |
| download | Tango-50b4615b65c7c4566637993868d24c9de939c8bb.tar.gz Tango-50b4615b65c7c4566637993868d24c9de939c8bb.zip | |
Hardware version comparison, change colors according to themes
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
4 files changed, 22 insertions, 22 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs index 801aa0a72..628613fea 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/ComparisonWizardViewVM.cs @@ -125,6 +125,8 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels private void GenerateReport() { + _notification.ShowError($"Error generating HW version comparison report.\n"); + SaveFileDialog dlg = new SaveFileDialog(); dlg.Title = "Save Report"; dlg.Filter = "CSV Files|*.csv"; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/ComparisonWizardView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/ComparisonWizardView.xaml index af18d0003..d8a125e02 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/ComparisonWizardView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/ComparisonWizardView.xaml @@ -8,21 +8,21 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.MachineStudio.HardwareDesigner.ViewModels" mc:Ignorable="d" - d:DesignHeight="800" d:DesignWidth="800" Height="700" Width="1100"> + d:DesignHeight="800" d:DesignWidth="800" Height="700" Width="1100" Foreground="{StaticResource Dialog.Foreground}" Background="{StaticResource Dialog.Background}"> <UserControl.Resources> <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/> <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" /> <Style TargetType="TextBlock" x:Key="DifferenceTextBoxStyle"> <Style.Triggers> <DataTrigger Binding="{Binding IsDifferent}" Value="True" > - <Setter Property="Foreground" Value="red"/> + <Setter Property="Foreground" Value="{StaticResource RedBrush100}"/> </DataTrigger> </Style.Triggers> </Style> <Style TargetType="TextBlock" x:Key="CollectionHasDifferenceTextBox"> <Style.Triggers> <DataTrigger Binding="{Binding HasDifferences}" Value="True" > - <Setter Property="Foreground" Value="red"/> + <Setter Property="Foreground" Value="{StaticResource RedBrush100}"/> </DataTrigger> </Style.Triggers> </Style> @@ -40,25 +40,23 @@ <RowDefinition Height="Auto"></RowDefinition> </Grid.RowDefinitions> <UniformGrid Columns="3" Grid.Row="0" > - <!--<materialDesign:PackIcon Kind="Pencil" Width="24" Height="24" Foreground="Silver" VerticalAlignment="Center" Margin="5,5,0,0"/>--> <ComboBox Margin="10 0 0 0" HorizontalAlignment="Left" IsEnabled="{Binding IsFree}" ItemsSource="{Binding HardwareVersions}" SelectedItem="{Binding SelectedVersion1}" Width="300" FontSize="16" FontWeight="Bold" materialDesign:HintAssist.Hint="Hardware Version 1"> <ComboBox.ItemTemplate> <DataTemplate> - <TextBlock><Run Text="{Binding Name}"></Run> <Run></Run> <Run Foreground="{StaticResource MainWindow.Foreground}" FontSize="14">v</Run><Run Foreground="{StaticResource MainWindow.Foreground}" FontSize="14" Text="{Binding Version}"></Run></TextBlock> + <TextBlock><Run Text="{Binding Name}"></Run> <Run></Run> <Run Foreground="{StaticResource Dialog.Foreground}" FontSize="14">v</Run><Run Foreground="{StaticResource Dialog.Foreground}" FontSize="14" Text="{Binding Version}"></Run></TextBlock> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> - <TextBlock Text="Comparison Wizard" Foreground="Silver" FontStyle="Italic" FontWeight="Bold" FontSize="28" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock> + <TextBlock Text="Comparison Wizard" Foreground="{StaticResource LightGrayBrush}" FontStyle="Italic" FontWeight="Bold" FontSize="28" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock> <ComboBox IsEnabled="{Binding IsFree}" ItemsSource="{Binding HardwareVersions}" SelectedItem="{Binding SelectedVersion2}" Width="300" FontSize="16" FontWeight="Bold" materialDesign:HintAssist.Hint="Hardware Version 2"> <ComboBox.ItemTemplate> <DataTemplate> - <TextBlock><Run Text="{Binding Name}"></Run> <Run></Run> <Run Foreground="{StaticResource MainWindow.Foreground}" FontSize="14">v</Run><Run Foreground="{StaticResource MainWindow.Foreground}" FontSize="14" Text="{Binding Version}"></Run></TextBlock> + <TextBlock><Run Text="{Binding Name}"></Run> <Run></Run> <Run Foreground="{StaticResource Dialog.Foreground}" FontSize="14">v</Run><Run Foreground="{StaticResource Dialog.Foreground}" FontSize="14" Text="{Binding Version}"></Run></TextBlock> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> - <!--<Button Command="{Binding CompareCommand}" FontSize="16" Width="100" HorizontalAlignment="Right">Comp</Button>--> </UniformGrid> <StackPanel Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Center" Margin="10 0 0 0" HorizontalAlignment="Left"> <CheckBox Name="cbShowOnlyDifference" IsChecked="{Binding IsShowDifference}" VerticalAlignment="Center"></CheckBox> @@ -79,7 +77,7 @@ <ColumnDefinition Width="500*"/> </Grid.ColumnDefinitions> <Border Name="LeftB" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"> - <materialDesign:Card Margin="5,10,5,0" Background="{DynamicResource WhiteBackgroundBrush}" Padding="20 10"> + <materialDesign:Card Margin="5,10,5,0" Padding="20 10"> <StackPanel Orientation="Vertical"> <ItemsControl Margin="10,0,0,0" Name="ComponentListLeft" ItemsSource="{Binding Components}" HorizontalContentAlignment="Stretch"> <ItemsControl.ItemTemplate> @@ -145,7 +143,7 @@ </Style.Triggers> </Style> </Border.Style> - <TextBlock Text="None" Foreground="Red" FontWeight="SemiBold" HorizontalAlignment="Center" FontSize="16" VerticalAlignment="Center"/> + <TextBlock Text="None" Foreground="{StaticResource RedBrush100}" FontWeight="SemiBold" HorizontalAlignment="Center" FontSize="16" VerticalAlignment="Center"/> </Border> </Grid> </StackPanel> @@ -176,7 +174,7 @@ </materialDesign:Card> </Border> <Border Name="RightB" Grid.Column="1" Margin="10,0,0,0"> - <materialDesign:Card Margin="5,10,5,0" Background="{DynamicResource WhiteBackgroundBrush}" Padding="20 10"> + <materialDesign:Card Margin="5,10,5,0" Padding="20 10"> <StackPanel Orientation="Vertical"> <ItemsControl Margin="10,0,0,0" Name="ComponentListRight" ItemsSource="{Binding Components}" HorizontalContentAlignment="Stretch"> <ItemsControl.ItemTemplate> @@ -242,7 +240,7 @@ </Style.Triggers> </Style> </Border.Style> - <TextBlock Text="None" FontWeight="SemiBold" HorizontalAlignment="Center" FontSize="16" VerticalAlignment="Center" Foreground="Red"/> + <TextBlock Text="None" FontWeight="SemiBold" HorizontalAlignment="Center" FontSize="16" VerticalAlignment="Center" Foreground="{StaticResource RedBrush100}"/> </Border> </Grid> </StackPanel> @@ -307,7 +305,7 @@ </Grid> </Grid> - <Border CornerRadius="5" HorizontalAlignment="Center" VerticalAlignment="Center" Background="#F6F6F6" Width="700" Height="350"> + <Border CornerRadius="5" HorizontalAlignment="Center" VerticalAlignment="Center" Background="{StaticResource Transparent200}" Width="700" Height="350"> <Border.Style> <Style TargetType="Border"> <Setter Property="Visibility" Value="Hidden"></Setter> @@ -322,10 +320,10 @@ <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" Foreground="Gray">Select two hardware versions to display a comparison report</TextBlock> </Border> <Grid HorizontalAlignment="Stretch" Margin="10" VerticalAlignment="Stretch" Visibility="{Binding IsRunning,Converter={StaticResource BooleanToVisibilityConverter}}" - Background="#93FFFFFF"> + Background="{StaticResource TransparentBackgroundBrush500}"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center"> <mahapps:ProgressRing Foreground="#007ACC" Width="80" Height="80"></mahapps:ProgressRing> - <TextBlock Text="Loading..." FontStyle="Italic" Margin="10 0 0 0" FontSize="30" VerticalAlignment="Center" Foreground="Silver"></TextBlock> + <TextBlock Text="Loading..." FontStyle="Italic" Margin="10 0 0 0" FontSize="30" VerticalAlignment="Center" Foreground="{StaticResource HomePageForeground}"></TextBlock> </StackPanel> </Grid> </Grid> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs index 7c56115e3..52a861930 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs @@ -430,7 +430,7 @@ namespace Tango.MachineStudio.UI.Notifications /// <param name="message">The message.</param> public void ShowError(string message) { - ShowMessageBox(PackIconKind.AlertOctagon, Brushes.Red, message, false); + ShowMessageBox(PackIconKind.AlertOctagon, (SolidColorBrush)Application.Current.Resources["RedBrush100"], message, false); } /// <summary> @@ -439,7 +439,7 @@ namespace Tango.MachineStudio.UI.Notifications /// <param name="message">The message.</param> public void ShowInfo(string message) { - ShowMessageBox(PackIconKind.CommentAlertOutline, Brushes.Black, message, false); + ShowMessageBox(PackIconKind.CommentAlertOutline, (SolidColorBrush)Application.Current.Resources["Dialog.Foreground"], message, false); } /// <summary> @@ -449,7 +449,7 @@ namespace Tango.MachineStudio.UI.Notifications /// <returns></returns> public bool ShowQuestion(string message) { - return ShowMessageBox(PackIconKind.CommentQuestionOutline, Brushes.Black, message, true).Value; + return ShowMessageBox(PackIconKind.CommentQuestionOutline, (SolidColorBrush)Application.Current.Resources["Dialog.Foreground"], message, true).Value; } /// <summary> @@ -458,7 +458,7 @@ namespace Tango.MachineStudio.UI.Notifications /// <param name="message">The message.</param> public void ShowWarning(string message) { - ShowMessageBox(PackIconKind.AlertOutline, Brushes.DarkOrange, message, false); + ShowMessageBox(PackIconKind.AlertOutline, (SolidColorBrush)Application.Current.Resources["OrangeUploadBrush"], message, false); } /// <summary> @@ -468,7 +468,7 @@ namespace Tango.MachineStudio.UI.Notifications /// <returns></returns> public bool ShowErrorQuestion(string message) { - return ShowMessageBox(PackIconKind.CommentAlertOutline, Brushes.DarkOrange, message, true).Value; + return ShowMessageBox(PackIconKind.CommentAlertOutline, (SolidColorBrush)Application.Current.Resources["OrangeUploadBrush"], message, true).Value; } /// <summary> @@ -568,7 +568,7 @@ namespace Tango.MachineStudio.UI.Notifications Owner = Application.Current.MainWindow, Message = message, IconKind = PackIconKind.Pencil, - IconColor = Brushes.DimGray, + IconColor = (SolidColorBrush)Application.Current.Resources["DimGrayBrush"], Hint = hint, Response = defaultResponse }; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml index e037e3630..988e3c21f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml @@ -30,7 +30,7 @@ </StackPanel> <Grid> <StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="0 30 0 0"> - <materialDesign:PackIcon Kind="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=IconKind}" VerticalAlignment="Top" Width="50" Height="50" Foreground="{StaticResource Dialog.Foreground}" /> + <materialDesign:PackIcon Kind="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=IconKind}" VerticalAlignment="Top" Width="50" Height="50" Foreground="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=IconColor}" /> <TextBlock Padding="0 10 0 0" TextWrapping="Wrap" Margin="10 0 0 0" VerticalAlignment="Top" FontSize="14" Text="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=Message}" Width="400" Foreground="{StaticResource Dialog.Foreground}"></TextBlock> </StackPanel> </Grid> |
