aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
diff options
context:
space:
mode:
authorMirta <mirta@twine-s.com>2019-08-08 15:25:02 +0300
committerMirta <mirta@twine-s.com>2019-08-08 15:25:02 +0300
commitc7afd7e05b3230a4c652d74effd813b858da8ee3 (patch)
tree5e932dbdf668929ddc416b1706d5b481c2863ba2 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
parentb112abfecb622ac7fcb7c161b03f450fbb58b00a (diff)
parentd627576c770ddab1079940c34057a55206f6a835 (diff)
downloadTango-c7afd7e05b3230a4c652d74effd813b858da8ee3.tar.gz
Tango-c7afd7e05b3230a4c652d74effd813b858da8ee3.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml5
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs26
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindow.xaml31
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml3
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ConnectedMachineViewVM.cs46
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml18
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml6
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml19
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml10
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml3
14 files changed, 128 insertions, 51 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml
index 20e381b70..11ab79afd 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml
@@ -3,14 +3,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Tango.MachineStudio.UI"
xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
- StartupUri="MainWindow.xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d1p1:Ignorable="d" xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006">
+ StartupUri="MainWindow.xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d1p1:Ignorable="d" xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:resources="clr-namespace:Tango.MachineStudio.Common.Resources;assembly=Tango.MachineStudio.Common">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
<!-- Accent and AppTheme setting -->
<ResourceDictionary Source="pack://application:,,,/Tango.MachineStudio.Common;component/Resources/MaterialDesign.xaml"></ResourceDictionary>
-
+ <resources:SharedResourceDictionary Source="pack://application:,,,/Tango.MachineStudio.Common;component/Themes/LightThemeColors.xaml"/>
<!-- Include the Dragablz Material Design style -->
<ResourceDictionary Source="pack://application:,,,/Dragablz;component/Themes/materialdesign.xaml"/>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
index 7aa9ae890..951a40870 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
@@ -17,6 +17,7 @@ using Tango.MachineStudio.Common.StudioApplication;
using Tango.Core.Helpers;
using Tango.MachineStudio.Common.Web;
using Tango.BL.Builders;
+using System.Data.Entity.Core;
namespace Tango.MachineStudio.UI.Authentication
{
@@ -70,14 +71,24 @@ namespace Tango.MachineStudio.UI.Authentication
var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
_client.Environment = settings.DeploymentSlot;
- var response = _client.Login(new LoginRequest()
+
+ LoginResponse response = null;
+
+ try
{
+ response = _client.Login(new LoginRequest()
+ {
- Email = email,
- Password = password,
- Version = AssemblyHelper.GetCurrentAssemblyVersion().ToString(),
+ Email = email,
+ Password = password,
+ Version = AssemblyHelper.GetCurrentAssemblyVersion().ToString(),
- }).Result;
+ }).Result;
+ }
+ catch (Exception ex)
+ {
+ throw new AggregateException(new AuthenticationException("Error logging in to machine service."), ex);
+ }
if (settings.Environment == MachineStudioSettings.WorkingEnvironment.Remote)
{
@@ -88,10 +99,9 @@ namespace Tango.MachineStudio.UI.Authentication
{
ObservablesStaticCollections.Instance.Initialize();
}
- catch (System.Data.Entity.Core.MetadataException)
+ catch (Exception ex)
{
- ObservablesContext.ClearModelStore();
- ObservablesStaticCollections.Instance.Initialize();
+ throw new AggregateException(new MetadataException("Error initializing database connection."), ex);
}
using (ObservablesContext db = ObservablesContext.CreateDefault())
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindow.xaml
index 22338fea7..0408319ea 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindow.xaml
@@ -98,7 +98,7 @@
<fa:ImageAwesome Icon="Play" Width="12" Margin="2">
<fa:ImageAwesome.Style>
<Style TargetType="fa:ImageAwesome">
- <Setter Property="Foreground" Value="#8DD28A"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource GreenMenuDebugBrush}"></Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="Gray"></Setter>
@@ -114,7 +114,7 @@
<fa:ImageAwesome Icon="Stop" Width="12" Margin="2">
<fa:ImageAwesome.Style>
<Style TargetType="fa:ImageAwesome">
- <Setter Property="Foreground" Value="#F38B76"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource OrangeBrush400}"/>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="Gray"></Setter>
@@ -129,7 +129,7 @@
</Menu>
<DockPanel Grid.Row="1">
- <materialDesign:ColorZone Background="#2E2E2E" Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2"
+ <materialDesign:ColorZone Background="{StaticResource GrayBrush300}" Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2"
Mode="PrimaryMid" DockPanel.Dock="Top">
<DockPanel>
<Grid>
@@ -156,22 +156,26 @@
<RowDefinition Height="200*"/>
</Grid.RowDefinitions>
- <controls:ScriptEditorControl BorderThickness="0 1 0 0" BorderBrush="#616161" Text="{Binding Code,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" RunCommand="{Binding RunCommand}" StopCommand="{Binding StopCommand}" HighlightTypes="{Binding HighlightTypes}" IntellisenseTypes="{Binding IntellisenseTypes}"></controls:ScriptEditorControl>
+ <controls:ScriptEditorControl BorderThickness="0 1 0 0"
+ BorderBrush="#616161"
+ Text="{Binding Code,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+ RunCommand="{Binding RunCommand}"
+ StopCommand="{Binding StopCommand}" IntellisenseTypes="{Binding IntellisenseTypes}"
+ HighlightTypes="{Binding HighlightTypes}"/>
+ <GridSplitter Grid.Row="1" Background="{StaticResource DarkGrayBrush100}" Foreground="{StaticResource DarkGrayBrush200}" BorderBrush="{StaticResource DarkGrayBrush200}" Height="5" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
- <GridSplitter Grid.Row="1" Background="#101010" Foreground="#202020" BorderBrush="#202020" Height="5" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
-
- <Grid Grid.Row="2" Background="#1B1B1B">
+ <Grid Grid.Row="2" Background="{StaticResource DarkGrayBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="20"/>
<RowDefinition Height="57*"/>
</Grid.RowDefinitions>
- <Border BorderThickness="0 0 0 1" BorderBrush="#595959">
+ <Border BorderThickness="0 0 0 1" BorderBrush="{StaticResource GrayBrush250}">
<TextBlock Margin="2" HorizontalAlignment="Center">LOG</TextBlock>
</Border>
- <TextBox x:Name="txtLog" TextChanged="TextBox_TextChanged" FontFamily="Lucida Console" Background="#202020" BorderThickness="0" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" Padding="5" IsReadOnly="True" TextWrapping="Wrap" FontSize="11" Foreground="Gainsboro" Grid.Row="2"></TextBox>
+ <TextBox x:Name="txtLog" TextChanged="TextBox_TextChanged" FontFamily="Lucida Console" Background="{StaticResource DarkGrayBrush200}" BorderThickness="0" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" Padding="5" IsReadOnly="True" TextWrapping="Wrap" FontSize="11" Foreground="Gainsboro" Grid.Row="2"></TextBox>
</Grid>
</Grid>
</Grid>
@@ -180,6 +184,7 @@
<Border HorizontalAlignment="Right" Margin="0 -1 10 0" VerticalAlignment="Top" Width="300" Height="40" Padding="5" CornerRadius="0 0 30 30" BorderThickness="1 0 1 1" BorderBrush="DimGray">
<Border.Style>
<Style TargetType="Border">
+ <Setter Property="Background" Value="{StaticResource BlueGradientBrush}"></Setter>
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="1" ScaleY="0"></ScaleTransform>
@@ -205,12 +210,12 @@
</Style.Triggers>
</Style>
</Border.Style>
- <Border.Background>
- <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
+ <!--<Border.Background>-->
+ <!--<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="#03A9F4"/>
<GradientStop Color="#0081BB" Offset="1"/>
- </LinearGradientBrush>
- </Border.Background>
+ </LinearGradientBrush>-->
+ <!--</Border.Background>-->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="20 0 0 0">
<mahapps:ProgressRing Width="24" Height="24" Foreground="White"></mahapps:ProgressRing>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml
index 6c55f6c5e..810114144 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml
@@ -8,7 +8,8 @@
xmlns:views="clr-namespace:Tango.MachineStudio.UI.Views"
xmlns:sharedControls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
mc:Ignorable="d"
- Title="Tango" Height="800" Width="1280" Foreground="#494949" BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}">
+ Title="Tango" Height="800" Width="1280" Foreground="{StaticResource MainWindow.Foreground}"
+ BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}" Background="{DynamicResource MainWindow.Background}">
<Grid x:Name="main_grid">
<Grid.Background>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ConnectedMachineViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ConnectedMachineViewVM.cs
index 5467c53a0..16f6938a0 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ConnectedMachineViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ConnectedMachineViewVM.cs
@@ -3,12 +3,14 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Tango.BL;
using Tango.BL.Entities;
using Tango.Core.Commands;
using Tango.MachineStudio.Common.Diagnostics;
using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.Common.StudioApplication;
using Tango.SharedUI;
+using System.Data.Entity;
namespace Tango.MachineStudio.UI.ViewModels
{
@@ -39,6 +41,19 @@ namespace Tango.MachineStudio.UI.ViewModels
set { _diagnosticsFrameProvider = value; RaisePropertyChangedAuto(); }
}
+ private String _totalMachineWorkTime;
+ public String TotalMachineWorkTime
+ {
+ get { return _totalMachineWorkTime; }
+ set { _totalMachineWorkTime = value; RaisePropertyChangedAuto(); }
+ }
+
+ private String _totalMachineMeters;
+ public String TotalMachineMeters
+ {
+ get { return _totalMachineMeters; }
+ set { _totalMachineMeters = value; RaisePropertyChangedAuto(); }
+ }
public RelayCommand DisconnectCommand { get; set; }
@@ -64,5 +79,36 @@ namespace Tango.MachineStudio.UI.ViewModels
Result = result;
Accept();
}
+
+ public override void OnShow()
+ {
+ base.OnShow();
+ LoadMachineCounters();
+ }
+
+ private async void LoadMachineCounters()
+ {
+ try
+ {
+ TotalMachineMeters = "loading...";
+ TotalMachineWorkTime = "loading...";
+
+ using (ObservablesContext db = ObservablesContext.CreateDefault())
+ {
+ var jobs = await db.Jobs.Include(x => x.JobRuns).Where(x => x.MachineGuid == ApplicationManager.Machine.Guid).ToListAsync();
+
+ TotalMachineWorkTime = TimeSpan.FromHours(jobs.SelectMany(x => x.JobRuns).Select(x => x.EndDate - x.StartDate).Sum(x => x.TotalHours)).ToString(@"hh\:mm\:ss");
+
+ int meters = (int)jobs.SelectMany(x => x.JobRuns).Select(x => x.EndPosition).Sum();
+ TotalMachineMeters = $"{meters.ToString("N0")} meters";
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error loading machine counters.");
+ TotalMachineMeters = "error!";
+ TotalMachineWorkTime = "error!";
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs
index 1165c0920..b9cd82979 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs
@@ -193,7 +193,7 @@ namespace Tango.MachineStudio.UI.ViewModels
catch (Exception ex)
{
LogManager.Log(ex, "Login Error.");
- _notificationProvider.ShowError($"The specified email or password was incorrect, or you don't have a permission to run this application.\nError: {ex.FlattenMessage()}");
+ _notificationProvider.ShowError($"An error occurred while trying to perform the logging operation.\n{ex.FlattenMessage()}");
}
finally
{
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml
index 338cb2d22..8dfb04f1f 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml
@@ -12,7 +12,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300" Width="600" Height="480" Background="White" DataContext="{Binding ConnectedMachineViewVM, Source={StaticResource Locator}}">
+ d:DesignHeight="300" d:DesignWidth="300" Width="640" Height="500" Background="White" DataContext="{Binding ConnectedMachineViewVM, Source={StaticResource Locator}}">
<UserControl.Resources>
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"></converters:BooleanToVisibilityConverter>
@@ -73,6 +73,10 @@
<TextBlock Text="{Binding Machine.Name}" />
<TextBlock FontWeight="SemiBold" Text="Organization:" />
<TextBlock Text="{Binding Machine.Organization.Name}" />
+ <TextBlock FontWeight="SemiBold" Text="Total Dye Time:" />
+ <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineWorkTime}" />
+ <TextBlock FontWeight="SemiBold" Text="Total Dye Meters:" />
+ <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineMeters}" />
<TextBlock FontWeight="SemiBold" Text="Embedded Software Version:" />
<TextBlock Text="{Binding DeviceInformation.Version}" />
<TextBlock FontWeight="SemiBold" Text="IP Address:" />
@@ -112,6 +116,10 @@
<TextBlock Text="{Binding Machine.Name}" />
<TextBlock FontWeight="SemiBold" Text="Organization:" />
<TextBlock Text="{Binding Machine.Organization.Name}" />
+ <TextBlock FontWeight="SemiBold" Text="Total Dye Time:" />
+ <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineWorkTime}" />
+ <TextBlock FontWeight="SemiBold" Text="Total Dye Meters:" />
+ <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineMeters}" />
<TextBlock FontWeight="SemiBold" Text="Embedded Software Version:" />
<TextBlock Text="{Binding DeviceInformation.Version}" />
<TextBlock FontWeight="SemiBold" Text="FPGA Version:" />
@@ -166,6 +174,10 @@
<TextBlock Text="{Binding Machine.Name}" />
<TextBlock FontWeight="SemiBold" Text="Organization:" />
<TextBlock Text="{Binding Machine.Organization.Name}" />
+ <TextBlock FontWeight="SemiBold" Text="Total Dye Time:" />
+ <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineWorkTime}" />
+ <TextBlock FontWeight="SemiBold" Text="Total Dye Meters:" />
+ <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineMeters}" />
<TextBlock FontWeight="SemiBold" Text="Embedded Software Version:" />
<TextBlock Text="{Binding DeviceInformation.Version}" />
<TextBlock FontWeight="SemiBold" Text="FPGA Version:" />
@@ -225,8 +237,8 @@
<Grid Grid.Column="1">
<DockPanel>
<StackPanel>
- <Button FontSize="11" Height="40" Width="140" Command="{Binding ResetCommand}" Background="Transparent" BorderBrush="#202020" Foreground="#202020" Margin="0 2" ToolTip="Reset the embedded device">RESET</Button>
- <Button FontSize="11" Height="40" Width="140" Command="{Binding TurnOffHeatersCommand}" Background="Transparent" BorderBrush="#202020" Foreground="#202020" Margin="0 2" ToolTip="Resets the current process parameters in the embedded device">
+ <Button FontSize="11" Height="40" Width="140" Command="{Binding ResetCommand}" Background="Transparent" BorderBrush="{StaticResource DarkGrayBrush}" Foreground="{StaticResource DarkGrayBrush}" Margin="0 2" ToolTip="Reset the embedded device">RESET</Button>
+ <Button FontSize="11" Height="40" Width="140" Command="{Binding TurnOffHeatersCommand}" Background="Transparent" BorderBrush="{StaticResource DarkGrayBrush}" Foreground="{StaticResource DarkGrayBrush}" Margin="0 2" ToolTip="Resets the current process parameters in the embedded device">
<TextBlock TextWrapping="Wrap" TextAlignment="Center">
TURN OFF HEATERS
</TextBlock>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml
index 976c3866a..9af5c6b06 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml
@@ -88,7 +88,7 @@
<TextBlock HorizontalAlignment="Center" FontSize="18" FontWeight="SemiBold">Upgrading Machine Firmware</TextBlock>
<TextBlock Margin="0 40 0 0" HorizontalAlignment="Center" Foreground="Gray" Text="{Binding Handler.Message,Converter={StaticResource EnumToDescriptionConverter},Mode=OneWay}"></TextBlock>
<ProgressBar Height="15" Width="600" Margin="0 5 0 0" Maximum="{Binding Handler.Total,Mode=OneWay}" Value="{Binding Handler.Current,Mode=OneWay}" ></ProgressBar>
- <Button Width="150" Background="#FF5151" BorderBrush="#FF5151" Margin="0 40 0 0" Height="35" Command="{Binding AbortCommand}">ABORT</Button>
+ <Button Width="150" Background="{StaticResource RedBrush100}" BorderBrush="{StaticResource RedBrush100}" Margin="0 40 0 0" Height="35" Command="{Binding AbortCommand}">ABORT</Button>
</StackPanel>
</Grid>
@@ -103,8 +103,8 @@
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="18" FontWeight="SemiBold">Firmware Upgrade Failed</TextBlock>
- <materialDesign:PackIcon HorizontalAlignment="Center" Width="100" Margin="0 10 0 0" Height="100" Kind="AlertOutline" Foreground="#FF5151" />
- <TextBlock HorizontalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" Text="{Binding UpgradeError}" Foreground="#FF5151" FontWeight="SemiBold"></TextBlock>
+ <materialDesign:PackIcon HorizontalAlignment="Center" Width="100" Margin="0 10 0 0" Height="100" Kind="AlertOutline" Foreground="{StaticResource RedBrush100}" />
+ <TextBlock HorizontalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" Text="{Binding UpgradeError}" Foreground="{StaticResource RedBrush100}" FontWeight="SemiBold"></TextBlock>
<Button Width="150" Margin="0 15 0 0" Height="35" Command="{Binding CloseCommand}">CLOSE</Button>
</StackPanel>
</Grid>
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 f66e247a9..57b8335c5 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
@@ -248,11 +248,11 @@
<materialDesign:PackIcon Margin="10 0 0 0" Width="24" Height="24">
<materialDesign:PackIcon.Style>
<Style TargetType="materialDesign:PackIcon">
- <Setter Property="Foreground" Value="#333333"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource GrayBrush300}"></Setter>
<Setter Property="Kind" Value="LanDisconnect"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding ApplicationManager.IsMachineConnected,Mode=OneWay}" Value="True">
- <Setter Property="Foreground" Value="#03FF8E"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource GreenMConnectionBrush}"></Setter>
<Setter Property="Kind" Value="LanConnect"></Setter>
</DataTrigger>
</Style.Triggers>
@@ -470,6 +470,7 @@
<Border HorizontalAlignment="Right" Margin="0 -1 10 0" VerticalAlignment="Top" Width="300" Height="Auto" CornerRadius="0 0 30 30" BorderThickness="1 0 1 1" BorderBrush="DimGray">
<Border.Style>
<Style TargetType="Border">
+ <Setter Property="Background" Value="{StaticResource BlueGradientBrush}"/>
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="1" ScaleY="0"></ScaleTransform>
@@ -495,12 +496,12 @@
</Style.Triggers>
</Style>
</Border.Style>
- <Border.Background>
+ <!--<Border.Background>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="#03A9F4"/>
<GradientStop Color="#0081BB" Offset="1"/>
</LinearGradientBrush>
- </Border.Background>
+ </Border.Background>-->
<ItemsControl ItemsSource="{Binding NotificationProvider.TaskItems}">
<ItemsControl.ItemTemplate>
@@ -517,7 +518,7 @@
</Border>
<Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10" Visibility="{Binding IsMachineErrorsOpened,Converter={StaticResource BooleanToVisibilityConverter}}">
- <Border Width="350" Background="#FFF1F1F1" BorderBrush="White" CornerRadius="5" Padding="5">
+ <Border Width="350" Background="{StaticResource WhiteBrush50}" BorderBrush="White" CornerRadius="5" Padding="5">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" BlurRadius="10" />
</Border.Effect>
@@ -525,7 +526,7 @@
<ItemsControl ItemsSource="{Binding ApplicationManager.ConnectedMachine.MachineEventsStateProvider.Events}">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type entities:MachinesEvent}">
- <Border BorderThickness="0 0 0 1" BorderBrush="#E1E1E1" Padding="5">
+ <Border BorderThickness="0 0 0 1" BorderBrush="{StaticResource WhiteBrush100}" Padding="5">
<DockPanel>
<Grid DockPanel.Dock="Right" HorizontalAlignment="Right" VerticalAlignment="Center">
<ContentControl>
@@ -576,11 +577,11 @@
<Style.Triggers>
<DataTrigger Binding="{Binding Category}" Value="Warning">
<Setter Property="Kind" Value="Alert"></Setter>
- <Setter Property="Foreground" Value="#FFA300"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource OrangeBrush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Category}" Value="Error">
<Setter Property="Kind" Value="AlertOctagon"></Setter>
- <Setter Property="Foreground" Value="#FF5C5C"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Category}" Value="Critical">
<Setter Property="Kind" Value="BellPlus"></Setter>
@@ -605,7 +606,7 @@
</Border>
<Canvas HorizontalAlignment="Center">
- <Polygon Points="12,0 0,31 24,31" Fill="#FFF1F1F1" Canvas.Top="-30" Canvas.Left="90"></Polygon>
+ <Polygon Points="12,0 0,31 24,31" Fill="{StaticResource WhiteBrush50}" Canvas.Top="-30" Canvas.Left="90"></Polygon>
</Canvas>
</Grid>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml
index 5f5e1042b..a209df34a 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml
@@ -140,12 +140,12 @@
</Grid>
<Grid Grid.Row="2">
- <Button HorizontalAlignment="Right" Height="40" Width="140" Command="{Binding OKCommand}" Background="#FF6262" BorderBrush="#FF6262" IsDefault="True">SUBMIT</Button>
+ <Button HorizontalAlignment="Right" Height="40" Width="140" Command="{Binding OKCommand}" Background="{StaticResource RedBrush100}" BorderBrush="{StaticResource RedBrush100}" IsDefault="True">SUBMIT</Button>
<ItemsControl ItemsSource="{Binding ValidationErrors}" HorizontalAlignment="Left" Margin="5" VerticalAlignment="Center" Visibility="Visible">
<ItemsControl.ItemTemplate>
<DataTemplate>
- <TextBlock Foreground="#FF4C4C" Margin="0 2 0 0"><Run>*</Run> <Run Text="{Binding Path=.,Mode=OneWay}"></Run></TextBlock>
+ <TextBlock Foreground="{StaticResource RedBrush100}" Margin="0 2 0 0"><Run>*</Run> <Run Text="{Binding Path=.,Mode=OneWay}"></Run></TextBlock>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml
index 97c42d58d..d1ff75fc7 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml
@@ -42,7 +42,7 @@
<Border BorderBrush="#E6E6E6" BorderThickness="0 0 0 1" Padding="5">
<DockPanel>
<StackPanel DockPanel.Dock="Right" HorizontalAlignment="Right" Orientation="Horizontal">
- <Button Background="#FF8282" BorderBrush="#FF8282" Padding="0" Width="90" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.DeclineCommand}" CommandParameter="{Binding}">
+ <Button Background="{StaticResource RedBrush400}" BorderBrush="{StaticResource RedBrush400}" Padding="0" Width="90" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.DeclineCommand}" CommandParameter="{Binding}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Close" />
<TextBlock Margin="10 0 0 0" FontSize="11" VerticalAlignment="Center">NOT FIXED</TextBlock>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml
index f5d1065b8..a35928e12 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml
@@ -54,7 +54,7 @@
</Style>
</StackPanel.Style>
<TextBlock Foreground="Gray" FontSize="16">Release Notes</TextBlock>
- <TextBlock FontSize="12" TextWrapping="Wrap" Foreground="#404040" Margin="0 5 0 0" Text="{Binding UpdateComments}"></TextBlock>
+ <TextBlock FontSize="12" TextWrapping="Wrap" Foreground="{StaticResource GrayBrush290}" Margin="0 5 0 0" Text="{Binding UpdateComments}"></TextBlock>
</StackPanel>
</Canvas>
</Grid>
@@ -109,7 +109,7 @@
</StackPanel>
</Button>
- <Button Visibility="{Binding IsRollbackAvailable,Converter={StaticResource BoolToVisConverter}}" MinWidth="140" Height="40" Style="{StaticResource MaterialDesignFlatButton}" ToolTip="Restore Machine Studio to the previous version." Margin="0 40 0 0" Command="{Binding RollbackCommand}" Foreground="#FF5F5F">
+ <Button Visibility="{Binding IsRollbackAvailable,Converter={StaticResource BoolToVisConverter}}" MinWidth="140" Height="40" Style="{StaticResource MaterialDesignFlatButton}" ToolTip="Restore Machine Studio to the previous version." Margin="0 40 0 0" Command="{Binding RollbackCommand}" Foreground="{StaticResource RedBrush100}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="BackupRestore" Width="24" Height="24" />
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Restore previous version</TextBlock>
@@ -185,7 +185,7 @@
<TextBlock VerticalAlignment="Center" Margin="0 20 0 0">Your version of Machine Studio is up to date!</TextBlock>
</StackPanel>
- <Button Visibility="{Binding IsRollbackAvailable,Converter={StaticResource BoolToVisConverter}}" MinWidth="140" Height="40" Style="{StaticResource MaterialDesignFlatButton}" ToolTip="Restore Machine Studio to the previous version." Margin="0 40 0 0" Command="{Binding RollbackCommand}" Foreground="#FF5F5F">
+ <Button Visibility="{Binding IsRollbackAvailable,Converter={StaticResource BoolToVisConverter}}" MinWidth="140" Height="40" Style="{StaticResource MaterialDesignFlatButton}" ToolTip="Restore Machine Studio to the previous version." Margin="0 40 0 0" Command="{Binding RollbackCommand}" Foreground="{StaticResource RedBrush100}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="BackupRestore" Width="24" Height="24" />
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Restore previous version</TextBlock>
@@ -201,7 +201,7 @@
<Setter.Value>
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
- <materialDesign:PackIcon Kind="Alert" Width="100" Height="100" Foreground="#FF5F5F" HorizontalAlignment="Center" />
+ <materialDesign:PackIcon Kind="Alert" Width="100" Height="100" Foreground="{StaticResource RedBrush100}" HorizontalAlignment="Center" />
<TextBlock VerticalAlignment="Center" Margin="0 20 0 0" HorizontalAlignment="Center">Error updating machine studio</TextBlock>
<TextBlock HorizontalAlignment="Center" Margin="0 10 0 0" FontSize="12" TextAlignment="Center">
<Run>An error occurred while updating your software.</Run>
@@ -238,7 +238,7 @@
<Setter.Value>
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
- <materialDesign:PackIcon Kind="Alert" Width="100" Height="100" Foreground="#FF5F5F" HorizontalAlignment="Center" />
+ <materialDesign:PackIcon Kind="Alert" Width="100" Height="100" Foreground="{StaticResource RedBrush100}" HorizontalAlignment="Center" />
<TextBlock VerticalAlignment="Center" Margin="0 20 0 0" HorizontalAlignment="Center">Error restoring previous version</TextBlock>
<TextBlock HorizontalAlignment="Center" Margin="0 10 0 0" FontSize="12" TextAlignment="Center">
<Run>An error occurred while restore the last version.</Run>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml
index 147b40892..a1c58aab2 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml
@@ -43,7 +43,7 @@
</Grid>
<Grid Grid.Row="1" Margin="0 10 0 0">
- <TextBox Style="{x:Null}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" BorderBrush="#515151" IsReadOnly="True" AcceptsReturn="True" Foreground="#202020" Padding="2" TextWrapping="Wrap" Text="{Binding Exception}"></TextBox>
+ <TextBox Style="{x:Null}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" BorderBrush="{StaticResource GrayBrush200}" IsReadOnly="True" AcceptsReturn="True" Foreground="{StaticResource DarkGrayBrush}" Padding="2" TextWrapping="Wrap" Text="{Binding Exception}"></TextBox>
</Grid>
</Grid>
@@ -55,7 +55,7 @@
<Button x:Name="btnReport" Style="{StaticResource MaterialDesignFlatButton}" Width="150" Command="{Binding ResolveCommand}" CommandParameter="{x:Static local:ExceptionResolutions.Report}">
<StackPanel Orientation="Horizontal">
<Image Source="/Images/bug.png" RenderOptions.BitmapScalingMode="Fant"></Image>
- <TextBlock Foreground="#FF5C5C" Margin="10 0 0 0" VerticalAlignment="Center">Report Issue</TextBlock>
+ <TextBlock Foreground="{StaticResource RedBrush100}" Margin="10 0 0 0" VerticalAlignment="Center">Report Issue</TextBlock>
</StackPanel>
</Button>
<Button Margin="5 0 0 0" Width="140" Command="{Binding ResolveCommand}" CommandParameter="{x:Static local:ExceptionResolutions.Shutdown}">Shutdown</Button>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml
index 8721cfd6a..d53cb934e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml
@@ -51,6 +51,7 @@
<Border HorizontalAlignment="Right" Margin="0 -1 10 0" VerticalAlignment="Top" Width="300" Height="40" Padding="5" CornerRadius="0 0 30 30" BorderThickness="1 0 1 1" BorderBrush="DimGray">
<Border.Style>
<Style TargetType="Border">
+ <!--<Setter Property="Background" Value="{StaticResource BlueGradientBrush}"/>-->
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="1" ScaleY="0"></ScaleTransform>
@@ -78,7 +79,7 @@
</Border.Style>
<Border.Background>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Color="#03A9F4"/>
+ <GradientStop Color="#FF03A9F4"/>
<GradientStop Color="#0081BB" Offset="1"/>
</LinearGradientBrush>
</Border.Background>