aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-09-16 17:48:16 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-09-16 17:48:16 +0300
commit161fe6f6d2b29ba3deb641cdc049ad0d8f58004e (patch)
tree20318bb7ea4a243b8c2e9757e4635e8d5f5cb728 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
parent30fcfa4100a9d00e887c6e17e32e427b05296ce7 (diff)
parentb674a2e7751daa80c0d74207968bf8e3d18d7faf (diff)
downloadTango-161fe6f6d2b29ba3deb641cdc049ad0d8f58004e.tar.gz
Tango-161fe6f6d2b29ba3deb641cdc049ad0d8f58004e.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.config14
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml6
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs8
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs34
-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/MainWindow.xaml.cs5
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs12
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml6
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs1
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj11
-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.cs5
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs22
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs31
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml10
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml18
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectionLostView.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml14
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml11
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineSerialView.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml59
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs5
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml14
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml8
-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.xaml6
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml7
33 files changed, 292 insertions, 127 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
index 6f86f99e9..b8ad73b04 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
@@ -86,7 +86,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
@@ -94,27 +94,27 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml
index 20e381b70..618035112 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml
@@ -3,14 +3,16 @@
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"/>
+ <resources:SharedResourceDictionary Source="pack://application:,,,/Tango.MachineStudio.Common;component/Themes/DarkThemeColors.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/App.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
index 2e2b1a014..f4ae29549 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
@@ -29,7 +29,7 @@ namespace Tango.MachineStudio.UI
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
- public partial class App : Application
+ public partial class App : Application
{
private WpfGlobalExceptionTrapper exceptionTrapper;
private LogManager LogManager = LogManager.Default;
@@ -64,12 +64,14 @@ namespace Tango.MachineStudio.UI
LogManager.Log("Application Started...");
LogManager.LogReferencedAssemblies();
+ var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
+ //add current theme
+ MachineStudioTheme wTheme = settings.Theme;
base.OnStartup(e);
LogManager.Categories.Clear();
- var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
if (settings.LoggingCategories.Count == 0)
{
@@ -104,7 +106,9 @@ namespace Tango.MachineStudio.UI
{
LogManager.Log("EF Caching is disabled");
}
+
}
+
#region Global Exception Trapping
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..2de61fd75 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,28 +71,45 @@ 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)
{
ObservablesContext.OverrideSettingsDataSource(response.DataSource);
}
+ if (response.VersionChangeRequired)
+ {
+ return new AuthenticationLoginResult()
+ {
+ Response = response
+ };
+ }
+
try
{
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..eecbcf8ad 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}" WindowTitleBrush="{StaticResource MainWindow.WindowTitleColorBrush}">
<Grid x:Name="main_grid">
<Grid.Background>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
index e9e1ca979..4c5e2b9a6 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
@@ -97,7 +97,7 @@ namespace Tango.MachineStudio.UI
double ratio = scr_width / scr_height;
- List<double> ratios = new List<double>() { 16d / 9d, 16d / 10d, 4d / 3d };
+ List<double> ratios = new List<double>() { 16d / 9d, 16d / 10d, 4d / 3d, 1366 / 768 };
ratio = ratios.Closest(ratio);
switch (ratio)
@@ -111,6 +111,9 @@ namespace Tango.MachineStudio.UI
case 4d / 3d:
grid.Height = 1280;
break;
+ case 1366d / 768d:
+ grid.Height = 1100;
+ break;
default:
grid.Height = 1145;
break;
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/DialogWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml
index 2eb1080cb..41405f7fb 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml
@@ -10,7 +10,7 @@
Title="Machine Studio" MinHeight="220" SizeToContent="WidthAndHeight" MinWidth="600" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterOwner" Background="Transparent" ShowInTaskbar="False">
<Grid>
<Grid>
- <Border Background="White" CornerRadius="10" Padding="10" Margin="20">
+ <Border Background="{StaticResource Dialog.Background}" CornerRadius="10" Padding="10" Margin="20">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" BlurRadius="10"></DropShadowEffect>
</Border.Effect>
@@ -18,7 +18,7 @@
<Grid>
<ContentPresenter x:Name="presenter" Content="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=InnerContent}"></ContentPresenter>
- <Button Command="{Binding CloseCommand}" HorizontalAlignment="Right" VerticalAlignment="Top" Width="20" Height="20" Margin="0 -6 -4 0" Padding="0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="Black">
+ <Button Command="{Binding CloseCommand}" HorizontalAlignment="Right" VerticalAlignment="Top" Width="20" Height="20" Margin="0 -6 -4 0" Padding="0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource Dialog.Foreground}">
<materialDesign:PackIcon Kind="Close" Width="16" Height="16"></materialDesign:PackIcon>
</Button>
</Grid>
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 8f9512236..988e3c21f 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml
@@ -15,7 +15,7 @@
</Window.Resources>
<Grid>
- <Border Background="White" CornerRadius="10" Padding="10" Margin="20">
+ <Border Background="{StaticResource Dialog.Background}" CornerRadius="10" Padding="10" Margin="20">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" BlurRadius="10"></DropShadowEffect>
</Border.Effect>
@@ -31,7 +31,7 @@
<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="{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"></TextBlock>
+ <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>
</DockPanel>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml
index 5e27071ec..5cc3d719b 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml
@@ -15,7 +15,7 @@
</Window.Resources>
<Grid>
- <Border Background="White" CornerRadius="10" Padding="10" Margin="20">
+ <Border Background="{StaticResource Dialog.Background}" CornerRadius="10" Padding="10" Margin="20">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" BlurRadius="10"></DropShadowEffect>
</Border.Effect>
@@ -32,10 +32,10 @@
<StackPanel VerticalAlignment="Top" Margin="0 30 0 0">
<StackPanel Orientation="Horizontal">
<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"></TextBlock>
+ <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 TransparentBackgroundBrush}"></TextBlock>
</StackPanel>
- <TextBox x:Name="txtText" Margin="60 0 20 0" materialDesign:HintAssist.Hint="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=Hint}" Text="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=Response,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
+ <TextBox x:Name="txtText" Margin="60 0 20 0" materialDesign:HintAssist.Hint="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=Hint}" Text="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=Response,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{StaticResource Dialog.Foreground}"></TextBox>
</StackPanel>
</Grid>
</DockPanel>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs
index 3cf0dce1a..d5c392cd6 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs
@@ -4,5 +4,5 @@ using System.Runtime.InteropServices;
[assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)]
[assembly: AssemblyTitle("Tango - Machine Studio")]
-[assembly: AssemblyVersion("4.0.20.0")]
+[assembly: AssemblyVersion("4.0.26.0")]
[assembly: ComVisible(false)] \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
index df831afb9..fba037a6e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
@@ -10,6 +10,7 @@ using System.Threading.Tasks;
using System.Windows;
using Tango.BL.Entities;
using Tango.Core.DI;
+using Tango.Core.ExtensionMethods;
using Tango.Core.Helpers;
using Tango.Core.IO;
using Tango.Integration.Operation;
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
index 2ca31a671..f5dc3d158 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
@@ -440,6 +440,10 @@
<Project>{f69da3a8-f823-461e-87cf-a9275abc0b15}</Project>
<Name>Tango.MachineStudio.Dispensers</Name>
</ProjectReference>
+ <ProjectReference Include="..\Modules\Tango.MachineStudio.Catalogs\Tango.MachineStudio.Catalogs.csproj">
+ <Project>{7d0fce3c-9a37-439c-9f9f-b26cfd6a8a33}</Project>
+ <Name>Tango.MachineStudio.Catalogs</Name>
+ </ProjectReference>
<ProjectReference Include="..\Modules\Tango.MachineStudio.ColorCapture\Tango.MachineStudio.ColorCapture.csproj">
<Project>{1b87ca53-50bd-4c48-a8c7-fbb9f1419aff}</Project>
<Name>Tango.MachineStudio.ColorCapture</Name>
@@ -627,7 +631,10 @@ copy /Y "$(SolutionDir)Referenced Assemblies\msvcp140d.dll" "$(TargetDir)"
copy /Y "$(SolutionDir)Referenced Assemblies\ucrtbased.dll" "$(TargetDir)"
copy /Y "$(SolutionDir)Referenced Assemblies\vcruntime140.dll" "$(TargetDir)"
copy /Y "$(SolutionDir)Referenced Assemblies\vcruntime140d.dll" "$(TargetDir)"
-copy /Y "$(SolutionDir)Referenced Assemblies\Microsoft.WITDataStore32.dll" "$(TargetDir)"</PostBuildEvent>
+copy /Y "$(SolutionDir)Referenced Assemblies\Microsoft.WITDataStore32.dll" "$(TargetDir)"
+
+if $(ConfigurationName) == Release del *.xml
+if $(ConfigurationName) == Release RD /S /Q "$(TargetDir)ProtoCompilers\"</PostBuildEvent>
</PropertyGroup>
<Import Project="..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
@@ -638,7 +645,7 @@ copy /Y "$(SolutionDir)Referenced Assemblies\Microsoft.WITDataStore32.dll" "$(Ta
</Target>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="True" BuildVersion_UpdateFileVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.DeltaBaseYearDayOfYear" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_BuildVersioningStyle="None.None.Increment.DeltaBaseYearDayOfYear" BuildVersion_UpdateFileVersion="True" BuildVersion_DetectChanges="True" BuildVersion_UseGlobalSettings="False" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
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..c181d7b9d 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs
@@ -17,6 +17,7 @@ using Tango.MachineStudio.Common.EventLogging;
using Tango.MachineStudio.Common.Navigation;
using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.Common.Web;
+using Tango.MachineStudio.UI.Authentication;
using Tango.MachineStudio.UI.Messages;
using Tango.Settings;
using Tango.SharedUI;
@@ -157,7 +158,7 @@ namespace Tango.MachineStudio.UI.ViewModels
{
_settings.DeploymentSlot = DeploymentSlot;
- var result = _authenticationProvider.Login(Email, Password).Response;
+ LoginResponse result = _authenticationProvider.Login(Email, Password).Response;
if (result.VersionChangeRequired && !_settings.ByPassEnvironmentVersionCheck)
{
@@ -193,7 +194,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 log-in operation.\n{ex.FlattenMessage()}");
}
finally
{
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs
index ce49d805e..d1f3cc69e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs
@@ -36,7 +36,7 @@ namespace Tango.MachineStudio.UI.ViewModels
public IExternalBridgeClient SelectedMachine
{
get { return _selectedMachine; }
- set { _selectedMachine = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ set { _selectedMachine = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(RequiresAuthentication)); InvalidateRelayCommands(); }
}
/// <summary>
@@ -57,6 +57,7 @@ namespace Tango.MachineStudio.UI.ViewModels
EnableDiagnostics = true;
UploadHardwareConfiguration = true;
+ EnableKeepAlive = true;
ConnectCommand = new RelayCommand(Connect, (x) => SelectedMachine != null);
}
@@ -130,6 +131,17 @@ namespace Tango.MachineStudio.UI.ViewModels
set { _uploadHardwareConfiguration = value; RaisePropertyChangedAuto(); }
}
+ private bool _enableApplicationLogs;
+ /// <summary>
+ /// Gets or sets a value indicating whether to enable application logs.
+ /// </summary>
+ public bool EnableApplicationLogs
+ {
+ get { return _enableApplicationLogs; }
+ set { _enableApplicationLogs = value; RaisePropertyChangedAuto(); }
+ }
+
+
private bool _enableKeepAlive;
/// <summary>
/// Gets or sets a value indicating whether to use the keep alive mechanism.
@@ -140,5 +152,13 @@ namespace Tango.MachineStudio.UI.ViewModels
set { _enableKeepAlive = value; RaisePropertyChangedAuto(); }
}
+ public bool RequiresAuthentication
+ {
+ get
+ {
+ return SelectedMachine != null && SelectedMachine is IExternalBridgeSecureClient;
+ }
+ }
+
}
}
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 3f69ff771..31ba4e57d 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -5,6 +5,7 @@ using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
+using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
@@ -174,6 +175,11 @@ namespace Tango.MachineStudio.UI.ViewModels
/// </summary>
public RelayCommand AboutCommand { get; set; }
+ /// <summary>
+ /// Gets or sets the about command.
+ /// </summary>
+ public RelayCommand<MachineStudioTheme> ChangeAppThemeCommand { get; set; }
+
private IAuthenticationProvider _authenticationProvider;
/// <summary>
/// Gets or sets the authentication provider.
@@ -336,6 +342,8 @@ namespace Tango.MachineStudio.UI.ViewModels
TangoMessenger.Default.Register<Messages.ForcedUpdateMessage>((x) => DisableCheckForUpdates = true);
AboutCommand = new RelayCommand(ShowAboutDialog);
+
+ ChangeAppThemeCommand = new RelayCommand<MachineStudioTheme>(ChangeTheme);
}
private void MachineEventsStateProvider_EventsResolved(object sender, IEnumerable<MachinesEvent> e)
@@ -447,6 +455,11 @@ namespace Tango.MachineStudio.UI.ViewModels
x.SelectedMachine.EnableEventsNotification = x.EnableDiagnostics;
x.SelectedMachine.UseKeepAlive = x.EnableKeepAlive;
+ if (x.SelectedMachine is ExternalBridgeTcpClient)
+ {
+ x.SelectedMachine.As<ExternalBridgeTcpClient>().EnableApplicationLogs = x.EnableApplicationLogs;
+ }
+
if (x.SelectedMachine.RequiresAuthentication)
{
//Check machine exist on my database first
@@ -483,10 +496,10 @@ namespace Tango.MachineStudio.UI.ViewModels
PostMessage(new MachineConnectionChangedMessage() { Machine = x.SelectedMachine });
_eventLogger.Log(String.Format("Successfully connected to machine {0} via TCP", x.SelectedMachine.SerialNumber));
- if (x.UploadHardwareConfiguration)
- {
- UploadHardwareConfiguration(false);
- }
+ //if (x.UploadHardwareConfiguration)
+ //{
+ // UploadHardwareConfiguration(false);
+ //}
}
catch (ResponseErrorException ex)
@@ -921,5 +934,15 @@ namespace Tango.MachineStudio.UI.ViewModels
IsApplicationReady = true;
}
}
+
+ private void ChangeTheme(MachineStudioTheme theme)
+ {
+ var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
+ //add current theme
+ settings.Theme = theme;
+ settings.Save();
+
+ _notificationProvider.ShowInfo("Changes will be applies after application restart.");
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml
index bf9a52b98..a5ffe9964 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml
@@ -10,7 +10,7 @@
xmlns:bl="clr-namespace:Tango.BL;assembly=Tango.BL"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300" Width="600" Height="700" Background="White" d:DataContext="{d:DesignInstance Type=vm:AboutViewVM, IsDesignTimeCreatable=False}" DataContext="{Binding AboutViewVM, Source={StaticResource Locator}}">
+ d:DesignHeight="300" d:DesignWidth="300" Width="600" Height="700" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:AboutViewVM, IsDesignTimeCreatable=False}" DataContext="{Binding AboutViewVM, Source={StaticResource Locator}}" Foreground="{StaticResource MainWindow.Foreground}">
<UserControl.Resources>
<converters:VersionToShortVersionConverter x:Key="VersionToShortVersionConverter" />
@@ -61,23 +61,23 @@
<TextBlock Text="{Binding MachineStudioSettings.MachineServiceAddress}"></TextBlock>
<TextBlock FontWeight="SemiBold">Data Source:</TextBlock>
<TextBlock><Run Text="{Binding DataSource.Address,Mode=OneWay}"></Run>
- <Run>(</Run><Run Foreground="Gray" Text="{Binding DataSource.Catalog,Mode=OneWay}"></Run><Run>)</Run>
+ <Run>(</Run><Run Foreground="{StaticResource GrayBrush}" Text="{Binding DataSource.Catalog,Mode=OneWay}"></Run><Run>)</Run>
</TextBlock>
<TextBlock FontWeight="SemiBold">Caching Mode:</TextBlock>
<DockPanel>
<ComboBox Width="150" DockPanel.Dock="Left" ItemsSource="{Binding Source={x:Type bl:ObservablesContextInMemoryCachingMode},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding MachineStudioSettings.CachingMode}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
- <TextBlock Margin="20 0 0 0" Foreground="Gray" VerticalAlignment="Center">(Requires restart)</TextBlock>
+ <TextBlock Margin="20 0 0 0" Foreground="{StaticResource GrayBrush}" VerticalAlignment="Center">(Requires restart)</TextBlock>
</DockPanel>
<TextBlock FontWeight="SemiBold">Job Upload Strategy:</TextBlock>
<DockPanel>
<ComboBox Width="150" DockPanel.Dock="Left" ItemsSource="{Binding Source={x:Type pmrPrinting:JobUploadStrategy},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding MachineStudioSettings.JobUploadStrategy}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
- <TextBlock Margin="20 0 0 0" Foreground="Gray" VerticalAlignment="Center">(Requires restart)</TextBlock>
+ <TextBlock Margin="20 0 0 0" Foreground="{StaticResource GrayBrush}" VerticalAlignment="Center">(Requires restart)</TextBlock>
</DockPanel>
</controls:TableGrid>
<DockPanel Margin="0 0 0 0">
<TextBlock DockPanel.Dock="Top" FontWeight="SemiBold">Change Log:</TextBlock>
- <TextBox Margin="0 5 0 0" Style="{x:Null}" IsReadOnly="True" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled" TextWrapping="Wrap" AcceptsReturn="True" Foreground="DimGray" Text="{Binding ApplicationManager.ChangeLog,Mode=OneWay}">
+ <TextBox Margin="0 5 0 0" Style="{x:Null}" IsReadOnly="True" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled" TextWrapping="Wrap" AcceptsReturn="True" Foreground="{StaticResource DimGrayBrush}" Text="{Binding ApplicationManager.ChangeLog,Mode=OneWay}">
</TextBox>
</DockPanel>
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..e69ac516e 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="800" Height="540" Background="{StaticResource Dialog.Background}" DataContext="{Binding ConnectedMachineViewVM, Source={StaticResource Locator}}" Foreground="{StaticResource MainWindow.Foreground}">
<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/ConnectionLostView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectionLostView.xaml
index ded02ab47..b2fa2b3e3 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectionLostView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectionLostView.xaml
@@ -7,7 +7,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
- Width="559" Height="266" Background="White" d:DataContext="{d:DesignInstance Type=vm:ConnectionLostViewVM, IsDesignTimeCreatable=False}">
+ Width="559" Height="266" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:ConnectionLostViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}">
<Grid>
<Grid>
<Grid.RowDefinitions>
@@ -43,7 +43,7 @@
</TextBlock>
<TextBlock Margin="0 20 0 0" FontWeight="SemiBold">Reason:</TextBlock>
- <TextBlock Foreground="Gray" Margin="0 2 0 0" Text="{Binding Exception}" Height="75" TextWrapping="Wrap" TextTrimming="CharacterEllipsis">
+ <TextBlock Foreground="{StaticResource GrayBrush}" Margin="0 2 0 0" Text="{Binding Exception}" Height="75" TextWrapping="Wrap" TextTrimming="CharacterEllipsis">
</TextBlock>
</StackPanel>
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..233f8e4cb 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml
@@ -9,7 +9,7 @@
xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300" Width="800" Height="400" Background="White" d:DataContext="{d:DesignInstance Type=vm:FirmwareUpgradeViewVM, IsDesignTimeCreatable=False}">
+ d:DesignHeight="300" d:DesignWidth="300" Width="800" Height="400" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:FirmwareUpgradeViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}">
<UserControl.Resources>
<converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
@@ -39,7 +39,7 @@
<Image Source="/Images/firmware_upgrade.png" Height="100" />
<TextBlock VerticalAlignment="Center" FontSize="30" FontWeight="SemiBold" Margin="20 0 0 0">FIRMWARE UPGRADE</TextBlock>
</StackPanel>
- <Rectangle Stroke="Gainsboro" StrokeDashArray="5 5 5 5" Margin="20 10" />
+ <Rectangle Stroke="{StaticResource BorderBrushGainsboro}" StrokeDashArray="5 5 5 5" Margin="20 10" />
</StackPanel>
</Grid>
@@ -61,7 +61,7 @@
<StackPanel>
<DockPanel Margin="0 30 0 0" Width="600" HorizontalAlignment="Left">
<Button DockPanel.Dock="Right" Margin="10 0 0 0" Command="{Binding SelectCommand}">SELECT</Button>
- <TextBox Style="{x:Null}" VerticalContentAlignment="Center" BorderBrush="{StaticResource AccentColorBrush}" Padding="5 0" Foreground="DimGray" IsReadOnly="True" Text="{Binding SelectedFile,Mode=OneWay}"></TextBox>
+ <TextBox Style="{x:Null}" VerticalContentAlignment="Center" BorderBrush="{StaticResource AccentColorBrush}" Padding="5 0" Foreground="{StaticResource DimGrayBrush}" IsReadOnly="True" Text="{Binding SelectedFile,Mode=OneWay}"></TextBox>
</DockPanel>
<StackPanel Orientation="Horizontal" Margin="0 5 0 0">
@@ -86,9 +86,9 @@
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<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>
+ <TextBlock Margin="0 40 0 0" HorizontalAlignment="Center" Foreground="{StaticResource GrayBrush}" 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/LoadingView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml
index 6e804c61d..df1c1b831 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml
@@ -27,7 +27,7 @@
</Grid>
- <TextBlock Foreground="Gray" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="40" FontSize="20" FontWeight="SemiBold" FontStyle="Italic">
+ <TextBlock Foreground="{StaticResource GrayBrush}" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="40" FontSize="20" FontWeight="SemiBold" FontStyle="Italic">
<Run>v</Run>
<Run Text="{Binding ApplicationManager.Version,Converter={StaticResource VersionToShortVersionConverter},Mode=OneWay,ConverterParameter='3'}"></Run>
</TextBlock>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml
index 7c4e960ec..69ce4c855 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml
@@ -10,7 +10,7 @@
xmlns:emulations="clr-namespace:Tango.Emulations.ExternalBridge;assembly=Tango.Emulations"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300" Width="630" Height="400" Background="White" DataContext="{Binding MachineConnectionViewVM, Source={StaticResource Locator}}">
+ d:DesignHeight="300" d:DesignWidth="300" Width="630" Height="400" Background="{StaticResource Dialog.Background}" DataContext="{Binding MachineConnectionViewVM, Source={StaticResource Locator}}" Foreground="{StaticResource MainWindow.Foreground}">
<UserControl.Resources>
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"></converters:BooleanToVisibilityConverter>
@@ -53,7 +53,7 @@
</Grid>
<Grid Grid.Row="1">
- <ListBox ItemsSource="{Binding Scanner.AvailableMachines}" SelectedItem="{Binding SelectedMachine}" Margin="0 0 0 7" BorderThickness="1" BorderBrush="Gainsboro" HorizontalContentAlignment="Stretch">
+ <ListBox ItemsSource="{Binding Scanner.AvailableMachines}" SelectedItem="{Binding SelectedMachine}" Margin="0 0 0 7" BorderThickness="1" BorderBrush="{StaticResource BorderBrushGainsboro}" HorizontalContentAlignment="Stretch">
<ListBox.Resources>
<DataTemplate DataType="{x:Type integration:ExternalBridgeTcpClient}">
<DockPanel>
@@ -118,11 +118,16 @@
<TextBlock VerticalAlignment="Center" FontSize="10" Margin="5 0 0 0">Diagnostics, Debug &amp; Events</TextBlock>
</StackPanel>
- <StackPanel Margin="20 0 0 0" Orientation="Horizontal" VerticalAlignment="Center">
+ <StackPanel Margin="20 0 0 0" Orientation="Horizontal" VerticalAlignment="Center" Visibility="{Binding RequiresAuthentication,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<ToggleButton IsChecked="{Binding UploadHardwareConfiguration}" VerticalAlignment="Center" ToolTip="Upload hardware configuration after connection is successful"></ToggleButton>
<TextBlock VerticalAlignment="Center" FontSize="10" Margin="5 0 0 0">Upload HW Configuration</TextBlock>
</StackPanel>
+ <StackPanel Margin="20 0 0 0" Orientation="Horizontal" VerticalAlignment="Center" Visibility="{Binding RequiresAuthentication,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <ToggleButton IsChecked="{Binding EnableApplicationLogs}" VerticalAlignment="Center" ToolTip="Allow incoming application logs from the remote host"></ToggleButton>
+ <TextBlock VerticalAlignment="Center" FontSize="10" Margin="5 0 0 0">Enable Application Logs</TextBlock>
+ </StackPanel>
+
<StackPanel Margin="20 0 0 0" Orientation="Horizontal" VerticalAlignment="Center">
<ToggleButton IsChecked="{Binding EnableKeepAlive}" VerticalAlignment="Center" ToolTip="Allow a keep alive mechanism to improve lost connection detection"></ToggleButton>
<TextBlock VerticalAlignment="Center" FontSize="10" Margin="5 0 0 0">Keep Alive</TextBlock>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml
index 14967686f..7d0b2e25c 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml
@@ -9,7 +9,7 @@
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
- d:DesignHeight="200" d:DesignWidth="550" Background="White" DataContext="{Binding MachineLoginViewVM, Source={StaticResource Locator}}">
+ d:DesignHeight="200" d:DesignWidth="550" Background="{StaticResource MainWindow.Background}" DataContext="{Binding MachineLoginViewVM, Source={StaticResource Locator}}" Foreground="{StaticResource MainWindow.Foreground}">
<UserControl.Resources>
<converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineSerialView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineSerialView.xaml
index b988d0a76..eea90c7b9 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineSerialView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineSerialView.xaml
@@ -8,7 +8,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
- mc:Ignorable="d" Width="559" Height="266" Background="White" d:DataContext="{d:DesignInstance Type=vm:MachineSerialViewVM, IsDesignTimeCreatable=False}">
+ mc:Ignorable="d" Width="559" Height="266" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:MachineSerialViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}">
<UserControl.Resources>
<autoCompleteMachine:MachinesProvider x:Key="MachinesProvider" />
@@ -54,7 +54,7 @@
<Image Source="/Images/machine-trans.png" Width="24" RenderOptions.BitmapScalingMode="Fant" />
<TextBlock Margin="10 0 0 0" FontWeight="SemiBold" Text="{Binding SerialNumber}" VerticalAlignment="Center"></TextBlock>
</StackPanel>
- <TextBlock DockPanel.Dock="Right" HorizontalAlignment="Right" Text="{Binding Name}" Foreground="Gray" VerticalAlignment="Center"></TextBlock>
+ <TextBlock DockPanel.Dock="Right" HorizontalAlignment="Right" Text="{Binding Name}" Foreground="{StaticResource GrayBrush}" VerticalAlignment="Center"></TextBlock>
</DockPanel>
</Border>
</DataTemplate>
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..5513b65ac 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
@@ -9,6 +9,7 @@
xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:common="clr-namespace:Tango.MachineStudio.Common;assembly=Tango.MachineStudio.Common"
xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
@@ -43,7 +44,7 @@
<materialDesign:DrawerHost IsLeftDrawerOpen="{Binding Source={x:Reference MenuToggleButton}, Path=IsChecked}">
<materialDesign:DrawerHost.LeftDrawerContent>
- <DockPanel LastChildFill="False">
+ <DockPanel LastChildFill="False" TextElement.Foreground="{StaticResource MainWindow.Foreground}" >
<StackPanel MinWidth="300" DockPanel.Dock="Top">
<Grid>
<ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}"
@@ -90,8 +91,8 @@
</ListBoxItem>
</StackPanel>
<StackPanel Margin="10 10 0 0">
- <TextBlock Foreground="Silver" FontSize="16" FontWeight="Bold" FontStyle="Italic">MODULES</TextBlock>
- <Separator Background="Gainsboro" />
+ <TextBlock Foreground="{StaticResource borderBrush}" FontSize="16" FontWeight="Bold" FontStyle="Italic">MODULES</TextBlock>
+ <Separator Background="{StaticResource BorderBrushGainsboro}" />
</StackPanel>
<ListBox ItemsSource="{Binding StudioModuleLoader.UserModules}" HorizontalContentAlignment="Stretch" FontSize="14">
<ListBox.ItemContainerStyle>
@@ -125,7 +126,7 @@
</StackPanel>
<StackPanel DockPanel.Dock="Bottom">
- <Separator Margin="0 10 0 0" Background="Gainsboro" />
+ <Separator Margin="0 10 0 0" Background="{StaticResource BorderBrushGainsboro}" />
<ListBoxItem>
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseUp">
@@ -142,11 +143,11 @@
</materialDesign:DrawerHost.LeftDrawerContent>
<DockPanel>
<materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2"
- Mode="PrimaryMid" DockPanel.Dock="Top">
+ Mode="PrimaryMid" DockPanel.Dock="Top" Background="{StaticResource MainWindow.Header}">
<DockPanel>
<ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="{Binding IsMenuOpened}"
x:Name="MenuToggleButton"/>
- <materialDesign:PopupBox DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False">
+ <materialDesign:PopupBox DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False" >
<StackPanel>
<Button Command="{Binding ConnectCommand}">
<StackPanel Orientation="Horizontal">
@@ -202,13 +203,22 @@
</Button>
<Separator/>
</StackPanel>
+ <Separator/>
+ <MenuItem x:Name="menuTheme" Header="Theme" MouseEnter="MenuItem_MouseEnter">
+ <MenuItem Header="Light" Command="{Binding ChangeAppThemeCommand}" CommandParameter="{x:Static common:MachineStudioTheme.Light}" Background="{StaticResource MainWindow.SubMenuItem.Background}"></MenuItem>
+ <MenuItem Header="Dark" Command="{Binding ChangeAppThemeCommand}" CommandParameter="{x:Static common:MachineStudioTheme.Dark}" Background="{StaticResource MainWindow.SubMenuItem.Background}"></MenuItem>
+ </MenuItem>
+ <Separator/>
<Button Command="{Binding AboutCommand}">
<StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="Information" Width="24" Height="24" />
- <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">About</TextBlock>
+ <materialDesign:PackIcon Kind="Information"
+ Width="24"
+ Height="24" />
+ <TextBlock Margin="5 0 0 0"
+ VerticalAlignment="Center">About</TextBlock>
</StackPanel>
</Button>
- <Separator/>
+ <Separator />
<Button Command="{Binding ExitCommand}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="CloseCircleOutline" Width="24" Height="24" />
@@ -248,11 +258,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>
@@ -404,7 +414,7 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid>
- <StackPanel Margin="30 20" HorizontalAlignment="Left">
+ <StackPanel Margin="30 20" HorizontalAlignment="Left" TextElement.Foreground="#9A9A9A">
<TextBlock FontSize="35">Welcome to Machine Studio</TextBlock>
<TextBlock HorizontalAlignment="Left" Margin="350 5 0 0" FontStyle="Italic" FontSize="16">The below modules are displayed according to your user roles and permissions.</TextBlock>
</StackPanel>
@@ -421,21 +431,21 @@
<ItemsControl.ItemTemplate>
<DataTemplate>
- <materialDesign:Card Width="300" Margin="10" Height="400" Visibility="{Binding InNewWindow,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
+ <materialDesign:Card Background="{StaticResource WhiteBackgroundBrush}" Foreground="{StaticResource JobFieldForeground}" Width="300" Margin="10" Height="400" Visibility="{Binding InNewWindow,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="180" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
- <Image Source="{Binding Image,Mode=OneWay}" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" />
- <Rectangle VerticalAlignment="Bottom" Stroke="Silver"></Rectangle>
+ <Image Opacity="{StaticResource HomeImageOpacity}" Source="{Binding Image,Mode=OneWay}" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" />
+ <Rectangle VerticalAlignment="Bottom" Stroke="{StaticResource borderBrush}"></Rectangle>
<Button Tag="{Binding}" AutomationProperties.AutomationId="{Binding Name}" 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>
+ <TextBlock FontWeight="Bold" FontSize="20" Text="{Binding Name,Mode=OneWay}" Foreground="{StaticResource HomePageForeground}"></TextBlock>
+ <TextBlock VerticalAlignment="Center" Margin="0 5 0 0" FontSize="14" TextWrapping="Wrap" Text="{Binding Description,Mode=OneWay}" Foreground="{StaticResource HomePageForeground}"></TextBlock>
</StackPanel>
<StackPanel Grid.Row="2" Margin="8" HorizontalAlignment="Right" Orientation="Horizontal">
<materialDesign:PopupBox Padding="2,0,2,0" Style="{StaticResource MaterialDesignToolPopupBox}">
@@ -470,6 +480,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 LoadingBorderGradientBrush}"/>
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="1" ScaleY="0"></ScaleTransform>
@@ -495,12 +506,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 +528,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="{StaticResource WhiteBackgroundBrush}" CornerRadius="5" Padding="5">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" BlurRadius="10" />
</Border.Effect>
@@ -525,7 +536,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 +587,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 +616,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/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
index ca8d7066c..eb76bf4ec 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
@@ -96,5 +96,10 @@ namespace Tango.MachineStudio.UI.Views
});
});
}
+
+ private void MenuItem_MouseEnter(object sender, MouseEventArgs e)
+ {
+ menuTheme.IsSubmenuOpen = true;
+ }
}
}
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..ef9667b6d 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml
@@ -12,7 +12,7 @@
xmlns:tfs="clr-namespace:Tango.TFS;assembly=Tango.TFS"
xmlns:tfss="clr-namespace:Tango.MachineStudio.UI.TFS"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
- mc:Ignorable="d" Width="530" Height="720" Background="White" d:DataContext="{d:DesignInstance Type=vm:ReportIssueViewVM, IsDesignTimeCreatable=False}">
+ mc:Ignorable="d" Width="530" Height="720" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:ReportIssueViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}">
<UserControl.Resources>
<converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
@@ -57,7 +57,7 @@
<ControlTemplate TargetType="ToggleButton">
<Grid Background="Transparent">
<Popup Height="200" AllowsTransparency="True" Width="{TemplateBinding ActualWidth}" PopupAnimation="Slide" IsOpen="{Binding IsChecked, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
- <Border Background="White" Margin="0 2 0 0" BorderBrush="Silver" BorderThickness="1" CornerRadius="3">
+ <Border Background="{StaticResource MainWindow.Background}" Margin="0 2 0 0" BorderBrush="{StaticResource borderBrush}" BorderThickness="1" CornerRadius="3">
<TreeView Loaded="TreeView_Loaded" ItemsSource="{Binding Project.Areas}" SelectedItemChanged="TreeView_SelectedItemChanged">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding SubAreas}">
@@ -96,11 +96,11 @@
<Border CornerRadius="5" Margin="0 5 5 5" Padding="5" BorderThickness="1" BorderBrush="DimGray">
<Border.Style>
<Style TargetType="Border">
- <Setter Property="Background" Value="Silver"></Setter>
+ <Setter Property="Background" Value="{StaticResource borderBrush}"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsSelected}" Value="True">
<Setter Property="Background" Value="{StaticResource AccentColorBrush}"></Setter>
- <Setter Property="TextElement.Foreground" Value="White"></Setter>
+ <Setter Property="TextElement.Foreground" Value="{StaticResource MainWindow.Foreground}"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
@@ -132,7 +132,7 @@
</DockPanel>
<Grid Margin="30 0 0 0">
- <TextBox Margin="0 5 0 0" Style="{x:Null}" BorderBrush="Silver" AcceptsReturn="True" TextWrapping="Wrap" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Text="{Binding WorkItem.StepsToReproduce}"></TextBox>
+ <TextBox Margin="0 5 0 0" Style="{x:Null}" BorderBrush="{StaticResource borderBrush}" AcceptsReturn="True" TextWrapping="Wrap" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Text="{Binding WorkItem.StepsToReproduce}"></TextBox>
</Grid>
</DockPanel>
</Grid>
@@ -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..92317a5d5 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml
@@ -12,7 +12,7 @@
xmlns:tfs="clr-namespace:Tango.TFS;assembly=Tango.TFS"
xmlns:tfss="clr-namespace:Tango.MachineStudio.UI.TFS"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
- mc:Ignorable="d" Width="530" Height="580" Background="White" d:DataContext="{d:DesignInstance Type=vm:ResolvedIssuesViewVM, IsDesignTimeCreatable=False}">
+ mc:Ignorable="d" Width="530" Height="580" Background="{StaticResource MainWindow.Background}" d:DataContext="{d:DesignInstance Type=vm:ResolvedIssuesViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}">
<Grid>
<Grid IsEnabled="{Binding IsAvailable}">
<Grid.RowDefinitions>
@@ -39,10 +39,10 @@
<ListBox x:Name="list" ItemsSource="{Binding TFSClient.ResolvedWorkItems}" HorizontalContentAlignment="Stretch">
<ListBox.ItemTemplate>
<DataTemplate>
- <Border BorderBrush="#E6E6E6" BorderThickness="0 0 0 1" Padding="5">
+ <Border BorderBrush="{StaticResource WhiteBrush100}" 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>
@@ -60,7 +60,7 @@
<Image Source="/Images/bug.png" Width="24" RenderOptions.BitmapScalingMode="Fant"></Image>
<StackPanel Margin="5 0 0 0" ToolTip="{Binding Comment}">
<TextBlock Text="{Binding Title}" FontWeight="SemiBold" TextTrimming="CharacterEllipsis"></TextBlock>
- <TextBlock Text="{Binding Comment,TargetNullValue='Comment',FallbackValue='Comment'}" TextWrapping="Wrap" Foreground="Gray" FontSize="10"></TextBlock>
+ <TextBlock Text="{Binding Comment,TargetNullValue='Comment',FallbackValue='Comment'}" TextWrapping="Wrap" Foreground="{StaticResource GrayBrush}" FontSize="10"></TextBlock>
</StackPanel>
</StackPanel>
</DockPanel>
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..25fe4af5d 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml
@@ -7,7 +7,7 @@
mc:Ignorable="d"
WindowStyle="None" ResizeMode="NoResize" Topmost="True" AllowsTransparency="True" WindowStartupLocation="CenterScreen" Width="800" Height="600" Background="Transparent" d:DataContext="{d:DesignInstance Type=local:ExceptionWindow, IsDesignTimeCreatable=False}">
<Grid>
- <Border BorderThickness="1" BorderBrush="DodgerBlue" Background="White" Margin="10" CornerRadius="10">
+ <Border BorderThickness="1" BorderBrush="DodgerBlue" Background="{StaticResource Dialog.Background}" Margin="10" CornerRadius="10">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" BlurRadius="10" />
</Border.Effect>
@@ -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..47b36070a 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>
@@ -76,12 +77,12 @@
</Style.Triggers>
</Style>
</Border.Style>
- <Border.Background>
+ <!--<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>
+ </Border.Background>-->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="20 0 0 0">
<mahapps:ProgressRing Width="24" Height="24" Foreground="White"></mahapps:ProgressRing>