aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-04-22 13:35:22 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-04-22 13:35:22 +0300
commitde099bd3b50b8ea52b212b8d322626582c2648be (patch)
treeeea98a7f7b073d6cf8ded47bddc3b3f3f5e7c430
parent8edd1a95962a5c1c2e73d15f209a9fb362ff884a (diff)
downloadTango-de099bd3b50b8ea52b212b8d322626582c2648be.tar.gz
Tango-de099bd3b50b8ea52b212b8d322626582c2648be.zip
Implemented new TangoIOC container & TangoMessenger.
Got rid of MVVMLite libs ! Got rid of IShutdownRequestBlocker, IShutdownListener, IModuleRequestListener. Implemented IStudioViewModel & StudioViewModel.
-rw-r--r--Software/DB/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/Tango_log.ldfbin1572864 -> 1572864 bytes
-rw-r--r--Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Tango.EmbroideryUI.csproj1
-rw-r--r--Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/app.config47
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModelLocator.cs10
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/app.config40
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/packages.config2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/App.config40
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs173
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs10
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs22
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs8
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModelLocator.cs10
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/packages.config2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModelLocator.cs14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs22
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/app.config40
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs10
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/app.config40
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/packages.config2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/App.config48
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs25
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/packages.config2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs9
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/app.config40
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/packages.config2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModelLocator.cs11
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs9
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml.cs3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/packages.config2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/App.config80
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModelLocator.cs29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/DirectSynchronizationViewVM.cs4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/LocalSynchronizationViewVM.cs6
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/packages.config2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs22
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs13
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml.cs3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/app.config40
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModelLocator.cs14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/app.config40
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/packages.config2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/IStudioMessageExtensions.cs22
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/TangoIOCExtensions.cs22
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModuleViewVM.cs29
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioViewModel.cs42
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IModuleRequestListener.cs21
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IShutdownListener.cs19
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IShutdownRequestBlocker.cs21
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs117
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj22
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/app.config40
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/packages.config2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/App.config40
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs3
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs19
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs97
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs30
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs8
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config3
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config40
-rw-r--r--Software/Visual_Studio/Tango.Core/DI/ITangoIOC.cs14
-rw-r--r--Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs30
-rw-r--r--Software/Visual_Studio/Tango.Core/Tango.Core.csproj18
-rw-r--r--Software/Visual_Studio/Tango.Core/packages.config1
-rw-r--r--Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj1
-rw-r--r--Software/Visual_Studio/Tango.DragAndDrop/app.config47
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj17
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/ViewModel.cs8
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/app.config47
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/packages.config2
-rw-r--r--Software/Visual_Studio/Utilities/Tango.EmbroideryViewer/App.config46
-rw-r--r--Software/Visual_Studio/Utilities/Tango.ILMerge.UI/App.config46
-rw-r--r--Software/Visual_Studio/Utilities/Tango.MachineEM.UI/App.config40
-rw-r--r--Software/Visual_Studio/Utilities/Tango.Protobuf.UI/App.config48
-rw-r--r--Software/Visual_Studio/Utilities/Tango.TransportRouter.UI/App.config40
-rw-r--r--Software/Visual_Studio/Utilities/Tango.UITests/App.config40
100 files changed, 1476 insertions, 706 deletions
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index d1624d80d..285e43436 100644
--- a/Software/DB/Tango.mdf
+++ b/Software/DB/Tango.mdf
Binary files differ
diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf
index 20488dd58..04cb5a2a6 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Tango.EmbroideryUI.csproj b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Tango.EmbroideryUI.csproj
index f0b55d92a..d384abfe7 100644
--- a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Tango.EmbroideryUI.csproj
+++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/Tango.EmbroideryUI.csproj
@@ -92,6 +92,7 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
+ <None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
diff --git a/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/app.config b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/app.config
new file mode 100644
index 000000000..462d17b27
--- /dev/null
+++ b/Software/Visual_Studio/Embroidery/Tango.EmbroideryUI/app.config
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj
index 5a53e77a0..4fa4c1d9f 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj
@@ -37,15 +37,6 @@
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
@@ -58,14 +49,11 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
@@ -113,7 +101,9 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
- <None Include="app.config" />
+ <None Include="app.config">
+ <SubType>Designer</SubType>
+ </None>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModelLocator.cs
index 2ea8d17a3..46caecc70 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModelLocator.cs
@@ -1,6 +1,4 @@
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
using Tango.MachineStudio.ColorLab.ViewModels;
using Tango.MachineStudio.ColorLab.Views;
@@ -17,16 +15,14 @@ namespace Tango.MachineStudio.ColorLab
/// </summary>
static ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
-
- SimpleIoc.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<MainViewVM>();
}
public static MainViewVM MainViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<MainViewVM>();
+ return TangoIOC.Default.GetInstance<MainViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs
index 91ee4d162..88007b5f4 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs
@@ -13,6 +13,7 @@ using System.Windows.Media;
using Tango.BL;
using Tango.BL.Entities;
using Tango.Core.Commands;
+using Tango.MachineStudio.Common;
using Tango.MachineStudio.Common.Controls;
using Tango.MachineStudio.Common.Notifications;
using Tango.PMR;
@@ -22,7 +23,7 @@ using Tango.SharedUI.Controls;
namespace Tango.MachineStudio.ColorLab.ViewModels
{
- public class MainViewVM : ViewModel
+ public class MainViewVM : StudioViewModel<ColorLabModule>
{
[DllImport("Tango.ColorLib.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "Convert")]
public static extern int GetColorAdjust(IntPtr data, int size, ref IntPtr output);
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/app.config
index 4a6cb0526..77b7003e2 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/app.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/app.config
@@ -10,6 +10,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/packages.config
index 8cd12859b..c9f4c28c9 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/packages.config
@@ -2,9 +2,9 @@
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/App.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/App.config
index f89af9711..2031d1be1 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/App.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/App.config
@@ -16,6 +16,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
index 8eabcc605..baa6042f0 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
@@ -40,15 +40,6 @@
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
</Reference>
@@ -58,9 +49,6 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="SimpleValidator, Version=0.6.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\SimpleValidator.0.6.1.0\lib\net40\SimpleValidator.dll</HintPath>
</Reference>
@@ -68,7 +56,7 @@
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
index da2bdf631..d2506c362 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
@@ -1,6 +1,4 @@
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
using Tango.MachineStudio.DB.ViewModels;
namespace Tango.MachineStudio.DB
@@ -16,65 +14,64 @@ namespace Tango.MachineStudio.DB
/// </summary>
static ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
- SimpleIoc.Default.Register<MainViewVM>();
- SimpleIoc.Default.Register<MachinesViewVM>();
- SimpleIoc.Default.Register<OrganizationsViewVM>();
- SimpleIoc.Default.Register<AddressesViewVM>();
- SimpleIoc.Default.Register<UsersViewVM>();
- SimpleIoc.Default.Register<RolesViewVM>();
- SimpleIoc.Default.Register<PermissionsViewVM>();
- SimpleIoc.Default.Register<MachineVersionsViewVM>();
- SimpleIoc.Default.Register<ConfigurationsViewVM>();
+ TangoIOC.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<MachinesViewVM>();
+ TangoIOC.Default.Register<OrganizationsViewVM>();
+ TangoIOC.Default.Register<AddressesViewVM>();
+ TangoIOC.Default.Register<UsersViewVM>();
+ TangoIOC.Default.Register<RolesViewVM>();
+ TangoIOC.Default.Register<PermissionsViewVM>();
+ TangoIOC.Default.Register<MachineVersionsViewVM>();
+ TangoIOC.Default.Register<ConfigurationsViewVM>();
- SimpleIoc.Default.Register<ApplicationDisplayPanelVersionsViewVM>();
- SimpleIoc.Default.Register<ApplicationFirmwareVersionsViewVM>();
- SimpleIoc.Default.Register<ApplicationOsVersionsViewVM>();
- SimpleIoc.Default.Register<ApplicationVersionsViewVM>();
- SimpleIoc.Default.Register<EmbeddedFirmwareVersionsViewVM>();
- SimpleIoc.Default.Register<EmbeddedSoftwareVersionsViewVM>();
- SimpleIoc.Default.Register<HardwareVersionsViewVM>();
+ TangoIOC.Default.Register<ApplicationDisplayPanelVersionsViewVM>();
+ TangoIOC.Default.Register<ApplicationFirmwareVersionsViewVM>();
+ TangoIOC.Default.Register<ApplicationOsVersionsViewVM>();
+ TangoIOC.Default.Register<ApplicationVersionsViewVM>();
+ TangoIOC.Default.Register<EmbeddedFirmwareVersionsViewVM>();
+ TangoIOC.Default.Register<EmbeddedSoftwareVersionsViewVM>();
+ TangoIOC.Default.Register<HardwareVersionsViewVM>();
- SimpleIoc.Default.Register<IdsPacksViewVM>();
- SimpleIoc.Default.Register<IdsPackFormulasViewVM>();
- SimpleIoc.Default.Register<DispenserTypesViewVM>();
- SimpleIoc.Default.Register<LiquidTypesViewVM>();
- SimpleIoc.Default.Register<CartridgeTypesViewVM>();
- SimpleIoc.Default.Register<MidTankTypesViewVM>();
+ TangoIOC.Default.Register<IdsPacksViewVM>();
+ TangoIOC.Default.Register<IdsPackFormulasViewVM>();
+ TangoIOC.Default.Register<DispenserTypesViewVM>();
+ TangoIOC.Default.Register<LiquidTypesViewVM>();
+ TangoIOC.Default.Register<CartridgeTypesViewVM>();
+ TangoIOC.Default.Register<MidTankTypesViewVM>();
- SimpleIoc.Default.Register<EventTypesViewVM>();
- SimpleIoc.Default.Register<ActionTypesViewVM>();
+ TangoIOC.Default.Register<EventTypesViewVM>();
+ TangoIOC.Default.Register<ActionTypesViewVM>();
- SimpleIoc.Default.Register<ContactsViewVM>();
+ TangoIOC.Default.Register<ContactsViewVM>();
- SimpleIoc.Default.Register<MediaMaterialsViewVM>();
- SimpleIoc.Default.Register<MediaColorsViewVM>();
- SimpleIoc.Default.Register<MediaPurposesViewVM>();
- SimpleIoc.Default.Register<MediaConditionsViewVM>();
- SimpleIoc.Default.Register<LinearMassDensityUnitsViewVM>();
- SimpleIoc.Default.Register<FiberShapesViewVM>();
- SimpleIoc.Default.Register<FiberSynthsViewVM>();
- SimpleIoc.Default.Register<RmlsViewVM>();
- SimpleIoc.Default.Register<LiquidTypesRmlsViewVM>();
+ TangoIOC.Default.Register<MediaMaterialsViewVM>();
+ TangoIOC.Default.Register<MediaColorsViewVM>();
+ TangoIOC.Default.Register<MediaPurposesViewVM>();
+ TangoIOC.Default.Register<MediaConditionsViewVM>();
+ TangoIOC.Default.Register<LinearMassDensityUnitsViewVM>();
+ TangoIOC.Default.Register<FiberShapesViewVM>();
+ TangoIOC.Default.Register<FiberSynthsViewVM>();
+ TangoIOC.Default.Register<RmlsViewVM>();
+ TangoIOC.Default.Register<LiquidTypesRmlsViewVM>();
- SimpleIoc.Default.Register<CctsViewVM>();
- SimpleIoc.Default.Register<CatsViewVM>();
+ TangoIOC.Default.Register<CctsViewVM>();
+ TangoIOC.Default.Register<CatsViewVM>();
- SimpleIoc.Default.Register<ProcessParametersTablesViewVM>();
- SimpleIoc.Default.Register<ProcessParametersTablesGroupsViewVM>();
+ TangoIOC.Default.Register<ProcessParametersTablesViewVM>();
+ TangoIOC.Default.Register<ProcessParametersTablesGroupsViewVM>();
- SimpleIoc.Default.Register<HardwareMotorTypesViewVM>();
- SimpleIoc.Default.Register<HardwareDancerTypesViewVM>();
- SimpleIoc.Default.Register<HardwarePidControlTypesViewVM>();
+ TangoIOC.Default.Register<HardwareMotorTypesViewVM>();
+ TangoIOC.Default.Register<HardwareDancerTypesViewVM>();
+ TangoIOC.Default.Register<HardwarePidControlTypesViewVM>();
- SimpleIoc.Default.Register<EventTypesGroupsViewVM>();
+ TangoIOC.Default.Register<EventTypesGroupsViewVM>();
}
public static MainViewVM MainViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<MainViewVM>();
+ return TangoIOC.Default.GetInstance<MainViewVM>();
}
}
@@ -82,7 +79,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<MachinesViewVM>();
+ return TangoIOC.Default.GetInstance<MachinesViewVM>();
}
}
@@ -90,7 +87,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<OrganizationsViewVM>();
+ return TangoIOC.Default.GetInstance<OrganizationsViewVM>();
}
}
@@ -98,7 +95,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<AddressesViewVM>();
+ return TangoIOC.Default.GetInstance<AddressesViewVM>();
}
}
@@ -106,7 +103,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<UsersViewVM>();
+ return TangoIOC.Default.GetInstance<UsersViewVM>();
}
}
@@ -114,7 +111,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<RolesViewVM>();
+ return TangoIOC.Default.GetInstance<RolesViewVM>();
}
}
@@ -122,7 +119,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<PermissionsViewVM>();
+ return TangoIOC.Default.GetInstance<PermissionsViewVM>();
}
}
@@ -130,7 +127,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<MachineVersionsViewVM>();
+ return TangoIOC.Default.GetInstance<MachineVersionsViewVM>();
}
}
@@ -138,7 +135,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<ConfigurationsViewVM>();
+ return TangoIOC.Default.GetInstance<ConfigurationsViewVM>();
}
}
@@ -146,7 +143,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<ApplicationDisplayPanelVersionsViewVM>();
+ return TangoIOC.Default.GetInstance<ApplicationDisplayPanelVersionsViewVM>();
}
}
@@ -154,7 +151,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<ApplicationFirmwareVersionsViewVM>();
+ return TangoIOC.Default.GetInstance<ApplicationFirmwareVersionsViewVM>();
}
}
@@ -162,7 +159,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<ApplicationOsVersionsViewVM>();
+ return TangoIOC.Default.GetInstance<ApplicationOsVersionsViewVM>();
}
}
@@ -170,7 +167,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<ApplicationVersionsViewVM>();
+ return TangoIOC.Default.GetInstance<ApplicationVersionsViewVM>();
}
}
@@ -178,7 +175,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<EmbeddedFirmwareVersionsViewVM>();
+ return TangoIOC.Default.GetInstance<EmbeddedFirmwareVersionsViewVM>();
}
}
@@ -186,7 +183,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<EmbeddedSoftwareVersionsViewVM>();
+ return TangoIOC.Default.GetInstance<EmbeddedSoftwareVersionsViewVM>();
}
}
@@ -194,7 +191,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<HardwareVersionsViewVM>();
+ return TangoIOC.Default.GetInstance<HardwareVersionsViewVM>();
}
}
@@ -202,7 +199,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<IdsPacksViewVM>();
+ return TangoIOC.Default.GetInstance<IdsPacksViewVM>();
}
}
@@ -210,7 +207,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<DispenserTypesViewVM>();
+ return TangoIOC.Default.GetInstance<DispenserTypesViewVM>();
}
}
@@ -218,7 +215,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<LiquidTypesViewVM>();
+ return TangoIOC.Default.GetInstance<LiquidTypesViewVM>();
}
}
@@ -226,7 +223,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<CartridgeTypesViewVM>();
+ return TangoIOC.Default.GetInstance<CartridgeTypesViewVM>();
}
}
@@ -234,7 +231,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<EventTypesViewVM>();
+ return TangoIOC.Default.GetInstance<EventTypesViewVM>();
}
}
@@ -242,7 +239,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<ActionTypesViewVM>();
+ return TangoIOC.Default.GetInstance<ActionTypesViewVM>();
}
}
@@ -250,7 +247,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<ContactsViewVM>();
+ return TangoIOC.Default.GetInstance<ContactsViewVM>();
}
}
@@ -258,7 +255,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<MediaMaterialsViewVM>();
+ return TangoIOC.Default.GetInstance<MediaMaterialsViewVM>();
}
}
@@ -266,7 +263,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<MediaColorsViewVM>();
+ return TangoIOC.Default.GetInstance<MediaColorsViewVM>();
}
}
@@ -274,7 +271,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<MediaPurposesViewVM>();
+ return TangoIOC.Default.GetInstance<MediaPurposesViewVM>();
}
}
@@ -282,7 +279,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<MediaConditionsViewVM>();
+ return TangoIOC.Default.GetInstance<MediaConditionsViewVM>();
}
}
@@ -290,7 +287,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<LinearMassDensityUnitsViewVM>();
+ return TangoIOC.Default.GetInstance<LinearMassDensityUnitsViewVM>();
}
}
@@ -298,7 +295,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<FiberShapesViewVM>();
+ return TangoIOC.Default.GetInstance<FiberShapesViewVM>();
}
}
@@ -306,7 +303,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<FiberSynthsViewVM>();
+ return TangoIOC.Default.GetInstance<FiberSynthsViewVM>();
}
}
@@ -314,7 +311,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<RmlsViewVM>();
+ return TangoIOC.Default.GetInstance<RmlsViewVM>();
}
}
@@ -322,7 +319,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<CctsViewVM>();
+ return TangoIOC.Default.GetInstance<CctsViewVM>();
}
}
@@ -330,7 +327,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<CatsViewVM>();
+ return TangoIOC.Default.GetInstance<CatsViewVM>();
}
}
@@ -338,7 +335,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<MidTankTypesViewVM>();
+ return TangoIOC.Default.GetInstance<MidTankTypesViewVM>();
}
}
@@ -346,7 +343,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<LiquidTypesRmlsViewVM>();
+ return TangoIOC.Default.GetInstance<LiquidTypesRmlsViewVM>();
}
}
@@ -354,7 +351,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<ProcessParametersTablesViewVM>();
+ return TangoIOC.Default.GetInstance<ProcessParametersTablesViewVM>();
}
}
@@ -362,7 +359,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<ProcessParametersTablesGroupsViewVM>();
+ return TangoIOC.Default.GetInstance<ProcessParametersTablesGroupsViewVM>();
}
}
@@ -370,7 +367,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<IdsPackFormulasViewVM>();
+ return TangoIOC.Default.GetInstance<IdsPackFormulasViewVM>();
}
}
@@ -378,7 +375,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<HardwareMotorTypesViewVM>();
+ return TangoIOC.Default.GetInstance<HardwareMotorTypesViewVM>();
}
}
@@ -386,7 +383,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<HardwareDancerTypesViewVM>();
+ return TangoIOC.Default.GetInstance<HardwareDancerTypesViewVM>();
}
}
@@ -394,7 +391,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<HardwarePidControlTypesViewVM>();
+ return TangoIOC.Default.GetInstance<HardwarePidControlTypesViewVM>();
}
}
@@ -402,7 +399,7 @@ namespace Tango.MachineStudio.DB
{
get
{
- return ServiceLocator.Current.GetInstance<EventTypesGroupsViewVM>();
+ return TangoIOC.Default.GetInstance<EventTypesGroupsViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs
index de6772bf8..f4a0c6b0b 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs
@@ -9,7 +9,6 @@ using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.DB.Managers;
using Tango.SharedUI;
using System.Data.Entity.Infrastructure;
-using GalaSoft.MvvmLight.Messaging;
using Tango.MachineStudio.DB.Messages;
using System.Collections.ObjectModel;
using System.Reflection;
@@ -17,6 +16,7 @@ using Tango.MachineStudio.Common.StudioApplication;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using Tango.BL;
+using Tango.Core.DI;
namespace Tango.MachineStudio.DB.ViewModels
{
@@ -180,7 +180,7 @@ namespace Tango.MachineStudio.DB.ViewModels
ValidationErrors.Clear();
DialogOpenMode = DialogOpenMode.Editing;
EditEntity = GetEditableEntity(DialogOpenMode);
- Messenger.Default.Send(new OpenEntityEditViewMessage(DialogOpenMode, this, typeof(T)));
+ TangoMessenger.Default.Send(new OpenEntityEditViewMessage(DialogOpenMode, this, typeof(T)));
IsDialogOpen = true;
}
@@ -204,7 +204,7 @@ namespace Tango.MachineStudio.DB.ViewModels
}
}
- Messenger.Default.Send(new OpenEntityEditViewMessage(DialogOpenMode, this, typeof(T)));
+ TangoMessenger.Default.Send(new OpenEntityEditViewMessage(DialogOpenMode, this, typeof(T)));
IsDialogOpen = true;
}
@@ -231,7 +231,7 @@ namespace Tango.MachineStudio.DB.ViewModels
}
}
- Messenger.Default.Send(new CloseEntityEditViewMessage());
+ TangoMessenger.Default.Send(new CloseEntityEditViewMessage());
if (mode == DialogOpenMode.Editing)
{
@@ -288,7 +288,7 @@ namespace Tango.MachineStudio.DB.ViewModels
/// <param name="mode">The mode.</param>
protected virtual void OnDialogCancelPressed(DialogOpenMode mode, T entity)
{
- Messenger.Default.Send(new CloseEntityEditViewMessage());
+ TangoMessenger.Default.Send(new CloseEntityEditViewMessage());
IsDialogOpen = false;
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs
index abda33804..727436306 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs
@@ -1,5 +1,4 @@
-using Microsoft.Practices.ServiceLocation;
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
@@ -8,37 +7,40 @@ using System.Threading.Tasks;
using System.Windows;
using Tango.BL;
using Tango.BL.Entities;
+using Tango.Core.DI;
using Tango.MachineStudio.Common;
using Tango.MachineStudio.Common.StudioApplication;
using Tango.SharedUI;
namespace Tango.MachineStudio.DB.ViewModels
{
- public class MainViewVM : ViewModel, IModuleRequestListener
+ public class MainViewVM : StudioViewModel<DBModule>
{
public MainViewVM() : base()
{
}
- public void OnRequestModule(IStudioModule module, object args)
+ public override void OnModuleRequest(params object[] args)
{
- if (module is DBModule && args != null && args is IObservableEntity)
+ if (args != null && args.Length > 0 && args[0] is IObservableEntity)
{
- String vmName = args.GetType().Name + "sViewVM";
-
+ var arg = args[0];
+
+ String vmName = arg.GetType().Name + "sViewVM";
+
Type vmType = Assembly.GetAssembly(typeof(MainViewVM)).GetTypes().SingleOrDefault(x => x.Name == vmName);
if (vmType == null)
{
- vmName = args.GetType().BaseType.Name + "sViewVM";
+ vmName = arg.GetType().BaseType.Name + "sViewVM";
vmType = Assembly.GetAssembly(typeof(MainViewVM)).GetTypes().SingleOrDefault(x => x.Name == vmName);
}
if (vmType != null)
{
- var vm = ServiceLocator.Current.GetInstance(vmType);
- vmType.GetProperty("SelectedEntity").SetValue(vm, args);
+ var vm = TangoIOC.Default.GetInstance(vmType);
+ vmType.GetProperty("SelectedEntity").SetValue(vm, arg);
vmType.GetMethod("OnEdit", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(vm, new object[] { });
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs
index b769b9bfd..73f73844c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs
@@ -1,5 +1,4 @@
-using GalaSoft.MvvmLight.Messaging;
-using MaterialDesignThemes.Wpf;
+using MaterialDesignThemes.Wpf;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -14,6 +13,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using Tango.Core.DI;
using Tango.MachineStudio.DB.Messages;
using Tango.MachineStudio.DB.ViewModels;
using Tango.MachineStudio.DB.Views.DBViews;
@@ -31,8 +31,8 @@ namespace Tango.MachineStudio.DB.Views
{
InitializeComponent();
- Messenger.Default.Register<OpenEntityEditViewMessage>(this, HandleOpenEntityViewMessage);
- Messenger.Default.Register<CloseEntityEditViewMessage>(this, HandleCloseEntityViewMessage);
+ TangoMessenger.Default.Register<OpenEntityEditViewMessage>(HandleOpenEntityViewMessage);
+ TangoMessenger.Default.Register<CloseEntityEditViewMessage>(HandleCloseEntityViewMessage);
}
public bool IsEditViewOpen
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config
index 138a48ec7..08a360572 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config
@@ -3,11 +3,10 @@
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
<package id="Dragablz" version="0.0.3.197" targetFramework="net46" />
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLight" version="5.3.0.0" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
<package id="SimpleValidator" version="0.6.1.0" targetFramework="net46" />
<package id="WriteableBitmapEx" version="1.5.0.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj
index 384a3fc32..3d8fe79c7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj
@@ -31,15 +31,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
@@ -52,13 +43,10 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModelLocator.cs
index 98c5db8fe..888282659 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModelLocator.cs
@@ -1,6 +1,4 @@
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
using Tango.MachineStudio.DataCapture.ViewModels;
using Tango.MachineStudio.DataCapture.Views;
@@ -17,16 +15,14 @@ namespace Tango.MachineStudio.DataCapture
/// </summary>
static ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
-
- SimpleIoc.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<MainViewVM>();
}
public static MainViewVM MainViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<MainViewVM>();
+ return TangoIOC.Default.GetInstance<MainViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/packages.config
index 9f69ed86f..73dae1a0c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/packages.config
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
index ed55edbe6..ddea73858 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
@@ -40,15 +40,6 @@
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
@@ -61,9 +52,6 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
@@ -86,7 +74,7 @@
<Reference Include="System.Speech" />
<Reference Include="System.Windows" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModelLocator.cs
index c5ed7d385..70ae8a90a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModelLocator.cs
@@ -1,6 +1,4 @@
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
using Tango.MachineStudio.Developer.Navigation;
using Tango.MachineStudio.Developer.ViewModels;
using Tango.MachineStudio.Developer.Views;
@@ -18,18 +16,16 @@ namespace Tango.MachineStudio.Developer
/// </summary>
static ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
-
- SimpleIoc.Default.Register<IMainView>(() => MainView.Instance);
- SimpleIoc.Default.Register<MainViewVM>();
- SimpleIoc.Default.Register<DeveloperNavigationManager, DeveloperNavigationManager>();
+ TangoIOC.Default.Register<IMainView>(MainView.Instance);
+ TangoIOC.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<DeveloperNavigationManager, DeveloperNavigationManager>();
}
public static MainViewVM MainViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<MainViewVM>();
+ return TangoIOC.Default.GetInstance<MainViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
index 377b15610..b2f476eab 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
@@ -1,5 +1,4 @@
-using GalaSoft.MvvmLight.Ioc;
-using System;
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
@@ -35,9 +34,10 @@ using System.Speech.Synthesis;
using System.Media;
using Tango.MachineStudio.Common.EventLogging;
using Tango.MachineStudio.Common.Speech;
-using Microsoft.Practices.ServiceLocation;
using System.Threading;
using Tango.SharedUI.Helpers;
+using Tango.Core.DI;
+using Tango.MachineStudio.Common;
namespace Tango.MachineStudio.Developer.ViewModels
{
@@ -45,7 +45,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
/// Represents the developer module main view, view model.
/// </summary>
/// <seealso cref="Tango.SharedUI.ViewModel" />
- public class MainViewVM : ViewModel, IShutdownRequestBlocker, IShutdownListener
+ public class MainViewVM : StudioViewModel<DeveloperModule>
{
private static object _syncLock = new object();
private const string EMB_FORMATS_EXPORT = "Baby Lock (PES)|*.pes|Tajima (DST)|*.dst|EXP|*.exp|PCS|*.pcs|HUS|*.hus|KSM|*.ksm";
@@ -652,7 +652,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
LogManager.Log("Initializing relay commands...");
- _dataCaptureVM = ServiceLocator.Current.GetInstance<DataCapture.ViewModels.MainViewVM>();
+ _dataCaptureVM = TangoIOC.Default.GetInstance<DataCapture.ViewModels.MainViewVM>();
_dataCaptureVM.RelayCommandsInvalidated += (_, __) => StartJobAndRecordCommand.RaiseCanExecuteChanged();
//Initialize Commands...
@@ -1885,9 +1885,9 @@ namespace Tango.MachineStudio.Developer.ViewModels
#endregion
- #region IShutdownRequestBlocker
+ #region IStudioViewModel
- public Task<bool> OnShutdownRequest()
+ public override Task<bool> OnShutdownRequest()
{
if (IsJobRunning)
{
@@ -1902,16 +1902,14 @@ namespace Tango.MachineStudio.Developer.ViewModels
return Task.FromResult(true);
}
- #endregion
-
- #region IShutdownListener
-
- public void OnShuttingDown()
+ public override void OnShuttingDown()
{
SettingsManager.Default.MachineStudio.DeveloperModule.LastSelectedMachineGuid = SelectedMachine != null ? SelectedMachine.Guid : null;
SettingsManager.Default.MachineStudio.DeveloperModule.LastSelectedJobGuid = SelectedMachineJob != null ? SelectedMachineJob.Guid : null;
}
#endregion
+
+
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/app.config
index 4a6cb0526..77b7003e2 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/app.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/app.config
@@ -10,6 +10,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config
index c3235a090..122d9eaac 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config
@@ -3,11 +3,11 @@
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
<package id="DeepEqual" version="1.6.0.0" targetFramework="net46" />
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
<package id="System.Reactive" version="3.1.1" targetFramework="net46" />
<package id="System.Reactive.Core" version="3.1.1" targetFramework="net46" />
<package id="System.Reactive.Interfaces" version="3.1.1" targetFramework="net46" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj
index af3a76c0b..b3b2f6ba9 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj
@@ -37,15 +37,6 @@
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
</Reference>
@@ -55,14 +46,11 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs
index 0f770c798..3c0b2e5c8 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs
@@ -1,6 +1,4 @@
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
using Tango.MachineStudio.HardwareDesigner.ViewModels;
using Tango.MachineStudio.HardwareDesigner.Views;
@@ -17,16 +15,14 @@ namespace Tango.MachineStudio.HardwareDesigner
/// </summary>
static ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
-
- SimpleIoc.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<MainViewVM>();
}
public static MainViewVM MainViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<MainViewVM>();
+ return TangoIOC.Default.GetInstance<MainViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/app.config
index 4a6cb0526..77b7003e2 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/app.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/app.config
@@ -10,6 +10,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/packages.config
index cf0df03c8..f571e3807 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/packages.config
@@ -2,8 +2,8 @@
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/App.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/App.config
index 2fb423e8b..2031d1be1 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/App.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/App.config
@@ -10,4 +10,52 @@
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj
index 8d5b12d73..1659a260e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj
@@ -37,15 +37,6 @@
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
</Reference>
@@ -55,14 +46,11 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs
index b3c16c2b4..94b2f4341 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs
@@ -1,6 +1,4 @@
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
using Tango.MachineStudio.Logging.Navigation;
using Tango.MachineStudio.Logging.ViewModels;
@@ -17,21 +15,20 @@ namespace Tango.MachineStudio.Logging
/// </summary>
static ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
- SimpleIoc.Default.Register<EventsViewVM>();
- SimpleIoc.Default.Register<ApplicationLogsViewVM>();
- SimpleIoc.Default.Register<EmbeddedLogsViewVM>();
- SimpleIoc.Default.Register<HomeViewVM>();
+ TangoIOC.Default.Register<EventsViewVM>();
+ TangoIOC.Default.Register<ApplicationLogsViewVM>();
+ TangoIOC.Default.Register<EmbeddedLogsViewVM>();
+ TangoIOC.Default.Register<HomeViewVM>();
- SimpleIoc.Default.Unregister<LoggingNavigationManager>();
- SimpleIoc.Default.Register<LoggingNavigationManager>(() => new LoggingNavigationManager());
+ TangoIOC.Default.Unregister<LoggingNavigationManager>();
+ TangoIOC.Default.Register<LoggingNavigationManager>(new LoggingNavigationManager());
}
public static EventsViewVM EventsViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<EventsViewVM>();
+ return TangoIOC.Default.GetInstance<EventsViewVM>();
}
}
@@ -39,7 +36,7 @@ namespace Tango.MachineStudio.Logging
{
get
{
- return ServiceLocator.Current.GetInstance<ApplicationLogsViewVM>();
+ return TangoIOC.Default.GetInstance<ApplicationLogsViewVM>();
}
}
@@ -47,7 +44,7 @@ namespace Tango.MachineStudio.Logging
{
get
{
- return ServiceLocator.Current.GetInstance<EmbeddedLogsViewVM>();
+ return TangoIOC.Default.GetInstance<EmbeddedLogsViewVM>();
}
}
@@ -55,7 +52,7 @@ namespace Tango.MachineStudio.Logging
{
get
{
- return ServiceLocator.Current.GetInstance<HomeViewVM>();
+ return TangoIOC.Default.GetInstance<HomeViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs
index 361adef01..f92c51aa4 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs
@@ -1,5 +1,4 @@
-using GalaSoft.MvvmLight.Messaging;
-using System;
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/packages.config
index cf0df03c8..f571e3807 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/packages.config
@@ -2,8 +2,8 @@
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj
index c329685c6..b0d43c6df 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj
@@ -34,15 +34,6 @@
<Reference Include="FontAwesome.WPF, Version=4.7.0.37774, Culture=neutral, PublicKeyToken=0758b07a11a4f466, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
</Reference>
@@ -52,16 +43,13 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="SimpleValidator, Version=0.6.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\SimpleValidator.0.6.1.0\lib\net40\SimpleValidator.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs
index 66018e09c..f1f4d9d89 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs
@@ -1,6 +1,4 @@
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
using Tango.MachineStudio.MachineDesigner.ViewModels;
namespace Tango.MachineStudio.MachineDesigner
@@ -16,15 +14,14 @@ namespace Tango.MachineStudio.MachineDesigner
/// </summary>
static ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
- SimpleIoc.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<MainViewVM>();
}
public static MainViewVM MainViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<MainViewVM>();
+ return TangoIOC.Default.GetInstance<MainViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
index e8e7170b1..6a3b232d5 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
@@ -19,11 +19,11 @@ using Tango.BL;
namespace Tango.MachineStudio.MachineDesigner.ViewModels
{
- public class MainViewVM : ViewModel, IModuleRequestListener
+ public class MainViewVM : StudioViewModel<MachineDesignerModule>
{
private bool _isSaving;
private INotificationProvider _notification;
-
+
#region Properties
@@ -156,8 +156,8 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
SaveCommand = new RelayCommand(Save, (x) => !_isSaving);
AddIdsCommand = new RelayCommand(AddIds, (x) => !_isSaving && Configuration.IdsPacks.Count < 8);
RemoveIdsCommand = new RelayCommand(RemoveIds, (x) => !_isSaving && SelectedIds != null);
- SetVersionConfigurationCommand = new RelayCommand(SetVersionConfiguration,(x) => !_isSaving);
- SetAsDefaultCommand = new RelayCommand(SetAsDefaultConfiguration,(x) => !_isSaving);
+ SetVersionConfigurationCommand = new RelayCommand(SetVersionConfiguration, (x) => !_isSaving);
+ SetAsDefaultCommand = new RelayCommand(SetAsDefaultConfiguration, (x) => !_isSaving);
}
#endregion
@@ -615,7 +615,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
/// </summary>
private void SetAsDefaultConfiguration()
{
- _notification.ShowModalDialog<MachineVersionDialogVM>(async (vm) =>
+ _notification.ShowModalDialog<MachineVersionDialogVM>(async (vm) =>
{
try
{
@@ -644,7 +644,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
_notification.ShowError(ex.Message);
}
- }, () =>
+ }, () =>
{
});
@@ -652,20 +652,12 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
#endregion
- #region IModuleRequestListener
+ #region IStudioModuleVM
- /// <summary>
- /// Called when the request has been made.
- /// </summary>
- /// <param name="module">The module instance.</param>
- /// <param name="args">The arguments.</param>
- public void OnRequestModule(IStudioModule module, object args)
+ public override void OnModuleRequest(params object[] args)
{
- if (module is MachineDesignerModule)
- {
- SelectedMachine = Adapter.Machines.SingleOrDefault(x => x.Guid == (args as Machine).Guid);
- }
- }
+ SelectedMachine = Adapter.Machines.SingleOrDefault(x => x.Guid == (args[0] as Machine).Guid);
+ }
#endregion
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/app.config
index cacd4cd77..5d794b958 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/app.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/app.config
@@ -6,6 +6,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/packages.config
index aada4ebd7..59e34e36f 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/packages.config
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
<package id="SimpleValidator" version="0.6.1.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj
index 85928cb0c..a20f17b7a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj
@@ -34,15 +34,6 @@
<Reference Include="FontAwesome.WPF, Version=4.7.0.37774, Culture=neutral, PublicKeyToken=0758b07a11a4f466, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
@@ -55,16 +46,13 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModelLocator.cs
index 02ac1b8dd..5034a4d90 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModelLocator.cs
@@ -1,5 +1,4 @@
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
using Tango.MachineStudio.Stubs.ViewModels;
namespace Tango.MachineStudio.Stubs
@@ -15,18 +14,14 @@ namespace Tango.MachineStudio.Stubs
/// </summary>
static ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
-
- //SimpleIoc.Default.Unregister<INotificationProvider>();
-
- SimpleIoc.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<MainViewVM>();
}
public static MainViewVM MainViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<MainViewVM>();
+ return TangoIOC.Default.GetInstance<MainViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs
index 6797b15e6..54aa0c22b 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs
@@ -9,6 +9,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Tango.Core.Commands;
+using Tango.MachineStudio.Common;
using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.Common.StudioApplication;
using Tango.Scripting;
@@ -24,7 +25,7 @@ namespace Tango.MachineStudio.Stubs.ViewModels
/// Represents the script execution module main view model.
/// </summary>
/// <seealso cref="Tango.SharedUI.ViewModel" />
- public class MainViewVM : ViewModel , IShutdownListener
+ public class MainViewVM : StudioViewModel<StubsModule>
{
private UsbTransportAdapter _adapter; //Holds the USB transport adapter.
private StubManager _stubManager;
@@ -523,11 +524,15 @@ namespace Tango.MachineStudio.Stubs.ViewModels
Status = "Completed";
}
+ #endregion
+
+ #region Studio View Model
+
/// <summary>
/// Called when [shutdown request].
/// </summary>
/// <returns></returns>
- public void OnShuttingDown()
+ public override void OnShuttingDown()
{
SettingsManager.Default.MachineStudio.StubsModule.SelectedPort = SelectedPort;
SettingsManager.Default.MachineStudio.StubsModule.LastTabs = CodeTabs.Select(x => x.File).ToList();
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml.cs
index 16de196e1..2d099ef16 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml.cs
@@ -1,5 +1,4 @@
-using Microsoft.Practices.ServiceLocation;
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/packages.config
index a29d1ec82..47f51fbae 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/packages.config
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net46" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/App.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/App.config
index 158702ed3..d46a7e835 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/App.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/App.config
@@ -24,6 +24,86 @@
</dependentAssembly>
+ <dependentAssembly>
+
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+
+ </dependentAssembly>
+
+ <dependentAssembly>
+
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+
+ </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" />
+
+ </dependentAssembly>
+
+ <dependentAssembly>
+
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+
+ </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" />
+
+ </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" />
+
+ </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" />
+
+ </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" />
+
+ </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" />
+
+ </dependentAssembly>
+
</assemblyBinding>
</runtime>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj
index 1b827f001..f863df9c2 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj
@@ -42,15 +42,6 @@
<Reference Include="FontAwesome.WPF, Version=4.7.0.37774, Culture=neutral, PublicKeyToken=0758b07a11a4f466, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
@@ -63,9 +54,6 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
@@ -86,7 +74,7 @@
</Reference>
<Reference Include="System.Windows" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModelLocator.cs
index 090a323a2..861bf56bf 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModelLocator.cs
@@ -1,6 +1,4 @@
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
using Tango.MachineStudio.Synchronization.Navigation;
using Tango.MachineStudio.Synchronization.ViewModels;
@@ -17,23 +15,22 @@ namespace Tango.MachineStudio.Synchronization
/// </summary>
static ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
- SimpleIoc.Default.Register<MainViewVM>();
- SimpleIoc.Default.Register<MenuViewVM>();
- SimpleIoc.Default.Register<LocalSynchronizationViewVM>();
- SimpleIoc.Default.Register<RemoteSynchronizationViewVM>();
- SimpleIoc.Default.Register<DirectSynchronizationViewVM>();
+ TangoIOC.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<MenuViewVM>();
+ TangoIOC.Default.Register<LocalSynchronizationViewVM>();
+ TangoIOC.Default.Register<RemoteSynchronizationViewVM>();
+ TangoIOC.Default.Register<DirectSynchronizationViewVM>();
- SimpleIoc.Default.Unregister<SyncNavigationManager>();
+ TangoIOC.Default.Unregister<SyncNavigationManager>();
- SimpleIoc.Default.Register<SyncNavigationManager, SyncNavigationManager>();
+ TangoIOC.Default.Register<SyncNavigationManager, SyncNavigationManager>();
}
public static MainViewVM MainViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<MainViewVM>();
+ return TangoIOC.Default.GetInstance<MainViewVM>();
}
}
@@ -41,7 +38,7 @@ namespace Tango.MachineStudio.Synchronization
{
get
{
- return ServiceLocator.Current.GetInstance<MenuViewVM>();
+ return TangoIOC.Default.GetInstance<MenuViewVM>();
}
}
@@ -49,7 +46,7 @@ namespace Tango.MachineStudio.Synchronization
{
get
{
- return ServiceLocator.Current.GetInstance<LocalSynchronizationViewVM>();
+ return TangoIOC.Default.GetInstance<LocalSynchronizationViewVM>();
}
}
@@ -57,7 +54,7 @@ namespace Tango.MachineStudio.Synchronization
{
get
{
- return ServiceLocator.Current.GetInstance<RemoteSynchronizationViewVM>();
+ return TangoIOC.Default.GetInstance<RemoteSynchronizationViewVM>();
}
}
@@ -65,7 +62,7 @@ namespace Tango.MachineStudio.Synchronization
{
get
{
- return ServiceLocator.Current.GetInstance<DirectSynchronizationViewVM>();
+ return TangoIOC.Default.GetInstance<DirectSynchronizationViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/DirectSynchronizationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/DirectSynchronizationViewVM.cs
index b4dd67178..bb5ef68f1 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/DirectSynchronizationViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/DirectSynchronizationViewVM.cs
@@ -1,5 +1,4 @@
using Google.Protobuf;
-using Microsoft.Practices.ServiceLocation;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -21,6 +20,7 @@ using Tango.SharedUI;
using Tango.Synchronization;
using Tango.Synchronization.Local;
using Tango.Synchronization.Remote;
+using Tango.Core.DI;
namespace Tango.MachineStudio.Synchronization.ViewModels
{
@@ -168,7 +168,7 @@ namespace Tango.MachineStudio.Synchronization.ViewModels
{
if (_mainView == null)
{
- _mainView = ServiceLocator.Current.GetInstance<MainViewVM>();
+ _mainView = TangoIOC.Default.GetInstance<MainViewVM>();
_mainView.Log = String.Empty;
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/LocalSynchronizationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/LocalSynchronizationViewVM.cs
index 2621f622a..d3cb23d64 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/LocalSynchronizationViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/LocalSynchronizationViewVM.cs
@@ -1,5 +1,4 @@
-using Microsoft.Practices.ServiceLocation;
-using Microsoft.Win32;
+using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -9,6 +8,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Tango.Core.Commands;
+using Tango.Core.DI;
using Tango.Logging;
using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.Synchronization.Navigation;
@@ -178,7 +178,7 @@ namespace Tango.MachineStudio.Synchronization.ViewModels
{
if (_mainView == null)
{
- _mainView = ServiceLocator.Current.GetInstance<MainViewVM>();
+ _mainView = TangoIOC.Default.GetInstance<MainViewVM>();
_mainView.Log = String.Empty;
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs
index 57b3af1a8..75b5fe95a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs
@@ -21,7 +21,8 @@ using Tango.SharedUI;
using Tango.Synchronization;
using Tango.Synchronization.Local;
using Tango.Synchronization.Remote;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
+using Tango.MachineStudio.Common;
namespace Tango.MachineStudio.Synchronization.ViewModels
{
@@ -30,7 +31,7 @@ namespace Tango.MachineStudio.Synchronization.ViewModels
/// </summary>
/// <seealso cref="Tango.SharedUI.ViewModel" />
/// <seealso cref="Tango.MachineStudio.Common.StudioApplication.IShutdownRequestBlocker" />
- public class RemoteSynchronizationViewVM : ViewModel, IShutdownRequestBlocker
+ public class RemoteSynchronizationViewVM : StudioViewModel<SynchronizationModule>
{
private SyncNavigationManager _navigation;
private String _slaveDBFile;
@@ -117,7 +118,7 @@ namespace Tango.MachineStudio.Synchronization.ViewModels
{
if (_mainView == null)
{
- _mainView = ServiceLocator.Current.GetInstance<MainViewVM>();
+ _mainView = TangoIOC.Default.GetInstance<MainViewVM>();
_mainView.Log = String.Empty;
}
@@ -407,11 +408,15 @@ namespace Tango.MachineStudio.Synchronization.ViewModels
InvokeUINow(() => _notification.ShowInfo(message));
}
+ #endregion
+
+ #region IStudioModuleVM
+
/// <summary>
/// Called when the application is shutting down.
/// </summary>
/// <returns></returns>
- public Task<bool> OnShutdownRequest()
+ public override Task<bool> OnShutdownRequest()
{
if (_comparer != null)
{
@@ -420,6 +425,7 @@ namespace Tango.MachineStudio.Synchronization.ViewModels
return Task.FromResult(true);
}
+
#endregion
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/packages.config
index 1fa8e3268..3f608c982 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/packages.config
@@ -2,12 +2,12 @@
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net46" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
<package id="System.Reactive" version="3.1.1" targetFramework="net46" />
<package id="System.Reactive.Core" version="3.1.1" targetFramework="net46" />
<package id="System.Reactive.Interfaces" version="3.1.1" targetFramework="net46" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
index ecc235d02..27b15cb34 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
@@ -34,15 +34,6 @@
<Reference Include="FontAwesome.WPF, Version=4.7.0.37774, Culture=neutral, PublicKeyToken=0758b07a11a4f466, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
@@ -55,9 +46,6 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Reactive.Core, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
@@ -77,7 +65,7 @@
</Reference>
<Reference Include="System.Windows" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs
index 077b30663..5921a2f15 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs
@@ -1,6 +1,4 @@
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
using Tango.MachineStudio.Technician.Navigation;
using Tango.MachineStudio.Technician.ViewModels;
@@ -17,22 +15,20 @@ namespace Tango.MachineStudio.Technician
/// </summary>
static ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
+ TangoIOC.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<SensorsViewVM>();
+ TangoIOC.Default.Register<MachineTechViewVM>();
- SimpleIoc.Default.Register<MainViewVM>();
- SimpleIoc.Default.Register<SensorsViewVM>();
- SimpleIoc.Default.Register<MachineTechViewVM>();
+ TangoIOC.Default.Unregister<TechNavigationManager>();
- SimpleIoc.Default.Unregister<TechNavigationManager>();
-
- SimpleIoc.Default.Register<TechNavigationManager, TechNavigationManager>();
+ TangoIOC.Default.Register<TechNavigationManager, TechNavigationManager>();
}
public static MainViewVM MainViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<MainViewVM>();
+ return TangoIOC.Default.GetInstance<MainViewVM>();
}
}
@@ -40,7 +36,7 @@ namespace Tango.MachineStudio.Technician
{
get
{
- return ServiceLocator.Current.GetInstance<SensorsViewVM>();
+ return TangoIOC.Default.GetInstance<SensorsViewVM>();
}
}
@@ -48,7 +44,7 @@ namespace Tango.MachineStudio.Technician
{
get
{
- return ServiceLocator.Current.GetInstance<MachineTechViewVM>();
+ return TangoIOC.Default.GetInstance<MachineTechViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
index 88c50b549..c1dfe5f8c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
@@ -1,5 +1,4 @@
-using GalaSoft.MvvmLight.Ioc;
-using Google.Protobuf.Collections;
+using Google.Protobuf.Collections;
using Microsoft.Win32;
using RealTimeGraphEx.Controllers;
using System;
@@ -30,6 +29,7 @@ using Tango.Integration.Services;
using Tango.BL.Enumerations;
using Tango.BL;
using Tango.MachineStudio.Common.EventLogging;
+using Tango.MachineStudio.Common;
namespace Tango.MachineStudio.Technician.ViewModels
{
@@ -38,7 +38,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
/// </summary>
/// <seealso cref="Tango.SharedUI.ViewModel" />
/// <seealso cref="Tango.MachineStudio.Common.StudioApplication.IShutdownListener" />
- public class MachineTechViewVM : ViewModel, IShutdownListener
+ public class MachineTechViewVM : StudioViewModel<TechnicianModule>
{
private List<PropertyInfo> _diagnoticsMonitorsDataProperties;
private Dictionary<SingleGraphItem, GraphController> _singleControllers;
@@ -1205,12 +1205,9 @@ namespace Tango.MachineStudio.Technician.ViewModels
#endregion
- #region IShutdownListener
+ #region IStudioModuleVM
- /// <summary>
- /// Called when the application is about to terminate.
- /// </summary>
- public void OnShuttingDown()
+ public override void OnShuttingDown()
{
InvokeUINow(() =>
{
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml.cs
index c94c26414..e60deacbd 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml.cs
@@ -1,5 +1,4 @@
-using Microsoft.Practices.ServiceLocation;
-using RealTimeGraphEx.Synchronization;
+using RealTimeGraphEx.Synchronization;
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/app.config
index cacd4cd77..5d794b958 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/app.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/app.config
@@ -6,6 +6,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config
index dc7f6404d..49b90c865 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net46" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
<package id="System.Reactive" version="3.1.1" targetFramework="net46" />
<package id="System.Reactive.Core" version="3.1.1" targetFramework="net46" />
<package id="System.Reactive.Interfaces" version="3.1.1" targetFramework="net46" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj
index 9f020344a..fc858ad30 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj
@@ -37,15 +37,6 @@
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
</Reference>
@@ -55,9 +46,6 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
@@ -65,7 +53,7 @@
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModelLocator.cs
index 588d2db09..0473fd028 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModelLocator.cs
@@ -1,6 +1,4 @@
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
using Tango.MachineStudio.UsersAndRoles.Navigation;
using Tango.MachineStudio.UsersAndRoles.ViewModels;
@@ -17,19 +15,17 @@ namespace Tango.MachineStudio.UsersAndRoles
/// </summary>
static ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
+ TangoIOC.Default.Register<MainViewVM>();
- SimpleIoc.Default.Register<MainViewVM>();
-
- SimpleIoc.Default.Unregister<UsersAndRolesNavigationManager>();
- SimpleIoc.Default.Register<UsersAndRolesNavigationManager>(() => new UsersAndRolesNavigationManager());
+ TangoIOC.Default.Unregister<UsersAndRolesNavigationManager>();
+ TangoIOC.Default.Register<UsersAndRolesNavigationManager>(new UsersAndRolesNavigationManager());
}
public static MainViewVM MainViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<MainViewVM>();
+ return TangoIOC.Default.GetInstance<MainViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/app.config
index cacd4cd77..5d794b958 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/app.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/app.config
@@ -6,6 +6,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/packages.config
index 6b8afad69..ef38b21fd 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/packages.config
@@ -2,9 +2,9 @@
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/IStudioMessageExtensions.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/IStudioMessageExtensions.cs
deleted file mode 100644
index 7ae259e04..000000000
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/IStudioMessageExtensions.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.MachineStudio.Common.Messages;
-
-/// <summary>
-/// Contains <see cref="IStudioMessage"/> extension methods.
-/// </summary>
-public static class IStudioMessageExtensions
-{
- /// <summary>
- /// Sends the message.
- /// </summary>
- /// <param name="message">The message.</param>
- public static void Send(this IStudioMessage message)
- {
- Messenger.Default.Send(message);
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/TangoIOCExtensions.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/TangoIOCExtensions.cs
new file mode 100644
index 000000000..827650f59
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/TangoIOCExtensions.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core.DI;
+using Tango.MachineStudio.Common;
+
+public static class TangoIOCExtensions
+{
+ /// <summary>
+ /// Gets the specified module <see cref="IStudioViewModel"/> view models.
+ /// </summary>
+ /// <param name="tangoIOC">The Tango IOC.</param>
+ /// <param name="module">The module.</param>
+ /// <returns></returns>
+ public static IEnumerable<IStudioViewModel> GetModuleViewModels(this TangoIOC tangoIOC, IStudioModule module)
+ {
+ var viewModels = tangoIOC.GetAllInstancesByBase<IStudioViewModel>().Where(x => x != null && x.GetType().BaseType.GetGenericArguments().Length > 0 && x.GetType().BaseType.GetGenericArguments()[0] == module.GetType());
+ return viewModels;
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModuleViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModuleViewVM.cs
deleted file mode 100644
index 1fd562590..000000000
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModuleViewVM.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.MachineStudio.Common
-{
- public interface IStudioModuleViewVM
- {
- /// <summary>
- /// Called when the module .
- /// </summary>
- void OnNavigatedTo();
- /// <summary>
- /// Called when [navigated from].
- /// </summary>
- void OnNavigatedFrom();
- /// <summary>
- /// Called when [shutting down].
- /// </summary>
- void OnShuttingDown();
- /// <summary>
- /// Called when the application is shutting down.
- /// </summary>
- /// <returns></returns>
- Task<bool> OnShutdownRequest();
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioViewModel.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioViewModel.cs
new file mode 100644
index 000000000..35ed50cd9
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioViewModel.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.MachineStudio.Common
+{
+ /// <summary>
+ /// Represents a Machine Studio view model.
+ /// </summary>
+ public interface IStudioViewModel
+ {
+ /// <summary>
+ /// Called when the user has navigated in to the module.
+ /// </summary>
+ void OnNavigatedTo();
+
+ /// <summary>
+ /// Called when the user has navigated out of the module.
+ /// </summary>
+ void OnNavigatedFrom();
+
+ /// <summary>
+ /// Called when application is shutting down.
+ /// </summary>
+ void OnShuttingDown();
+
+ /// <summary>
+ /// Called before the application is shutting down.
+ /// Return false to cancel the shutdown in case an important process is in progress.
+ /// </summary>
+ /// <returns></returns>
+ Task<bool> OnShutdownRequest();
+
+ /// <summary>
+ /// Called when another module has wants to navigate to this module with some arguments.
+ /// </summary>
+ /// <param name="args">The arguments.</param>
+ void OnModuleRequest(params object[] args);
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IModuleRequestListener.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IModuleRequestListener.cs
deleted file mode 100644
index b950d7bcd..000000000
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IModuleRequestListener.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.MachineStudio.Common.StudioApplication
-{
- /// <summary>
- /// Represents a type which will be notified when a new module request was made by <see cref="IStudioApplicationManager.RequestModule(string, object)"/>
- /// </summary>
- public interface IModuleRequestListener
- {
- /// <summary>
- /// Called when the request has been made.
- /// </summary>
- /// <param name="module">The module instance.</param>
- /// <param name="args">The arguments.</param>
- void OnRequestModule(IStudioModule module, Object args);
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IShutdownListener.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IShutdownListener.cs
deleted file mode 100644
index 1ca5a7df2..000000000
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IShutdownListener.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.MachineStudio.Common.StudioApplication
-{
- /// <summary>
- /// Used to notify view models about application terminating.
- /// </summary>
- public interface IShutdownListener
- {
- /// <summary>
- /// Called when the application is about to terminate.
- /// </summary>
- void OnShuttingDown();
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IShutdownRequestBlocker.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IShutdownRequestBlocker.cs
deleted file mode 100644
index 4d5f968a4..000000000
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IShutdownRequestBlocker.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.MachineStudio.Common.StudioApplication
-{
- /// <summary>
- /// Represents a component capable of receiving notification for when the Machine Studio shuts down.
- /// The component can perform it's own shutdown operations, or cancel the current shutdown operation.
- /// </summary>
- public interface IShutdownRequestBlocker
- {
- /// <summary>
- /// Called when the application is shutting down.
- /// </summary>
- /// <returns></returns>
- Task<bool> OnShutdownRequest();
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs
index 9a5f39a96..be793ac81 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs
@@ -47,7 +47,7 @@ namespace Tango.MachineStudio.Common.StudioApplication
/// </summary>
/// <param name="moduleName">Name of the module.</param>
/// <param name="args">The arguments.</param>
- void RequestModule(String moduleName, Object args);
+ void RequestModule(String moduleName, params object[] args);
/// <summary>
/// Gets the machine studio application version.
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs
index 6b7984faf..30e96bd0a 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs
@@ -7,19 +7,126 @@ using Tango.SharedUI;
namespace Tango.MachineStudio.Common
{
- public abstract class StudioViewModel : ViewModel
+ /// <summary>
+ /// Represents a Machine Studio view model
+ /// </summary>
+ /// <typeparam name="Module">The type of the module.</typeparam>
+ /// <seealso cref="Tango.SharedUI.ViewModel" />
+ /// <seealso cref="Tango.MachineStudio.Common.IStudioViewModel" />
+ public abstract class StudioViewModel<Module> : ViewModel, IStudioViewModel where Module : IStudioModule
{
- public abstract Task<bool> RequestShutdown();
+ /// <summary>
+ /// Initializes a new instance of the <see cref="StudioViewModel{Module}"/> class.
+ /// </summary>
+ public StudioViewModel() : base()
+ {
+
+ }
+
+ /// <summary>
+ /// Called when another module has wants to navigate to this module with some arguments.
+ /// </summary>
+ /// <param name="args">The arguments.</param>
+ public virtual void OnModuleRequest(params object[] args)
+ {
+
+ }
+
+ /// <summary>
+ /// Called when the user has navigated out of the module.
+ /// </summary>
+ public virtual void OnNavigatedFrom()
+ {
+
+ }
+
+ /// <summary>
+ /// Called when the user has navigated in to the module.
+ /// </summary>
+ public virtual void OnNavigatedTo()
+ {
+
+ }
+
+ /// <summary>
+ /// Called before the application is shutting down.
+ /// Return false to cancel the shutdown in case an important process is in progress.
+ /// </summary>
+ /// <returns></returns>
+ public virtual Task<bool> OnShutdownRequest()
+ {
+ return Task.FromResult(true);
+ }
+
+ /// <summary>
+ /// Called when application is shutting down.
+ /// </summary>
+ public virtual void OnShuttingDown()
+ {
+
+ }
}
- public abstract class StudioViewModel<T> : ViewModel<T> where T : IView
+ /// <summary>
+ /// Represents a Machine Studio view model.
+ /// </summary>
+ /// <typeparam name="Module">The type of the module.</typeparam>
+ /// <typeparam name="T"></typeparam>
+ /// <seealso cref="Tango.SharedUI.ViewModel" />
+ /// <seealso cref="Tango.MachineStudio.Common.IStudioViewModel" />
+ public abstract class StudioViewModel<Module, T> : ViewModel<T>, IStudioViewModel where Module : IStudioModule where T : IView
{
- public abstract Task<bool> OnShutdownRequest();
-
+ /// <summary>
+ /// Initializes a new instance of the <see cref="StudioViewModel{Module, T}"/> class.
+ /// </summary>
+ /// <param name="view">The view.</param>
public StudioViewModel(T view) : base(view)
{
}
+
+ /// <summary>
+ /// Called when another module has wants to navigate to this module with some arguments.
+ /// </summary>
+ /// <param name="args">The arguments.</param>
+ public virtual void OnModuleRequest(params object[] args)
+ {
+
+ }
+
+ /// <summary>
+ /// Called when the user has navigated out of the module.
+ /// </summary>
+ public virtual void OnNavigatedFrom()
+ {
+
+ }
+
+ /// <summary>
+ /// Called when the user has navigated in to the module.
+ /// </summary>
+ public virtual void OnNavigatedTo()
+ {
+
+ }
+
+ /// <summary>
+ /// Called before the application is shutting down.
+ /// Return false to cancel the shutdown in case an important process is in progress.
+ /// </summary>
+ /// <returns></returns>
+ public virtual Task<bool> OnShutdownRequest()
+ {
+ return Task.FromResult(true);
+ }
+
+ /// <summary>
+ /// Called when application is shutting down.
+ /// </summary>
+ public virtual void OnShuttingDown()
+ {
+
+ }
}
}
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 ab99a3ad7..f722d13ae 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
@@ -37,15 +37,6 @@
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
@@ -58,9 +49,6 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
@@ -68,7 +56,7 @@
<Reference Include="System.ServiceModel" />
<Reference Include="System.Speech" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
@@ -105,22 +93,20 @@
<Compile Include="EventLogging\DefaultEventLogger.cs" />
<Compile Include="EventLogging\IEventLogger.cs" />
<Compile Include="ExtensionMethods\CommonDialogExtensions.cs" />
+ <Compile Include="ExtensionMethods\TangoIOCExtensions.cs" />
<Compile Include="Html\IHtmlPresenter.cs" />
<Compile Include="Helpers\GraphsHelper.cs" />
- <Compile Include="IStudioModuleViewVM.cs" />
+ <Compile Include="IStudioViewModel.cs" />
<Compile Include="Messages\MachineConnectionChangedMessage.cs" />
<Compile Include="Notifications\BarItem.cs" />
<Compile Include="Notifications\DialogViewVM.cs" />
<Compile Include="Speech\DefaultSpeechProvider.cs" />
<Compile Include="Speech\ISpeechProvider.cs" />
- <Compile Include="StudioApplication\IModuleRequestListener.cs" />
- <Compile Include="StudioApplication\IShutdownListener.cs" />
<Compile Include="StudioApplication\IStudioApplicationManager.cs" />
- <Compile Include="StudioApplication\IShutdownRequestBlocker.cs" />
- <Compile Include="ExtensionMethods\IStudioMessageExtensions.cs" />
<Compile Include="Messages\IStudioMessage.cs" />
<Compile Include="Notifications\TaskItem.cs" />
<Compile Include="StudioModuleBase.cs" />
+ <Compile Include="StudioViewModel.cs" />
<Compile Include="Update\CheckForUpdatesResponse.cs" />
<Compile Include="Update\CheckForUpdatesRequest.cs" />
<Compile Include="Update\FileStreamWrapper.cs" />
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/app.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/app.config
index 4a6cb0526..77b7003e2 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/app.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/app.config
@@ -10,6 +10,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/packages.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/packages.config
index 8cd12859b..c9f4c28c9 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/packages.config
@@ -2,9 +2,9 @@
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/App.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/App.config
index f2af62f53..209c9be3f 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/App.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/App.config
@@ -9,6 +9,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
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 1334a349d..d9c64b9e3 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
@@ -12,9 +12,9 @@ using Tango.BL.Entities;
using Tango.Logging;
using Tango.MachineStudio.UI.Windows;
using Tango.Settings;
-using Microsoft.Practices.ServiceLocation;
using Tango.MachineStudio.Common.EventLogging;
using Tango.BL.Enumerations;
+using Tango.Core.DI;
namespace Tango.MachineStudio.UI
{
@@ -72,7 +72,7 @@ namespace Tango.MachineStudio.UI
try
{
- var eventLogger = ServiceLocator.Current.GetInstance<IEventLogger>();
+ var eventLogger = TangoIOC.Default.GetInstance<IEventLogger>();
if (eventLogger != null)
{
eventLogger.Log(e.Exception, "Application Crashed!");
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 8461a5d93..9901d3b80 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
@@ -1,5 +1,4 @@
using MahApps.Metro.Controls;
-using Microsoft.Practices.ServiceLocation;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -16,6 +15,7 @@ using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using Tango.Core.DI;
using Tango.Core.Helpers;
using Tango.Logging;
using Tango.MachineStudio.Common.StudioApplication;
@@ -90,7 +90,7 @@ namespace Tango.MachineStudio.UI
private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = true;
- ServiceLocator.Current.GetInstance<IStudioApplicationManager>().ShutDown();
+ TangoIOC.Default.GetInstance<IStudioApplicationManager>().ShutDown();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
index d7035b57b..4afddae69 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
@@ -1,5 +1,4 @@
-using GalaSoft.MvvmLight.Ioc;
-using System;
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
index 52602e6de..0bbcfd313 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
@@ -1,5 +1,4 @@
-using Microsoft.Practices.ServiceLocation;
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -8,7 +7,6 @@ using System.Threading.Tasks;
using Tango.Core.Helpers;
using Tango.MachineStudio.Common.StudioApplication;
using Tango.MachineStudio.Common.Navigation;
-using GalaSoft.MvvmLight.Ioc;
using System.Reflection;
using System.Collections;
using Tango.Core;
@@ -20,6 +18,7 @@ using System.Windows;
using Tango.Integration.Services;
using Tango.MachineStudio.Common.EventLogging;
using Tango.BL.Enumerations;
+using Tango.Core.DI;
namespace Tango.MachineStudio.UI.StudioApplication
{
@@ -136,7 +135,7 @@ namespace Tango.MachineStudio.UI.StudioApplication
await Task.Factory.StartNew(async () =>
{
//Do Shutdown Procedures...
- foreach (var vm in ServiceLocator.Current.GetAllInstancesByBase<IShutdownRequestBlocker>())
+ foreach (var vm in TangoIOC.Default.GetAllInstancesByBase<IStudioViewModel>())
{
try
{
@@ -153,7 +152,7 @@ namespace Tango.MachineStudio.UI.StudioApplication
}
}
- foreach (var vm in ServiceLocator.Current.GetAllInstancesByBase<IShutdownListener>())
+ foreach (var vm in TangoIOC.Default.GetAllInstancesByBase<IStudioViewModel>())
{
vm.OnShuttingDown();
}
@@ -191,7 +190,7 @@ namespace Tango.MachineStudio.UI.StudioApplication
LogManager.Log(ex, "Error disconnecting from machine.");
}
- var eventLogger = ServiceLocator.Current.GetInstance<IEventLogger>();
+ var eventLogger = TangoIOC.Default.GetInstance<IEventLogger>();
if (eventLogger != null)
{
eventLogger.Log(EventTypes.ApplicationTerminated, "Application Terminated!");
@@ -210,18 +209,18 @@ namespace Tango.MachineStudio.UI.StudioApplication
/// </summary>
/// <param name="moduleName">Name of the module.</param>
/// <param name="args">The arguments.</param>
- public void RequestModule(string moduleName, object args)
+ public void RequestModule(string moduleName, params object[] args)
{
IStudioModule module = _moduleLoader.UserModules.SingleOrDefault(x => x.Name == moduleName);
if (module != null)
{
- ServiceLocator.Current.GetInstance<ViewModels.MainViewVM>().StartModule(module);
+ TangoIOC.Default.GetInstance<ViewModels.MainViewVM>().StartModule(module);
//Notify request listeners.
- foreach (var vm in ServiceLocator.Current.GetAllInstancesByBase<IModuleRequestListener>())
+ foreach (var vm in TangoIOC.Default.GetAllInstancesByBase<IStudioViewModel>())
{
- vm.OnRequestModule(module, args);
+ vm.OnModuleRequest(module, args);
}
}
else
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 eb4139936..722d37d77 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
@@ -54,15 +54,6 @@
<Reference Include="FontAwesome.WPF, Version=4.7.0.37774, Culture=neutral, PublicKeyToken=0758b07a11a4f466, processorArchitecture=MSIL">
<HintPath>..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
@@ -78,9 +69,6 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="SimpleValidator, Version=0.6.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SimpleValidator.0.6.1.0\lib\net40\SimpleValidator.dll</HintPath>
</Reference>
@@ -123,7 +111,7 @@
<Reference Include="System.Windows" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <HintPath>..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
index fa3a38c5c..c4b8a1a59 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
@@ -1,7 +1,5 @@
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
using System;
+using Tango.Core.DI;
using Tango.Integration.Services;
using Tango.Logging;
using Tango.MachineStudio.Common.Authentication;
@@ -40,66 +38,63 @@ namespace Tango.MachineStudio.UI
/// </summary>
public ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
-
////if (ViewModelBase.IsInDesignModeStatic)
////{
//// // Create design time view services and models
- //// SimpleIoc.Default.Register<IDataService, DesignDataService>();
+ //// TangoIOC.Default.Register<IDataService, DesignDataService>();
////}
////else
////{
//// // Create run time view services and models
- //// SimpleIoc.Default.Register<IDataService, DataService>();
+ //// TangoIOC.Default.Register<IDataService, DataService>();
////}
- SimpleIoc.Default.Unregister<INotificationProvider>();
- SimpleIoc.Default.Unregister<IAuthenticationProvider>();
- SimpleIoc.Default.Unregister<INavigationManager>();
- SimpleIoc.Default.Unregister<IStudioModuleLoader>();
- SimpleIoc.Default.Unregister<IStudioApplicationManager>();
- SimpleIoc.Default.Unregister<ExternalBridgeScanner>();
- SimpleIoc.Default.Unregister<IVideoCaptureProvider>();
- SimpleIoc.Default.Unregister<IDiagnosticsFrameProvider>();
- SimpleIoc.Default.Unregister<IEventLogger>();
- SimpleIoc.Default.Unregister<ISpeechProvider>();
- SimpleIoc.Default.Unregister<IHtmlPresenter>();
+ TangoIOC.Default.Unregister<INotificationProvider>();
+ TangoIOC.Default.Unregister<IAuthenticationProvider>();
+ 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>();
+ TangoIOC.Default.Unregister<ISpeechProvider>();
+ TangoIOC.Default.Unregister<IHtmlPresenter>();
- SimpleIoc.Default.Register<INotificationProvider, DefaultNotificationProvider>();
- SimpleIoc.Default.Register<IAuthenticationProvider, DefaultAuthenticationProvider>();
- SimpleIoc.Default.Register<INavigationManager, DefaultNavigationManager>();
- SimpleIoc.Default.Register<IStudioModuleLoader, DefaultStudioModuleLoader>();
- SimpleIoc.Default.Register<IStudioApplicationManager, DefaultStudioApplicationManager>();
- SimpleIoc.Default.Register<ExternalBridgeScanner, ExternalBridgeScanner>();
- SimpleIoc.Default.Register<ExternalBridgeScanner, ExternalBridgeScanner>();
- SimpleIoc.Default.Register<IVideoCaptureProvider, DefaultVideoCaptureProvider>();
- SimpleIoc.Default.Register<IDiagnosticsFrameProvider, DefaultDiagnosticsFrameProvider>();
- SimpleIoc.Default.Register<IEventLogger, DefaultEventLogger>();
- SimpleIoc.Default.Register<ISpeechProvider, DefaultSpeechProvider>();
- SimpleIoc.Default.Register<IHtmlPresenter, DefaultHtmlPresenter>();
+ TangoIOC.Default.Register<INotificationProvider, DefaultNotificationProvider>();
+ TangoIOC.Default.Register<IAuthenticationProvider, DefaultAuthenticationProvider>();
+ 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>();
+ TangoIOC.Default.Register<ISpeechProvider, DefaultSpeechProvider>();
+ TangoIOC.Default.Register<IHtmlPresenter, DefaultHtmlPresenter>();
- SimpleIoc.Default.Register<MainViewVM>();
- SimpleIoc.Default.Register<LoadingViewVM>();
- SimpleIoc.Default.Register<ShutdownViewVM>();
- SimpleIoc.Default.Register<LoginViewVM>();
- SimpleIoc.Default.Register<MachineConnectionViewVM>();
- SimpleIoc.Default.Register<ConnectedMachineViewVM>();
- SimpleIoc.Default.Register<MachineLoginViewVM>();
- SimpleIoc.Default.Register<UpdateViewVM>();
+ TangoIOC.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<LoadingViewVM>();
+ TangoIOC.Default.Register<ShutdownViewVM>();
+ TangoIOC.Default.Register<LoginViewVM>();
+ TangoIOC.Default.Register<MachineConnectionViewVM>();
+ TangoIOC.Default.Register<ConnectedMachineViewVM>();
+ TangoIOC.Default.Register<MachineLoginViewVM>();
+ TangoIOC.Default.Register<UpdateViewVM>();
//Register View (Supervising Controller Pattern).
- if (!ViewModelBase.IsInDesignModeStatic)
- {
- LogManager.Log(String.Format("Registering Supervising Controller {0}...", nameof(IMainView)));
- SimpleIoc.Default.Register(() => (IMainView)MainView.Self);
- }
+ //if (!ViewModelBase.IsInDesignModeStatic)
+ //{
+ // LogManager.Log(String.Format("Registering Supervising Controller {0}...", nameof(IMainView)));
+ // TangoIOC.Default.Register(() => (IMainView)MainView.Self);
+ //}
}
public MainViewVM MainViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<MainViewVM>();
+ return TangoIOC.Default.GetInstance<MainViewVM>();
}
}
@@ -107,7 +102,7 @@ namespace Tango.MachineStudio.UI
{
get
{
- return ServiceLocator.Current.GetInstance<LoadingViewVM>();
+ return TangoIOC.Default.GetInstance<LoadingViewVM>();
}
}
@@ -115,7 +110,7 @@ namespace Tango.MachineStudio.UI
{
get
{
- return ServiceLocator.Current.GetInstance<ShutdownViewVM>();
+ return TangoIOC.Default.GetInstance<ShutdownViewVM>();
}
}
@@ -123,7 +118,7 @@ namespace Tango.MachineStudio.UI
{
get
{
- return ServiceLocator.Current.GetInstance<LoginViewVM>();
+ return TangoIOC.Default.GetInstance<LoginViewVM>();
}
}
@@ -131,7 +126,7 @@ namespace Tango.MachineStudio.UI
{
get
{
- return ServiceLocator.Current.GetInstance<MachineConnectionViewVM>();
+ return TangoIOC.Default.GetInstance<MachineConnectionViewVM>();
}
}
@@ -139,7 +134,7 @@ namespace Tango.MachineStudio.UI
{
get
{
- return ServiceLocator.Current.GetInstance<ConnectedMachineViewVM>();
+ return TangoIOC.Default.GetInstance<ConnectedMachineViewVM>();
}
}
@@ -147,7 +142,7 @@ namespace Tango.MachineStudio.UI
{
get
{
- return ServiceLocator.Current.GetInstance<MachineLoginViewVM>();
+ return TangoIOC.Default.GetInstance<MachineLoginViewVM>();
}
}
@@ -155,7 +150,7 @@ namespace Tango.MachineStudio.UI
{
get
{
- return ServiceLocator.Current.GetInstance<UpdateViewVM>();
+ return TangoIOC.Default.GetInstance<UpdateViewVM>();
}
}
}
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 b97825d34..25346e94b 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -1,6 +1,4 @@
-using GalaSoft.MvvmLight.Ioc;
-using GalaSoft.MvvmLight.Messaging;
-using System;
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
@@ -14,6 +12,7 @@ using System.Windows.Controls;
using System.Windows.Media;
using Tango.BL.Entities;
using Tango.Core.Commands;
+using Tango.Core.DI;
using Tango.Integration.Services;
using Tango.Logging;
using Tango.MachineStudio.Common;
@@ -45,7 +44,7 @@ namespace Tango.MachineStudio.UI.ViewModels
/// Represents the Machine Studio main view, view model.
/// </summary>
/// <seealso cref="Tango.SharedUI.ViewModel{Tango.MachineStudio.UI.SupervisingController.IMainView}" />
- public class MainViewVM : ViewModel<IMainView>
+ public class MainViewVM : ViewModel
{
private IStudioModule _currentModule;
private INavigationManager _navigation;
@@ -240,7 +239,6 @@ namespace Tango.MachineStudio.UI.ViewModels
/// <param name="applicationManager">The application manager.</param>
/// <param name="navigationManager">The navigation manager.</param>
public MainViewVM(
- IMainView view,
IAuthenticationProvider authenticationProvider,
IStudioModuleLoader studioModuleLoader,
INotificationProvider notificationProvider,
@@ -249,7 +247,7 @@ namespace Tango.MachineStudio.UI.ViewModels
IEventLogger eventLogger,
IDiagnosticsFrameProvider frameProvider,
ISpeechProvider speechProvider,
- IHtmlPresenter htmlPresenter) : base(view)
+ IHtmlPresenter htmlPresenter) : base()
{
_eventLogger = eventLogger;
_navigation = navigationManager;
@@ -508,9 +506,10 @@ namespace Tango.MachineStudio.UI.ViewModels
}
}
- foreach (var m in StudioModuleLoader.AllModules.Where(x => x != module))
+ foreach (var m in StudioModuleLoader.AllModules.Where(x => x != module && !x.InNewWindow))
{
m.IsLoaded = false;
+ TangoIOC.Default.GetModuleViewModels(m).ToList().ForEach(x => x.OnNavigatedFrom());
}
if (module != null)
@@ -519,6 +518,8 @@ namespace Tango.MachineStudio.UI.ViewModels
CurrentModule.IsLoaded = true;
IsModuleLoaded = true;
(MainView.Self as MainView).TransitionControl.NavigateTo(module.Name);
+
+ TangoIOC.Default.GetModuleViewModels(module).ToList().ForEach(x => x.OnNavigatedTo());
}
else
{
@@ -528,14 +529,6 @@ namespace Tango.MachineStudio.UI.ViewModels
}
/// <summary>
- /// Called when the <see cref="T:Tango.SharedUI.IView" /> is loaded and attached.
- /// </summary>
- protected override void OnViewAttached()
- {
- base.OnViewAttached();
- }
-
- /// <summary>
/// Opens the module in a new window.
/// </summary>
/// <param name="module">The module.</param>
@@ -545,10 +538,10 @@ namespace Tango.MachineStudio.UI.ViewModels
try
{
- StartModule(null);
-
module.InNewWindow = true;
+ StartModule(null);
+
if (!(MainView.Self as MainView).TransitionControl.Elements.ToList().Exists(x => x.GetType() == module.MainViewType))
{
FrameworkElement v = Activator.CreateInstance(module.MainViewType) as FrameworkElement;
@@ -565,11 +558,14 @@ namespace Tango.MachineStudio.UI.ViewModels
{
window.grid.Children.Remove(view);
module.InNewWindow = false;
+ TangoIOC.Default.GetModuleViewModels(module).ToList().ForEach(v => v.OnNavigatedFrom());
};
window.Owner = MainWindow.Instance;
window.Show();
+ TangoIOC.Default.GetModuleViewModels(module).ToList().ForEach(x => x.OnNavigatedTo());
+
(_applicationManager as DefaultStudioApplicationManager).RegisterOpenedWindow(window);
}
catch (Exception ex)
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs
index ab4fd8e0b..0f6ec8b98 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs
@@ -1,6 +1,5 @@
using FluentFTP;
using Ionic.Zip;
-using Microsoft.Practices.ServiceLocation;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -12,6 +11,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Tango.Core.Commands;
+using Tango.Core.DI;
using Tango.Core.Helpers;
using Tango.Logging;
using Tango.MachineStudio.Common.Authentication;
@@ -256,7 +256,7 @@ namespace Tango.MachineStudio.UI.ViewModels
}
}
- ServiceLocator.Current.GetInstance<MainViewVM>().DisableCheckForUpdates = true;
+ TangoIOC.Default.GetInstance<MainViewVM>().DisableCheckForUpdates = true;
Status = UpdateStatus.UpdateCompleted;
}
catch (Exception ex)
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 df1f97f23..1e894f3f2 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
@@ -1,5 +1,4 @@
-using Microsoft.Practices.ServiceLocation;
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -27,6 +26,7 @@ using Tango.Core.Helpers;
using Tango.SharedUI.Helpers;
using Tango.Logging;
using static Tango.SharedUI.Controls.NavigationControl;
+using Tango.Core.DI;
namespace Tango.MachineStudio.UI.Views
{
@@ -41,7 +41,7 @@ namespace Tango.MachineStudio.UI.Views
{
InitializeComponent();
- _loader = ServiceLocator.Current.GetInstance<IStudioModuleLoader>() as DefaultStudioModuleLoader;
+ _loader = TangoIOC.Default.GetInstance<IStudioModuleLoader>() as DefaultStudioModuleLoader;
_loader.ModulesLoaded += Loader_ModulesLoaded;
}
@@ -51,7 +51,7 @@ namespace Tango.MachineStudio.UI.Views
{
LogManager.Default.Log("Loading modules views...");
- var item = ServiceLocator.Current.GetInstance<INotificationProvider>().PushTaskItem("Loading Modules...");
+ var item = TangoIOC.Default.GetInstance<INotificationProvider>().PushTaskItem("Loading Modules...");
var modules = _loader.UserModules.ToList();
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config
index 5dcc330a7..9568f9f90 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config
@@ -3,6 +3,7 @@
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
<package id="Dragablz" version="0.0.3.197" targetFramework="net46" />
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="FluentFTP" version="19.1.2" targetFramework="net46" />
<package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net46" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
@@ -10,8 +11,6 @@
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
- <package id="MvvmLight" version="5.3.0.0" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
<package id="SimpleValidator" version="0.6.1.0" targetFramework="net46" />
<package id="System.Data.SQLite" version="1.0.106.0" targetFramework="net46" />
<package id="System.Data.SQLite.Core" version="1.0.106.0" targetFramework="net46" />
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config
index 1805380e9..276756b0e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config
@@ -50,6 +50,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Core/DI/ITangoIOC.cs b/Software/Visual_Studio/Tango.Core/DI/ITangoIOC.cs
index f67e06d71..3d386035d 100644
--- a/Software/Visual_Studio/Tango.Core/DI/ITangoIOC.cs
+++ b/Software/Visual_Studio/Tango.Core/DI/ITangoIOC.cs
@@ -97,6 +97,20 @@ namespace Tango.Core.DI
T GetInstance<T>();
/// <summary>
+ /// Gets all instances by the specified base type.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <returns></returns>
+ IEnumerable<T> GetAllInstancesByBase<T>();
+
+ /// <summary>
+ /// Gets all instances by the specified base type.
+ /// </summary>
+ /// <param name="baseType">Type of the base.</param>
+ /// <returns></returns>
+ IEnumerable<Object> GetAllInstancesByBase(Type baseType);
+
+ /// <summary>
/// Gets the instance by the specified type.
/// </summary>
/// <param name="type">The type.</param>
diff --git a/Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs b/Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs
index d5c66cb83..afda3d8bf 100644
--- a/Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs
+++ b/Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs
@@ -208,11 +208,6 @@ namespace Tango.Core.DI
/// <param name="instance">The instance.</param>
protected virtual void RegisterInternal(Type interfaceType, Type implementationType, Object instance)
{
- if (instance.GetType() != implementationType)
- {
- throw new InvalidOperationException(String.Format("Instance type '{0}' does not match the implementation type '{1}'.", instance.GetType().Name, implementationType.Name));
- }
-
if (!interfaceType.IsAssignableFrom(implementationType))
{
throw new InvalidOperationException(String.Format("Interface type '{0}' cannot be assigned from implementation type '{1}'.", interfaceType.Name, implementationType.Name));
@@ -223,6 +218,11 @@ namespace Tango.Core.DI
throw new InvalidOperationException(String.Format("The specified type '{0}' is already registered.", interfaceType.Name));
}
+ if (instance != null && instance.GetType() != implementationType)
+ {
+ throw new InvalidOperationException(String.Format("Instance type '{0}' does not match the implementation type '{1}'.", instance.GetType().Name, implementationType.Name));
+ }
+
_registeredTypes.Add(interfaceType, new RegisteredType(interfaceType, implementationType, instance));
}
@@ -272,5 +272,25 @@ namespace Tango.Core.DI
return instance;
}
+
+ /// <summary>
+ /// Gets all instances by the specified base type.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <returns></returns>
+ public IEnumerable<T> GetAllInstancesByBase<T>()
+ {
+ return GetAllInstancesByBase(typeof(T)).Select(x => (T)x);
+ }
+
+ /// <summary>
+ /// Gets all instances by the specified base type.
+ /// </summary>
+ /// <param name="baseType">Type of the base.</param>
+ /// <returns></returns>
+ public virtual IEnumerable<object> GetAllInstancesByBase(Type baseType)
+ {
+ return _registeredTypes.Where(x => baseType.IsAssignableFrom(x.Key)).Select(x => x.Value.Instance);
+ }
}
}
diff --git a/Software/Visual_Studio/Tango.Core/Tango.Core.csproj b/Software/Visual_Studio/Tango.Core/Tango.Core.csproj
index d2e67d408..ff15274d7 100644
--- a/Software/Visual_Studio/Tango.Core/Tango.Core.csproj
+++ b/Software/Visual_Studio/Tango.Core/Tango.Core.csproj
@@ -31,21 +31,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
<Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
@@ -60,10 +48,6 @@
<Reference Include="System.Data.Entity.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows" />
- <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
- <Private>True</Private>
- </Reference>
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
@@ -97,7 +81,7 @@
<Compile Include="ExtensionMethods\IParameterizedExtensions.cs" />
<Compile Include="ExtensionMethods\ObjectExtensions.cs" />
<Compile Include="ExtensionMethods\TypeExtensions.cs" />
- <Compile Include="ExtensionMethods\IServiceLocatorExtensions.cs" />
+ <None Include="ExtensionMethods\IServiceLocatorExtensions.cs" />
<Compile Include="ExtensionMethods\StringExtensions.cs" />
<Compile Include="Helpers\AssemblyHelper.cs" />
<Compile Include="Helpers\ColorHelper.cs" />
diff --git a/Software/Visual_Studio/Tango.Core/packages.config b/Software/Visual_Studio/Tango.Core/packages.config
index 8a10ba9d6..77e93188f 100644
--- a/Software/Visual_Studio/Tango.Core/packages.config
+++ b/Software/Visual_Studio/Tango.Core/packages.config
@@ -2,7 +2,6 @@
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net46" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net46" />
<package id="SimpleValidator" version="0.6.1.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj b/Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj
index 608795117..324bf9f90 100644
--- a/Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj
+++ b/Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj
@@ -90,6 +90,7 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
+ <None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
diff --git a/Software/Visual_Studio/Tango.DragAndDrop/app.config b/Software/Visual_Studio/Tango.DragAndDrop/app.config
new file mode 100644
index 000000000..462d17b27
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DragAndDrop/app.config
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj
index af4084453..eeae87a91 100644
--- a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj
+++ b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj
@@ -35,26 +35,10 @@
<Reference Include="FontAwesome.WPF, Version=4.7.0.37774, Culture=neutral, PublicKeyToken=0758b07a11a4f466, processorArchitecture=MSIL">
<HintPath>..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll</HintPath>
</Reference>
- <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
- <HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
- <HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
- </Reference>
- <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
- <HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
- <Private>True</Private>
- </Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
@@ -148,6 +132,7 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="CSharp-Mode.xshd" />
+ <None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
diff --git a/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs b/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs
index af203c0d0..13b9206cd 100644
--- a/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs
+++ b/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs
@@ -1,5 +1,4 @@
-using GalaSoft.MvvmLight.Messaging;
-using System;
+using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
@@ -10,6 +9,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Tango.Core;
+using Tango.Core.DI;
namespace Tango.SharedUI
{
@@ -101,7 +101,7 @@ namespace Tango.SharedUI
/// <returns></returns>
protected virtual T PostMessage<T>(T message)
{
- Messenger.Default.Send<T>(message);
+ TangoMessenger.Default.Send<T>(message);
return message;
}
@@ -112,7 +112,7 @@ namespace Tango.SharedUI
/// <param name="handler">The handler.</param>
protected virtual void RegisterMessage<T>(Action<T> handler)
{
- Messenger.Default.Register<T>(this, handler);
+ TangoMessenger.Default.Register<T>(handler);
}
}
diff --git a/Software/Visual_Studio/Tango.SharedUI/app.config b/Software/Visual_Studio/Tango.SharedUI/app.config
new file mode 100644
index 000000000..462d17b27
--- /dev/null
+++ b/Software/Visual_Studio/Tango.SharedUI/app.config
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.SharedUI/packages.config b/Software/Visual_Studio/Tango.SharedUI/packages.config
index b8183f4dd..f67be0fe2 100644
--- a/Software/Visual_Studio/Tango.SharedUI/packages.config
+++ b/Software/Visual_Studio/Tango.SharedUI/packages.config
@@ -2,6 +2,4 @@
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net45" />
<package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net45" />
- <package id="MvvmLight" version="5.3.0.0" targetFramework="net45" />
- <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.EmbroideryViewer/App.config b/Software/Visual_Studio/Utilities/Tango.EmbroideryViewer/App.config
index 8324aa6ff..0715f3c37 100644
--- a/Software/Visual_Studio/Utilities/Tango.EmbroideryViewer/App.config
+++ b/Software/Visual_Studio/Utilities/Tango.EmbroideryViewer/App.config
@@ -1,6 +1,50 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.ILMerge.UI/App.config b/Software/Visual_Studio/Utilities/Tango.ILMerge.UI/App.config
index 8324aa6ff..0715f3c37 100644
--- a/Software/Visual_Studio/Utilities/Tango.ILMerge.UI/App.config
+++ b/Software/Visual_Studio/Utilities/Tango.ILMerge.UI/App.config
@@ -1,6 +1,50 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/App.config b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/App.config
index 08560e57b..ada51894a 100644
--- a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/App.config
+++ b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/App.config
@@ -13,6 +13,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
diff --git a/Software/Visual_Studio/Utilities/Tango.Protobuf.UI/App.config b/Software/Visual_Studio/Utilities/Tango.Protobuf.UI/App.config
index 2d2a12d81..6a26aa552 100644
--- a/Software/Visual_Studio/Utilities/Tango.Protobuf.UI/App.config
+++ b/Software/Visual_Studio/Utilities/Tango.Protobuf.UI/App.config
@@ -1,6 +1,50 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
</configuration>
diff --git a/Software/Visual_Studio/Utilities/Tango.TransportRouter.UI/App.config b/Software/Visual_Studio/Utilities/Tango.TransportRouter.UI/App.config
index 4f1ff76f3..d14be49eb 100644
--- a/Software/Visual_Studio/Utilities/Tango.TransportRouter.UI/App.config
+++ b/Software/Visual_Studio/Utilities/Tango.TransportRouter.UI/App.config
@@ -9,6 +9,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/App.config b/Software/Visual_Studio/Utilities/Tango.UITests/App.config
index f2af62f53..209c9be3f 100644
--- a/Software/Visual_Studio/Utilities/Tango.UITests/App.config
+++ b/Software/Visual_Studio/Utilities/Tango.UITests/App.config
@@ -9,6 +9,46 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </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" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </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" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file