aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-04-23 22:25:54 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-04-23 22:25:54 +0300
commitebcb9ce27131e4bbd14c96b5f897a67bc752aaeb (patch)
tree293aee8b1751ce7fce542645722c0f1a96b73097 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
parent52967e858bd52621208f6360e84f4c47ec435816 (diff)
parent636ad730569dfef1a4ee04c8d716d510bcc47ee1 (diff)
downloadTango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.tar.gz
Tango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.zip
merge alarm handling from remote
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config26
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs393
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj18
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs46
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs7
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml6
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml18
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml23
15 files changed, 366 insertions, 215 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
index 36619a25b..6f86f99e9 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.2.0" newVersion="4.0.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.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.2.0" newVersion="4.0.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml.XPath.XDocument" 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.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.StackTrace" 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.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
@@ -140,6 +140,18 @@
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
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 161177bf1..7c56115e3 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs
@@ -105,109 +105,148 @@ namespace Tango.MachineStudio.UI.Notifications
}
/// <summary>
- /// Creates a new instance of the specified View type and displays it as a modal dialog.
+ /// Shows the specified view with the specified view model as it's data context.
/// </summary>
+ /// <typeparam name="VM">The type of the mm.</typeparam>
/// <typeparam name="View">The type of the view.</typeparam>
- /// <typeparam name="VM">The type of the view model.</typeparam>
- /// <param name="onAccept">Accept button callback.</param>
- /// <param name="onCancel">Cancel button callback.</param>
- public void ShowModalDialog<View, VM>(Action<VM> onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM
+ /// <param name="vm">The view model.</param>
+ /// <param name="view">The view.</param>
+ /// <param name="onAccept">The accept action.</param>
+ /// <param name="onCancel">The cancel action.</param>
+ public void ShowModalDialog<VM, View>(VM vm, View view, Action<VM> onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM
{
- var view = Activator.CreateInstance<View>();
- DialogWindow dialog = new DialogWindow();
- dialog.Owner = Application.Current.MainWindow;
- dialog.InnerContent = view;
- MainWindow.Instance.shadowGrid.Visibility = Visibility.Visible;
- view.Loaded += (x, y) =>
+ try
{
- VM context = view.DataContext as VM;
- dialog.DataContext = context;
+ DialogWindow dialog = new DialogWindow();
+ dialog.Owner = Application.Current.MainWindow;
+ dialog.InnerContent = view;
+ MainWindow.Instance.shadowGrid.Visibility = Visibility.Visible;
+ view.Loaded += (x, y) =>
+ {
+ try
+ {
+ VM context = vm;
+ dialog.DataContext = context;
- Action onAcceptAction = null;
- Action onCancelAction = null;
+ Action onAcceptAction = null;
+ Action onCancelAction = null;
- onAcceptAction = new Action(() =>
- {
- dialog.Close();
- onAccept(context);
- context.Accepted -= onAcceptAction;
- context.Canceled -= onCancelAction;
- });
+ onAcceptAction = new Action(() =>
+ {
+ dialog.Close();
+ onAccept(context);
+ context.Accepted -= onAcceptAction;
+ context.Canceled -= onCancelAction;
+ });
- onCancelAction = new Action(() =>
- {
- dialog.Close();
+ onCancelAction = new Action(() =>
+ {
+ dialog.Close();
- if (onCancel != null)
- {
- onCancel();
- }
+ if (onCancel != null)
+ {
+ onCancel();
+ }
- context.Accepted -= onAcceptAction;
- context.Canceled -= onCancelAction;
- });
+ context.Canceled -= onCancelAction;
+ context.Accepted -= onAcceptAction;
+ });
- context.Accepted += onAcceptAction;
- context.Canceled += onCancelAction;
+ context.Accepted += onAcceptAction;
+ context.Canceled += onCancelAction;
- context.OnShow();
- };
- dialog.ShowDialog();
- MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden;
+ context.OnShow();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error display modal dialog. {typeof(VM).Name}");
+ onCancel?.Invoke();
+ }
+ };
+
+ dialog.ShowDialog();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error display modal dialog. {typeof(VM).Name}");
+ onCancel?.Invoke();
+ }
+ finally
+ {
+ MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden;
+ }
}
/// <summary>
- /// Shows the specified view with the specified view model as it's data context.
+ /// Creates a new instance of the specified View type and displays it as a modal dialog.
/// </summary>
- /// <typeparam name="VM">The type of the mm.</typeparam>
/// <typeparam name="View">The type of the view.</typeparam>
- /// <param name="vm">The view model.</param>
- /// <param name="view">The view.</param>
- /// <param name="onAccept">The accept action.</param>
- /// <param name="onCancel">The cancel action.</param>
- public void ShowModalDialog<VM, View>(VM vm, Action<VM> onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM
+ /// <typeparam name="VM">The type of the view model.</typeparam>
+ /// <param name="onAccept">Accept button callback.</param>
+ /// <param name="onCancel">Cancel button callback.</param>
+ public void ShowModalDialog<View, VM>(Action<VM> onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM
{
- var view = Activator.CreateInstance<View>();
- DialogWindow dialog = new DialogWindow();
- dialog.Owner = Application.Current.MainWindow;
- dialog.InnerContent = view;
- MainWindow.Instance.shadowGrid.Visibility = Visibility.Visible;
- view.Loaded += (x, y) =>
+ try
{
- VM context = vm;
- dialog.DataContext = context;
+ var view = Activator.CreateInstance<View>();
+ DialogWindow dialog = new DialogWindow();
+ dialog.Owner = Application.Current.MainWindow;
+ dialog.InnerContent = view;
+ MainWindow.Instance.shadowGrid.Visibility = Visibility.Visible;
+ view.Loaded += (x, y) =>
+ {
+ try
+ {
+ VM context = view.DataContext as VM;
+ dialog.DataContext = context;
- Action onAcceptAction = null;
- Action onCancelAction = null;
+ Action onAcceptAction = null;
+ Action onCancelAction = null;
- onAcceptAction = new Action(() =>
- {
- dialog.Close();
- onAccept(context);
- context.Accepted -= onAcceptAction;
- context.Canceled -= onCancelAction;
- });
+ onAcceptAction = new Action(() =>
+ {
+ dialog.Close();
+ onAccept(context);
+ context.Accepted -= onAcceptAction;
+ context.Canceled -= onCancelAction;
+ });
- onCancelAction = new Action(() =>
- {
- dialog.Close();
+ onCancelAction = new Action(() =>
+ {
+ dialog.Close();
- if (onCancel != null)
- {
- onCancel();
- }
+ if (onCancel != null)
+ {
+ onCancel();
+ }
- context.Accepted -= onAcceptAction;
- context.Canceled -= onCancelAction;
- });
+ context.Accepted -= onAcceptAction;
+ context.Canceled -= onCancelAction;
+ });
- context.Accepted += onAcceptAction;
- context.Canceled += onCancelAction;
+ context.Accepted += onAcceptAction;
+ context.Canceled += onCancelAction;
- context.OnShow();
- };
- dialog.ShowDialog();
- MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden;
+ context.OnShow();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error display modal dialog. {typeof(VM).Name}");
+ onCancel?.Invoke();
+ }
+ };
+ dialog.ShowDialog();
+ MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden;
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error display modal dialog. {typeof(VM).Name}");
+ onCancel?.Invoke();
+ }
+ finally
+ {
+ MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden;
+ }
}
/// <summary>
@@ -219,48 +258,68 @@ namespace Tango.MachineStudio.UI.Notifications
/// <param name="view">The view.</param>
/// <param name="onAccept">The accept action.</param>
/// <param name="onCancel">The cancel action.</param>
- public void ShowModalDialog<VM, View>(VM vm, View view, Action<VM> onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM
+ public void ShowModalDialog<VM, View>(VM vm, Action<VM> onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM
{
- DialogWindow dialog = new DialogWindow();
- dialog.Owner = Application.Current.MainWindow;
- dialog.InnerContent = view;
- MainWindow.Instance.shadowGrid.Visibility = Visibility.Visible;
- view.Loaded += (x, y) =>
+ try
{
- VM context = vm;
- dialog.DataContext = context;
+ var view = Activator.CreateInstance<View>();
+ DialogWindow dialog = new DialogWindow();
+ dialog.Owner = Application.Current.MainWindow;
+ dialog.InnerContent = view;
+ MainWindow.Instance.shadowGrid.Visibility = Visibility.Visible;
+ view.Loaded += (x, y) =>
+ {
+ try
+ {
+ VM context = vm;
+ dialog.DataContext = context;
- Action onAcceptAction = null;
- Action onCancelAction = null;
+ Action onAcceptAction = null;
+ Action onCancelAction = null;
- onAcceptAction = new Action(() =>
- {
- dialog.Close();
- onAccept(context);
- context.Accepted -= onAcceptAction;
- context.Canceled -= onCancelAction;
- });
+ onAcceptAction = new Action(() =>
+ {
+ dialog.Close();
+ onAccept(context);
+ context.Accepted -= onAcceptAction;
+ context.Canceled -= onCancelAction;
+ });
- onCancelAction = new Action(() =>
- {
- dialog.Close();
+ onCancelAction = new Action(() =>
+ {
+ dialog.Close();
- if (onCancel != null)
- {
- onCancel();
- }
+ if (onCancel != null)
+ {
+ onCancel();
+ }
- context.Canceled -= onCancelAction;
- context.Accepted -= onAcceptAction;
- });
+ context.Accepted -= onAcceptAction;
+ context.Canceled -= onCancelAction;
+ });
- context.Accepted += onAcceptAction;
- context.Canceled += onCancelAction;
+ context.Accepted += onAcceptAction;
+ context.Canceled += onCancelAction;
- context.OnShow();
- };
- dialog.ShowDialog();
- MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden;
+ context.OnShow();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error display modal dialog. {typeof(VM).Name}");
+ onCancel?.Invoke();
+ }
+ };
+ dialog.ShowDialog();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error display modal dialog. {typeof(VM).Name}");
+ onCancel?.Invoke();
+ }
+ finally
+ {
+ MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden;
+ }
}
/// <summary>
@@ -272,67 +331,87 @@ namespace Tango.MachineStudio.UI.Notifications
/// <exception cref="NullReferenceException">Could not locate view " + viewName</exception>
public void ShowModalDialog<VM>(Action<VM> onAccept, Action onCancel) where VM : DialogViewVM
{
- String viewName = typeof(VM).Name.Replace("VM", "");
-
- if (viewTypes == null)
+ try
{
- viewTypes = AppDomain.CurrentDomain.GetAssemblies().Where(x => x.FullName.Contains("MachineStudio")).SelectMany(x => x.GetTypes()).ToList();
- }
+ String viewName = typeof(VM).Name.Replace("VM", "");
- var viewType = viewTypes.SingleOrDefault(x => x.Name == viewName);
+ if (viewTypes == null)
+ {
+ viewTypes = AppDomain.CurrentDomain.GetAssemblies().Where(x => x.FullName.Contains("MachineStudio")).SelectMany(x => x.GetTypes()).ToList();
+ }
- if (viewType == null)
- {
- throw new NullReferenceException("Could not locate view " + viewName);
- }
+ var viewType = viewTypes.SingleOrDefault(x => x.Name == viewName);
- var view = Activator.CreateInstance(viewType) as FrameworkElement;
- DialogWindow dialog = new DialogWindow();
- dialog.Owner = Application.Current.MainWindow;
- dialog.InnerContent = view;
- MainWindow.Instance.shadowGrid.Visibility = Visibility.Visible;
- view.Loaded += (x, y) =>
- {
- VM context = view.DataContext as VM;
- if (context == null)
+ if (viewType == null)
{
- context = Activator.CreateInstance<VM>();
+ throw new NullReferenceException("Could not locate view " + viewName);
}
- dialog.DataContext = context;
-
- Action onCancelAction = null;
- Action onAcceptAction = null;
- onAcceptAction = new Action(() =>
+ var view = Activator.CreateInstance(viewType) as FrameworkElement;
+ DialogWindow dialog = new DialogWindow();
+ dialog.Owner = Application.Current.MainWindow;
+ dialog.InnerContent = view;
+ MainWindow.Instance.shadowGrid.Visibility = Visibility.Visible;
+ view.Loaded += (x, y) =>
{
- dialog.Close();
- onAccept(context);
+ try
+ {
+ VM context = view.DataContext as VM;
+ if (context == null)
+ {
+ context = Activator.CreateInstance<VM>();
+ }
+ dialog.DataContext = context;
- context.Canceled -= onCancelAction;
- context.Accepted -= onAcceptAction;
- });
+ Action onCancelAction = null;
+ Action onAcceptAction = null;
- onCancelAction = new Action(() =>
- {
- dialog.Close();
+ onAcceptAction = new Action(() =>
+ {
+ dialog.Close();
+ onAccept(context);
- if (onCancel != null)
- {
- onCancel();
- }
+ context.Canceled -= onCancelAction;
+ context.Accepted -= onAcceptAction;
+ });
- context.Canceled -= onCancelAction;
- context.Accepted -= onAcceptAction;
- });
+ onCancelAction = new Action(() =>
+ {
+ dialog.Close();
- context.Accepted += onAcceptAction;
- context.Canceled += onCancelAction;
+ if (onCancel != null)
+ {
+ onCancel();
+ }
- context.OnShow();
- };
+ context.Canceled -= onCancelAction;
+ context.Accepted -= onAcceptAction;
+ });
- dialog.ShowDialog();
- MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden;
+ context.Accepted += onAcceptAction;
+ context.Canceled += onCancelAction;
+
+ context.OnShow();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error display modal dialog. {typeof(VM).Name}");
+ onCancel?.Invoke();
+ return;
+ }
+ };
+
+ dialog.ShowDialog();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error display modal dialog. {typeof(VM).Name}");
+ onCancel?.Invoke();
+ }
+ finally
+ {
+ MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden;
+ }
}
/// <summary>
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 c11e2e11b..2eb1080cb 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml
@@ -7,7 +7,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Windows"
mc:Ignorable="d"
- Title="Machine Studio" MinHeight="220" SizeToContent="WidthAndHeight" MinWidth="600" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterOwner" Background="Transparent">
+ 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">
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 a89f8eeca..8f9512236 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml
@@ -8,7 +8,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
mc:Ignorable="d"
- Title="Machine Studio" MinHeight="220" MaxHeight="600" SizeToContent="Height" Width="570" Opacity="0" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterOwner" Background="Transparent">
+ Title="Machine Studio" MinHeight="220" MaxHeight="600" SizeToContent="Height" Width="570" Opacity="0" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterOwner" Background="Transparent" ShowInTaskbar="False">
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"></BooleanToVisibilityConverter>
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 d2aad7cee..5e27071ec 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml
@@ -8,7 +8,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
mc:Ignorable="d"
- Title="Machine Studio" MinHeight="220" MaxHeight="600" SizeToContent="Height" Width="570" Opacity="0" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterOwner" Background="Transparent">
+ Title="Machine Studio" MinHeight="220" MaxHeight="600" SizeToContent="Height" Width="570" Opacity="0" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterOwner" Background="Transparent" ShowInTaskbar="False">
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"></BooleanToVisibilityConverter>
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 f313e9073..eff1f2521 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.9.0")]
+[assembly: AssemblyVersion("4.0.11.0")]
[assembly: ComVisible(false)] \ No newline at end of file
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 0051c3883..21fcdaa3c 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
@@ -343,6 +343,14 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
+ <Content Include="..\..\tcc\benchmarks\benchmarks_rgb_lab.csv">
+ <Link>TCC\benchmarks_rgb_lab.csv</Link>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ <Content Include="..\..\tcc\images\template.bmp">
+ <Link>TCC\template.bmp</Link>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
@@ -356,10 +364,6 @@
<Resource Include="design.ico" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\SideChains\RealTimeGraphEx\RealTimeGraphEx.csproj">
- <Project>{b9ae25d6-be35-492f-9079-21a7f3e6f7cc}</Project>
- <Name>RealTimeGraphEx</Name>
- </ProjectReference>
<ProjectReference Include="..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj">
<Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project>
<Name>Tango.AutoComplete</Name>
@@ -424,6 +428,10 @@
<Project>{f69da3a8-f823-461e-87cf-a9275abc0b15}</Project>
<Name>Tango.MachineStudio.Dispensers</Name>
</ProjectReference>
+ <ProjectReference Include="..\Modules\Tango.MachineStudio.ColorCapture\Tango.MachineStudio.ColorCapture.csproj">
+ <Project>{1b87ca53-50bd-4c48-a8c7-fbb9f1419aff}</Project>
+ <Name>Tango.MachineStudio.ColorCapture</Name>
+ </ProjectReference>
<ProjectReference Include="..\Modules\Tango.MachineStudio.ColorLab\Tango.MachineStudio.ColorLab.csproj">
<Project>{4d183aca-552b-4135-ae81-7c5a8e5fc3b1}</Project>
<Name>Tango.MachineStudio.ColorLab</Name>
@@ -610,7 +618,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/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
index 7fbb0008c..3fffd69fd 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
@@ -61,7 +61,6 @@ namespace Tango.MachineStudio.UI
TangoIOC.Default.Unregister<INavigationManager>();
TangoIOC.Default.Unregister<IStudioModuleLoader>();
TangoIOC.Default.Unregister<IStudioApplicationManager>();
- TangoIOC.Default.Unregister<ExternalBridgeScanner>();
TangoIOC.Default.Unregister<IVideoCaptureProvider>();
TangoIOC.Default.Unregister<IDiagnosticsFrameProvider>();
TangoIOC.Default.Unregister<IEventLogger>();
@@ -79,7 +78,6 @@ namespace Tango.MachineStudio.UI
TangoIOC.Default.Register<INavigationManager, DefaultNavigationManager>();
TangoIOC.Default.Register<IStudioModuleLoader, DefaultStudioModuleLoader>();
TangoIOC.Default.Register<IStudioApplicationManager, DefaultStudioApplicationManager>();
- TangoIOC.Default.Register<ExternalBridgeScanner, ExternalBridgeScanner>();
TangoIOC.Default.Register<IVideoCaptureProvider, DefaultVideoCaptureProvider>();
TangoIOC.Default.Register<IDiagnosticsFrameProvider, DefaultDiagnosticsFrameProvider>();
TangoIOC.Default.Register<IEventLogger, DefaultEventLogger>();
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 7737911e0..ce49d805e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs
@@ -19,18 +19,16 @@ namespace Tango.MachineStudio.UI.ViewModels
/// <seealso cref="Tango.MachineStudio.Common.Notifications.DialogViewVM" />
public class MachineConnectionViewVM : DialogViewVM
{
- private EmulatorExternalBridge _emulator;
-
- private ExternalBridgeScanner _scanner;
- /// <summary>
- /// Gets or sets the machine scanner.
- /// </summary>
+ private static ExternalBridgeScanner _scanner;
public ExternalBridgeScanner Scanner
{
get { return _scanner; }
set { _scanner = value; RaisePropertyChangedAuto(); }
}
+
+ private EmulatorExternalBridge _emulator;
+
private IExternalBridgeClient _selectedMachine;
/// <summary>
/// Gets or sets the selected machine.
@@ -50,11 +48,15 @@ namespace Tango.MachineStudio.UI.ViewModels
/// Initializes a new instance of the <see cref="MachineConnectionViewVM"/> class.
/// </summary>
/// <param name="scanner">The scanner.</param>
- public MachineConnectionViewVM(ExternalBridgeScanner scanner)
+ public MachineConnectionViewVM()
{
+ if (_scanner == null)
+ {
+ _scanner = new ExternalBridgeScanner();
+ }
+
EnableDiagnostics = true;
UploadHardwareConfiguration = true;
- Scanner = scanner;
ConnectCommand = new RelayCommand(Connect, (x) => SelectedMachine != null);
}
@@ -65,7 +67,7 @@ namespace Tango.MachineStudio.UI.ViewModels
{
if (SelectedMachine != null)
{
- Scanner.Stop();
+ _scanner.Stop();
Accept();
}
}
@@ -75,7 +77,7 @@ namespace Tango.MachineStudio.UI.ViewModels
/// </summary>
protected override void Cancel()
{
- Scanner.Stop();
+ _scanner.Stop();
base.Cancel();
}
@@ -85,19 +87,27 @@ namespace Tango.MachineStudio.UI.ViewModels
public override void OnShow()
{
base.OnShow();
- Scanner.AvailableMachines.Clear();
- if (SettingsManager.Default.GetOrCreate<MachineStudioSettings>().UseExternalBridgeEmulator)
+ try
{
- if (_emulator != null)
+ _scanner.AvailableMachines.Clear();
+
+ if (SettingsManager.Default.GetOrCreate<MachineStudioSettings>().UseExternalBridgeEmulator)
{
- _emulator.Disconnect();
+ if (_emulator != null)
+ {
+ _emulator.Disconnect();
+ }
+ _emulator = new EmulatorExternalBridge();
}
- _emulator = new EmulatorExternalBridge();
- }
- Scanner.AvailableMachines.Add(_emulator);
- Scanner.Start();
+ _scanner.AvailableMachines.Add(_emulator);
+ _scanner.Start();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error starting external bridge scanner.");
+ }
}
private bool _enableDiagnostics;
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs
index 2b1acdbe6..7584617ed 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs
@@ -5,6 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using Tango.Core.Commands;
using Tango.MachineStudio.Common.Notifications;
+using Tango.PMR.Integration;
using Tango.SharedUI;
namespace Tango.MachineStudio.UI.ViewModels
@@ -21,6 +22,11 @@ namespace Tango.MachineStudio.UI.ViewModels
public String Password { get; set; }
/// <summary>
+ /// Gets or sets the intent.
+ /// </summary>
+ public ExternalBridgeLoginIntent Intent { get; set; }
+
+ /// <summary>
/// Gets or sets the login command.
/// </summary>
public RelayCommand<String> LoginCommand { get; set; }
@@ -35,6 +41,7 @@ namespace Tango.MachineStudio.UI.ViewModels
/// </summary>
public MachineLoginViewVM()
{
+ Intent = ExternalBridgeLoginIntent.FullControl;
LoginCommand = new RelayCommand<string>(Login);
CancelCommand = new RelayCommand(Cancel);
}
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 986bf483f..3f69ff771 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -9,6 +9,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
+using System.Windows.Input;
using System.Windows.Media;
using Tango.BL;
using Tango.BL.Builders;
@@ -467,7 +468,7 @@ namespace Tango.MachineStudio.UI.ViewModels
HostName = Environment.MachineName,
Password = login.Password,
UserGuid = AuthenticationProvider.CurrentUser.Guid,
- Intent = PMR.Integration.ExternalBridgeLoginIntent.Override,
+ Intent = login.Intent,
});
ApplicationManager.SetConnectedMachine(x.SelectedMachine);
@@ -892,25 +893,28 @@ namespace Tango.MachineStudio.UI.ViewModels
{
if (!IsApplicationReady)
{
- var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
-
- foreach (var item in settings.StudioModulesBounds)
+ if (!Keyboard.IsKeyDown(Key.LeftCtrl))
{
- var module = StudioModuleLoader.AllModules.SingleOrDefault(x => x.Name == item.Name);
+ var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
- if (module != null && !module.InNewWindow)
+ foreach (var item in settings.StudioModulesBounds)
{
- OpenModuleInWindow(module, item.Bounds, item.State);
- }
- }
+ var module = StudioModuleLoader.AllModules.SingleOrDefault(x => x.Name == item.Name);
- if (settings.LastMainModuleName != null)
- {
- var m = StudioModuleLoader.UserModules.SingleOrDefault(x => x.Name == settings.LastMainModuleName);
+ if (module != null && !module.InNewWindow)
+ {
+ OpenModuleInWindow(module, item.Bounds, item.State);
+ }
+ }
- if (m != null)
+ if (settings.LastMainModuleName != null)
{
- StartModule(m);
+ var m = StudioModuleLoader.UserModules.SingleOrDefault(x => x.Name == settings.LastMainModuleName);
+
+ if (m != null)
+ {
+ StartModule(m);
+ }
}
}
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 54a8349e6..bf9a52b98 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml
@@ -6,6 +6,7 @@
xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:pmrPrinting="clr-namespace:Tango.PMR.Printing;assembly=Tango.PMR"
xmlns:bl="clr-namespace:Tango.BL;assembly=Tango.BL"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
@@ -67,6 +68,11 @@
<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>
</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>
+ </DockPanel>
</controls:TableGrid>
<DockPanel Margin="0 0 0 0">
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 c323ce0b0..338cb2d22 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml
@@ -115,7 +115,14 @@
<TextBlock FontWeight="SemiBold" Text="Embedded Software Version:" />
<TextBlock Text="{Binding DeviceInformation.Version}" />
<TextBlock FontWeight="SemiBold" Text="FPGA Version:" />
- <TextBlock>
+ <TextBlock TextTrimming="CharacterEllipsis">
+ <TextBlock.ToolTip>
+ <TextBlock>
+ <Run Text="{Binding DeviceInformation.FPGA1Version}"></Run> •
+ <Run Text="{Binding DeviceInformation.FPGA2Version}"></Run> •
+ <Run Text="{Binding DeviceInformation.FPGA3Version}"></Run>
+ </TextBlock>
+ </TextBlock.ToolTip>
<Run Text="{Binding DeviceInformation.FPGA1Version}"></Run> •
<Run Text="{Binding DeviceInformation.FPGA2Version}"></Run> •
<Run Text="{Binding DeviceInformation.FPGA3Version}"></Run>
@@ -162,7 +169,14 @@
<TextBlock FontWeight="SemiBold" Text="Embedded Software Version:" />
<TextBlock Text="{Binding DeviceInformation.Version}" />
<TextBlock FontWeight="SemiBold" Text="FPGA Version:" />
- <TextBlock>
+ <TextBlock TextTrimming="CharacterEllipsis">
+ <TextBlock.ToolTip>
+ <TextBlock>
+ <Run Text="{Binding DeviceInformation.FPGA1Version}"></Run> •
+ <Run Text="{Binding DeviceInformation.FPGA2Version}"></Run> •
+ <Run Text="{Binding DeviceInformation.FPGA3Version}"></Run>
+ </TextBlock>
+ </TextBlock.ToolTip>
<Run Text="{Binding DeviceInformation.FPGA1Version}"></Run> •
<Run Text="{Binding DeviceInformation.FPGA2Version}"></Run> •
<Run Text="{Binding DeviceInformation.FPGA3Version}"></Run>
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 9794404b9..7c4e960ec 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml
@@ -124,7 +124,7 @@
</StackPanel>
<StackPanel Margin="20 0 0 0" Orientation="Horizontal" VerticalAlignment="Center">
- <ToggleButton IsChecked="{Binding EnableKeepAlive}" VerticalAlignment="Center" ToolTip="Upload hardware configuration after connection is successful"></ToggleButton>
+ <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>
</StackPanel>
</StackPanel>
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 04f787c41..14967686f 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml
@@ -5,9 +5,16 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:pmr="clr-namespace:Tango.PMR.Integration;assembly=Tango.PMR"
+ 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}}">
+
+ <UserControl.Resources>
+ <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
+ </UserControl.Resources>
+
<Grid>
<DockPanel LastChildFill="True">
<StackPanel Margin="10" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right" DockPanel.Dock="Bottom">
@@ -26,12 +33,18 @@
<materialDesign:PackIcon Kind="Lock" VerticalAlignment="Bottom" Width="24" Height="24" HorizontalAlignment="Right" Foreground="{StaticResource AccentColorBrush}" />
</Grid>
<TextBlock Padding="0 10 0 0" TextWrapping="Wrap" Margin="10 0 0 0" VerticalAlignment="Top" FontSize="18" Text="Machine Login" Width="400"></TextBlock>
- </StackPanel>
-
- <StackPanel Margin="60 0 0 0">
- <TextBlock Margin="0 15 0 0">Enter machine password</TextBlock>
- <PasswordBox x:Name="txtPass" Margin="0 0 0 0" HorizontalAlignment="Left" PasswordChanged="txtPass_PasswordChanged" materialDesign:HintAssist.FloatingScale="0.50" materialDesign:HintAssist.Hint="*********" Width="300" materialDesign:TextFieldAssist.TextBoxViewMargin="1 0 1 0" Style="{StaticResource MaterialDesignFloatingHintPasswordBox}" />
</StackPanel>
+
+ <DockPanel Margin="60 15 0 0">
+ <StackPanel Width="280" >
+ <TextBlock>Enter machine password</TextBlock>
+ <PasswordBox x:Name="txtPass" Margin="0 0 0 0" PasswordChanged="txtPass_PasswordChanged" materialDesign:HintAssist.FloatingScale="0.50" materialDesign:HintAssist.Hint="*********" materialDesign:TextFieldAssist.TextBoxViewMargin="1 0 1 0" Style="{StaticResource MaterialDesignFloatingHintPasswordBox}" />
+ </StackPanel>
+ <StackPanel Margin="20 0 20 0">
+ <TextBlock>Intent</TextBlock>
+ <ComboBox Margin="0 8 0 0" ItemsSource="{Binding Source={x:Type pmr:ExternalBridgeLoginIntent},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding Intent}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
+ </StackPanel>
+ </DockPanel>
</StackPanel>
</Grid>
</DockPanel>