aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2017-11-11 01:18:30 +0200
committerRoy <roy.mail.net@gmail.com>2017-11-11 01:18:30 +0200
commit6738f5190b2e341cb0985a833fd304ce8f01096f (patch)
treee0edf417095aaef5c478c0d007b27c8a550a6cec /Software
parent92d805a20292ad69f6bc5d9c414bbd215365adf5 (diff)
downloadTango-6738f5190b2e341cb0985a833fd304ce8f01096f.tar.gz
Tango-6738f5190b2e341cb0985a833fd304ce8f01096f.zip
Removed Integration & Emulator.
Added Mobile and Machine Emulators.
Diffstat (limited to 'Software')
-rw-r--r--Software/Visual Studio/Tango.Emulations/EmulatorBase.cs (renamed from Software/Visual Studio/Tango.Integration/Emulators/MachineEmulator.cs)105
-rw-r--r--Software/Visual Studio/Tango.Emulations/Emulators/MachineEmulator.cs70
-rw-r--r--Software/Visual Studio/Tango.Emulations/Emulators/MobileEmulator.cs51
-rw-r--r--Software/Visual Studio/Tango.Emulations/IEmulator.cs43
-rw-r--r--Software/Visual Studio/Tango.Emulations/Properties/AssemblyInfo.cs (renamed from Software/Visual Studio/Tango.Emulator/Properties/AssemblyInfo.cs)2
-rw-r--r--Software/Visual Studio/Tango.Emulations/Tango.Emulations.csproj (renamed from Software/Visual Studio/Tango.Integration/Tango.Integration.csproj)31
-rw-r--r--Software/Visual Studio/Tango.Emulations/packages.config4
-rw-r--r--Software/Visual Studio/Tango.Emulator/Models/StubVM.cs16
-rw-r--r--Software/Visual Studio/Tango.Emulator/packages.config12
-rw-r--r--Software/Visual Studio/Tango.Integration/packages.config10
-rw-r--r--Software/Visual Studio/Tango.Transport/Adapters/TcpTransportAdapter.cs5
-rw-r--r--Software/Visual Studio/Tango.Transport/TransportAdapterBase.cs2
-rw-r--r--Software/Visual Studio/Tango.Transport/TransporterBase.cs7
-rw-r--r--Software/Visual Studio/Tango.sln30
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/App.config (renamed from Software/Visual Studio/Tango.Emulator/App.config)0
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/App.xaml20
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/App.xaml.cs17
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/Images/machine-trans.png (renamed from Software/Visual Studio/Tango.Emulator/Images/machine-trans.png)bin45618 -> 45618 bytes
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/MainWindow.xaml (renamed from Software/Visual Studio/Tango.Emulator/MainWindow.xaml)35
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/MainWindow.xaml.cs (renamed from Software/Visual Studio/Tango.Emulator/MainWindow.xaml.cs)89
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/AssemblyInfo.cs (renamed from Software/Visual Studio/Tango.Integration/Properties/AssemblyInfo.cs)2
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Resources.Designer.cs71
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Resources.resx (renamed from Software/Visual Studio/Tango.Emulator/Properties/Resources.resx)0
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Settings.Designer.cs30
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Settings.settings (renamed from Software/Visual Studio/Tango.Emulator/Properties/Settings.settings)0
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/Tango.MachineEM.UI.csproj (renamed from Software/Visual Studio/Tango.Emulator/Tango.Emulator.csproj)64
-rw-r--r--Software/Visual Studio/Utilities/Tango.MachineEM.UI/packages.config6
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/App.config6
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/App.xaml (renamed from Software/Visual Studio/Tango.Emulator/App.xaml)4
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/App.xaml.cs (renamed from Software/Visual Studio/Tango.Emulator/App.xaml.cs)2
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/Images/phone.png (renamed from Software/Visual Studio/Tango.Emulator/Images/phone.png)bin72384 -> 72384 bytes
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/MainWindow.xaml56
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/MainWindow.xaml.cs54
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/AssemblyInfo.cs6
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Resources.Designer.cs (renamed from Software/Visual Studio/Tango.Emulator/Properties/Resources.Designer.cs)4
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Resources.resx117
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Settings.Designer.cs (renamed from Software/Visual Studio/Tango.Emulator/Properties/Settings.Designer.cs)2
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Settings.settings7
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/Tango.MobileEM.UI.csproj144
-rw-r--r--Software/Visual Studio/Utilities/Tango.MobileEM.UI/packages.config6
40 files changed, 860 insertions, 270 deletions
diff --git a/Software/Visual Studio/Tango.Integration/Emulators/MachineEmulator.cs b/Software/Visual Studio/Tango.Emulations/EmulatorBase.cs
index 0767791d2..7309499ba 100644
--- a/Software/Visual Studio/Tango.Integration/Emulators/MachineEmulator.cs
+++ b/Software/Visual Studio/Tango.Emulations/EmulatorBase.cs
@@ -1,26 +1,23 @@
-using Google.Protobuf;
-using System;
-using System.Collections.Concurrent;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
-using System.Threading;
using System.Threading.Tasks;
-using Tango.Transport.Servers;
using Tango.Logging;
-using Tango.PMR;
using Tango.PMR.Common;
-using Tango.PMR.Stubs;
using Tango.SharedUI;
using Tango.SharedUI.Commands;
using Tango.Transport;
-namespace Tango.Integration.Emulators
+namespace Tango.Emulations
{
- public class MachineEmulator : ExtendedObject
+ /// <summary>
+ /// Represents an <see cref="IEmulator"/> base class.
+ /// </summary>
+ /// <seealso cref="Tango.SharedUI.ExtendedObject" />
+ /// <seealso cref="Tango.Emulations.IEmulator" />
+ public abstract class EmulatorBase : ExtendedObject, IEmulator
{
- private ITransporter _transporter;
-
#region Properties
private bool _isStarted;
@@ -33,6 +30,20 @@ namespace Tango.Integration.Emulators
set { _isStarted = value; RaisePropertyChanged(nameof(IsStarted)); InvalidateRelayCommands(); }
}
+ private ITransporter _transporter;
+ /// <summary>
+ /// Gets or sets the transporter.
+ /// </summary>
+ public ITransporter Transporter
+ {
+ get { return _transporter; }
+ set
+ {
+ _transporter = value;
+ SetTransporter(_transporter);
+ }
+ }
+
#endregion
#region Commands
@@ -52,9 +63,32 @@ namespace Tango.Integration.Emulators
#region Constructors
/// <summary>
- /// Initializes a new instance of the <see cref="MachineEmulator"/> class.
+ /// Initializes a new instance of the <see cref="EmulatorBase"/> class.
+ /// </summary>
+ public EmulatorBase()
+ {
+ StartCommand = new RelayCommand(async () => { await Start(); }, (x) => !IsStarted);
+ StopCommand = new RelayCommand(async () => { await Stop(); }, (x) => IsStarted);
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="EmulatorBase"/> class.
+ /// </summary>
+ /// <param name="transporter">The transporter.</param>
+ public EmulatorBase(ITransporter transporter) : this()
+ {
+ Transporter = transporter;
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ /// <summary>
+ /// Sets the transporter.
/// </summary>
- public MachineEmulator(ITransporter transporter)
+ /// <param name="transporter">The transporter.</param>
+ private void SetTransporter(ITransporter transporter)
{
if (_transporter != null)
{
@@ -65,12 +99,8 @@ namespace Tango.Integration.Emulators
_transporter.RequestReceived += OnTransporterRequestReceived;
_transporter.StateChanged += OnTransporterStateChanged;
- StartCommand = new RelayCommand(async () => { await Start(); }, (x) => !IsStarted);
- StopCommand = new RelayCommand(async () => { await Stop(); }, (x) => IsStarted);
}
-
-
#endregion
#region Public Methods
@@ -103,27 +133,38 @@ namespace Tango.Integration.Emulators
#region Virtual Methods
+ /// <summary>
+ /// Called when transporter state has changed.
+ /// </summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
protected virtual void OnTransporterStateChanged(object sender, TransportComponentState e)
{
LogManager.Log("Transporter state changed: " + e.ToString());
}
- protected virtual void OnTransporterRequestReceived(object sender, MessageContainer container)
+ #endregion
+
+ #region Abstract Methods
+
+ /// <summary>
+ /// Called on new request message.
+ /// </summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="container">The container.</param>
+ protected abstract void OnTransporterRequestReceived(object sender, MessageContainer container);
+
+ #endregion
+
+ #region Dispose
+
+ /// <summary>
+ /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+ /// </summary>
+ public void Dispose()
{
- switch (container.Type)
- {
- case MessageType.Stub1Request:
- Task.Factory.StartNew(() =>
- {
- Thread.Sleep(1000);
- var request = MessageFactory.ParseContainer<Stub1Request>(container);
- var response = MessageFactory.CreateContainer<Stub1Response>(container.Token);
- response.Message.Sum = request.A + request.B;
- response.Container.Token = container.Token;
- _transporter.SendResponse(response);
- });
- break;
- }
+ Stop().Wait();
+ if (Transporter != null) Transporter.Dispose();
}
#endregion
diff --git a/Software/Visual Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual Studio/Tango.Emulations/Emulators/MachineEmulator.cs
new file mode 100644
index 000000000..8c986cb95
--- /dev/null
+++ b/Software/Visual Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -0,0 +1,70 @@
+using Google.Protobuf;
+using System;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using Tango.Transport.Servers;
+using Tango.Logging;
+using Tango.PMR;
+using Tango.PMR.Common;
+using Tango.PMR.Stubs;
+using Tango.SharedUI;
+using Tango.SharedUI.Commands;
+using Tango.Transport;
+
+namespace Tango.Emulations.Emulators
+{
+ public class MachineEmulator : EmulatorBase
+ {
+ #region Constructors
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MachineEmulator"/> class.
+ /// </summary>
+ public MachineEmulator() : base()
+ {
+
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MachineEmulator"/> class.
+ /// </summary>
+ /// <param name="transporter">The transporter.</param>
+ public MachineEmulator(ITransporter transporter) : base(transporter)
+ {
+
+ }
+
+ #endregion
+
+ #region Override Methods
+
+ /// <summary>
+ /// Called on new request message.
+ /// </summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="container">The container.</param>
+ protected override void OnTransporterRequestReceived(object sender, MessageContainer container)
+ {
+ switch (container.Type)
+ {
+ case MessageType.Stub1Request:
+ Task.Factory.StartNew(() =>
+ {
+ Thread.Sleep(1000);
+ var request = MessageFactory.ParseContainer<Stub1Request>(container);
+ var response = MessageFactory.CreateContainer<Stub1Response>(container.Token);
+ response.Message.Sum = request.A + request.B;
+ response.Container.Token = container.Token;
+ Transporter.SendResponse(response);
+ });
+ break;
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Software/Visual Studio/Tango.Emulations/Emulators/MobileEmulator.cs b/Software/Visual Studio/Tango.Emulations/Emulators/MobileEmulator.cs
new file mode 100644
index 000000000..cea0a7fec
--- /dev/null
+++ b/Software/Visual Studio/Tango.Emulations/Emulators/MobileEmulator.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using Tango.PMR;
+using Tango.PMR.Common;
+using Tango.PMR.Stubs;
+using Tango.Transport;
+
+namespace Tango.Emulations.Emulators
+{
+ public class MobileEmulator : EmulatorBase
+ {
+ #region Constructors
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MobileEmulator "/> class.
+ /// </summary>
+ public MobileEmulator () : base()
+ {
+
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MobileEmulator "/> class.
+ /// </summary>
+ /// <param name="transporter">The transporter.</param>
+ public MobileEmulator (ITransporter transporter) : base(transporter)
+ {
+
+ }
+
+ #endregion
+
+ #region Override Methods
+
+ /// <summary>
+ /// Called on new request message.
+ /// </summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="container">The container.</param>
+ protected override void OnTransporterRequestReceived(object sender, MessageContainer container)
+ {
+
+ }
+
+ #endregion
+ }
+}
diff --git a/Software/Visual Studio/Tango.Emulations/IEmulator.cs b/Software/Visual Studio/Tango.Emulations/IEmulator.cs
new file mode 100644
index 000000000..360087f96
--- /dev/null
+++ b/Software/Visual Studio/Tango.Emulations/IEmulator.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.SharedUI.Commands;
+using Tango.Transport;
+
+namespace Tango.Emulations
+{
+ public interface IEmulator : IDisposable
+ {
+ /// <summary>
+ /// Starts this emulator.
+ /// </summary>
+ Task Stop();
+
+ /// <summary>
+ /// Starts this instance.
+ /// </summary>
+ Task Start();
+
+ /// <summary>
+ /// Gets or sets the transporter.
+ /// </summary>
+ ITransporter Transporter { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether this instance is started.
+ /// </summary>
+ bool IsStarted { get; set; }
+
+ /// <summary>
+ /// Gets or sets the start command.
+ /// </summary>
+ RelayCommand StartCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the stop command.
+ /// </summary>
+ RelayCommand StopCommand { get; set; }
+ }
+}
diff --git a/Software/Visual Studio/Tango.Emulator/Properties/AssemblyInfo.cs b/Software/Visual Studio/Tango.Emulations/Properties/AssemblyInfo.cs
index 7d440978a..0882138f5 100644
--- a/Software/Visual Studio/Tango.Emulator/Properties/AssemblyInfo.cs
+++ b/Software/Visual Studio/Tango.Emulations/Properties/AssemblyInfo.cs
@@ -2,5 +2,5 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-[assembly: AssemblyTitle("Tango - Machine Emulator Utility")]
+[assembly: AssemblyTitle("Tango - Emulation Components")]
[assembly: ComVisible(false)] \ No newline at end of file
diff --git a/Software/Visual Studio/Tango.Integration/Tango.Integration.csproj b/Software/Visual Studio/Tango.Emulations/Tango.Emulations.csproj
index f0bda4170..aae43bf96 100644
--- a/Software/Visual Studio/Tango.Integration/Tango.Integration.csproj
+++ b/Software/Visual Studio/Tango.Emulations/Tango.Emulations.csproj
@@ -4,11 +4,11 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{B6182925-8864-401F-A390-6EFF737C4FC7}</ProjectGuid>
+ <ProjectGuid>{63561E19-FF5A-414B-A5EF-E30711543E1D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Tango.Integration</RootNamespace>
- <AssemblyName>Tango.Integration</AssemblyName>
+ <RootNamespace>Tango.Emulations</RootNamespace>
+ <AssemblyName>Tango.Emulations</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
@@ -35,35 +35,21 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
- <Reference Include="System.Reactive.Core, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Reactive.Core.3.1.1\lib\net45\System.Reactive.Core.dll</HintPath>
- </Reference>
- <Reference Include="System.Reactive.Interfaces, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Reactive.Interfaces.3.1.1\lib\net45\System.Reactive.Interfaces.dll</HintPath>
- </Reference>
- <Reference Include="System.Reactive.Linq, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Reactive.Linq.3.1.1\lib\net45\System.Reactive.Linq.dll</HintPath>
- </Reference>
- <Reference Include="System.Reactive.PlatformServices, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Reactive.PlatformServices.3.1.1\lib\net45\System.Reactive.PlatformServices.dll</HintPath>
- </Reference>
- <Reference Include="System.Reactive.Windows.Threading, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Reactive.Windows.Threading.3.1.1\lib\net45\System.Reactive.Windows.Threading.dll</HintPath>
- </Reference>
- <Reference Include="System.Windows" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
- <Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Versioning\GlobalVersionInfo.cs">
<Link>GlobalVersionInfo.cs</Link>
</Compile>
+ <Compile Include="EmulatorBase.cs" />
<Compile Include="Emulators\MachineEmulator.cs" />
+ <Compile Include="Emulators\MobileEmulator.cs" />
+ <Compile Include="IEmulator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
@@ -79,10 +65,6 @@
<Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project>
<Name>Tango.PMR</Name>
</ProjectReference>
- <ProjectReference Include="..\Tango.Protobuf\Tango.Protobuf.csproj">
- <Project>{40073806-914e-4e78-97ab-fa9639308ebe}</Project>
- <Name>Tango.Protobuf</Name>
- </ProjectReference>
<ProjectReference Include="..\Tango.SharedUI\Tango.SharedUI.csproj">
<Project>{ac489889-6e50-4f16-9dba-ff4c6f9ec72b}</Project>
<Name>Tango.SharedUI</Name>
@@ -95,6 +77,5 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
- <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> \ No newline at end of file
diff --git a/Software/Visual Studio/Tango.Emulations/packages.config b/Software/Visual Studio/Tango.Emulations/packages.config
new file mode 100644
index 000000000..e7e6cbade
--- /dev/null
+++ b/Software/Visual Studio/Tango.Emulations/packages.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="Google.Protobuf" version="3.4.1" targetFramework="net45" />
+</packages> \ No newline at end of file
diff --git a/Software/Visual Studio/Tango.Emulator/Models/StubVM.cs b/Software/Visual Studio/Tango.Emulator/Models/StubVM.cs
deleted file mode 100644
index abda393b8..000000000
--- a/Software/Visual Studio/Tango.Emulator/Models/StubVM.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.PMR;
-using Tango.PMR.Common;
-using Tango.SharedUI;
-
-namespace Tango.Emulator.Models
-{
- public class StubVM : ExtendedObject
- {
- public MessageContainer Message { get; set; }
- }
-}
diff --git a/Software/Visual Studio/Tango.Emulator/packages.config b/Software/Visual Studio/Tango.Emulator/packages.config
deleted file mode 100644
index 72d96268c..000000000
--- a/Software/Visual Studio/Tango.Emulator/packages.config
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net45" />
- <package id="Google.Protobuf" version="3.4.1" targetFramework="net45" />
- <package id="MahApps.Metro" version="1.5.0" targetFramework="net45" />
- <package id="System.Reactive" version="3.1.1" targetFramework="net45" />
- <package id="System.Reactive.Core" version="3.1.1" targetFramework="net45" />
- <package id="System.Reactive.Interfaces" version="3.1.1" targetFramework="net45" />
- <package id="System.Reactive.Linq" version="3.1.1" targetFramework="net45" />
- <package id="System.Reactive.PlatformServices" version="3.1.1" targetFramework="net45" />
- <package id="System.Reactive.Windows.Threading" version="3.1.1" targetFramework="net45" />
-</packages> \ No newline at end of file
diff --git a/Software/Visual Studio/Tango.Integration/packages.config b/Software/Visual Studio/Tango.Integration/packages.config
deleted file mode 100644
index 5a7de5f4e..000000000
--- a/Software/Visual Studio/Tango.Integration/packages.config
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Google.Protobuf" version="3.4.1" targetFramework="net45" />
- <package id="System.Reactive" version="3.1.1" targetFramework="net45" />
- <package id="System.Reactive.Core" version="3.1.1" targetFramework="net45" />
- <package id="System.Reactive.Interfaces" version="3.1.1" targetFramework="net45" />
- <package id="System.Reactive.Linq" version="3.1.1" targetFramework="net45" />
- <package id="System.Reactive.PlatformServices" version="3.1.1" targetFramework="net45" />
- <package id="System.Reactive.Windows.Threading" version="3.1.1" targetFramework="net45" />
-</packages> \ No newline at end of file
diff --git a/Software/Visual Studio/Tango.Transport/Adapters/TcpTransportAdapter.cs b/Software/Visual Studio/Tango.Transport/Adapters/TcpTransportAdapter.cs
index d3bc4a855..b2fd3fd10 100644
--- a/Software/Visual Studio/Tango.Transport/Adapters/TcpTransportAdapter.cs
+++ b/Software/Visual Studio/Tango.Transport/Adapters/TcpTransportAdapter.cs
@@ -108,8 +108,6 @@ namespace Tango.Transport.Adapters
/// <returns></returns>
public override Task Disconnect()
{
- ThrowFailedOrDisposed();
-
return Task.Factory.StartNew((Action)(() =>
{
try
@@ -120,7 +118,6 @@ namespace Tango.Transport.Adapters
_socket.GetStream().Close();
_socket.Close();
LogManager.Log("TCP adapter disconnected.");
- Dispose();
}
}
catch (Exception ex)
@@ -176,7 +173,7 @@ namespace Tango.Transport.Adapters
{
if (_socket.Client.Poll(1, SelectMode.SelectRead) && _socket.Client.Available == 0)
{
- OnFailed(LogManager.Log(new Exception("Client disconnected.")));
+ OnFailed(LogManager.Log(new TimeoutException("Client disconnected.")));
return;
}
}
diff --git a/Software/Visual Studio/Tango.Transport/TransportAdapterBase.cs b/Software/Visual Studio/Tango.Transport/TransportAdapterBase.cs
index fb442577d..9f2fb3262 100644
--- a/Software/Visual Studio/Tango.Transport/TransportAdapterBase.cs
+++ b/Software/Visual Studio/Tango.Transport/TransportAdapterBase.cs
@@ -88,7 +88,7 @@ namespace Tango.Transport
{
if (State == TransportComponentState.Failed || State == TransportComponentState.Disposed)
{
- throw new ObjectDisposedException("The adapter is in a " + State + " state.");
+ throw LogManager.Log(new ObjectDisposedException("The adapter is in a " + State + " state."));
}
}
diff --git a/Software/Visual Studio/Tango.Transport/TransporterBase.cs b/Software/Visual Studio/Tango.Transport/TransporterBase.cs
index 9b27b860d..073499225 100644
--- a/Software/Visual Studio/Tango.Transport/TransporterBase.cs
+++ b/Software/Visual Studio/Tango.Transport/TransporterBase.cs
@@ -93,7 +93,7 @@ namespace Tango.Transport
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="System.Collections.Specialized.NotifyCollectionChangedEventArgs"/> instance containing the event data.</param>
- protected virtual void OnAdaptersCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
+ protected virtual async void OnAdaptersCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
foreach (var ad in _adapters)
{
@@ -101,6 +101,11 @@ namespace Tango.Transport
ad.StateChanged += OnAdapterStateChanged;
ad.DataAvailable -= OnAdapterDataAvailable;
ad.DataAvailable += OnAdapterDataAvailable;
+
+ if (State == TransportComponentState.Connected && ad.State == TransportComponentState.Disconnected)
+ {
+ await ad.Connect();
+ }
}
}
diff --git a/Software/Visual Studio/Tango.sln b/Software/Visual Studio/Tango.sln
index d217cf754..dff95ce1a 100644
--- a/Software/Visual Studio/Tango.sln
+++ b/Software/Visual Studio/Tango.sln
@@ -31,11 +31,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resources", "Resources", "{
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.PMR", "Tango.PMR\Tango.PMR.csproj", "{E4927038-348D-4295-AAF4-861C58CB3943}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Emulator", "Tango.Emulator\Tango.Emulator.csproj", "{FA15BBFC-AEAF-4364-9F90-CE4EFCE661FE}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Transport", "Tango.Transport\Tango.Transport.csproj", "{74E700B0-1156-4126-BE40-EE450D3C3026}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Integration", "Tango.Integration\Tango.Integration.csproj", "{B6182925-8864-401F-A390-6EFF737C4FC7}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Emulations", "Tango.Emulations\Tango.Emulations.csproj", "{63561E19-FF5A-414B-A5EF-E30711543E1D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Transport", "Tango.Transport\Tango.Transport.csproj", "{74E700B0-1156-4126-BE40-EE450D3C3026}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.MachineEM.UI", "Utilities\Tango.MachineEM.UI\Tango.MachineEM.UI.csproj", "{1971345A-0627-4428-88AA-1CCC4BFAEF4B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.MobileEM.UI", "Utilities\Tango.MobileEM.UI\Tango.MobileEM.UI.csproj", "{372401B3-FFEB-483F-965F-261506B3FDFB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -75,18 +77,22 @@ Global
{E4927038-348D-4295-AAF4-861C58CB3943}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E4927038-348D-4295-AAF4-861C58CB3943}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E4927038-348D-4295-AAF4-861C58CB3943}.Release|Any CPU.Build.0 = Release|Any CPU
- {FA15BBFC-AEAF-4364-9F90-CE4EFCE661FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FA15BBFC-AEAF-4364-9F90-CE4EFCE661FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FA15BBFC-AEAF-4364-9F90-CE4EFCE661FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FA15BBFC-AEAF-4364-9F90-CE4EFCE661FE}.Release|Any CPU.Build.0 = Release|Any CPU
- {B6182925-8864-401F-A390-6EFF737C4FC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B6182925-8864-401F-A390-6EFF737C4FC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B6182925-8864-401F-A390-6EFF737C4FC7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B6182925-8864-401F-A390-6EFF737C4FC7}.Release|Any CPU.Build.0 = Release|Any CPU
{74E700B0-1156-4126-BE40-EE450D3C3026}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74E700B0-1156-4126-BE40-EE450D3C3026}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74E700B0-1156-4126-BE40-EE450D3C3026}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74E700B0-1156-4126-BE40-EE450D3C3026}.Release|Any CPU.Build.0 = Release|Any CPU
+ {63561E19-FF5A-414B-A5EF-E30711543E1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {63561E19-FF5A-414B-A5EF-E30711543E1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {63561E19-FF5A-414B-A5EF-E30711543E1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {63561E19-FF5A-414B-A5EF-E30711543E1D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1971345A-0627-4428-88AA-1CCC4BFAEF4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1971345A-0627-4428-88AA-1CCC4BFAEF4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1971345A-0627-4428-88AA-1CCC4BFAEF4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1971345A-0627-4428-88AA-1CCC4BFAEF4B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {372401B3-FFEB-483F-965F-261506B3FDFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {372401B3-FFEB-483F-965F-261506B3FDFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {372401B3-FFEB-483F-965F-261506B3FDFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {372401B3-FFEB-483F-965F-261506B3FDFB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -94,5 +100,7 @@ Global
GlobalSection(NestedProjects) = preSolution
{37E45CE1-A0F6-4ED7-9791-A1BED947602F} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760}
{DE5AB980-A9AD-4273-8272-C4E1E062E3EC} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760}
+ {1971345A-0627-4428-88AA-1CCC4BFAEF4B} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760}
+ {372401B3-FFEB-483F-965F-261506B3FDFB} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760}
EndGlobalSection
EndGlobal
diff --git a/Software/Visual Studio/Tango.Emulator/App.config b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/App.config
index 8e1564635..8e1564635 100644
--- a/Software/Visual Studio/Tango.Emulator/App.config
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/App.config
diff --git a/Software/Visual Studio/Utilities/Tango.MachineEM.UI/App.xaml b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/App.xaml
new file mode 100644
index 000000000..a2db7a7c0
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/App.xaml
@@ -0,0 +1,20 @@
+<Application x:Class="Tango.MachineEM.UI.App"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="clr-namespace:Tango.MachineEM.UI"
+ StartupUri="MainWindow.xaml">
+ <Application.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
+ <!-- Accent and AppTheme setting -->
+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Red.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml" />
+ </ResourceDictionary.MergedDictionaries>
+ </ResourceDictionary>
+ </Application.Resources>
+</Application>
diff --git a/Software/Visual Studio/Utilities/Tango.MachineEM.UI/App.xaml.cs b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/App.xaml.cs
new file mode 100644
index 000000000..24222d957
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace Tango.MachineEM.UI
+{
+ /// <summary>
+ /// Interaction logic for App.xaml
+ /// </summary>
+ public partial class App : Application
+ {
+ }
+}
diff --git a/Software/Visual Studio/Tango.Emulator/Images/machine-trans.png b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Images/machine-trans.png
index a7cf65852..a7cf65852 100644
--- a/Software/Visual Studio/Tango.Emulator/Images/machine-trans.png
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Images/machine-trans.png
Binary files differ
diff --git a/Software/Visual Studio/Tango.Emulator/MainWindow.xaml b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/MainWindow.xaml
index f5e4ee98e..28ad0ca6c 100644
--- a/Software/Visual Studio/Tango.Emulator/MainWindow.xaml
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/MainWindow.xaml
@@ -1,4 +1,4 @@
-<mahapps:MetroWindow x:Class="Tango.Emulator.MainWindow"
+<mahapps:MetroWindow x:Class="Tango.MachineEM.UI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@@ -6,7 +6,7 @@
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:fa="http://schemas.fontawesome.io/icons/"
- xmlns:local="clr-namespace:Tango.Emulator"
+ xmlns:local="clr-namespace:Tango.MachineEM.UI"
mc:Ignorable="d"
Title="Tango Machine Emulator" Height="720" Width="1200" TitleCaps="False" BorderBrush="Gray" BorderThickness="1" WindowStartupLocation="CenterScreen" Background="#202020" Foreground="Gainsboro" DataContext="{Binding RelativeSource={RelativeSource Self}}">
<Grid>
@@ -38,38 +38,7 @@
<Grid x:Name="gridContent" Background="#151515" Margin="5">
<Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="300"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <Image Source="Images/phone.png" RenderOptions.BitmapScalingMode="Fant" Stretch="Fill"></Image>
-
- <Grid Margin="45 70 45 55">
- <Grid.RowDefinitions>
- <RowDefinition Height="302*"/>
- <RowDefinition Height="35"/>
- </Grid.RowDefinitions>
-
- <Grid>
- <Button Width="100" Height="40" Click="Button_Click">SEND</Button>
- </Grid>
-
- <UniformGrid Grid.Row="1" Columns="2" Background="#151515">
- <Button Margin="5" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding DisconnectCommand}">
- <StackPanel Orientation="Horizontal">
- <fa:ImageAwesome Icon="Unlink" Width="16"></fa:ImageAwesome>
- <TextBlock VerticalAlignment="Center" Margin="5 0 10 0">Disconnect</TextBlock>
- </StackPanel>
- </Button>
- <Button Margin="5" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding ConnectCommand}">
- <StackPanel Orientation="Horizontal">
- <fa:ImageAwesome Icon="Link" Width="16"></fa:ImageAwesome>
- <TextBlock VerticalAlignment="Center" Margin="5 0 10 0">Connect</TextBlock>
- </StackPanel>
- </Button>
- </UniformGrid>
- </Grid>
</Grid>
</Grid>
<Grid x:Name="gridActions" Grid.Row="1" Background="#151515" Margin="5">
diff --git a/Software/Visual Studio/Tango.Emulator/MainWindow.xaml.cs b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/MainWindow.xaml.cs
index 6e32d9f2d..a3b49d726 100644
--- a/Software/Visual Studio/Tango.Emulator/MainWindow.xaml.cs
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/MainWindow.xaml.cs
@@ -13,23 +13,21 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using Tango.Emulations.Emulators;
+using Tango.Logging;
+using Tango.SharedUI.Commands;
using Tango.Transport.Adapters;
-using Tango.Integration.Emulators;
using Tango.Transport.Servers;
using Tango.Transport.Transporters;
-using Tango.Logging;
-using Tango.PMR;
-using Tango.PMR.Stubs;
-using Tango.SharedUI.Commands;
-namespace Tango.Emulator
+namespace Tango.MachineEM.UI
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : MetroWindow
{
- private JsonTransporter mobileTransporter;
+ private TcpServer TcpServer;
#region Properties
@@ -55,18 +53,6 @@ namespace Tango.Emulator
public static readonly DependencyProperty EmulatorProperty =
DependencyProperty.Register("Emulator", typeof(MachineEmulator), typeof(MainWindow), new PropertyMetadata(null));
-
- /// <summary>
- /// Gets or sets the TCP server.
- /// </summary>
- public TcpServer TcpServer
- {
- get { return (TcpServer)GetValue(TcpServerProperty); }
- set { SetValue(TcpServerProperty, value); }
- }
- public static readonly DependencyProperty TcpServerProperty =
- DependencyProperty.Register("TcpServer", typeof(TcpServer), typeof(MainWindow), new PropertyMetadata(null));
-
#endregion
#region Commands
@@ -81,37 +67,23 @@ namespace Tango.Emulator
/// </summary>
public RelayCommand StopCommand { get; set; }
- /// <summary>
- /// Gets or sets the connect command.
- /// </summary>
- public RelayCommand ConnectCommand { get; set; }
-
- /// <summary>
- /// Gets or sets the disconnect command.
- /// </summary>
- public RelayCommand DisconnectCommand { get; set; }
-
#endregion
- #region Constructors
-
/// <summary>
/// Initializes a new instance of the <see cref="MainWindow"/> class.
/// </summary>
public MainWindow()
{
LogManager.RegisterLogger(new VSOutputLogger());
-
TcpServer = new TcpServer(9999);
TcpServer.ClientConnected += TcpServer_ClientConnected;
- mobileTransporter = new JsonTransporter();
+ Emulator = new MachineEmulator(new ProtoTransporter());
StartCommand = new RelayCommand(async () =>
{
- //TcpServer.Start();
- Emulator = new MachineEmulator(new JsonTransporter(new UsbTransportAdapter("COM1")));
await Emulator.Start();
+ TcpServer.Start();
StopCommand.RaiseCanExecuteChanged();
StartCommand.RaiseCanExecuteChanged();
}, x => !TcpServer.IsStarted);
@@ -119,11 +91,7 @@ namespace Tango.Emulator
StopCommand = new RelayCommand(async () =>
{
TcpServer.Stop();
-
- if (Emulator != null)
- {
- await Emulator.Stop();
- }
+ await Emulator.Stop();
StartCommand.RaiseCanExecuteChanged();
StopCommand.RaiseCanExecuteChanged();
}, (x) =>
@@ -131,44 +99,17 @@ namespace Tango.Emulator
return TcpServer.IsStarted;
});
- ConnectCommand = new RelayCommand(async () =>
- {
- mobileTransporter.Adapters.Add(new UsbTransportAdapter("COM2"));
- await mobileTransporter.Connect();
-
- ConnectCommand.RaiseCanExecuteChanged();
- DisconnectCommand.RaiseCanExecuteChanged();
-
- }, (x) => mobileTransporter.State != Transport.TransportComponentState.Connected);
-
- DisconnectCommand = new RelayCommand(async () =>
- {
- await mobileTransporter.Disconnect();
-
- ConnectCommand.RaiseCanExecuteChanged();
- DisconnectCommand.RaiseCanExecuteChanged();
-
- }, (x) => mobileTransporter.State == Transport.TransportComponentState.Connected);
-
InitializeComponent();
}
- private async void TcpServer_ClientConnected(object sender, ClientConnectedEventArgs e)
- {
- Emulator = new MachineEmulator(new JsonTransporter(new TcpTransportAdapter(e.Socket)));
- await Emulator.Start();
- }
-
- #endregion
-
- private async void Button_Click(object sender, RoutedEventArgs e)
+ /// <summary>
+ /// Handles the ClientConnected event of the TcpServer control.
+ /// </summary>
+ /// <param name="sender">The source of the event.</param>
+ /// <param name="e">The <see cref="ClientConnectedEventArgs"/> instance containing the event data.</param>
+ private void TcpServer_ClientConnected(object sender, ClientConnectedEventArgs e)
{
- var request = MessageFactory.CreateContainer<Stub1Request>();
- request.Message.A = 5;
- request.Message.B = 10;
- var result = await mobileTransporter.SendRequest<Stub1Request, Stub1Response>(request,mobileTransporter.Adapters.First());
-
- var a = result;
+ Emulator.Transporter.Adapters.Add(new TcpTransportAdapter(e.Socket));
}
}
}
diff --git a/Software/Visual Studio/Tango.Integration/Properties/AssemblyInfo.cs b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/AssemblyInfo.cs
index d76cafb27..67dc85fcd 100644
--- a/Software/Visual Studio/Tango.Integration/Properties/AssemblyInfo.cs
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/AssemblyInfo.cs
@@ -2,5 +2,5 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-[assembly: AssemblyTitle("Tango - Machine Integration Layer")]
+[assembly: AssemblyTitle("Tango - Machine Emulator")]
[assembly: ComVisible(false)] \ No newline at end of file
diff --git a/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Resources.Designer.cs b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Resources.Designer.cs
new file mode 100644
index 000000000..03267e59a
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.MachineEM.UI.Properties
+{
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.MachineEM.UI.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Software/Visual Studio/Tango.Emulator/Properties/Resources.resx b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Resources.resx
index af7dbebba..af7dbebba 100644
--- a/Software/Visual Studio/Tango.Emulator/Properties/Resources.resx
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Resources.resx
diff --git a/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Settings.Designer.cs b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Settings.Designer.cs
new file mode 100644
index 000000000..01ea89440
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.MachineEM.UI.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Software/Visual Studio/Tango.Emulator/Properties/Settings.settings b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Settings.settings
index 033d7a5e9..033d7a5e9 100644
--- a/Software/Visual Studio/Tango.Emulator/Properties/Settings.settings
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Properties/Settings.settings
diff --git a/Software/Visual Studio/Tango.Emulator/Tango.Emulator.csproj b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Tango.MachineEM.UI.csproj
index 696486c3e..3d4d51d1a 100644
--- a/Software/Visual Studio/Tango.Emulator/Tango.Emulator.csproj
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/Tango.MachineEM.UI.csproj
@@ -4,10 +4,10 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{FA15BBFC-AEAF-4364-9F90-CE4EFCE661FE}</ProjectGuid>
+ <ProjectGuid>{1971345A-0627-4428-88AA-1CCC4BFAEF4B}</ProjectGuid>
<OutputType>WinExe</OutputType>
- <RootNamespace>Tango.Emulator</RootNamespace>
- <AssemblyName>Tango.Emulator</AssemblyName>
+ <RootNamespace>Tango.MachineEM.UI</RootNamespace>
+ <AssemblyName>Tango.MachineEM.UI</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@@ -18,7 +18,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>..\Build\Debug\</OutputPath>
+ <OutputPath>..\..\Build\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -34,34 +34,19 @@
</PropertyGroup>
<ItemGroup>
<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>
+ <HintPath>..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.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>
+ <HintPath>..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.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>
+ <HintPath>..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
- <Reference Include="System.Reactive.Core, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Reactive.Core.3.1.1\lib\net45\System.Reactive.Core.dll</HintPath>
- </Reference>
- <Reference Include="System.Reactive.Interfaces, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Reactive.Interfaces.3.1.1\lib\net45\System.Reactive.Interfaces.dll</HintPath>
- </Reference>
- <Reference Include="System.Reactive.Linq, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Reactive.Linq.3.1.1\lib\net45\System.Reactive.Linq.dll</HintPath>
- </Reference>
- <Reference Include="System.Reactive.PlatformServices, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Reactive.PlatformServices.3.1.1\lib\net45\System.Reactive.PlatformServices.dll</HintPath>
- </Reference>
- <Reference Include="System.Reactive.Windows.Threading, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Reactive.Windows.Threading.3.1.1\lib\net45\System.Reactive.Windows.Threading.dll</HintPath>
- </Reference>
- <Reference Include="System.Windows" />
<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\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ <Private>True</Private>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
@@ -85,9 +70,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Compile Include="..\Versioning\GlobalVersionInfo.cs">
- <Link>GlobalVersionInfo.cs</Link>
- </Compile>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
@@ -98,7 +80,6 @@
</Compile>
</ItemGroup>
<ItemGroup>
- <Compile Include="Models\StubVM.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>
</SubType>
@@ -127,40 +108,37 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\Tango.Core\Tango.Core.csproj">
+ <Resource Include="Images\machine-trans.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj">
<Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
<Name>Tango.Core</Name>
</ProjectReference>
- <ProjectReference Include="..\Tango.Integration\Tango.Integration.csproj">
- <Project>{b6182925-8864-401f-a390-6eff737c4fc7}</Project>
- <Name>Tango.Integration</Name>
+ <ProjectReference Include="..\..\Tango.Emulations\Tango.Emulations.csproj">
+ <Project>{63561e19-ff5a-414b-a5ef-e30711543e1d}</Project>
+ <Name>Tango.Emulations</Name>
</ProjectReference>
- <ProjectReference Include="..\Tango.Logging\Tango.Logging.csproj">
+ <ProjectReference Include="..\..\Tango.Logging\Tango.Logging.csproj">
<Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project>
<Name>Tango.Logging</Name>
</ProjectReference>
- <ProjectReference Include="..\Tango.PMR\Tango.PMR.csproj">
+ <ProjectReference Include="..\..\Tango.PMR\Tango.PMR.csproj">
<Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project>
<Name>Tango.PMR</Name>
</ProjectReference>
- <ProjectReference Include="..\Tango.Protobuf\Tango.Protobuf.csproj">
+ <ProjectReference Include="..\..\Tango.Protobuf\Tango.Protobuf.csproj">
<Project>{40073806-914e-4e78-97ab-fa9639308ebe}</Project>
<Name>Tango.Protobuf</Name>
</ProjectReference>
- <ProjectReference Include="..\Tango.SharedUI\Tango.SharedUI.csproj">
+ <ProjectReference Include="..\..\Tango.SharedUI\Tango.SharedUI.csproj">
<Project>{ac489889-6e50-4f16-9dba-ff4c6f9ec72b}</Project>
<Name>Tango.SharedUI</Name>
</ProjectReference>
- <ProjectReference Include="..\Tango.Transport\Tango.Transport.csproj">
+ <ProjectReference Include="..\..\Tango.Transport\Tango.Transport.csproj">
<Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project>
<Name>Tango.Transport</Name>
</ProjectReference>
</ItemGroup>
- <ItemGroup>
- <Resource Include="Images\machine-trans.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Images\phone.png" />
- </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> \ No newline at end of file
diff --git a/Software/Visual Studio/Utilities/Tango.MachineEM.UI/packages.config b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/packages.config
new file mode 100644
index 000000000..9cbe8b937
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MachineEM.UI/packages.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.4.1" targetFramework="net45" />
+ <package id="MahApps.Metro" version="1.5.0" targetFramework="net45" />
+</packages> \ No newline at end of file
diff --git a/Software/Visual Studio/Utilities/Tango.MobileEM.UI/App.config b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/App.config
new file mode 100644
index 000000000..8e1564635
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/App.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+ </startup>
+</configuration> \ No newline at end of file
diff --git a/Software/Visual Studio/Tango.Emulator/App.xaml b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/App.xaml
index a5bc9bfe1..5aa87af23 100644
--- a/Software/Visual Studio/Tango.Emulator/App.xaml
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/App.xaml
@@ -1,7 +1,7 @@
-<Application x:Class="Tango.Emulator.App"
+<Application x:Class="Tango.MobileEM.UI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:Tango.Emulator"
+ xmlns:local="clr-namespace:Tango.MobileEM.UI"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
diff --git a/Software/Visual Studio/Tango.Emulator/App.xaml.cs b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/App.xaml.cs
index ca571bda0..9819b418d 100644
--- a/Software/Visual Studio/Tango.Emulator/App.xaml.cs
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/App.xaml.cs
@@ -6,7 +6,7 @@ using System.Linq;
using System.Threading.Tasks;
using System.Windows;
-namespace Tango.Emulator
+namespace Tango.MobileEM.UI
{
/// <summary>
/// Interaction logic for App.xaml
diff --git a/Software/Visual Studio/Tango.Emulator/Images/phone.png b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Images/phone.png
index d93503adc..d93503adc 100644
--- a/Software/Visual Studio/Tango.Emulator/Images/phone.png
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Images/phone.png
Binary files differ
diff --git a/Software/Visual Studio/Utilities/Tango.MobileEM.UI/MainWindow.xaml b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/MainWindow.xaml
new file mode 100644
index 000000000..7cd7213c5
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/MainWindow.xaml
@@ -0,0 +1,56 @@
+<mahapps:MetroWindow x:Class="Tango.MobileEM.UI.MainWindow"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:fa="http://schemas.fontawesome.io/icons/"
+ xmlns:local="clr-namespace:Tango.MobileEM.UI"
+ mc:Ignorable="d"
+ Title="Tango Machine Emulator" Height="558" Width="354" TitleCaps="False" BorderBrush="Gray" BorderThickness="1" WindowStartupLocation="CenterScreen" Background="#202020" Foreground="Gainsboro" DataContext="{Binding RelativeSource={RelativeSource Self}}">
+ <Grid>
+ <Grid>
+ <Image Source="Images/phone.png" RenderOptions.BitmapScalingMode="Fant" Stretch="Fill"></Image>
+
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="52*"/>
+ <ColumnDefinition Width="237*"/>
+ <ColumnDefinition Width="55*"/>
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="81*"/>
+ <RowDefinition Height="379*"/>
+ <RowDefinition Height="65*"/>
+ </Grid.RowDefinitions>
+
+ <Grid Grid.Column="1" Grid.Row="1">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="1*"/>
+ <RowDefinition Height="40"/>
+ </Grid.RowDefinitions>
+
+ <Grid>
+ <Button Width="100" Height="50" Click="Button_Click">SEND</Button>
+ </Grid>
+
+ <UniformGrid Grid.Row="1" Columns="2" Background="#151515">
+ <Button Margin="5" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding Emulator.StopCommand}">
+ <StackPanel Orientation="Horizontal">
+ <fa:ImageAwesome Icon="Unlink" Width="16"></fa:ImageAwesome>
+ <TextBlock VerticalAlignment="Center" Margin="5 0 10 0">Disconnect</TextBlock>
+ </StackPanel>
+ </Button>
+ <Button Margin="5 5 0 5" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding Emulator.StartCommand}">
+ <StackPanel Orientation="Horizontal">
+ <fa:ImageAwesome Icon="Link" Width="16"></fa:ImageAwesome>
+ <TextBlock VerticalAlignment="Center" Margin="5 0 10 0">Connect</TextBlock>
+ </StackPanel>
+ </Button>
+ </UniformGrid>
+ </Grid>
+ </Grid>
+ </Grid>
+ </Grid>
+</mahapps:MetroWindow>
diff --git a/Software/Visual Studio/Utilities/Tango.MobileEM.UI/MainWindow.xaml.cs b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/MainWindow.xaml.cs
new file mode 100644
index 000000000..72e8a480f
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/MainWindow.xaml.cs
@@ -0,0 +1,54 @@
+using MahApps.Metro.Controls;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.Emulations.Emulators;
+using Tango.Logging;
+using Tango.SharedUI.Commands;
+using Tango.Transport.Adapters;
+using Tango.Transport.Transporters;
+
+namespace Tango.MobileEM.UI
+{
+ /// <summary>
+ /// Interaction logic for MainWindow.xaml
+ /// </summary>
+ public partial class MainWindow : MetroWindow
+ {
+ #region Properties
+
+ public MobileEmulator Emulator
+ {
+ get { return (MobileEmulator)GetValue(EmulatorProperty); }
+ set { SetValue(EmulatorProperty, value); }
+ }
+ public static readonly DependencyProperty EmulatorProperty =
+ DependencyProperty.Register("Emulator", typeof(MobileEmulator), typeof(MainWindow), new PropertyMetadata(null));
+
+ #endregion
+
+ public MainWindow()
+ {
+ LogManager.RegisterLogger(new VSOutputLogger());
+
+ Emulator = new MobileEmulator(new ProtoTransporter(new TcpTransportAdapter("127.0.0.1", 9999)));
+ InitializeComponent();
+ }
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/AssemblyInfo.cs b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..e603a7590
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/AssemblyInfo.cs
@@ -0,0 +1,6 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Tango - Mobile Emulator")]
+[assembly: ComVisible(false)] \ No newline at end of file
diff --git a/Software/Visual Studio/Tango.Emulator/Properties/Resources.Designer.cs b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Resources.Designer.cs
index 3958e81c9..979ab736c 100644
--- a/Software/Visual Studio/Tango.Emulator/Properties/Resources.Designer.cs
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Resources.Designer.cs
@@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
-namespace Tango.Emulator.Properties
+namespace Tango.MobileEM.UI.Properties
{
@@ -44,7 +44,7 @@ namespace Tango.Emulator.Properties
{
if ((resourceMan == null))
{
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.Emulator.Properties.Resources", typeof(Resources).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.MobileEM.UI.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Resources.resx b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Resources.resx
new file mode 100644
index 000000000..af7dbebba
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Resources.resx
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/Software/Visual Studio/Tango.Emulator/Properties/Settings.Designer.cs b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Settings.Designer.cs
index a9e286568..ed8de364e 100644
--- a/Software/Visual Studio/Tango.Emulator/Properties/Settings.Designer.cs
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Settings.Designer.cs
@@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
-namespace Tango.Emulator.Properties
+namespace Tango.MobileEM.UI.Properties
{
diff --git a/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Settings.settings b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Settings.settings
new file mode 100644
index 000000000..033d7a5e9
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Properties/Settings.settings
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile> \ No newline at end of file
diff --git a/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Tango.MobileEM.UI.csproj b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Tango.MobileEM.UI.csproj
new file mode 100644
index 000000000..e376ad738
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/Tango.MobileEM.UI.csproj
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{372401B3-FFEB-483F-965F-261506B3FDFB}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <RootNamespace>Tango.MobileEM.UI</RootNamespace>
+ <AssemblyName>Tango.MobileEM.UI</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\Build\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <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="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="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>
+ <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>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Xml" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xaml">
+ <RequiredTargetFramework>4.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Page Include="MainWindow.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="MainWindow.xaml.cs">
+ <DependentUpon>MainWindow.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>
+ </SubType>
+ </Compile>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="packages.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\phone.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj">
+ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
+ <Name>Tango.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.Emulations\Tango.Emulations.csproj">
+ <Project>{63561e19-ff5a-414b-a5ef-e30711543e1d}</Project>
+ <Name>Tango.Emulations</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.Logging\Tango.Logging.csproj">
+ <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project>
+ <Name>Tango.Logging</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.PMR\Tango.PMR.csproj">
+ <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project>
+ <Name>Tango.PMR</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.Protobuf\Tango.Protobuf.csproj">
+ <Project>{40073806-914e-4e78-97ab-fa9639308ebe}</Project>
+ <Name>Tango.Protobuf</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.SharedUI\Tango.SharedUI.csproj">
+ <Project>{ac489889-6e50-4f16-9dba-ff4c6f9ec72b}</Project>
+ <Name>Tango.SharedUI</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.Transport\Tango.Transport.csproj">
+ <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project>
+ <Name>Tango.Transport</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project> \ No newline at end of file
diff --git a/Software/Visual Studio/Utilities/Tango.MobileEM.UI/packages.config b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/packages.config
new file mode 100644
index 000000000..9cbe8b937
--- /dev/null
+++ b/Software/Visual Studio/Utilities/Tango.MobileEM.UI/packages.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.4.1" targetFramework="net45" />
+ <package id="MahApps.Metro" version="1.5.0" targetFramework="net45" />
+</packages> \ No newline at end of file