From 5cb75f4b026a7842171369f58f5aba1c9678f60f Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 20 Dec 2019 17:47:51 +0200 Subject: Added error message for when external bridge failed due to udp port is already used. Implemented flexo font on mahcine studio. Added module title/image on MS. Updated some machine icons on MS. --- Software/Graphics/machine_new.png | Bin 0 -> 43275 bytes .../Fonts/Flexo-Black.otf | Bin 0 -> 112924 bytes .../Fonts/Flexo-BlackIt.otf | Bin 0 -> 121948 bytes .../Fonts/Flexo-Bold.otf | Bin 0 -> 112436 bytes .../Fonts/Flexo-BoldIt.otf | Bin 0 -> 121352 bytes .../Fonts/Flexo-Demi.otf | Bin 0 -> 112936 bytes .../Fonts/Flexo-DemiIt.otf | Bin 0 -> 122096 bytes .../Fonts/Flexo-Heavy.otf | Bin 0 -> 112632 bytes .../Fonts/Flexo-HeavyIt.otf | Bin 0 -> 122220 bytes .../Tango.MachineStudio.Common/Fonts/Flexo-It.otf | Bin 0 -> 120816 bytes .../Fonts/Flexo-Light.otf | Bin 0 -> 112116 bytes .../Fonts/Flexo-LightIt.otf | Bin 0 -> 120472 bytes .../Fonts/Flexo-Medium.otf | Bin 0 -> 112016 bytes .../Fonts/Flexo-MediumIt.otf | Bin 0 -> 121092 bytes .../Fonts/Flexo-Regular.otf | Bin 0 -> 111924 bytes .../Fonts/Flexo-Thin.otf | Bin 0 -> 112040 bytes .../Fonts/Flexo-ThinIt.otf | Bin 0 -> 120108 bytes .../Images/machine_new.png | Bin 0 -> 43275 bytes .../Images/machine_new_small.png | Bin 0 -> 16963 bytes .../Resources/MaterialDesign.xaml | 13 +++- .../Tango.MachineStudio.Common.csproj | 25 +++++++- .../Tango.MachineStudio.UI/MainWindow.xaml | 2 +- .../Notifications/DialogWindow.xaml | 2 +- .../Notifications/MessageBoxWindow.xaml | 2 +- .../Notifications/TextInputBoxWindow.xaml | 2 +- .../Tango.MachineStudio.UI.csproj | 5 +- .../ViewModels/MachineConnectionViewVM.cs | 3 + .../ViewModels/MainViewVM.cs | 14 +++-- .../Tango.MachineStudio.UI/Views/AboutView.xaml | 2 +- .../Views/ConnectionLostView.xaml | 2 +- .../Tango.MachineStudio.UI/Views/LoadingView.xaml | 2 +- .../Tango.MachineStudio.UI/Views/LoginView.xaml | 2 +- .../Views/MachineConnectionView.xaml | 2 +- .../Views/MachineLoginView.xaml | 2 +- .../Views/MachineSerialView.xaml | 2 +- .../Tango.MachineStudio.UI/Views/MainView.xaml | 69 +++++++++++++++++++-- .../Tango.MachineStudio.UI/Views/ShutdownView.xaml | 2 +- .../Windows/ExceptionWindow.xaml | 2 +- .../Windows/ModuleWindow.xaml | 14 ++++- .../Windows/ModuleWindow.xaml.cs | 9 +++ .../Tango.MachineStudio.UI/machine_new_small.ico | Bin 0 -> 132825 bytes .../ExternalBridge/ExternalBridgeScanner.cs | 6 +- 42 files changed, 153 insertions(+), 31 deletions(-) create mode 100644 Software/Graphics/machine_new.png create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Black.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-BlackIt.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Bold.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-BoldIt.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Demi.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-DemiIt.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Heavy.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-HeavyIt.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-It.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Light.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-LightIt.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Medium.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-MediumIt.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Regular.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Thin.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-ThinIt.otf create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new.png create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new_small.png create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/machine_new_small.ico diff --git a/Software/Graphics/machine_new.png b/Software/Graphics/machine_new.png new file mode 100644 index 000000000..116e1e9c7 Binary files /dev/null and b/Software/Graphics/machine_new.png differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Black.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Black.otf new file mode 100644 index 000000000..0341d05db Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Black.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-BlackIt.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-BlackIt.otf new file mode 100644 index 000000000..e0823abdf Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-BlackIt.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Bold.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Bold.otf new file mode 100644 index 000000000..2b9144e5c Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Bold.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-BoldIt.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-BoldIt.otf new file mode 100644 index 000000000..f21ed044d Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-BoldIt.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Demi.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Demi.otf new file mode 100644 index 000000000..ada716012 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Demi.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-DemiIt.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-DemiIt.otf new file mode 100644 index 000000000..ab9a133a5 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-DemiIt.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Heavy.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Heavy.otf new file mode 100644 index 000000000..b3630c982 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Heavy.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-HeavyIt.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-HeavyIt.otf new file mode 100644 index 000000000..e47f75546 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-HeavyIt.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-It.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-It.otf new file mode 100644 index 000000000..6f9b5fa49 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-It.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Light.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Light.otf new file mode 100644 index 000000000..27af39094 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Light.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-LightIt.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-LightIt.otf new file mode 100644 index 000000000..89085eeca Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-LightIt.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Medium.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Medium.otf new file mode 100644 index 000000000..04b2a8853 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Medium.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-MediumIt.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-MediumIt.otf new file mode 100644 index 000000000..91996979e Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-MediumIt.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Regular.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Regular.otf new file mode 100644 index 000000000..2703ba3f3 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Regular.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Thin.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Thin.otf new file mode 100644 index 000000000..666c69931 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-Thin.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-ThinIt.otf b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-ThinIt.otf new file mode 100644 index 000000000..b039daffe Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Fonts/Flexo-ThinIt.otf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new.png b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new.png new file mode 100644 index 000000000..116e1e9c7 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new.png differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new_small.png b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new_small.png new file mode 100644 index 000000000..378879ce1 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new_small.png differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml index 177a4fe75..37e35b1ab 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml @@ -63,6 +63,13 @@ ../Fonts/#digital-7 + ../Fonts/#flexo + + + + + + @@ -526,7 +533,7 @@ - + @@ -774,6 +781,10 @@ + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index 3ce667afe..5e874add1 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -127,6 +127,22 @@ + + + + + + + + + + + + + + + + @@ -401,11 +417,16 @@ - + + + + + + - + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml index a76749b05..054d7b9d8 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml @@ -8,7 +8,7 @@ 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="{StaticResource MainWindow.Foreground}" + Title="Tango" Height="800" Width="1280" Foreground="{StaticResource MainWindow.Foreground}" FontFamily="{StaticResource flexo}" BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}" Background="{DynamicResource MainWindow.Background}" WindowTitleBrush="{StaticResource MainWindow.WindowTitleColorBrush}"> 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 41405f7fb..939adf5d5 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" ShowInTaskbar="False"> + Title="Machine Studio" MinHeight="220" SizeToContent="WidthAndHeight" MinWidth="600" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterOwner" Background="Transparent" ShowInTaskbar="False" FontFamily="{StaticResource flexo}" > 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 988e3c21f..888f49d3f 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" ShowInTaskbar="False"> + Title="Machine Studio" MinHeight="220" MaxHeight="600" SizeToContent="Height" Width="570" Opacity="0" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterOwner" Background="Transparent" ShowInTaskbar="False" FontFamily="{StaticResource flexo}" > 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 a43fafb46..7d888d784 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" ShowInTaskbar="False"> + Title="Machine Studio" MinHeight="220" MaxHeight="600" SizeToContent="Height" Width="570" Opacity="0" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterOwner" Background="Transparent" ShowInTaskbar="False" FontFamily="{StaticResource flexo}" > 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 d5084d051..1762205ad 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 @@ -36,7 +36,7 @@ 4 - machine.ico + machine_new_small.ico @@ -363,6 +363,7 @@ TCC\template.bmp Always + @@ -674,7 +675,7 @@ if $(ConfigurationName) == Release RD /S /Q "$(TargetDir)Roslyn\" - + \ No newline at end of file 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 d1f3cc69e..0ea47c24a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; +using Tango.Core.DI; using Tango.Emulations.ExternalBridge; using Tango.Integration.ExternalBridge; using Tango.MachineStudio.Common; @@ -108,6 +109,8 @@ namespace Tango.MachineStudio.UI.ViewModels catch (Exception ex) { LogManager.Log(ex, "Error starting external bridge scanner."); + Cancel(); + TangoIOC.Default.GetInstance().ShowError($"There is a problem with machine scanning.\n{ex.FlattenMessage()}"); } } 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 c7fd7a525..a7397835b 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -668,7 +668,7 @@ namespace Tango.MachineStudio.UI.ViewModels /// Starts the specified module. /// /// The module. - internal void StartModule(IStudioModule module) + internal async void StartModule(IStudioModule module) { IsMenuOpened = false; @@ -693,10 +693,9 @@ namespace Tango.MachineStudio.UI.ViewModels m.IsLoaded = false; } - CurrentModule = module; - if (module != null) { + CurrentModule = module; CurrentModule.IsLoaded = true; IsModuleLoaded = true; @@ -707,7 +706,10 @@ namespace Tango.MachineStudio.UI.ViewModels { IsModuleLoaded = false; LogManager.Log(String.Format("Navigating to Home...")); - (MainView.Self as MainView).NavigationControl.NavigateTo("Home"); + (MainView.Self as MainView).NavigationControl.NavigateTo("Home",() => + { + CurrentModule = module; + }); } } @@ -715,7 +717,7 @@ namespace Tango.MachineStudio.UI.ViewModels /// Opens the module in a new window. /// /// The module. - private void OpenModuleInWindow(IStudioModule module, Rect? bounds = null, WindowState? state = null) + private async void OpenModuleInWindow(IStudioModule module, Rect? bounds = null, WindowState? state = null) { if (module == null) return; @@ -725,6 +727,8 @@ namespace Tango.MachineStudio.UI.ViewModels StartModule(null); + await Task.Delay(1000); + LogManager.Log(String.Format("Starting module '{0}' in new window...", module.Name)); if (!(MainView.Self as MainView).NavigationControl.Elements.ToList().Exists(x => x.GetType() == module.MainViewType)) 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 f7e90d4f5..82d628785 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml @@ -28,7 +28,7 @@ - + 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 b2fa2b3e3..28937a438 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectionLostView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectionLostView.xaml @@ -18,7 +18,7 @@ - + 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 df1c1b831..14fcc3a37 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml @@ -16,7 +16,7 @@ - + Machine Studio diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml index ec6091988..d93dbc127 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml @@ -42,7 +42,7 @@ - + Machine Studio 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 69ce4c855..581e87ed6 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml @@ -27,7 +27,7 @@ - + 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 7d0b2e25c..5be9ba089 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml @@ -29,7 +29,7 @@ - + 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 eea90c7b9..2393ab6e7 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineSerialView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineSerialView.xaml @@ -23,7 +23,7 @@ - + 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 d427be9e5..3f1164526 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -231,10 +231,71 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml index cc1060b2a..6bda3fe2d 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml @@ -10,7 +10,7 @@ - + Machine Studio 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 25fe4af5d..6b80fad43 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Windows" 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}"> + 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}" FontFamily="{StaticResource flexo}" > 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 47b36070a..5db0277cc 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml @@ -10,7 +10,7 @@ xmlns:views="clr-namespace:Tango.MachineStudio.UI.Views" xmlns:sharedControls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" mc:Ignorable="d" - Title="{Binding RelativeSource={RelativeSource Self},Path=ModuleContext.Module.Name}" Height="800" Width="1280" WindowStartupLocation="CenterOwner" WindowState="Maximized" Foreground="#494949" BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}"> + Title="Machine Studio" Height="800" Width="1280" WindowStartupLocation="CenterOwner" WindowState="Maximized" Foreground="#494949" BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}" FontFamily="{StaticResource flexo}"> @@ -29,8 +29,16 @@ - - + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml.cs index 7ca062645..cfea78964 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml.cs @@ -12,6 +12,8 @@ using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; +using Tango.Core.DI; +using Tango.MachineStudio.Common.StudioApplication; using Tango.MachineStudio.UI.ViewModels; namespace Tango.MachineStudio.UI.Windows @@ -32,6 +34,13 @@ namespace Tango.MachineStudio.UI.Windows public ModuleWindow() { InitializeComponent(); + + ContentRendered += ModuleWindow_ContentRendered; + } + + private void ModuleWindow_ContentRendered(object sender, EventArgs e) + { + Title = "MACHINE STUDIO " + TangoIOC.Default.GetInstance().Version.ToString(3); } public ModuleWindow(MainViewVM mainViewVM, ModuleWindowVM moduleVM, FrameworkElement view) : this() diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/machine_new_small.ico b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/machine_new_small.ico new file mode 100644 index 000000000..dd159c221 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/machine_new_small.ico differ diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs index b84942643..e20b12d1a 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs @@ -60,7 +60,6 @@ namespace Tango.Integration.ExternalBridge public ExternalBridgeScanner() { _settings = SettingsManager.Default.GetOrCreate(); - _server = new UdpClient(_settings.ExternalBridgeServiceDiscoveryPort); AvailableMachines = new SynchronizedObservableCollection(); } @@ -73,6 +72,11 @@ namespace Tango.Integration.ExternalBridge { LogManager.Log("External bridge scanner started..."); + if (_server == null) + { + _server = new UdpClient(_settings.ExternalBridgeServiceDiscoveryPort); + } + IsStarted = true; foreach (var machine in AvailableMachines.OfType().ToList()) -- cgit v1.3.1