diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-05-09 14:55:00 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-05-09 14:55:00 +0300 |
| commit | 2a459c79e90a2ade3f1dac1ae4541c0f4d74965c (patch) | |
| tree | 969943c6a06d99ff472f24bb1d37e7fe2913bfdf /Software/Visual_Studio | |
| parent | 67255998056910f53640e11e634cfdbbd7f6880c (diff) | |
| download | Tango-2a459c79e90a2ade3f1dac1ae4541c0f4d74965c.tar.gz Tango-2a459c79e90a2ade3f1dac1ae4541c0f4d74965c.zip | |
Stubs UI v1.4
Diffstat (limited to 'Software/Visual_Studio')
13 files changed, 518 insertions, 962 deletions
diff --git a/Software/Visual_Studio/SideChains/ICSharpCode.AvalonEdit/Highlighting/Resources/CSharp-Mode.xshd b/Software/Visual_Studio/SideChains/ICSharpCode.AvalonEdit/Highlighting/Resources/CSharp-Mode.xshd index 43f0d529f..40eecf1db 100644 --- a/Software/Visual_Studio/SideChains/ICSharpCode.AvalonEdit/Highlighting/Resources/CSharp-Mode.xshd +++ b/Software/Visual_Studio/SideChains/ICSharpCode.AvalonEdit/Highlighting/Resources/CSharp-Mode.xshd @@ -126,6 +126,7 @@ <Word>StubManager</Word> <Word>Int32</Word> <Word>Double</Word> + <Word>include</Word> </Keywords> <Keywords color="ThisOrBaseReference"> diff --git a/Software/Visual_Studio/Tango.Core/IO/ITemporaryItem.cs b/Software/Visual_Studio/Tango.Core/IO/ITemporaryItem.cs new file mode 100644 index 000000000..ebfc70e60 --- /dev/null +++ b/Software/Visual_Studio/Tango.Core/IO/ITemporaryItem.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Core.IO +{ + public interface ITemporaryItem + { + DateTime Date { get; } + String Path { get; } + IReadOnlyCollection<ITemporaryItem> Items { get; } + void AddItem(ITemporaryItem item); + void RemoveItem(ITemporaryItem item); + void Delete(); + } +} diff --git a/Software/Visual_Studio/Tango.Core/IO/TemporaryFile.cs b/Software/Visual_Studio/Tango.Core/IO/TemporaryFile.cs new file mode 100644 index 000000000..4e119875e --- /dev/null +++ b/Software/Visual_Studio/Tango.Core/IO/TemporaryFile.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Core.IO +{ + public class TemporaryFile + { + + } +} diff --git a/Software/Visual_Studio/Tango.Core/IO/TemporaryFileManager.cs b/Software/Visual_Studio/Tango.Core/IO/TemporaryFileManager.cs new file mode 100644 index 000000000..a4ff8fa27 --- /dev/null +++ b/Software/Visual_Studio/Tango.Core/IO/TemporaryFileManager.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Core.IO +{ + /// <summary> + /// Represents the Tango system temporary file manager. + /// </summary> + public class TemporaryFileManager + { + #region Singleton + + private static TemporaryFileManager _default; + public static TemporaryFileManager Default + { + get + { + if (_default == null) + { + _default = new TemporaryFileManager(); + } + + return _default; + } + } + + private TemporaryFileManager() + { + + } + + #endregion + + + } +} diff --git a/Software/Visual_Studio/Tango.Core/IO/TemporaryItem.cs b/Software/Visual_Studio/Tango.Core/IO/TemporaryItem.cs new file mode 100644 index 000000000..46464bf15 --- /dev/null +++ b/Software/Visual_Studio/Tango.Core/IO/TemporaryItem.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Collections.ObjectModel; + +namespace Tango.Core.IO +{ + public abstract class TemporaryItem : ITemporaryItem + { + public DateTime Date { get; protected set; } + public abstract string Path { get; protected set; } + public abstract IReadOnlyCollection<ITemporaryItem> Items { get; protected set; } + + public virtual void AddItem(ITemporaryItem item) + { + var list = Items.ToList(); + list.Add(item); + + //IReadOnlyCollection<String> s = new ReadOnlyCollection<String>(); + } + + public virtual void Delete() + { + + } + + public virtual void RemoveItem(ITemporaryItem item) + { + + } + } +} diff --git a/Software/Visual_Studio/Tango.Core/Tango.Core.csproj b/Software/Visual_Studio/Tango.Core/Tango.Core.csproj index 648137190..7063f4d86 100644 --- a/Software/Visual_Studio/Tango.Core/Tango.Core.csproj +++ b/Software/Visual_Studio/Tango.Core/Tango.Core.csproj @@ -90,6 +90,10 @@ <Compile Include="Helpers\FileHelper.cs" /> <Compile Include="Helpers\PathHelper.cs" /> <Compile Include="Helpers\ThreadsHelper.cs" /> + <Compile Include="IO\ITemporaryItem.cs" /> + <Compile Include="IO\TemporaryFile.cs" /> + <Compile Include="IO\TemporaryFileManager.cs" /> + <Compile Include="IO\TemporaryItem.cs" /> <Compile Include="IParameterized.cs" /> <Compile Include="Json\HtmlContractResolver.cs" /> <Compile Include="Json\DynamicContractResolver.cs" /> diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorInitRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorInitRequest.cs index 65fe8d524..73855c461 100644 --- a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorInitRequest.cs +++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorInitRequest.cs @@ -23,16 +23,20 @@ namespace Tango.PMR.Stubs { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChpTdHViTW90b3JJbml0UmVxdWVzdC5wcm90bxIPVGFuZ28uUE1SLlN0dWJz", - "IrwBChRTdHViTW90b3JJbml0UmVxdWVzdBIQCghNb3Rvcl9JRBgBIAEoDRIT", + "IpoDChRTdHViTW90b3JJbml0UmVxdWVzdBIQCghNb3Rvcl9JRBgBIAEoDRIT", "CgtNaWNyb19TdGVwcxgCIAEoDRIXCg9TZXRfTWljcm9fU3RlcHMYAyABKAgS", "CwoDQUNDGAQgASgNEg8KB1NldF9BQ0MYBSABKAgSCwoDREVDGAYgASgNEg8K", "B1NldF9EZWMYByABKAgSEQoJTWF4X1NwZWVkGAggASgNEhUKDVNldF9NYXhf", - "U3BlZWQYCSABKAhCGwoZY29tLnR3aW5lLnRhbmdvLnBtci5zdHVic2IGcHJv", - "dG8z")); + "U3BlZWQYCSABKAgSGgoSTWluX1NwZWVkX0xTUERfT1BUGAogASgNEh4KFlNl", + "dF9NaW5fU3BlZWRfTFNQRF9PUFQYCyABKAgSDgoGQ29uZmlnGAwgASgNEhEK", + "CUtWQUxfSE9MRBgNIAEoDRIQCghLVkFMX1JVThgOIAEoDRIQCghLVkFMX0FD", + "QxgPIAEoDRIQCghLVkFMX0RFQxgQIAEoDRIOCgZTVF9TTFAYESABKA0SDwoH", + "SU5UX1NQRBgSIAEoDRISCgpGTl9TTFBfQUNDGBMgASgNEhIKCkZOX1NMUF9E", + "RUMYFCABKA1CGwoZY29tLnR3aW5lLnRhbmdvLnBtci5zdHVic2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorInitRequest), global::Tango.PMR.Stubs.StubMotorInitRequest.Parser, new[]{ "MotorID", "MicroSteps", "SetMicroSteps", "ACC", "SetACC", "DEC", "SetDec", "MaxSpeed", "SetMaxSpeed" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorInitRequest), global::Tango.PMR.Stubs.StubMotorInitRequest.Parser, new[]{ "MotorID", "MicroSteps", "SetMicroSteps", "ACC", "SetACC", "DEC", "SetDec", "MaxSpeed", "SetMaxSpeed", "MinSpeedLSPDOPT", "SetMinSpeedLSPDOPT", "Config", "KVALHOLD", "KVALRUN", "KVALACC", "KVALDEC", "STSLP", "INTSPD", "FNSLPACC", "FNSLPDEC" }, null, null, null) })); } #endregion @@ -72,6 +76,17 @@ namespace Tango.PMR.Stubs { setDec_ = other.setDec_; maxSpeed_ = other.maxSpeed_; setMaxSpeed_ = other.setMaxSpeed_; + minSpeedLSPDOPT_ = other.minSpeedLSPDOPT_; + setMinSpeedLSPDOPT_ = other.setMinSpeedLSPDOPT_; + config_ = other.config_; + kVALHOLD_ = other.kVALHOLD_; + kVALRUN_ = other.kVALRUN_; + kVALACC_ = other.kVALACC_; + kVALDEC_ = other.kVALDEC_; + sTSLP_ = other.sTSLP_; + iNTSPD_ = other.iNTSPD_; + fNSLPACC_ = other.fNSLPACC_; + fNSLPDEC_ = other.fNSLPDEC_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -181,6 +196,127 @@ namespace Tango.PMR.Stubs { } } + /// <summary>Field number for the "Min_Speed_LSPD_OPT" field.</summary> + public const int MinSpeedLSPDOPTFieldNumber = 10; + private uint minSpeedLSPDOPT_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint MinSpeedLSPDOPT { + get { return minSpeedLSPDOPT_; } + set { + minSpeedLSPDOPT_ = value; + } + } + + /// <summary>Field number for the "Set_Min_Speed_LSPD_OPT" field.</summary> + public const int SetMinSpeedLSPDOPTFieldNumber = 11; + private bool setMinSpeedLSPDOPT_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool SetMinSpeedLSPDOPT { + get { return setMinSpeedLSPDOPT_; } + set { + setMinSpeedLSPDOPT_ = value; + } + } + + /// <summary>Field number for the "Config" field.</summary> + public const int ConfigFieldNumber = 12; + private uint config_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Config { + get { return config_; } + set { + config_ = value; + } + } + + /// <summary>Field number for the "KVAL_HOLD" field.</summary> + public const int KVALHOLDFieldNumber = 13; + private uint kVALHOLD_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint KVALHOLD { + get { return kVALHOLD_; } + set { + kVALHOLD_ = value; + } + } + + /// <summary>Field number for the "KVAL_RUN" field.</summary> + public const int KVALRUNFieldNumber = 14; + private uint kVALRUN_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint KVALRUN { + get { return kVALRUN_; } + set { + kVALRUN_ = value; + } + } + + /// <summary>Field number for the "KVAL_ACC" field.</summary> + public const int KVALACCFieldNumber = 15; + private uint kVALACC_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint KVALACC { + get { return kVALACC_; } + set { + kVALACC_ = value; + } + } + + /// <summary>Field number for the "KVAL_DEC" field.</summary> + public const int KVALDECFieldNumber = 16; + private uint kVALDEC_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint KVALDEC { + get { return kVALDEC_; } + set { + kVALDEC_ = value; + } + } + + /// <summary>Field number for the "ST_SLP" field.</summary> + public const int STSLPFieldNumber = 17; + private uint sTSLP_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint STSLP { + get { return sTSLP_; } + set { + sTSLP_ = value; + } + } + + /// <summary>Field number for the "INT_SPD" field.</summary> + public const int INTSPDFieldNumber = 18; + private uint iNTSPD_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint INTSPD { + get { return iNTSPD_; } + set { + iNTSPD_ = value; + } + } + + /// <summary>Field number for the "FN_SLP_ACC" field.</summary> + public const int FNSLPACCFieldNumber = 19; + private uint fNSLPACC_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint FNSLPACC { + get { return fNSLPACC_; } + set { + fNSLPACC_ = value; + } + } + + /// <summary>Field number for the "FN_SLP_DEC" field.</summary> + public const int FNSLPDECFieldNumber = 20; + private uint fNSLPDEC_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint FNSLPDEC { + get { return fNSLPDEC_; } + set { + fNSLPDEC_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as StubMotorInitRequest); @@ -203,6 +339,17 @@ namespace Tango.PMR.Stubs { if (SetDec != other.SetDec) return false; if (MaxSpeed != other.MaxSpeed) return false; if (SetMaxSpeed != other.SetMaxSpeed) return false; + if (MinSpeedLSPDOPT != other.MinSpeedLSPDOPT) return false; + if (SetMinSpeedLSPDOPT != other.SetMinSpeedLSPDOPT) return false; + if (Config != other.Config) return false; + if (KVALHOLD != other.KVALHOLD) return false; + if (KVALRUN != other.KVALRUN) return false; + if (KVALACC != other.KVALACC) return false; + if (KVALDEC != other.KVALDEC) return false; + if (STSLP != other.STSLP) return false; + if (INTSPD != other.INTSPD) return false; + if (FNSLPACC != other.FNSLPACC) return false; + if (FNSLPDEC != other.FNSLPDEC) return false; return true; } @@ -218,6 +365,17 @@ namespace Tango.PMR.Stubs { if (SetDec != false) hash ^= SetDec.GetHashCode(); if (MaxSpeed != 0) hash ^= MaxSpeed.GetHashCode(); if (SetMaxSpeed != false) hash ^= SetMaxSpeed.GetHashCode(); + if (MinSpeedLSPDOPT != 0) hash ^= MinSpeedLSPDOPT.GetHashCode(); + if (SetMinSpeedLSPDOPT != false) hash ^= SetMinSpeedLSPDOPT.GetHashCode(); + if (Config != 0) hash ^= Config.GetHashCode(); + if (KVALHOLD != 0) hash ^= KVALHOLD.GetHashCode(); + if (KVALRUN != 0) hash ^= KVALRUN.GetHashCode(); + if (KVALACC != 0) hash ^= KVALACC.GetHashCode(); + if (KVALDEC != 0) hash ^= KVALDEC.GetHashCode(); + if (STSLP != 0) hash ^= STSLP.GetHashCode(); + if (INTSPD != 0) hash ^= INTSPD.GetHashCode(); + if (FNSLPACC != 0) hash ^= FNSLPACC.GetHashCode(); + if (FNSLPDEC != 0) hash ^= FNSLPDEC.GetHashCode(); return hash; } @@ -264,6 +422,50 @@ namespace Tango.PMR.Stubs { output.WriteRawTag(72); output.WriteBool(SetMaxSpeed); } + if (MinSpeedLSPDOPT != 0) { + output.WriteRawTag(80); + output.WriteUInt32(MinSpeedLSPDOPT); + } + if (SetMinSpeedLSPDOPT != false) { + output.WriteRawTag(88); + output.WriteBool(SetMinSpeedLSPDOPT); + } + if (Config != 0) { + output.WriteRawTag(96); + output.WriteUInt32(Config); + } + if (KVALHOLD != 0) { + output.WriteRawTag(104); + output.WriteUInt32(KVALHOLD); + } + if (KVALRUN != 0) { + output.WriteRawTag(112); + output.WriteUInt32(KVALRUN); + } + if (KVALACC != 0) { + output.WriteRawTag(120); + output.WriteUInt32(KVALACC); + } + if (KVALDEC != 0) { + output.WriteRawTag(128, 1); + output.WriteUInt32(KVALDEC); + } + if (STSLP != 0) { + output.WriteRawTag(136, 1); + output.WriteUInt32(STSLP); + } + if (INTSPD != 0) { + output.WriteRawTag(144, 1); + output.WriteUInt32(INTSPD); + } + if (FNSLPACC != 0) { + output.WriteRawTag(152, 1); + output.WriteUInt32(FNSLPACC); + } + if (FNSLPDEC != 0) { + output.WriteRawTag(160, 1); + output.WriteUInt32(FNSLPDEC); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -296,6 +498,39 @@ namespace Tango.PMR.Stubs { if (SetMaxSpeed != false) { size += 1 + 1; } + if (MinSpeedLSPDOPT != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MinSpeedLSPDOPT); + } + if (SetMinSpeedLSPDOPT != false) { + size += 1 + 1; + } + if (Config != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Config); + } + if (KVALHOLD != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(KVALHOLD); + } + if (KVALRUN != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(KVALRUN); + } + if (KVALACC != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(KVALACC); + } + if (KVALDEC != 0) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(KVALDEC); + } + if (STSLP != 0) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(STSLP); + } + if (INTSPD != 0) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(INTSPD); + } + if (FNSLPACC != 0) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(FNSLPACC); + } + if (FNSLPDEC != 0) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(FNSLPDEC); + } return size; } @@ -331,6 +566,39 @@ namespace Tango.PMR.Stubs { if (other.SetMaxSpeed != false) { SetMaxSpeed = other.SetMaxSpeed; } + if (other.MinSpeedLSPDOPT != 0) { + MinSpeedLSPDOPT = other.MinSpeedLSPDOPT; + } + if (other.SetMinSpeedLSPDOPT != false) { + SetMinSpeedLSPDOPT = other.SetMinSpeedLSPDOPT; + } + if (other.Config != 0) { + Config = other.Config; + } + if (other.KVALHOLD != 0) { + KVALHOLD = other.KVALHOLD; + } + if (other.KVALRUN != 0) { + KVALRUN = other.KVALRUN; + } + if (other.KVALACC != 0) { + KVALACC = other.KVALACC; + } + if (other.KVALDEC != 0) { + KVALDEC = other.KVALDEC; + } + if (other.STSLP != 0) { + STSLP = other.STSLP; + } + if (other.INTSPD != 0) { + INTSPD = other.INTSPD; + } + if (other.FNSLPACC != 0) { + FNSLPACC = other.FNSLPACC; + } + if (other.FNSLPDEC != 0) { + FNSLPDEC = other.FNSLPDEC; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -377,6 +645,50 @@ namespace Tango.PMR.Stubs { SetMaxSpeed = input.ReadBool(); break; } + case 80: { + MinSpeedLSPDOPT = input.ReadUInt32(); + break; + } + case 88: { + SetMinSpeedLSPDOPT = input.ReadBool(); + break; + } + case 96: { + Config = input.ReadUInt32(); + break; + } + case 104: { + KVALHOLD = input.ReadUInt32(); + break; + } + case 112: { + KVALRUN = input.ReadUInt32(); + break; + } + case 120: { + KVALACC = input.ReadUInt32(); + break; + } + case 128: { + KVALDEC = input.ReadUInt32(); + break; + } + case 136: { + STSLP = input.ReadUInt32(); + break; + } + case 144: { + INTSPD = input.ReadUInt32(); + break; + } + case 152: { + FNSLPACC = input.ReadUInt32(); + break; + } + case 160: { + FNSLPDEC = input.ReadUInt32(); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.Scripting/ScriptEngine.cs b/Software/Visual_Studio/Tango.Scripting/ScriptEngine.cs index 745e694b1..fdd4a0889 100644 --- a/Software/Visual_Studio/Tango.Scripting/ScriptEngine.cs +++ b/Software/Visual_Studio/Tango.Scripting/ScriptEngine.cs @@ -3,6 +3,7 @@ using Microsoft.CodeAnalysis.CSharp.Scripting; using Microsoft.CodeAnalysis.Scripting; using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Reflection; using System.Text; @@ -36,8 +37,17 @@ namespace Tango.Scripting /// </summary> /// <param name="code">The code.</param> /// <returns></returns> - public async Task Run(String code) + public async Task Run(String code, String workingFolder) { + try + { + code = ReplaceIncludes(code, workingFolder); + } + catch (Exception ex) + { + throw ex; + } + var options = CreateOptions(); String methodParameters = CreateMethodParameters(); @@ -51,10 +61,19 @@ namespace Tango.Scripting "await Task.Factory.StartNew(() => { OnExecute(" + methodParameters + "); });", options: options, globals: _onExecuteParameters, cancellationToken: _cancaller.Token); } - public Task<List<CompilerError>> Compile(String code) + public Task<List<CompilerError>> Compile(String code, String workingFolder) { return Task.Factory.StartNew<List<CompilerError>>(() => { + try + { + code = ReplaceIncludes(code, workingFolder); + } + catch (Exception ex) + { + return new List<CompilerError>() { new CompilerError() { Error = ex.Message } }; + } + var options = CreateOptions(); String methodParameters = CreateMethodParameters(); @@ -78,6 +97,63 @@ namespace Tango.Scripting return String.Join(", ", _onExecuteParameters.GetType().GetFields(BindingFlags.Public | BindingFlags.Instance).Select(x => x.Name)); } + private String ReplaceIncludes(String code, String workingFolder) + { + if (Directory.Exists(workingFolder)) + { + Environment.CurrentDirectory = workingFolder; + } + + List<String> lines = code.ToLines(); + + for (int i = 0; i < lines.Count; i++) + { + var line = lines[i]; + + if (line.Trim().StartsWith("include")) + { + String path = line.Replace("include", "").Trim().Replace("\"", ""); + + if (!File.Exists(path)) + { + throw new FileNotFoundException("Could not locate include file '" + path + "'."); + } + + String content = ReplaceIncludes(File.ReadAllText(path), Path.GetDirectoryName(path)); + + if (content.Contains("OnExecute(")) + { + throw new InvalidProgramException(String.Format("Include file '{0}' contains and OnExecute method. Please remove it before trying to compile.", path)); + } + + lines[i] = content; + } + } + + code = ClearnUsings(String.Join(Environment.NewLine, lines)); + + return code; + } + + private String ClearnUsings(String code) + { + List<String> usings = new List<string>(); + + List<String> lines = code.ToLines(); + + foreach (var line in lines) + { + if (line.Trim().StartsWith("using")) + { + usings.Add(line); + } + } + + lines.RemoveAll(x => x.Trim().StartsWith("using")); + + return String.Join(Environment.NewLine, usings.Distinct()) + String.Join(Environment.NewLine, lines); + } + private ScriptOptions CreateOptions() { //My References. diff --git a/Software/Visual_Studio/Tango.Scripting/Tango.Scripting.csproj b/Software/Visual_Studio/Tango.Scripting/Tango.Scripting.csproj index f9842aeff..16bff8c03 100644 --- a/Software/Visual_Studio/Tango.Scripting/Tango.Scripting.csproj +++ b/Software/Visual_Studio/Tango.Scripting/Tango.Scripting.csproj @@ -157,6 +157,12 @@ <ItemGroup> <None Include="FodyWeavers.xml" /> </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="..\packages\Fody.2.0.0\build\dotnet\Fody.targets" Condition="Exists('..\packages\Fody.2.0.0\build\dotnet\Fody.targets')" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> diff --git a/Software/Visual_Studio/Tango.SharedUI/CSharp-Mode.xshd b/Software/Visual_Studio/Tango.SharedUI/CSharp-Mode.xshd index a6b997d55..cb2520461 100644 --- a/Software/Visual_Studio/Tango.SharedUI/CSharp-Mode.xshd +++ b/Software/Visual_Studio/Tango.SharedUI/CSharp-Mode.xshd @@ -259,6 +259,7 @@ <Keywords color="NamespaceKeywords"> <Word>namespace</Word> <Word>using</Word> + <Word>include</Word> </Keywords> <Keywords color="GetSetAddRemove"> diff --git a/Software/Visual_Studio/Tango.UnitTesting/Helper.cs b/Software/Visual_Studio/Tango.UnitTesting/Helper.cs index 8a4cd57e8..e09b17149 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/Helper.cs +++ b/Software/Visual_Studio/Tango.UnitTesting/Helper.cs @@ -57,7 +57,7 @@ namespace Tango.UnitTesting /// </summary> public static ConsoleLogger InitializeLogging(bool useConsole = false, [CallerMemberName] string testName = null) { - LogManager.Default.RegisterLogger(new FileLogger(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Twine", "Tango", "logs", "Unit Testing", testName + ".txt"))); + LogManager.Default.RegisterLogger(new FileLogger(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Twine", "Tango", "logs", "Unit Testing"),"Unit_Testing")); if (useConsole) { var consoleLogger = new ConsoleLogger(testName); diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj b/Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj index 1a3c8bfd0..9204ecd02 100644 --- a/Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj +++ b/Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj @@ -39,418 +39,28 @@ } "Entry" { - "MsmKey" = "8:_2DC8C87C2D90158064A700C697B49957" - "OwnerKey" = "8:_25CD57B9CA3242F18E33F548DDB13C14" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_2DC8C87C2D90158064A700C697B49957" - "OwnerKey" = "8:_E6DED22BB43E475B9794561C384D2713" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_2DC8C87C2D90158064A700C697B49957" - "OwnerKey" = "8:_92474495A2F0D65A21D2BFF4587358D8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_2DC8C87C2D90158064A700C697B49957" - "OwnerKey" = "8:_94CDF51D67BB69C2699CEC4485EBCA30" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_2DC8C87C2D90158064A700C697B49957" - "OwnerKey" = "8:_5397E5B2CD05015FD556CF7136D97D21" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_2DC8C87C2D90158064A700C697B49957" - "OwnerKey" = "8:_F35F069FCC8C9B6808AAD45B8039A4FB" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_2DC8C87C2D90158064A700C697B49957" - "OwnerKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_5397E5B2CD05015FD556CF7136D97D21" - "OwnerKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_5397E5B2CD05015FD556CF7136D97D21" - "OwnerKey" = "8:_E6DED22BB43E475B9794561C384D2713" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_5397E5B2CD05015FD556CF7136D97D21" - "OwnerKey" = "8:_92474495A2F0D65A21D2BFF4587358D8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_5397E5B2CD05015FD556CF7136D97D21" - "OwnerKey" = "8:_94CDF51D67BB69C2699CEC4485EBCA30" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_6290C6253BE08D5AEAF445DC538F5A32" - "OwnerKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_6290C6253BE08D5AEAF445DC538F5A32" - "OwnerKey" = "8:_8F0D060313A40E3D6C4B196C5819AA1F" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_65CE51F98CEBE9E3D46589DB414FAA93" - "OwnerKey" = "8:_9E54529BF03690F97BEE24C45258265B" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_65CE51F98CEBE9E3D46589DB414FAA93" - "OwnerKey" = "8:_72B65244C4FF9BF01D372402C3CE52C5" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_72B65244C4FF9BF01D372402C3CE52C5" - "OwnerKey" = "8:_92474495A2F0D65A21D2BFF4587358D8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_78C9B7DB89C8CFF3E6F812DBDAF18DC7" - "OwnerKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_8B8BABD8173D326B3175B52925968439" - "OwnerKey" = "8:_78C9B7DB89C8CFF3E6F812DBDAF18DC7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_8F0D060313A40E3D6C4B196C5819AA1F" - "OwnerKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_92474495A2F0D65A21D2BFF4587358D8" - "OwnerKey" = "8:_94CDF51D67BB69C2699CEC4485EBCA30" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_92474495A2F0D65A21D2BFF4587358D8" - "OwnerKey" = "8:_E6DED22BB43E475B9794561C384D2713" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_92474495A2F0D65A21D2BFF4587358D8" - "OwnerKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_94CDF51D67BB69C2699CEC4485EBCA30" - "OwnerKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_9E54529BF03690F97BEE24C45258265B" - "OwnerKey" = "8:_94CDF51D67BB69C2699CEC4485EBCA30" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_9E54529BF03690F97BEE24C45258265B" - "OwnerKey" = "8:_72B65244C4FF9BF01D372402C3CE52C5" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_A09EFD9A2681B7EEE293BB3C3E00C524" - "OwnerKey" = "8:_E8DB13B92FF4C290BF9E84F6AD1DE386" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_B903CCAAE77F80B733B5FF7D00A8E88A" - "OwnerKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_B903CCAAE77F80B733B5FF7D00A8E88A" - "OwnerKey" = "8:_E6DED22BB43E475B9794561C384D2713" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_B903CCAAE77F80B733B5FF7D00A8E88A" - "OwnerKey" = "8:_8B8BABD8173D326B3175B52925968439" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_B903CCAAE77F80B733B5FF7D00A8E88A" - "OwnerKey" = "8:_F35F069FCC8C9B6808AAD45B8039A4FB" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_BFCEC942CF3BF1B9FB6AEACA2A8753C3" - "OwnerKey" = "8:_F35F069FCC8C9B6808AAD45B8039A4FB" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_BFCEC942CF3BF1B9FB6AEACA2A8753C3" - "OwnerKey" = "8:_92474495A2F0D65A21D2BFF4587358D8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_BFCEC942CF3BF1B9FB6AEACA2A8753C3" - "OwnerKey" = "8:_94CDF51D67BB69C2699CEC4485EBCA30" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_BFCEC942CF3BF1B9FB6AEACA2A8753C3" - "OwnerKey" = "8:_78C9B7DB89C8CFF3E6F812DBDAF18DC7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_C5A4AB00302044959F446E92967BBAD4" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_D2FFB7AB335C92855094B6988900F58C" - "OwnerKey" = "8:_8F0D060313A40E3D6C4B196C5819AA1F" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_DE92CA29E3DCD5F35FD39C7351489051" - "OwnerKey" = "8:_F35F069FCC8C9B6808AAD45B8039A4FB" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_E6DED22BB43E475B9794561C384D2713" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_E8DB13B92FF4C290BF9E84F6AD1DE386" - "OwnerKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_F35F069FCC8C9B6808AAD45B8039A4FB" - "OwnerKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_F35F069FCC8C9B6808AAD45B8039A4FB" - "OwnerKey" = "8:_E6DED22BB43E475B9794561C384D2713" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_F35F069FCC8C9B6808AAD45B8039A4FB" - "OwnerKey" = "8:_92474495A2F0D65A21D2BFF4587358D8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_F35F069FCC8C9B6808AAD45B8039A4FB" - "OwnerKey" = "8:_94CDF51D67BB69C2699CEC4485EBCA30" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_F35F069FCC8C9B6808AAD45B8039A4FB" - "OwnerKey" = "8:_8F0D060313A40E3D6C4B196C5819AA1F" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_C5A4AB00302044959F446E92967BBAD4" "MsmSig" = "8:_UNDEFINED" } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_E6DED22BB43E475B9794561C384D2713" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_94CDF51D67BB69C2699CEC4485EBCA30" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_92474495A2F0D65A21D2BFF4587358D8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_72B65244C4FF9BF01D372402C3CE52C5" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_9E54529BF03690F97BEE24C45258265B" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_65CE51F98CEBE9E3D46589DB414FAA93" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_8F0D060313A40E3D6C4B196C5819AA1F" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_D2FFB7AB335C92855094B6988900F58C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_78C9B7DB89C8CFF3E6F812DBDAF18DC7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_8B8BABD8173D326B3175B52925968439" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_6290C6253BE08D5AEAF445DC538F5A32" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_5397E5B2CD05015FD556CF7136D97D21" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_F35F069FCC8C9B6808AAD45B8039A4FB" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_BFCEC942CF3BF1B9FB6AEACA2A8753C3" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_DE92CA29E3DCD5F35FD39C7351489051" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_B903CCAAE77F80B733B5FF7D00A8E88A" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_E8DB13B92FF4C290BF9E84F6AD1DE386" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_A09EFD9A2681B7EEE293BB3C3E00C524" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_25CD57B9CA3242F18E33F548DDB13C14" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_2DC8C87C2D90158064A700C697B49957" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_13F82A52BE0C4D8A8602D03A12CC09C2" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_0712ECEB4DE24D8B9E9936D94BDC61B4" - "MsmSig" = "8:_UNDEFINED" - } } "Configurations" { @@ -459,7 +69,7 @@ "DisplayName" = "8:Debug" "IsDebugOnly" = "11:TRUE" "IsReleaseOnly" = "11:FALSE" - "OutputFilename" = "8:..\\..\\Build\\Debug\\Installers\\Tango Stubs Installer v1.3.msi" + "OutputFilename" = "8:..\\..\\Build\\Debug\\Installers\\Tango Stubs Installer v1.4.msi" "PackageFilesAs" = "3:2" "PackageFileSize" = "3:-2147483648" "CabType" = "3:1" @@ -665,68 +275,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_2DC8C87C2D90158064A700C697B49957" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_2DC8C87C2D90158064A700C697B49957" - { - "Name" = "8:Google.Protobuf.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Google.Protobuf.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5397E5B2CD05015FD556CF7136D97D21" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Tango.PMR, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_5397E5B2CD05015FD556CF7136D97D21" - { - "Name" = "8:Tango.PMR.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Tango.PMR.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_61BDC9339D1440BCBC454CC904BCE79C" { "AssemblyRegister" = "3:1" @@ -758,378 +306,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_6290C6253BE08D5AEAF445DC538F5A32" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Tango.Scripting, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_6290C6253BE08D5AEAF445DC538F5A32" - { - "Name" = "8:Tango.Scripting.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Tango.Scripting.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_65CE51F98CEBE9E3D46589DB414FAA93" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:System.Reactive.Interfaces, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_65CE51F98CEBE9E3D46589DB414FAA93" - { - "Name" = "8:System.Reactive.Interfaces.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:System.Reactive.Interfaces.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_72B65244C4FF9BF01D372402C3CE52C5" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:System.Reactive.Linq, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_72B65244C4FF9BF01D372402C3CE52C5" - { - "Name" = "8:System.Reactive.Linq.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:System.Reactive.Linq.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_78C9B7DB89C8CFF3E6F812DBDAF18DC7" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Tango.Settings, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_78C9B7DB89C8CFF3E6F812DBDAF18DC7" - { - "Name" = "8:Tango.Settings.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Tango.Settings.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_8B8BABD8173D326B3175B52925968439" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Tango.Serialization, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_8B8BABD8173D326B3175B52925968439" - { - "Name" = "8:Tango.Serialization.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Tango.Serialization.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_8F0D060313A40E3D6C4B196C5819AA1F" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Tango.SharedUI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_8F0D060313A40E3D6C4B196C5819AA1F" - { - "Name" = "8:Tango.SharedUI.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Tango.SharedUI.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_92474495A2F0D65A21D2BFF4587358D8" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Tango.Transport, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_92474495A2F0D65A21D2BFF4587358D8" - { - "Name" = "8:Tango.Transport.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Tango.Transport.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_94CDF51D67BB69C2699CEC4485EBCA30" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Tango.Stubs, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_94CDF51D67BB69C2699CEC4485EBCA30" - { - "Name" = "8:Tango.Stubs.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Tango.Stubs.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_9E54529BF03690F97BEE24C45258265B" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:System.Reactive.Core, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_9E54529BF03690F97BEE24C45258265B" - { - "Name" = "8:System.Reactive.Core.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:System.Reactive.Core.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_A09EFD9A2681B7EEE293BB3C3E00C524" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_A09EFD9A2681B7EEE293BB3C3E00C524" - { - "Name" = "8:System.Windows.Interactivity.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:System.Windows.Interactivity.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_B903CCAAE77F80B733B5FF7D00A8E88A" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_B903CCAAE77F80B733B5FF7D00A8E88A" - { - "Name" = "8:Newtonsoft.Json.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Newtonsoft.Json.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_BFCEC942CF3BF1B9FB6AEACA2A8753C3" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Tango.Logging, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_BFCEC942CF3BF1B9FB6AEACA2A8753C3" - { - "Name" = "8:Tango.Logging.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Tango.Logging.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_C5A4AB00302044959F446E92967BBAD4" { "AssemblyRegister" = "3:1" @@ -1161,68 +337,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_D2FFB7AB335C92855094B6988900F58C" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:ICSharpCode.AvalonEdit, Version=4.3.1.9429, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_D2FFB7AB335C92855094B6988900F58C" - { - "Name" = "8:ICSharpCode.AvalonEdit.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:ICSharpCode.AvalonEdit.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_DE92CA29E3DCD5F35FD39C7351489051" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:SimpleValidator, Version=0.6.1.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_DE92CA29E3DCD5F35FD39C7351489051" - { - "Name" = "8:SimpleValidator.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:SimpleValidator.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_E6DED22BB43E475B9794561C384D2713" { "AssemblyRegister" = "3:1" @@ -1254,68 +368,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_E8DB13B92FF4C290BF9E84F6AD1DE386" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_E8DB13B92FF4C290BF9E84F6AD1DE386" - { - "Name" = "8:MahApps.Metro.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:MahApps.Metro.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_F35F069FCC8C9B6808AAD45B8039A4FB" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Tango.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_F35F069FCC8C9B6808AAD45B8039A4FB" - { - "Name" = "8:Tango.Core.DLL" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Tango.Core.DLL" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } } "FileType" { @@ -1372,15 +424,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Tango Stubs GUI" - "ProductCode" = "8:{00E132D7-B7F4-4EBB-AF3B-72B2BC0E3032}" - "PackageCode" = "8:{0D2A3E44-4CFC-4323-A91A-98736C560509}" + "ProductCode" = "8:{231D1349-3BD2-4D21-868F-5F0DC38229DE}" + "PackageCode" = "8:{2FC098FD-BB0A-40A5-A1F6-419BA372CFA2}" "UpgradeCode" = "8:{72B680FB-E47D-486A-A81E-6C035F2EBA42}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:FALSE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.3" + "ProductVersion" = "8:1.4" "Manufacturer" = "8:Twine" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/ViewModels/MainViewVM.cs index c25a92495..3bcdc823f 100644 --- a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/ViewModels/MainViewVM.cs @@ -620,7 +620,7 @@ namespace Tango.Stubs.UI.ViewModels engine.ReferencedAssemblies.Add(this.GetType()); engine.ReferencedAssemblies.Add(typeof(PMR.Stubs.CalculateRequest)); engine.ReferencedAssemblies.Add(typeof(IMessage)); - await engine.Run(SelectedCodeTab.Code); + await engine.Run(SelectedCodeTab.Code, Path.GetDirectoryName(SelectedCodeTab.File)); if (!thisStubManager.Aborted) { @@ -655,7 +655,7 @@ namespace Tango.Stubs.UI.ViewModels engine.ReferencedAssemblies.Add(this.GetType()); engine.ReferencedAssemblies.Add(typeof(PMR.Stubs.CalculateRequest)); engine.ReferencedAssemblies.Add(typeof(IMessage)); - var results = engine.Compile(SelectedCodeTab.Code).Result; + var results = engine.Compile(SelectedCodeTab.Code, Path.GetDirectoryName(SelectedCodeTab.File)).Result; if (results.Count == 0) { @@ -665,7 +665,7 @@ namespace Tango.Stubs.UI.ViewModels else { SelectedCodeTab.Errors = results.ToObservableCollection(); - Status = results.Count + " compilation errors found!"; + Status = results.Count + " compilation errors found!"; } } catch (Exception ex) |
