From f32a4fdbaaa4ef966d27c7d2727d81bf65aabb61 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 17 Dec 2020 05:26:44 +0200 Subject: StubsUtils --- .../Tango.StubsUtils.Client.CLI/App.config | 6 + .../Tango.StubsUtils.Client.CLI/Program.cs | 66 ++++ .../Properties/AssemblyInfo.cs | 36 +++ .../Tango.StubsUtils.Client.CLI.csproj | 63 ++++ .../Tango.StubsUtils.Client.CLI/packages.config | 4 + .../App.config | 6 + .../Program.cs | 90 ++++++ .../Properties/AssemblyInfo.cs | 36 +++ .../Tango.StubsUtils.PerformanceTest.CLI.csproj | 63 ++++ .../Tango.StubsUtils.Service.UI/App.config | 22 ++ .../Tango.StubsUtils.Service.UI/App.xaml | 92 ++++++ .../Tango.StubsUtils.Service.UI/App.xaml.cs | 25 ++ .../Images/machine_icon_connected.ico | Bin 0 -> 109412 bytes .../Images/machine_icon_connected.png | Bin 0 -> 2914 bytes .../Images/machine_icon_disconnected.ico | Bin 0 -> 109141 bytes .../Images/machine_icon_disconnected.png | Bin 0 -> 2817 bytes .../Images/machine_icon_none.png | Bin 0 -> 3171 bytes .../Tango.StubsUtils.Service.UI/MainWindow.xaml | 15 + .../Tango.StubsUtils.Service.UI/MainWindow.xaml.cs | 55 ++++ .../Properties/AssemblyInfo.cs | 55 ++++ .../Properties/Resources.Designer.cs | 71 +++++ .../Properties/Resources.resx | 117 ++++++++ .../Properties/Settings.Designer.cs | 30 ++ .../Properties/Settings.settings | 7 + .../Resources/Colors.xaml | 140 +++++++++ .../Resources/Converters.xaml | 45 +++ .../Resources/Fonts.xaml | 14 + .../ServiceUISettings.cs | 13 + .../Tango.StubsUtils.Service.UI.csproj | 183 +++++++++++ .../ViewModels/MainViewVM.cs | 68 +++++ .../Views/MainView.xaml | 144 +++++++++ .../Views/MainView.xaml.cs | 30 ++ .../Tango.StubsUtils.Service.UI/packages.config | 9 + .../Properties/AssemblyInfo.cs | 36 +++ .../Tango.StubsUtils.Service/StubReflection.cs | 49 +++ .../Tango.StubsUtils.Service/StubsService.cs | 334 +++++++++++++++++++++ .../StubsServiceSettings.cs | 19 ++ .../Tango.StubsUtils.Service.csproj | 89 ++++++ .../StubsUtils/Tango.StubsUtils.Service/app.config | 19 ++ .../Tango.StubsUtils.Service/packages.config | 6 + .../Tango.StubsUtils.SessionClient.CLI/App.config | 6 + .../Tango.StubsUtils.SessionClient.CLI/Program.cs | 79 +++++ .../Properties/AssemblyInfo.cs | 36 +++ .../Tango.StubsUtils.SessionClient.CLI.csproj | 59 ++++ .../Properties/AssemblyInfo.cs | 36 +++ .../StubPackageRequestDTO.cs | 14 + .../StubPackageResponseDTO.cs | 20 ++ .../StubPackageResponseStatus.cs | 16 + .../Tango.StubsUtils.Shared.csproj | 50 +++ 49 files changed, 2373 insertions(+) create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/App.config create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Program.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Tango.StubsUtils.Client.CLI.csproj create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/packages.config create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/App.config create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Program.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Tango.StubsUtils.PerformanceTest.CLI.csproj create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.config create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_connected.ico create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_connected.png create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_disconnected.ico create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_disconnected.png create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.png create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Resources.Designer.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Resources.resx create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Settings.Designer.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Settings.settings create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Colors.xaml create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Converters.xaml create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Fonts.xaml create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ServiceUISettings.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Tango.StubsUtils.Service.UI.csproj create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ViewModels/MainViewVM.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/packages.config create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubReflection.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsService.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceSettings.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Tango.StubsUtils.Service.csproj create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/app.config create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/packages.config create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/App.config create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Program.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Tango.StubsUtils.SessionClient.CLI.csproj create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageRequestDTO.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseDTO.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseStatus.cs create mode 100644 Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/Tango.StubsUtils.Shared.csproj (limited to 'Software/Visual_Studio/StubsUtils') diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/App.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/App.config new file mode 100644 index 000000000..731f6de6c --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Program.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Program.cs new file mode 100644 index 000000000..9fd588906 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Program.cs @@ -0,0 +1,66 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.IO.Pipes; +using System.Linq; +using System.Runtime.Serialization.Formatters.Binary; +using System.Text; +using System.Threading.Tasks; +using Tango.StubsUtils.Shared; + +namespace Tango.StubsUtils.Client.CLI +{ + class Program + { + private const string PIPE_NAME = "Tango_Stubs_Server"; + + static void Main(string[] args) + { + StubPackageResponseDTO response = null; + + try + { + var _client = new NamedPipeClientStream(PIPE_NAME); + _client.Connect(5000); + + var writer = new StreamWriter(_client); + + var jsonRequest = String.Join(" ", args); + + writer.WriteLine(jsonRequest); + writer.Flush(); + + var reader = new StreamReader(_client); + String responseString = reader.ReadToEnd(); + response = new StubPackageResponseDTO(); + response.Status = responseString.StartsWith("Status: OK") ? StubPackageResponseStatus.OK : StubPackageResponseStatus.Error; + response.Message = responseString; + } + catch (Exception ex) + { + ExitError($"Error communicating with the stubs service. {ex.Message}"); + } + + if (response.Status == StubPackageResponseStatus.OK) + { + Console.ForegroundColor = ConsoleColor.Gray; + Console.WriteLine(response.Message); + Environment.Exit(0); + } + else + { + ExitError(response.Message); + } + } + + private static void ExitError(String error) + { + Console.ForegroundColor = ConsoleColor.Red; + Console.Error.WriteLine($"{error}"); + Console.ForegroundColor = ConsoleColor.Gray; + Environment.Exit(-1); + } + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..9c1a90a8d --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango.StubsUtils.Client.CLI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.StubsUtils.Client.CLI")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("2ed5d897-df22-491e-8410-d01383b3dad2")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Tango.StubsUtils.Client.CLI.csproj b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Tango.StubsUtils.Client.CLI.csproj new file mode 100644 index 000000000..7bbf4b387 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Tango.StubsUtils.Client.CLI.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {2ED5D897-DF22-491E-8410-D01383B3DAD2} + Exe + Tango.StubsUtils.Client.CLI + tangostub + v4.6.1 + 512 + true + true + + + AnyCPU + true + full + false + ..\..\Build\StubsUtils\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + ..\..\Build\StubsUtils\Release\ + TRACE + prompt + 4 + + + + ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + + + {dae96f06-72cd-411d-90a3-9456ae79f699} + Tango.StubsUtils.Shared + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/packages.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/packages.config new file mode 100644 index 000000000..7ee8c1052 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/App.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/App.config new file mode 100644 index 000000000..731f6de6c --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Program.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Program.cs new file mode 100644 index 000000000..16492a276 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Program.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Tango.StubsUtils.PerformanceTest.CLI +{ + class Program + { + private const int ROUNDS = 10000; + + static void Main(string[] args) + { + List durations = new List(); + + Process process = new Process(); + process.StartInfo.FileName = "tangostub_s.exe"; + process.StartInfo.CreateNoWindow = true; + process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; + process.StartInfo.RedirectStandardOutput = true; + process.StartInfo.RedirectStandardOutput = true; + process.StartInfo.RedirectStandardInput = true; + process.StartInfo.UseShellExecute = false; + process.Start(); + process.PriorityClass = ProcessPriorityClass.RealTime; + + process.StandardOutput.ReadLine(); //Read the first welcome line... + + Stopwatch watch = new Stopwatch(); + + for (int i = 0; i < ROUNDS; i++) + { + watch.Restart(); + + process.StandardInput.WriteLine("calculate 10 15"); + StringBuilder builder = new StringBuilder(); + + char[] buffer = new char[1]; + + while (process.StandardOutput.Read(buffer, 0, 1) > 0) + { + char c = buffer[0]; + + if (c == '\r') + { + process.StandardOutput.Read(); + break; + } + else if (c == '>') + { + process.StandardOutput.Read(); + } + else + { + builder.Append(buffer[0]); + } + } + + String response = builder.ToString(); + + if (response.StartsWith("Status: Error")) + { + OnError(response); + return; + } + + durations.Add(watch.ElapsedMilliseconds); + + Console.SetCursorPosition(0, 0); + Console.Write($"Performance test: {i + 1}/{ROUNDS}, Avg: {Math.Round(durations.Average(), 2)} ms "); + } + + Console.WriteLine(); + Console.WriteLine(); + Console.WriteLine("Completed."); + Console.ReadLine(); + } + + private static void OnError(String error) + { + Console.ForegroundColor = ConsoleColor.Red; + Console.WriteLine(error); + Console.ForegroundColor = ConsoleColor.Gray; + Console.ReadLine(); + } + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..ff6dc5c94 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango.StubsUtils.PerformanceTest.CLI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.StubsUtils.PerformanceTest.CLI")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f423324c-7d0a-4512-beba-df3a931a09f6")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Tango.StubsUtils.PerformanceTest.CLI.csproj b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Tango.StubsUtils.PerformanceTest.CLI.csproj new file mode 100644 index 000000000..f4575043f --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Tango.StubsUtils.PerformanceTest.CLI.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {F423324C-7D0A-4512-BEBA-DF3A931A09F6} + Exe + Tango.StubsUtils.PerformanceTest.CLI + Tango.StubsUtils.PerformanceTest.CLI + v4.6.1 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {2ed5d897-df22-491e-8410-d01383b3dad2} + Tango.StubsUtils.Client.CLI + + + {f1b727f5-adf5-4a81-a740-7e64e48b29d4} + Tango.StubsUtils.SessionClient.CLI + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.config new file mode 100644 index 000000000..6544d52a6 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.config @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml new file mode 100644 index 000000000..4db18888a --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml.cs new file mode 100644 index 000000000..c6f57aad6 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; +using Tango.Settings; + +namespace Tango.StubsUtils.Service.UI +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + ServiceUISettings settings = SettingsManager.Default.GetOrCreate(); + settings.Save(); + } + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_connected.ico b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_connected.ico new file mode 100644 index 000000000..75aba4e9b Binary files /dev/null and b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_connected.ico differ diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_connected.png b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_connected.png new file mode 100644 index 000000000..47dd7d116 Binary files /dev/null and b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_connected.png differ diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_disconnected.ico b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_disconnected.ico new file mode 100644 index 000000000..8b5af1ccb Binary files /dev/null and b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_disconnected.ico differ diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_disconnected.png b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_disconnected.png new file mode 100644 index 000000000..51876421f Binary files /dev/null and b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_disconnected.png differ diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.png b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.png new file mode 100644 index 000000000..95cf615c5 Binary files /dev/null and b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.png differ diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml new file mode 100644 index 000000000..f7113076c --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml @@ -0,0 +1,15 @@ + + + + + diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml.cs new file mode 100644 index 000000000..98a8bd721 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml.cs @@ -0,0 +1,55 @@ +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.StubsUtils.Service.UI.ViewModels; + +namespace Tango.StubsUtils.Service.UI +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : MetroWindow + { + private MainViewVM _mainViewVM; + + public MainWindow() + { + InitializeComponent(); + Loaded += MainWindow_Loaded; + StateChanged += MainWindow_StateChanged; + Closing += MainWindow_Closing; + } + + private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) + { + e.Cancel = true; + _mainViewVM.ExitApplication(); + } + + private void MainWindow_StateChanged(object sender, EventArgs e) + { + if (WindowState == WindowState.Minimized) + { + Visibility = Visibility.Hidden; + _mainViewVM.IsTrayIconVisible = true; + } + } + + private void MainWindow_Loaded(object sender, RoutedEventArgs e) + { + _mainViewVM = MainView.DataContext as MainViewVM; + } + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..4b32746ed --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango.StubsUtils.Service.UI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.StubsUtils.Service.UI")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Resources.Designer.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Resources.Designer.cs new file mode 100644 index 000000000..11234f139 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace Tango.StubsUtils.Service.UI.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // 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() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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.StubsUtils.Service.UI.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [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/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Resources.resx b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Settings.Designer.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Settings.Designer.cs new file mode 100644 index 000000000..d058593f8 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace Tango.StubsUtils.Service.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/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Settings.settings b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Colors.xaml b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Colors.xaml new file mode 100644 index 000000000..48e13f381 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Colors.xaml @@ -0,0 +1,140 @@ + + + + #202020 + #262626 + #303030 + #404040 + #505050 + #EEEEEE + #A0A0A0 + #76000000 + #707070 + #009FE7 + #009FE7 + + #FA2828 + #FF4C4C + #FF914C + #6DFF72 + #404040 + + #FF6F6F + #58C13B + #6DDAFF + #F3FF6D + + #FF6F6F + #8EFF6F + #FF7C2B + #FFB84B + + #18FFFFFF + #B6FF6F6F + #BBFFB84B + #B958C13B + #BBFA9252 + + #7C98B3 + #202020 + #505050 + #303030 + + #202020 + #252525 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #009FE7 + #009FE7 + #009FE7 + #009FE7 + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Converters.xaml b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Converters.xaml new file mode 100644 index 000000000..260fc92ca --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Converters.xaml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Fonts.xaml b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Fonts.xaml new file mode 100644 index 000000000..b5ef75802 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Fonts.xaml @@ -0,0 +1,14 @@ + + + 14 + 12 + 10 + 16 + 18 + 16 + 30 + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ServiceUISettings.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ServiceUISettings.cs new file mode 100644 index 000000000..92f7157ca --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ServiceUISettings.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Settings; + +namespace Tango.StubsUtils.Service.UI +{ + public class ServiceUISettings : SettingsBase + { + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Tango.StubsUtils.Service.UI.csproj b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Tango.StubsUtils.Service.UI.csproj new file mode 100644 index 000000000..c4cdbab42 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Tango.StubsUtils.Service.UI.csproj @@ -0,0 +1,183 @@ + + + + + Debug + AnyCPU + {20AF2BAF-85CD-4437-BC6F-6BA030F984EA} + WinExe + Tango.StubsUtils.Service.UI + Tango.StubsUtils.Service.UI + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + + + AnyCPU + true + full + false + ..\..\Build\StubsUtils\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + ..\..\Build\StubsUtils\Release\ + TRACE + prompt + 4 + + + + ..\..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll + + + ..\..\packages\Hardcodet.NotifyIcon.Wpf.1.0.8\lib\net451\Hardcodet.Wpf.TaskbarNotification.dll + + + ..\..\packages\MahApps.Metro.1.6.5\lib\net46\MahApps.Metro.dll + + + ..\..\packages\MaterialDesignColors.1.2.2\lib\net45\MaterialDesignColors.dll + + + ..\..\packages\MaterialDesignThemes.3.0.1\lib\net45\MaterialDesignThemes.Wpf.dll + + + ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + + + + + ..\..\packages\ControlzEx.3.0.2.4\lib\net45\System.Windows.Interactivity.dll + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + + + MainView.xaml + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + {A34EE0F0-649D-41C8-8489-B6F1CC6924EE} + Tango.Core + + + {bc932dbd-7cdb-488c-99e4-f02cf441f55e} + Tango.Logging + + + {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} + Tango.Settings + + + {8491d07b-c1f6-4b62-a412-41b9fd2d6538} + Tango.SharedUI + + + {452df7f4-bfbf-45b1-9a27-d6b1888ac10b} + Tango.StubsUtils.Service + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ViewModels/MainViewVM.cs new file mode 100644 index 000000000..4e8b144e5 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ViewModels/MainViewVM.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using Tango.Core.Commands; +using Tango.SharedUI; +using Tango.SharedUI.Helpers; + +namespace Tango.StubsUtils.Service.UI.ViewModels +{ + public class MainViewVM : ViewModel + { + private StubsService _service; + public StubsService Service + { + get { return _service; } + set { _service = value; RaisePropertyChangedAuto(); } + } + + private bool _isTrayIconVisible; + public bool IsTrayIconVisible + { + get { return _isTrayIconVisible; } + set { _isTrayIconVisible = value; RaisePropertyChangedAuto(); } + } + + + public RelayCommand ExitCommand { get; set; } + public RelayCommand OpenCommand { get; set; } + + public MainViewVM() + { + Init(); + ExitCommand = new RelayCommand(ExitApplication); + OpenCommand = new RelayCommand(OpenMainWindow); + IsTrayIconVisible = true; + } + + public async void Init() + { + Service = new StubsService(); + await Service.Start(); + + await Task.Delay(10000); + await Service.Connect(); + } + + private async void OpenMainWindow() + { + Application.Current.MainWindow.Visibility = Visibility.Visible; + await Task.Delay(200); + Application.Current.MainWindow.WindowState = WindowState.Normal; + Application.Current.MainWindow.Focus(); + Application.Current.MainWindow.Activate(); + IsTrayIconVisible = false; + } + + public async void ExitApplication() + { + IsTrayIconVisible = false; + UIHelper.DoEvents(); + await Task.Delay(1000); + Environment.Exit(0); + } + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml new file mode 100644 index 000000000..eb2c24e44 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tango Stubs Service + + + + + + + + + + + + + + + + + + + + + + + + + + + Tango Stubs Service + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml.cs new file mode 100644 index 000000000..1c51be6d4 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml.cs @@ -0,0 +1,30 @@ +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.StubsUtils.Service.UI.ViewModels; + +namespace Tango.StubsUtils.Service.UI.Views +{ + /// + /// Interaction logic for MainView.xaml + /// + public partial class MainView : UserControl + { + public MainView() + { + InitializeComponent(); + DataContext = new MainViewVM(); + } + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/packages.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/packages.config new file mode 100644 index 000000000..96b22d216 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/packages.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Properties/AssemblyInfo.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..c0a90674c --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango.StubsUtils.Service")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.StubsUtils.Service")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("452df7f4-bfbf-45b1-9a27-d6b1888ac10b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubReflection.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubReflection.cs new file mode 100644 index 000000000..2b0f237ea --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubReflection.cs @@ -0,0 +1,49 @@ +using FastMember; +using Google.Protobuf; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using Tango.PMR; +using Tango.PMR.Common; + +namespace Tango.StubsUtils.Service +{ + public class StubReflection + { + public Type Type { get; set; } + public MessageType MessageType { get; set; } + public List Properties { get; set; } + public TypeAccessor Accesor { get; set; } + public MessageParser Parser { get; set; } + + public StubReflection() + { + Properties = new List(); + } + + public static StubReflection FromStubName(String stubName, List stubTypes) + { + StubReflection reflection = new StubReflection(); + + var stubType = stubTypes.SingleOrDefault(x => x.Name.ToLower() == stubName.ToLower() || x.Name.Replace("Request", "").ToLower() == stubName.ToLower()); + + if (stubType == null) + { + throw new InvalidOperationException($"Invalid stub name '{stubName}'."); + } + + reflection.Type = stubType; + reflection.MessageType = MessageFactory.ParseMessageType(reflection.Type.Name); + reflection.Properties = stubType.GetProperties(BindingFlags.Public | BindingFlags.Instance).ToList(); + reflection.Accesor = TypeAccessor.Create(stubType); + + var instance = Activator.CreateInstance(stubType); + reflection.Parser = stubType.GetProperty("Parser").GetValue(instance) as MessageParser; + + return reflection; + } + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsService.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsService.cs new file mode 100644 index 000000000..05b2d518c --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsService.cs @@ -0,0 +1,334 @@ +using Google.Protobuf; +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.IO.Pipes; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization.Formatters.Binary; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Tango.Core; +using Tango.Core.ExtensionMethods; +using Tango.Logging; +using Tango.PMR; +using Tango.PMR.Common; +using Tango.Settings; +using Tango.StubsUtils.Shared; +using Tango.Transport; +using Tango.Transport.Adapters; +using Tango.Transport.Transporters; + +namespace Tango.StubsUtils.Service +{ + public class StubsService : ExtendedObject + { + private const string PIPE_NAME = "Tango_Stubs_Server"; + private NamedPipeServerStream _server; + private StreamReader _reader; + private StreamWriter _writer; + private BinaryFormatter _formatter; + private StubsServiceSettings _settings; + private bool _initialized; + private List _stubsTypes; + private Dictionary _stubsLookup; + private Thread _communicationThread; + + #region Properties + + private ITransporter _transporter; + public ITransporter Transporter + { + get { return _transporter; } + private set { _transporter = value; RaisePropertyChangedAuto(); } + } + + private bool _isStarted; + public bool IsStarted + { + get { return _isStarted; } + private set { _isStarted = value; RaisePropertyChangedAuto(); } + } + + private bool _isConnected; + public bool IsConnected + { + get { return _isConnected; } + set { _isConnected = value; RaisePropertyChangedAuto(); } + } + + private bool _enableLogs; + public bool EnableLogs + { + get { return _enableLogs; } + set { _enableLogs = value; RaisePropertyChangedAuto(); } + } + + #endregion + + #region Constructors + + public StubsService() + { + _settings = SettingsManager.Default.GetOrCreate(); + _settings.Save(); + } + + #endregion + + #region Start/Stop + + private void Initialize() + { + if (!_initialized) + { + _stubsTypes = new List(); + _stubsLookup = new Dictionary(); + + foreach (var type in typeof(MessageFactory).Assembly.GetTypes().Where(x => x.Namespace != null && x.Namespace.Contains("Stubs") && (x.Name.Contains("Request") || x.Name.Contains("Response")) && !x.Name.Contains("Reflection")).ToList()) + { + _stubsTypes.Add(type); + } + + _server = new NamedPipeServerStream(PIPE_NAME); + _reader = new StreamReader(_server); + _writer = new StreamWriter(_server); + _formatter = new BinaryFormatter(); + _communicationThread = new Thread(CommunicationMethod); + _communicationThread.IsBackground = true; + _communicationThread.Start(); + + _initialized = true; + } + } + + public Task Start() + { + return Task.Factory.StartNew(() => + { + if (!IsStarted) + { + try + { + LogManager.Log("Starting stubs service..."); + IsStarted = true; + Initialize(); + LogManager.Log("Starting IPC service..."); + } + catch (Exception ex) + { + LogManager.Log(ex, "Error starting stubs service."); + } + } + }); + } + + public Task Stop() + { + return Task.Factory.StartNew(() => + { + if (IsStarted) + { + IsStarted = false; + } + }); + } + + #endregion + + #region Connect/Disconnect + + public async Task Connect() + { + if (!IsStarted) throw new InvalidOperationException("Cannot connect the transporter before the service has started."); + + if (!IsConnected) + { + Transporter = new BasicTransporter(new UsbTransportAdapter(_settings.USBPort)); + Transporter.UseKeepAlive = false; + await Transporter.Connect(); + IsConnected = true; + } + } + + public async Task Disconnect() + { + if (IsConnected) + { + await Transporter.Disconnect(); + } + } + + #endregion + + #region Communication + + private void CommunicationMethod() + { + while (IsStarted) + { + try + { + _server.WaitForConnection(); + var request = _reader.ReadLine(); + + if (EnableLogs) LogManager.Log($"Stub package received: '{request}'..."); + + var package = new StubPackageRequestDTO(); + package.Arguments = request.Split(' '); + + if (EnableLogs) LogManager.Log($"Stub package constructed: '{package.ToJsonString()}'..."); + + var response = ProcessStubPackage(package); + + if (EnableLogs) LogManager.Log($"Stub package response: '{response.ToJsonString()}'..."); + + _writer.Write(response.ToString()); + _writer.Flush(); + } + catch (Exception ex) + { + if (EnableLogs) LogManager.Log(ex, "Error processing stub package."); + + try + { + var response = new StubPackageResponseDTO() + { + Status = StubPackageResponseStatus.Error, + Message = $"Error processing stub package\n{ex.FlattenMessage()}" + }; + + _writer.WriteLine(response.ToString()); + _writer.Flush(); + _server.Disconnect(); + } + catch { } + } + finally + { + _server.Disconnect(); + } + } + } + + #endregion + + #region Process Package + + private StubPackageResponseDTO ProcessStubPackage(StubPackageRequestDTO package) + { + StubPackageResponseDTO response = new StubPackageResponseDTO(); + + if (Transporter == null || Transporter.State != TransportComponentState.Connected) + { + response.Status = StubPackageResponseStatus.NoConnection; + response.Message = "Machine is disconnected."; + return response; + } + + try + { + if (EnableLogs) LogManager.Log("Processing package..."); + + String stubName = package.Arguments[0]; + List arguments = package.Arguments.Skip(1).ToList(); + + StubReflection stubReflection = GetStubReflection(stubName); + + MessageContainer requestContainer = new MessageContainer(); + requestContainer.Token = Guid.NewGuid().ToString(); + requestContainer.Type = stubReflection.MessageType; + + IMessage request = Activator.CreateInstance(stubReflection.Type) as IMessage; + + for (int i = 0; i < arguments.Count; i++) + { + String argument = arguments[i]; + + if (i >= stubReflection.Properties.Count) + { + throw new ArgumentOutOfRangeException($"Argument '{argument}' index is out of range for stub '{stubReflection.Type.Name}'."); + } + + PropertyInfo prop = stubReflection.Properties[i]; + + if (prop.PropertyType == typeof(UInt32)) + { + prop.SetValue(request, UInt32.Parse(argument)); + } + else if (prop.PropertyType == typeof(bool)) + { + prop.SetValue(request, bool.Parse(argument)); + } + else if (typeof(IList).IsAssignableFrom(prop.PropertyType)) + { + IList arr = prop.GetValue(request) as IList; + foreach (var item in argument.Split(',')) + { + object converted = Convert.ChangeType(item, prop.PropertyType.GetGenericArguments()[0]); + arr.Add(converted); + } + } + else + { + object converted = Convert.ChangeType(argument, prop.PropertyType); + prop.SetValue(request, converted); + } + } + + if (EnableLogs) LogManager.Log($"Request stub constructed:\n{request.ToJsonString()}"); + + requestContainer.Data = request.ToByteString(); + var responseContainer = Transporter.SendRequest(requestContainer, new TransportRequestConfig() { ThreadingMode = TransportThreadingMode.ThreadPool }).Result; + + var stubResponseReflection = GetStubReflection(responseContainer.Type.ToOriginalName()); + IMessage stubResponse = stubResponseReflection.Parser.ParseFrom(responseContainer.Data); + + String responseMessage = String.Empty; + + foreach (var prop in stubResponseReflection.Properties) + { + responseMessage += $"{prop.Name}: {prop.GetValue(stubResponse).ToStringSafe()}\n"; + } + + if (EnableLogs) + { + String responseJson = stubResponse.ToJsonString(); + LogManager.Log($"Response:\n{stubResponse}"); + } + + response.Status = StubPackageResponseStatus.OK; + response.Message = responseMessage; + } + catch (Exception ex) + { + LogManager.Log(ex, "Error processing stub package."); + response.Status = StubPackageResponseStatus.Error; + response.Message = ex.FlattenMessage(); + } + + return response; + } + + #endregion + + #region Helper Methods + + private StubReflection GetStubReflection(String stubName) + { + if (_stubsLookup.ContainsKey(stubName)) + { + return _stubsLookup[stubName]; + } + + var stubReflection = StubReflection.FromStubName(stubName, _stubsTypes); + _stubsLookup[stubName] = stubReflection; + return stubReflection; + } + + #endregion + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceSettings.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceSettings.cs new file mode 100644 index 000000000..8741065cf --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceSettings.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Settings; + +namespace Tango.StubsUtils.Service +{ + public class StubsServiceSettings : SettingsBase + { + public String USBPort { get; set; } + + public StubsServiceSettings() + { + USBPort = "COM1"; + } + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Tango.StubsUtils.Service.csproj b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Tango.StubsUtils.Service.csproj new file mode 100644 index 000000000..40ec9d29f --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Tango.StubsUtils.Service.csproj @@ -0,0 +1,89 @@ + + + + + Debug + AnyCPU + {452DF7F4-BFBF-45B1-9A27-D6B1888AC10B} + Library + Properties + Tango.StubsUtils.Service + Tango.StubsUtils.Service + v4.6.1 + 512 + true + + + true + full + false + ..\..\Build\StubsUtils\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\Build\StubsUtils\Release\ + TRACE + prompt + 4 + + + + ..\..\packages\FastMember.1.5.0\lib\net461\FastMember.dll + + + ..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll + + + ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} + Tango.Core + + + {bc932dbd-7cdb-488c-99e4-f02cf441f55e} + Tango.Logging + + + {e4927038-348d-4295-aaf4-861c58cb3943} + Tango.PMR + + + {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} + Tango.Settings + + + {74e700b0-1156-4126-be40-ee450d3c3026} + Tango.Transport + + + {dae96f06-72cd-411d-90a3-9456ae79f699} + Tango.StubsUtils.Shared + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/app.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/app.config new file mode 100644 index 000000000..f63670818 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/app.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/packages.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/packages.config new file mode 100644 index 000000000..52834fea3 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/App.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/App.config new file mode 100644 index 000000000..731f6de6c --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Program.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Program.cs new file mode 100644 index 000000000..b72e15236 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Program.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.IO.Pipes; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.StubsUtils.Shared; + +namespace Tango.StubsUtils.SessionClient.CLI +{ + class Program + { + private const string PIPE_NAME = "Tango_Stubs_Server"; + + static void Main(string[] args) + { + String line = String.Empty; + + Console.WriteLine("Tango Stub Session Client v1.0"); + + while (true) + { + Console.Write("> "); + line = Console.ReadLine(); + + if (line.ToLower() == "exit") + { + Environment.Exit(0); + } + + args = line.Split(' '); + + StubPackageResponseDTO response = null; + + try + { + var _client = new NamedPipeClientStream(PIPE_NAME); + _client.Connect(5000); + + var writer = new StreamWriter(_client); + + var jsonRequest = String.Join(" ", args); + + writer.WriteLine(jsonRequest); + writer.Flush(); + + var reader = new StreamReader(_client); + String responseString = reader.ReadToEnd(); + response = new StubPackageResponseDTO(); + response.Status = responseString.StartsWith("Status: OK") ? StubPackageResponseStatus.OK : StubPackageResponseStatus.Error; + response.Message = responseString; + } + catch (Exception ex) + { + OnError($"Error communicating with the stubs service. {ex.Message}"); + } + + if (response.Status == StubPackageResponseStatus.OK) + { + Console.ForegroundColor = ConsoleColor.Gray; + Console.WriteLine(response.Message); + } + else + { + OnError(response.Message); + } + } + } + + private static void OnError(String error) + { + Console.ForegroundColor = ConsoleColor.Red; + Console.WriteLine($"{error}"); + Console.ForegroundColor = ConsoleColor.Gray; + } + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..14f843bcf --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango.StubsUtils.SessionClient.CLI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.StubsUtils.SessionClient.CLI")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f1b727f5-adf5-4a81-a740-7e64e48b29d4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Tango.StubsUtils.SessionClient.CLI.csproj b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Tango.StubsUtils.SessionClient.CLI.csproj new file mode 100644 index 000000000..6ccf31b7b --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Tango.StubsUtils.SessionClient.CLI.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {F1B727F5-ADF5-4A81-A740-7E64E48B29D4} + Exe + Tango.StubsUtils.SessionClient.CLI + tangostub_s + v4.6.1 + 512 + true + true + + + AnyCPU + true + full + false + ..\..\Build\StubsUtils\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + ..\..\Build\StubsUtils\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {dae96f06-72cd-411d-90a3-9456ae79f699} + Tango.StubsUtils.Shared + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/Properties/AssemblyInfo.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..aad82fef6 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango.StubsUtils.Shared")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.StubsUtils.Shared")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("dae96f06-72cd-411d-90a3-9456ae79f699")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageRequestDTO.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageRequestDTO.cs new file mode 100644 index 000000000..625fe931b --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageRequestDTO.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.StubsUtils.Shared +{ + [Serializable] + public class StubPackageRequestDTO + { + public string[] Arguments { get; set; } + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseDTO.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseDTO.cs new file mode 100644 index 000000000..b020c4f84 --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseDTO.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.StubsUtils.Shared +{ + [Serializable] + public class StubPackageResponseDTO + { + public StubPackageResponseStatus Status { get; set; } + public String Message { get; set; } + + public override string ToString() + { + return $"Status: {Status}\n{Message}"; + } + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseStatus.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseStatus.cs new file mode 100644 index 000000000..4edd47d6c --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseStatus.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.StubsUtils.Shared +{ + [Serializable] + public enum StubPackageResponseStatus + { + OK, + Error, + NoConnection + } +} diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/Tango.StubsUtils.Shared.csproj b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/Tango.StubsUtils.Shared.csproj new file mode 100644 index 000000000..a7b58f6ea --- /dev/null +++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/Tango.StubsUtils.Shared.csproj @@ -0,0 +1,50 @@ + + + + + Debug + AnyCPU + {DAE96F06-72CD-411D-90A3-9456AE79F699} + Library + Properties + Tango.StubsUtils.Shared + Tango.StubsUtils.Shared + v4.6.1 + 512 + true + + + true + full + false + ..\..\Build\StubsUtils\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\Build\StubsUtils\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.3.1