diff options
| author | Avi Levkovich <avi@twine-s.com> | 2019-03-17 09:44:03 +0200 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2019-03-17 09:44:03 +0200 |
| commit | 389b9711ec229f68313bf5da391f05d49bb36434 (patch) | |
| tree | 6340656a31819a75de447dabe64bedd0c90ac7b5 /Software/Visual_Studio/TEMP | |
| parent | 0e214df453878313d70065f68679a5a0267b0591 (diff) | |
| parent | c5e354289baee800f4cf93b6df1836a133c1addf (diff) | |
| download | Tango-389b9711ec229f68313bf5da391f05d49bb36434.tar.gz Tango-389b9711ec229f68313bf5da391f05d49bb36434.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/TEMP')
43 files changed, 2001 insertions, 665 deletions
diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownType.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownType.cs index 7aec36a86..28f9ccb9a 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownType.cs +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownType.cs @@ -7,66 +7,23 @@ using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Xml; +using Tango.Core; namespace Tango.Scripting.Editors.Intellisense { public class KnownType { - private static String dotNetXmlFolder = @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X"; - private static Dictionary<Assembly, XmlDocument> _assemblies_docs_cache; - private bool _initialized; + private bool _documentationLoaded; public Type Type { get; private set; } public String Name { get; private set; } public String TypeDefinition { get; private set; } public String FriendlyName { get; private set; } - - private String _summary; - public String Summary - { - get - { - InitTypeDocumentation(); - return _summary; - } - private set { _summary = value; } - } - - - private List<KnownTypeConstructor> _constructors; - public List<KnownTypeConstructor> Constructors - { - get - { - InitTypeDocumentation(); - return _constructors; - } - private set { _constructors = value; } - } - - private List<KnownTypeMethod> _methods; - public List<KnownTypeMethod> Methods - { - get - { - InitTypeDocumentation(); - return _methods; - } - private set { _methods = value; } - } - - private List<KnownTypeProperty> _properties; - public List<KnownTypeProperty> Properties - { - get - { - InitTypeDocumentation(); - return _properties; - } - private set { _properties = value; } - } - + public String Summary { get; set; } + public List<KnownTypeConstructor> Constructors { get; set; } + public List<KnownTypeMethod> Methods { get; set; } + public List<KnownTypeProperty> Properties { get; set; } public List<KnownTypeMember> Members { get @@ -79,18 +36,15 @@ namespace Tango.Scripting.Editors.Intellisense return members.OrderBy(x => x.Name).ToList(); } } - - static KnownType() - { - _assemblies_docs_cache = new Dictionary<Assembly, XmlDocument>(); - } + public List<KnownTypeField> Fields { get; set; } public KnownType(Type type) { - _summary = "Loading documentation..."; - _constructors = new List<KnownTypeConstructor>(); - _methods = new List<KnownTypeMethod>(); - _properties = new List<KnownTypeProperty>(); + Summary = "Loading documentation..."; + Constructors = new List<KnownTypeConstructor>(); + Methods = new List<KnownTypeMethod>(); + Properties = new List<KnownTypeProperty>(); + Fields = new List<KnownTypeField>(); Type = type; Name = type.Name; @@ -106,7 +60,7 @@ namespace Tango.Scripting.Editors.Intellisense { InitTypeDefinition(); InitFriendlyName(); - InitTypeDocumentation(); + InitType(); } private void InitFriendlyName() @@ -122,93 +76,31 @@ namespace Tango.Scripting.Editors.Intellisense else if (Type.IsValueType) TypeDefinition = "struct"; } - private void InitTypeDocumentation() + private void InitType() { if (!_initialized) { _initialized = true; - XmlDocument xmlDoc = null; - - if (_assemblies_docs_cache.ContainsKey(Type.Assembly)) - { - xmlDoc = _assemblies_docs_cache[Type.Assembly]; - } - - if (xmlDoc == null) - { - String dllPath = Type.Assembly.Location; - - string docuPath = dllPath.Substring(0, dllPath.LastIndexOf(".")) + ".XML"; - - if (File.Exists(docuPath)) - { - xmlDoc = new XmlDocument(); - xmlDoc.Load(docuPath); - } - else if (File.Exists(System.IO.Path.Combine(dotNetXmlFolder, System.IO.Path.GetFileName(docuPath)))) - { - xmlDoc = new XmlDocument(); - xmlDoc.Load(System.IO.Path.Combine(dotNetXmlFolder, System.IO.Path.GetFileName(docuPath))); - } - - if (xmlDoc != null) - { - _assemblies_docs_cache.Add(Type.Assembly, xmlDoc); - } - } - - xmlDoc = new XmlDocument(); - - //Load Type Summary - { - string path = "T:" + Type.FullName; - XmlNode xmlDocuOfType = xmlDoc.SelectSingleNode("//member[starts-with(@name, '" + path + "')]"); - - if (xmlDocuOfType != null) - { - XmlNode summaryNode = xmlDocuOfType.SelectSingleNode("summary"); - Summary = summaryNode.InnerText; - } - } - //Load Constructors... { - string path = "M:" + Type.FullName + ".#ctor"; - - var docNodes = xmlDoc.SelectNodes("//member[starts-with(@name, '" + path + "')]").OfType<XmlNode>().ToList(); var constructors = Type.GetConstructors().Where(x => x.IsPublic).ToList(); for (int i = 0; i < constructors.Count; i++) { var constructor = constructors[i]; - XmlNode cDoc = null; - - if (i < docNodes.Count) - { - cDoc = docNodes[i]; - } KnownTypeConstructor c = new KnownTypeConstructor(this); - c.Summary = cDoc != null ? cDoc.SelectSingleNode("summary").InnerXml : $"Initializes a new instance of {FriendlyName}."; var parameters = constructor.GetParameters().ToList(); - var parametersNodes = cDoc != null ? cDoc.SelectNodes("param").OfType<XmlNode>().ToList() : new List<XmlNode>(); for (int j = 0; j < parameters.Count; j++) { var parameter = parameters[j]; - XmlNode pNode = null; - - if (j < parametersNodes.Count) - { - pNode = parametersNodes[j]; - } KnownTypeMethodParameter p = new KnownTypeMethodParameter(); p.Type = parameter.ParameterType.GetFriendlyName(); p.Name = parameter.Name; - p.Description = pNode != null ? pNode.InnerText : null; if (j == parameters.Count - 1) { @@ -218,15 +110,12 @@ namespace Tango.Scripting.Editors.Intellisense c.Parameters.Add(p); } - _constructors.Add(c); + Constructors.Add(c); } } //Load Methods... { - string path = "M:" + Type.FullName; - - var docNodes = xmlDoc.SelectNodes("//member[starts-with(@name, '" + path + "')]").OfType<XmlNode>().ToList(); var methods = Type.GetRuntimeMethods().Where(x => x.IsPublic && !x.IsSpecialName).ToList(); //TODO: Separate extension methods! @@ -241,12 +130,8 @@ namespace Tango.Scripting.Editors.Intellisense for (int i = 0; i < methods.Count; i++) { var method = methods[i]; - XmlNode mDoc = null; - - mDoc = docNodes.FirstOrDefault(x => x.Attributes["name"].InnerText.Contains(method.DeclaringType.Name + "." + method.Name)); KnownTypeMethod m = new KnownTypeMethod(this); - m.Summary = mDoc != null ? mDoc.SelectSingleNode("summary").InnerXml : "No documentation"; m.Name = method.Name; m.ReturnType = method.ReturnType; m.ReturnTypeFriendlyName = method.ReturnType.GetFriendlyName(); @@ -260,7 +145,6 @@ namespace Tango.Scripting.Editors.Intellisense } var parameters = method.GetParameters().ToList(); - var parametersNodes = mDoc != null ? mDoc.SelectNodes("param").OfType<XmlNode>().ToList() : new List<XmlNode>(); bool isLinq = method.DeclaringType == typeof(Enumerable); @@ -268,17 +152,9 @@ namespace Tango.Scripting.Editors.Intellisense { var parameter = parameters[j]; - XmlNode pNode = null; - - if (j < parametersNodes.Count) - { - pNode = parametersNodes[j]; - } - KnownTypeMethodParameter p = new KnownTypeMethodParameter(); p.Type = parameter.ParameterType.GetFriendlyName(); p.Name = parameter.Name; - p.Description = pNode != null ? pNode.InnerText : null; if (j == parameters.Count - 1) { @@ -289,34 +165,58 @@ namespace Tango.Scripting.Editors.Intellisense m.Parameters.Add(p); } - _methods.Add(m); + Methods.Add(m); } } //Load Properties { - string path = "P:" + Type.FullName; - - var docNodes = xmlDoc.SelectNodes("//member[starts-with(@name, '" + path + "')]").OfType<XmlNode>().ToList(); var properties = Type.GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsPublic).ToList(); for (int i = 0; i < properties.Count; i++) { var property = properties[i]; - var pDoc = docNodes.FirstOrDefault(x => x.Attributes["name"].InnerText.Contains(property.DeclaringType.Name + "." + property.Name)); KnownTypeProperty p = new KnownTypeProperty(this); - p.Summary = pDoc != null ? pDoc.SelectSingleNode("summary").InnerXml : "No documentation"; p.Name = property.Name; p.ReturnType = property.PropertyType; p.ReturnTypeFriendlyName = property.PropertyType.GetFriendlyName(); - _properties.Add(p); + Properties.Add(p); + } + } + + //Load Enum Values + { + if (Type.IsEnum) + { + var values = Enum.GetNames(Type).ToList(); + + for (int i = 0; i < values.Count; i++) + { + var value = values[i]; + + KnownTypeField f = new KnownTypeField(this); + f.Name = value; + f.ReturnType = typeof(Int32); + f.ReturnTypeFriendlyName = typeof(Int32).Name; + Fields.Add(f); + } } } _initialized = true; } } + + public void LoadDocumentation() + { + if (!_documentationLoaded) + { + _documentationLoaded = true; + + Utils.LoadKnownTypeDocs(this); + } + } } } diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeConstructor.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeConstructor.cs index 273d61084..83dc3f750 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeConstructor.cs +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeConstructor.cs @@ -16,6 +16,7 @@ namespace Tango.Scripting.Editors.Intellisense public KnownTypeConstructor() { + Summary = "Loading documentation..."; Parameters = new List<KnownTypeMethodParameter>(); } diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeField.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeField.cs new file mode 100644 index 000000000..cd1349744 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeField.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Scripting.Editors.Intellisense +{ + public class KnownTypeField : KnownTypeMember + { + public KnownTypeField() + { + Summary = "Loading documentation..."; + } + + public KnownTypeField(KnownType knownType) : this() + { + Type = knownType; + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeMember.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeMember.cs index 1405a8c34..bae4edf41 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeMember.cs +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeMember.cs @@ -20,7 +20,7 @@ namespace Tango.Scripting.Editors.Intellisense public KnownTypeMember() { - + Summary = "Loading documentation..."; } public KnownTypeMember(KnownType knownType) : this() diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeMethod.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeMethod.cs index 767d49b7e..f84e26fe5 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeMethod.cs +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeMethod.cs @@ -29,6 +29,7 @@ namespace Tango.Scripting.Editors.Intellisense public KnownTypeMethod() { + Summary = "Loading documentation..."; Parameters = new List<KnownTypeMethodParameter>(); TypeArguments = new List<string>(); } diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeProperty.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeProperty.cs index a77dd7dc2..52717579a 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeProperty.cs +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/KnownTypeProperty.cs @@ -10,7 +10,7 @@ namespace Tango.Scripting.Editors.Intellisense { public KnownTypeProperty() { - + Summary = "Loading documentation..."; } public KnownTypeProperty(KnownType knownType) : this() diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/Utils.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/Utils.cs new file mode 100644 index 000000000..f8cc7072d --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Intellisense/Utils.cs @@ -0,0 +1,171 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Xml; + +namespace Tango.Scripting.Editors.Intellisense +{ + public static class Utils + { + private static String dotNetXmlFolder = @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X"; + private static Dictionary<Assembly, XmlDocument> _assemblies_docs_cache; + + static Utils() + { + _assemblies_docs_cache = new Dictionary<Assembly, XmlDocument>(); + } + + public static void LoadKnownTypeDocs(KnownType knownType) + { + XmlDocument xmlDoc = null; + + if (_assemblies_docs_cache.ContainsKey(knownType.Type.Assembly)) + { + xmlDoc = _assemblies_docs_cache[knownType.Type.Assembly]; + } + + if (xmlDoc == null) + { + String dllPath = knownType.Type.Assembly.Location; + + string docuPath = dllPath.Substring(0, dllPath.LastIndexOf(".")) + ".XML"; + + if (File.Exists(docuPath)) + { + xmlDoc = new XmlDocument(); + xmlDoc.Load(docuPath); + } + else if (File.Exists(System.IO.Path.Combine(dotNetXmlFolder, System.IO.Path.GetFileName(docuPath)))) + { + xmlDoc = new XmlDocument(); + xmlDoc.Load(System.IO.Path.Combine(dotNetXmlFolder, System.IO.Path.GetFileName(docuPath))); + } + + if (xmlDoc != null) + { + _assemblies_docs_cache.Add(knownType.Type.Assembly, xmlDoc); + } + } + + if (xmlDoc == null) + { + xmlDoc = new XmlDocument(); + } + + //Load Type Summary + { + string path = "T:" + knownType.Type.FullName; + XmlNode xmlDocuOfType = xmlDoc.SelectSingleNode("//member[starts-with(@name, '" + path + "')]"); + + if (xmlDocuOfType != null) + { + XmlNode summaryNode = xmlDocuOfType.SelectSingleNode("summary"); + knownType.Summary = summaryNode.InnerText; + } + } + + //Load Constructors... + { + string path = "M:" + knownType.Type.FullName + ".#ctor"; + + var docNodes = xmlDoc.SelectNodes("//member[starts-with(@name, '" + path + "')]").OfType<XmlNode>().ToList(); + + for (int i = 0; i < knownType.Constructors.Count; i++) + { + var constructor = knownType.Constructors[i]; + XmlNode cDoc = null; + + if (i < docNodes.Count) + { + cDoc = docNodes[i]; + } + + constructor.Summary = cDoc != null ? cDoc.SelectSingleNode("summary").InnerXml : $"Initializes a new instance of {knownType.FriendlyName}."; + + var parameters = constructor.Parameters.ToList(); + var parametersNodes = cDoc != null ? cDoc.SelectNodes("param").OfType<XmlNode>().ToList() : new List<XmlNode>(); + + for (int j = 0; j < parameters.Count; j++) + { + var parameter = parameters[j]; + XmlNode pNode = null; + + if (j < parametersNodes.Count) + { + pNode = parametersNodes[j]; + } + + parameter.Description = pNode != null ? pNode.InnerText : null; + } + } + } + + //Load Methods... + { + string path = "M:" + knownType.Type.FullName; + + var docNodes = xmlDoc.SelectNodes("//member[starts-with(@name, '" + path + "')]").OfType<XmlNode>().ToList(); + + for (int i = 0; i < knownType.Methods.Count; i++) + { + var method = knownType.Methods[i]; + XmlNode mDoc = null; + + mDoc = docNodes.FirstOrDefault(x => x.Attributes["name"].InnerText.Contains(knownType.Type.Name + "." + method.Name)); + method.Summary = mDoc != null ? mDoc.SelectSingleNode("summary").InnerXml.Remove("(<see cref=\".:)|(\" \\/>)") : "No documentation"; + + var parameters = method.Parameters.ToList(); + var parametersNodes = mDoc != null ? mDoc.SelectNodes("param").OfType<XmlNode>().ToList() : new List<XmlNode>(); + + bool isLinq = knownType.Type == typeof(Enumerable); + + for (int j = 0; j < parameters.Count; j++) + { + var parameter = parameters[j]; + + XmlNode pNode = null; + + if (j < parametersNodes.Count) + { + pNode = parametersNodes[j]; + } + + parameter.Description = pNode != null ? pNode.InnerText.Remove("(<see cref=\".:)|(\" \\/>)") : null; + } + } + } + + //Load Properties + { + string path = "P:" + knownType.Type.FullName; + + var docNodes = xmlDoc.SelectNodes("//member[starts-with(@name, '" + path + "')]").OfType<XmlNode>().ToList(); + + for (int i = 0; i < knownType.Properties.Count; i++) + { + var property = knownType.Properties[i]; + var pDoc = docNodes.FirstOrDefault(x => x.Attributes["name"].InnerText.Contains(knownType.Type.Name + "." + property.Name)); + + property.Summary = pDoc != null ? pDoc.SelectSingleNode("summary").InnerXml : "No documentation"; + } + } + + //Load Enum Values + { + if (knownType.Type.IsEnum) + { + for (int i = 0; i < knownType.Fields.Count; i++) + { + var field = knownType.Fields[i]; + var pDoc = xmlDoc.SelectSingleNode("//member[starts-with(@name, '" + $"F:{knownType.Type.FullName}.{field.Name}" + "')]"); + field.Summary = pDoc != null ? pDoc.SelectSingleNode("summary").InnerXml : "No documentation"; + } + } + } + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/ScriptEditor.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/ScriptEditor.cs index f6296ac5c..efa1b087a 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/ScriptEditor.cs +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/ScriptEditor.cs @@ -72,6 +72,7 @@ namespace Tango.Scripting.Editors { public KnownType Type { get; set; } public String MethodName { get; set; } + public int ParameterIndex { get; set; } } private class DeclaredMethodSession @@ -210,461 +211,6 @@ namespace Tango.Scripting.Editors #endregion - #region Public Methods - - /// <summary> - /// Invalidates all using statements in the script. - /// </summary> - public void InvalidateUsings() - { - var oldUsings = _current_usings.ToList(); - _current_usings = _parser.GetUsings(Text); - - if (_current_usings.Exists(x => !oldUsings.Exists(y => y == x)) || oldUsings.Exists(x => !_current_usings.Exists(y => y == x))) - { - InvalidateHighlighting(); - } - } - - /// <summary> - /// Invalidates the script folding if enabled. - /// </summary> - public void InvalidateFolding() - { - if (EnableFolding) - { - if (foldingManager == null) - { - foldingManager = FoldingManager.Install(TextArea); - } - - foldingStrategy.UpdateFoldings(foldingManager, Document); - } - } - - /// <summary> - /// Indents the code. - /// </summary> - public void IndentCode() - { - Text = Indentation.CSharp.CSharpIndentationHelper.IndentCSharpCode(Text); - } - - /// <summary> - /// Gets the current line. - /// </summary> - /// <returns></returns> - public DocumentLine GetCurrentLine() - { - int offset = CaretOffset; - var line = Document.GetLineByOffset(offset); - return line; - } - - /// <summary> - /// Gets the current line text. - /// </summary> - /// <returns></returns> - public String GetCurrentLineText() - { - var text = Document.GetText(GetCurrentLine()); - return text; - } - - /// <summary> - /// Gets the current word. - /// </summary> - /// <returns></returns> - public String GetCurrentWord() - { - return GetWordByEndIndex(CaretOffset); - } - - public String GetWordByEndIndex(int index) - { - String word = String.Empty; - var line = GetCurrentLine(); - - int position = index; - - for (int i = position - 1; i >= line.Offset; i--) - { - char c = Document.GetText(i, 1).First(); - - if (word_separators.Contains(c)) - { - break; - } - - word += c; - } - - word = new string(word.Reverse().ToArray()); - - if (word.Length > 0) - { - word = word.Replace(".", ""); - } - - return word; - } - - public int GetCurrentWordStartIndex() - { - var line = GetCurrentLine(); - - int position = CaretOffset; - - for (int i = position - 1; i >= line.Offset; i--) - { - char c = Document.GetText(i, 1).First(); - - if (word_separators.Contains(c)) - { - return i + 1; - } - } - - return line.Offset; - } - - public String GetPreviousWord() - { - int index = GetCurrentWordStartIndex() - 1; - return GetWordByEndIndex(index); - } - - private ConstructionSession GetConstructionSession() - { - var expression = _parser.GetCurrentConstructionExpression(GetCurrentLineText()); - - if (expression != null) - { - ConstructionSession session = new ConstructionSession(); - - var line = GetCurrentLine(); - int parameterIndex = 0; - for (int i = CaretOffset; i > line.Offset; i--) - { - String c = Document.GetText(i, 1); - - if (c == "(") - { - var typeDeclaration = expression.Type as GenericNameSyntax; - - KnownType type = null; - - if (typeDeclaration != null) - { - var typeName = typeDeclaration.Identifier.ToString(); - var argumentsCount = typeDeclaration.TypeArgumentList.Arguments.Count; - session.TypeArguments = typeDeclaration.TypeArgumentList.Arguments.Select(x => x.ToString()).ToList(); - - if (argumentsCount == 0) - { - type = _knownTypes.FirstOrDefault(x => x.Type.Name == expression.Type.ToString()); - } - else - { - type = _knownTypes.FirstOrDefault(x => x.Type.Name == typeName + "`" + argumentsCount); - } - } - else - { - type = _knownTypes.FirstOrDefault(x => x.Name == expression.Type.ToString()); - } - - if (type != null) - { - session.Type = type; - session.ParameterIndex = parameterIndex; - return session; - } - else - { - return null; - } - } - else if (c == ",") - { - parameterIndex++; - } - - } - } - - return null; - } - - private MethodSession GetMethodSession() - { - var expression = GetPreviousWords().LastOrDefault(); - - if (expression != null) - { - var tree = expression.Split('.').Select(x => x.Remove(@"\n|\r|\s|\t|\(|\)|\[|\]|<.*>")).ToList(); - var variableName = tree.FirstOrDefault(); - - if (variableName != null && tree.Count > 1) - { - tree.RemoveAt(0); - var variables = _parser.GetContextSymbols(Document.Text, CaretOffset); - var variable = variables.FirstOrDefault(x => x.Name == variableName); - - if (variable != null) - { - var knownType = _knownTypes.FirstOrDefault(x => x.FriendlyName == Regex.Replace(variable.Type, "<.+>", "<T>")); - - if (knownType != null) - { - while (tree.Count > 1) - { - var memberName = tree.First(); - tree.RemoveAt(0); - var member = knownType.Members.FirstOrDefault(x => x.Name == memberName); - - if (member == null) - { - return null; - } - - knownType = _knownTypes.FirstOrDefault(x => x.Type.Namespace + "." + x.Type.Name == member.ReturnType.Namespace + "." + member.ReturnType.Name); - } - - return new MethodSession() - { - Type = knownType, - MethodName = tree.Last(), - }; - } - } - } - } - - return null; - } - - private DeclaredMethodSession GetDeclaredMethodSession() - { - var expression = GetPreviousWords().LastOrDefault(); - - if (expression != null) - { - var tree = expression.Split('.').Select(x => x.Replace("\n", "").Replace("\r", "").Replace(" ", "").Replace("\t", "").Replace("(", "").Replace(")", "").Replace("[", "").Replace("]", "")).ToList(); - var variableName = tree.FirstOrDefault(); - - if (variableName != null && tree.Count > 0) - { - tree.RemoveAt(0); - var variables = _parser.GetContextSymbols(Document.Text, CaretOffset); - var variable = variables.FirstOrDefault(x => x.Name == variableName); - - if (variable != null) - { - var declaredType = _declaredTypes.FirstOrDefault(x => x.Name == Regex.Replace(variable.Class, "<.+>", "<T>")); - - if (declaredType != null) - { - while (tree.Count > 1) - { - var memberName = tree.First(); - tree.RemoveAt(0); - var member = declaredType.Symbols.FirstOrDefault(x => x.Name == memberName); - - if (member == null) - { - return null; - } - - declaredType = _declaredTypes.FirstOrDefault(x => x.ContainingNamespace + "." + x.Name == member.ContainingNamespace + "." + member.Type); - } - - var methodName = tree.Count > 0 ? tree.Last() : variableName; - - var method = declaredType.Symbols.FirstOrDefault(x => x.Kind == SymbolKind.Method && x.Name == methodName); - - if (method != null) - { - return new DeclaredMethodSession() - { - Type = declaredType, - Method = method, - }; - } - } - else if (tree.Count == 0) - { - var method = variable; - - if (method != null) - { - return new DeclaredMethodSession() - { - Type = declaredType, - Method = method, - }; - } - } - } - } - } - - return null; - } - - public List<String> GetPreviousWords() - { - var currentLine = GetCurrentLine(); - var currentText = Document.GetText(currentLine.Offset, CaretOffset - currentLine.Offset); - return currentText.Split(' ').ToList(); - } - - #endregion - - #region Highlighting - - private void InvalidateHighlighting() - { - if (!_isLoadingTypes) - { - _isLoadingTypes = true; - _knownTypes.Clear(); - - var assemblies = ReferenceAssemblies.ToList(); - var usings = _current_usings.ToList(); - - Thread t = new Thread(() => - { - foreach (var asm in assemblies.Select(x => x.Assembly)) - { - Parallel.ForEach(asm.GetTypes().Where(x => x.IsVisible && x.IsPublic && !x.IsPrimitive), (type) => - { - if (usings.Exists(x => type.Namespace == x)) - { - lock (_knownTypes) - { - if (!_knownTypes.Exists(x => x.Type.FullName == type.FullName)) - { - _knownTypes.Add(new KnownType(type)); - } - } - } - }); - } - - if (_knownTypes.Count > 0 || _declaredTypes.Count > 0) - { - String text = String.Empty; - - Stream xshd_stream = typeof(ScriptEditor).Assembly.GetManifestResourceStream("Tango.Scripting.Editors.Highlighting.Resources.CSharp-Mode.xshd"); - - using (StreamReader reader = new StreamReader(xshd_stream)) - { - text = reader.ReadToEnd(); - } - - List<String> referenceTypes = new List<string>(); - List<String> interfaceTypes = new List<string>(); - - lock (_knownTypes) - { - foreach (var type in _knownTypes.ToList().Where(x => x != null)) - { - String name = type.Name; - - if (type.Type.ContainsGenericParameters) - { - name = new String(name.TakeWhile(x => x != '`').ToArray()); - } - - if (type.Type.IsInterface || type.Type.IsEnum) - { - interfaceTypes.Add(String.Format("<Word>{0}</Word>", name)); - } - else if (type.Type.IsClass) - { - referenceTypes.Add(String.Format("<Word>{0}</Word>", name)); - } - } - } - - foreach (var type in _declaredTypes) - { - if (type.Kind == TypeKind.Interface || type.Kind == TypeKind.Enum) - { - interfaceTypes.Add(String.Format("<Word>{0}</Word>", type.Name)); - } - else if (type.Kind == TypeKind.Class) - { - referenceTypes.Add(String.Format("<Word>{0}</Word>", type.Name)); - } - } - - if (referenceTypes.Count > 0) - { - text = text.Replace("<Word>@ReferenceTypes@</Word>", String.Join(Environment.NewLine, referenceTypes.Distinct())); - } - - if (interfaceTypes.Count > 0) - { - text = text.Replace("<Word>@InterfaceTypes@</Word>", String.Join(Environment.NewLine, interfaceTypes.Distinct())); - } - - MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(text)); - - XmlTextReader xshd_reader = new XmlTextReader(ms); - - Dispatcher.BeginInvoke(new Action(() => - { - SyntaxHighlighting = HighlightingLoader.Load(xshd_reader, HighlightingManager.Instance); - xshd_reader.Close(); - ms.Dispose(); - })); - - } - - _isLoadingTypes = false; - }); - t.IsBackground = true; - t.Start(); - } - } - - private void InvalidateScriptTypesHighlightings() - { - var declaredTypes = _parser.GetDeclaredTypes(Text); - - if (declaredTypes.Exists(x => !_declaredTypes.Exists(y => y.Name == x.Name)) || _declaredTypes.Exists(x => !declaredTypes.Exists(y => y.Name == x.Name))) - { - _declaredTypes = declaredTypes; - InvalidateHighlighting(); - } - - _declaredTypes = declaredTypes; - - //for (int i = 0; i < TextArea.TextView.LineTransformers.Count; i++) - //{ - // if (TextArea.TextView.LineTransformers[i] is OffsetColorizer) - // { - // TextArea.TextView.LineTransformers.RemoveAt(i); - // } - //} - - //foreach (var cls in scriptClasses) - //{ - // Document.BeginUpdate(); - - // var line = Document.GetLineByOffset(cls.Index); - - // OffsetColorizer colorizer = new OffsetColorizer(line, cls.Index, cls.Index + cls.Name.Length, Brushes.Red); - // TextArea.TextView.LineTransformers.Add(colorizer); - - // Document.EndUpdate(); - //} - } - - #endregion - #region Override Methods /// <summary> @@ -754,13 +300,8 @@ namespace Tango.Scripting.Editors #endregion - #region Intellisense + #region Text Entered - /// <summary> - /// Handles the TextEntered event of the TextArea control. - /// </summary> - /// <param name="sender">The source of the event.</param> - /// <param name="e">The <see cref="TextCompositionEventArgs"/> instance containing the event data.</param> private void TextArea_TextEntered(object sender, TextCompositionEventArgs e) { List<Object> items = new List<object>(); @@ -775,7 +316,32 @@ namespace Tango.Scripting.Editors if (previousWords.Count > 0 && previousWords.First().Trim().StartsWith("//")) return; - if (e.Text == " " && GetPreviousWord() == "new") + if (e.Text == " " && previousWords.Count > 2 && previousWords[previousWords.Count - 2] == "=") + { + var expression = previousWords.First(); + var knownType = GetKnownTypeFromExpression(expression + "."); + + if (knownType != null && knownType.Type.IsEnum) + { + completionWindow.HideCompletion(); + IList<ICompletionData> data = new List<ICompletionData>(); + + foreach (var field in knownType.Fields) + { + data.Add(new FieldCompletionItem() + { + Class = knownType.FriendlyName, + Name = knownType.FriendlyName + "." + field.Name, + Type = field.ReturnTypeFriendlyName, + Description = field.Summary, + }); + } + + ShowCompletionWindow(data.OrderBy(x => x.Text).ToList(), GetCurrentWord()); + } + + } + else if (e.Text == " " && GetPreviousWord() == "new") { var s = _parser.GetExpressionFirst<FieldDeclarationSyntax>(GetCurrentLineText()); @@ -807,35 +373,52 @@ namespace Tango.Scripting.Editors completionWindow.HideCompletion(); IList<ICompletionData> data = new List<ICompletionData>(); - var typeMembers = knownType.Members.ToList(); - - foreach (var methodGroup in typeMembers.OfType<KnownTypeMethod>().GroupBy(x => x.NameWithTypeArguments)) + if (!knownType.Type.IsEnum) { - var method = methodGroup.First(); + var typeMembers = knownType.Members.ToList(); - data.Add(new MethodCompletionItem() + foreach (var methodGroup in typeMembers.OfType<KnownTypeMethod>().GroupBy(x => x.NameWithTypeArguments)) { - Class = knownType.FriendlyName, - Name = method.NameWithTypeArguments, - ReturnType = method.ReturnTypeFriendlyName, - Description = method.Summary, - Parameters = method.Parameters, - Overloads = methodGroup.Count() - 1, - }); - } + var method = methodGroup.First(); - foreach (var methodGroup in typeMembers.Where(x => x.GetType() != typeof(KnownTypeMethod)).GroupBy(x => x.Name)) - { - var member = methodGroup.First(); + data.Add(new MethodCompletionItem() + { + Class = knownType.FriendlyName, + Name = method.NameWithTypeArguments, + ReturnType = method.ReturnTypeFriendlyName, + Description = method.Summary, + Parameters = method.Parameters, + Overloads = methodGroup.Count() - 1, + }); + } - data.Add(new PropertyCompletionItem() + foreach (var methodGroup in typeMembers.Where(x => x.GetType() != typeof(KnownTypeMethod)).GroupBy(x => x.Name)) { - Class = knownType.FriendlyName, - Name = member.Name, - Type = member.ReturnTypeFriendlyName, - Description = member.Summary, - }); + var member = methodGroup.First(); + data.Add(new PropertyCompletionItem() + { + Class = knownType.FriendlyName, + Name = member.Name, + Type = member.ReturnTypeFriendlyName, + Description = member.Summary, + }); + + } + } + else + { + foreach (var field in knownType.Fields) + { + data.Add(new FieldCompletionItem() + { + Class = knownType.FriendlyName, + Name = field.Name, + Type = field.ReturnTypeFriendlyName, + Description = field.Summary, + }); + + } } ShowCompletionWindow(data.OrderBy(x => x.Text).ToList(), GetCurrentWord()); @@ -981,6 +564,31 @@ namespace Tango.Scripting.Editors ShowCompletionWindow(data, GetCurrentWord()); } + else if (e.Text == "{") + { + int parentesisCount = lineText.TakeWhile(x => x != '{').Count(x => x == '\"'); + + if (parentesisCount % 2 == 0) + { + Document.Insert(CaretOffset, "}"); + CaretOffset--; + } + } + else if (e.Text == "}") + { + if (Document.GetText(CaretOffset - 2, 1) == "{" && Document.GetText(CaretOffset, 1) == "}") + { + Document.Replace(CaretOffset, 1, ""); + } + } + else if (e.Text == "\n") + { + if (Document.GetText(CaretOffset - 3, 1) == "{" && Document.GetText(CaretOffset, 1) == "}") + { + CaretOffset--; + Document.Insert(CaretOffset, "\n\t"); + } + } else if (!currentWordIncludingParenthesis.Contains(".") || currentWord[currentWord.Length - 2] == '<') { if (completionWindow.IsVisible) @@ -1062,7 +670,7 @@ namespace Tango.Scripting.Editors } } - foreach (var type in _knownTypes.Where(x => x.Name.StartsWith(word))) + foreach (var type in _knownTypes.ToList().Where(x => x.Name.StartsWith(word))) { if (type.Type.IsEnum) { @@ -1166,11 +774,19 @@ namespace Tango.Scripting.Editors } } + #endregion + + #region Completion Window Insertion + private void CompletionWindow_InsertionRequest(ICompletionData item) { item.Complete(this); } + #endregion + + #region Private/Internal Methods + private void ShowCompletionWindow(IList<ICompletionData> suggestions, String filter) { IList<ICompletionData> data = completionWindow.CompletionList.CompletionData; @@ -1251,7 +867,11 @@ namespace Tango.Scripting.Editors private KnownType GetCurrentKnownType() { var expression = GetPreviousWords().LastOrDefault(); + return GetKnownTypeFromExpression(expression); + } + private KnownType GetKnownTypeFromExpression(String expression) + { if (expression != null) { var tree = expression.Split('.').Select(x => x.Remove(@"\n|\t|\r|\(.*\)|\[.*\]|\s")).ToList(); @@ -1259,6 +879,14 @@ namespace Tango.Scripting.Editors if (variableName != null) { + //Search for enum type first + var enumType = _knownTypes.FirstOrDefault(x => x.Name == variableName && x.Type.IsEnum); + + if (enumType != null) + { + return enumType; + } + tree.RemoveAt(0); var variables = _parser.GetContextSymbols(Document.Text, CaretOffset); var variable = variables.FirstOrDefault(x => x.Name == variableName); @@ -1336,10 +964,6 @@ namespace Tango.Scripting.Editors return null; } - #endregion - - #region Popup - private void ShowPopup(Object content) { var position = TextArea.Caret.Position; @@ -1447,19 +1071,19 @@ namespace Tango.Scripting.Editors popup.Methods.Add(method); } - //if (false) - //{ - // popup.CurrentMethod = popup.Methods.FirstOrDefault(x => x.Parameters.Count == session.ParameterIndex + 1); + if (session.ParameterIndex > 0) + { + popup.CurrentMethod = popup.Methods.FirstOrDefault(x => x.Parameters.Count == session.ParameterIndex + 1); - // if (popup.CurrentMethod == null) - // { - // popup.CurrentMethod = popup.Methods.FirstOrDefault(); - // } - //} - //else - //{ - popup.CurrentMethod = popup.Methods.FirstOrDefault(); - //} + if (popup.CurrentMethod == null) + { + popup.CurrentMethod = popup.Methods.FirstOrDefault(); + } + } + else + { + popup.CurrentMethod = popup.Methods.FirstOrDefault(); + } if (popup.CurrentMethod != null) { @@ -1516,6 +1140,456 @@ namespace Tango.Scripting.Editors return popup; } + private void InvalidateHighlighting() + { + if (!_isLoadingTypes) + { + _isLoadingTypes = true; + _knownTypes.Clear(); + + var assemblies = ReferenceAssemblies.ToList(); + var usings = _current_usings.ToList(); + + Thread t = new Thread(() => + { + foreach (var asm in assemblies.Select(x => x.Assembly)) + { + Parallel.ForEach(asm.GetTypes().Where(x => x.IsVisible && x.IsPublic && !x.IsPrimitive), (type) => + { + if (usings.Exists(x => type.Namespace == x)) + { + lock (_knownTypes) + { + if (!_knownTypes.Exists(x => x.Type.FullName == type.FullName)) + { + _knownTypes.Add(new KnownType(type)); + } + } + } + }); + } + + if (_knownTypes.Count > 0 || _declaredTypes.Count > 0) + { + String text = String.Empty; + + Stream xshd_stream = typeof(ScriptEditor).Assembly.GetManifestResourceStream("Tango.Scripting.Editors.Highlighting.Resources.CSharp-Mode.xshd"); + + using (StreamReader reader = new StreamReader(xshd_stream)) + { + text = reader.ReadToEnd(); + } + + List<String> referenceTypes = new List<string>(); + List<String> interfaceTypes = new List<string>(); + + lock (_knownTypes) + { + foreach (var type in _knownTypes.ToList().Where(x => x != null)) + { + String name = type.Name; + + if (type.Type.ContainsGenericParameters) + { + name = new String(name.TakeWhile(x => x != '`').ToArray()); + } + + if (type.Type.IsInterface || type.Type.IsEnum) + { + interfaceTypes.Add(String.Format("<Word>{0}</Word>", name)); + } + else if (type.Type.IsClass || (type.Type.IsValueType)) + { + referenceTypes.Add(String.Format("<Word>{0}</Word>", name)); + } + } + } + + foreach (var type in _declaredTypes) + { + if (type.Kind == TypeKind.Interface || type.Kind == TypeKind.Enum) + { + interfaceTypes.Add(String.Format("<Word>{0}</Word>", type.Name)); + } + else if (type.Kind == TypeKind.Class) + { + referenceTypes.Add(String.Format("<Word>{0}</Word>", type.Name)); + } + } + + if (referenceTypes.Count > 0) + { + text = text.Replace("<Word>@ReferenceTypes@</Word>", String.Join(Environment.NewLine, referenceTypes.Distinct())); + } + + if (interfaceTypes.Count > 0) + { + text = text.Replace("<Word>@InterfaceTypes@</Word>", String.Join(Environment.NewLine, interfaceTypes.Distinct())); + } + + MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(text)); + + XmlTextReader xshd_reader = new XmlTextReader(ms); + + Dispatcher.BeginInvoke(new Action(() => + { + SyntaxHighlighting = HighlightingLoader.Load(xshd_reader, HighlightingManager.Instance); + xshd_reader.Close(); + ms.Dispose(); + })); + + + foreach (var knownType in _knownTypes) + { + knownType.LoadDocumentation(); + } + } + + _isLoadingTypes = false; + }); + t.IsBackground = true; + t.Start(); + } + } + + private void InvalidateScriptTypesHighlightings() + { + var declaredTypes = _parser.GetDeclaredTypes(Text); + + if (declaredTypes.Exists(x => !_declaredTypes.Exists(y => y.Name == x.Name)) || _declaredTypes.Exists(x => !declaredTypes.Exists(y => y.Name == x.Name))) + { + _declaredTypes = declaredTypes; + InvalidateHighlighting(); + } + + _declaredTypes = declaredTypes; + + //for (int i = 0; i < TextArea.TextView.LineTransformers.Count; i++) + //{ + // if (TextArea.TextView.LineTransformers[i] is OffsetColorizer) + // { + // TextArea.TextView.LineTransformers.RemoveAt(i); + // } + //} + + //foreach (var cls in scriptClasses) + //{ + // Document.BeginUpdate(); + + // var line = Document.GetLineByOffset(cls.Index); + + // OffsetColorizer colorizer = new OffsetColorizer(line, cls.Index, cls.Index + cls.Name.Length, Brushes.Red); + // TextArea.TextView.LineTransformers.Add(colorizer); + + // Document.EndUpdate(); + //} + } + + private void InvalidateUsings() + { + var oldUsings = _current_usings.ToList(); + _current_usings = _parser.GetUsings(Text); + + if (_current_usings.Exists(x => !oldUsings.Exists(y => y == x)) || oldUsings.Exists(x => !_current_usings.Exists(y => y == x))) + { + InvalidateHighlighting(); + } + } + + private void InvalidateFolding() + { + if (EnableFolding) + { + if (foldingManager == null) + { + foldingManager = FoldingManager.Install(TextArea); + } + + foldingStrategy.UpdateFoldings(foldingManager, Document); + } + } + + private void IndentCode() + { + Text = Indentation.CSharp.CSharpIndentationHelper.IndentCSharpCode(Text); + //Text = _parser.IndentCSharpCode(Text); + } + + internal DocumentLine GetCurrentLine() + { + int offset = CaretOffset; + var line = Document.GetLineByOffset(offset); + return line; + } + + private String GetCurrentLineText() + { + var text = Document.GetText(GetCurrentLine()); + return text; + } + + internal String GetCurrentWord() + { + return GetWordByEndIndex(CaretOffset); + } + + private String GetWordByEndIndex(int index) + { + String word = String.Empty; + var line = GetCurrentLine(); + + int position = index; + + for (int i = position - 1; i >= line.Offset; i--) + { + char c = Document.GetText(i, 1).First(); + + if (word_separators.Contains(c)) + { + break; + } + + word += c; + } + + word = new string(word.Reverse().ToArray()); + + if (word.Length > 0) + { + word = word.Replace(".", ""); + } + + return word; + } + + internal int GetCurrentWordStartIndex() + { + var line = GetCurrentLine(); + + int position = CaretOffset; + + for (int i = position - 1; i >= line.Offset; i--) + { + char c = Document.GetText(i, 1).First(); + + if (word_separators.Contains(c)) + { + return i + 1; + } + } + + return line.Offset; + } + + private String GetPreviousWord() + { + int index = GetCurrentWordStartIndex() - 1; + return GetWordByEndIndex(index); + } + + private ConstructionSession GetConstructionSession() + { + var expression = _parser.GetCurrentConstructionExpression(GetCurrentLineText()); + + if (expression != null) + { + ConstructionSession session = new ConstructionSession(); + + var line = GetCurrentLine(); + int parameterIndex = 0; + for (int i = CaretOffset; i > line.Offset; i--) + { + String c = Document.GetText(i, 1); + + if (c == "(") + { + var typeDeclaration = expression.Type as GenericNameSyntax; + + KnownType type = null; + + if (typeDeclaration != null) + { + var typeName = typeDeclaration.Identifier.ToString(); + var argumentsCount = typeDeclaration.TypeArgumentList.Arguments.Count; + session.TypeArguments = typeDeclaration.TypeArgumentList.Arguments.Select(x => x.ToString()).ToList(); + + if (argumentsCount == 0) + { + type = _knownTypes.FirstOrDefault(x => x.Type.Name == expression.Type.ToString()); + } + else + { + type = _knownTypes.FirstOrDefault(x => x.Type.Name == typeName + "`" + argumentsCount); + } + } + else + { + type = _knownTypes.FirstOrDefault(x => x.Name == expression.Type.ToString()); + } + + if (type != null) + { + session.Type = type; + session.ParameterIndex = parameterIndex; + return session; + } + else + { + return null; + } + } + else if (c == ",") + { + parameterIndex++; + } + + } + } + + return null; + } + + private MethodSession GetMethodSession() + { + var words = GetCurrentLineText().Split(' '); + + if (words.Count() > 0 && (words.First() == "private" || words.First() == "public" || words.First() == "void")) + { + return null; + } + + var expression = words.LastOrDefault(); + + if (expression != null) + { + int parameterIndex = expression.Count(x => x == ','); + expression = new string(expression.TakeWhile(x => x != '(').ToArray()); + + var tree = expression.Split('.').Select(x => x.Remove(@"\n|\r|\s|\t|\(|\)|\[|\]|<.*>")).ToList(); + var variableName = tree.FirstOrDefault(); + + if (variableName != null && tree.Count > 1) + { + tree.RemoveAt(0); + var variables = _parser.GetContextSymbols(Document.Text, CaretOffset); + var variable = variables.FirstOrDefault(x => x.Name == variableName); + + if (variable != null) + { + var knownType = _knownTypes.FirstOrDefault(x => x.FriendlyName == Regex.Replace(variable.Type, "<.+>", "<T>")); + + if (knownType != null) + { + while (tree.Count > 1) + { + var memberName = tree.First(); + tree.RemoveAt(0); + var member = knownType.Members.FirstOrDefault(x => x.Name == memberName); + + if (member == null) + { + return null; + } + + knownType = _knownTypes.FirstOrDefault(x => x.Type.Namespace + "." + x.Type.Name == member.ReturnType.Namespace + "." + member.ReturnType.Name); + } + + return new MethodSession() + { + Type = knownType, + MethodName = tree.Last(), + ParameterIndex = parameterIndex, + }; + } + } + } + } + + return null; + } + + private DeclaredMethodSession GetDeclaredMethodSession() + { + var words = GetCurrentLineText().Split(' '); + + if (words.Count() > 0 && (words.First() == "private" || words.First() == "public" || words.First() == "void")) + { + return null; + } + + var expression = GetPreviousWords().LastOrDefault(); + + if (expression != null) + { + var tree = expression.Split('.').Select(x => x.Replace("\n", "").Replace("\r", "").Replace(" ", "").Replace("\t", "").Replace("(", "").Replace(")", "").Replace("[", "").Replace("]", "")).ToList(); + var variableName = tree.FirstOrDefault(); + + if (variableName != null && tree.Count > 0) + { + tree.RemoveAt(0); + var variables = _parser.GetContextSymbols(Document.Text, CaretOffset); + var variable = variables.FirstOrDefault(x => x.Name == variableName); + + if (variable != null) + { + var declaredType = _declaredTypes.FirstOrDefault(x => x.Name == Regex.Replace(variable.Class, "<.+>", "<T>")); + + if (declaredType != null) + { + while (tree.Count > 1) + { + var memberName = tree.First(); + tree.RemoveAt(0); + var member = declaredType.Symbols.FirstOrDefault(x => x.Name == memberName); + + if (member == null) + { + return null; + } + + declaredType = _declaredTypes.FirstOrDefault(x => x.ContainingNamespace + "." + x.Name == member.ContainingNamespace + "." + member.Type); + } + + var methodName = tree.Count > 0 ? tree.Last() : variableName; + + var method = declaredType.Symbols.FirstOrDefault(x => x.Kind == SymbolKind.Method && x.Name == methodName); + + if (method != null) + { + return new DeclaredMethodSession() + { + Type = declaredType, + Method = method, + }; + } + } + else if (tree.Count == 0) + { + var method = variable; + + if (method != null) + { + return new DeclaredMethodSession() + { + Type = declaredType, + Method = method, + }; + } + } + } + } + } + + return null; + } + + private List<String> GetPreviousWords() + { + var currentLine = GetCurrentLine(); + var currentText = Document.GetText(currentLine.Offset, CaretOffset - currentLine.Offset); + return currentText.Split(' ', ',').ToList(); + } + #endregion } } diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Tango.Scripting.Editors.csproj b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Tango.Scripting.Editors.csproj index 8b213a870..10236ee42 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Tango.Scripting.Editors.csproj +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/Tango.Scripting.Editors.csproj @@ -336,6 +336,7 @@ <Compile Include="Indentation\DefaultIndentationStrategy.cs" /> <Compile Include="Indentation\IIndentationStrategy.cs" /> <Compile Include="Intellisense\KnownTypeConstructor.cs" /> + <Compile Include="Intellisense\KnownTypeField.cs" /> <Compile Include="Intellisense\KnownTypeMember.cs" /> <Compile Include="Intellisense\KnownTypeMethodParameter.cs" /> <Compile Include="Intellisense\KnownTypeMethod.cs" /> @@ -349,6 +350,7 @@ <Compile Include="Intellisense\PropertyCompletionItemPopup.cs" /> <Compile Include="Intellisense\StructCompletionItem.cs" /> <Compile Include="Intellisense\StructCompletionItemPopup.cs" /> + <Compile Include="Intellisense\Utils.cs" /> <Compile Include="Popups\MethodDescription.cs" /> <Compile Include="Popups\MethodPopup.cs" /> <Compile Include="Popups\ParameterDescription.cs" /> @@ -620,9 +622,10 @@ <ItemGroup> <Resource Include="Images\struct.png" /> </ItemGroup> + <ItemGroup /> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_UseGlobalSettings="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UseGlobalSettings="True" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/App.config b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/App.config new file mode 100644 index 000000000..b7f531317 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/App.config @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> + </startup> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/App.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/App.xaml new file mode 100644 index 000000000..9563551dd --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/App.xaml @@ -0,0 +1,9 @@ +<Application x:Class="Tango.Scripting.IDE.UI.App" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.Scripting.IDE.UI" + StartupUri="MainWindow.xaml"> + <Application.Resources> + + </Application.Resources> +</Application> diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/App.xaml.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/App.xaml.cs new file mode 100644 index 000000000..273731b71 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace Tango.Scripting.IDE.UI +{ + /// <summary> + /// Interaction logic for App.xaml + /// </summary> + public partial class App : Application + { + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/MainWindow.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/MainWindow.xaml new file mode 100644 index 000000000..0234ed063 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/MainWindow.xaml @@ -0,0 +1,13 @@ +<Window x:Class="Tango.Scripting.IDE.UI.MainWindow" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:local="clr-namespace:Tango.Scripting.IDE.UI" + xmlns:ide="clr-namespace:Tango.Scripting.IDE;assembly=Tango.Scripting.IDE" + mc:Ignorable="d" + Title="MainWindow" Height="450" Width="800" d:DataContext="{d:DesignInstance Type=local:MainWindowVM, IsDesignTimeCreatable=False}"> + <Grid> + <ide:ScriptIDEView DataContext="{Binding IdeVM}" /> + </Grid> +</Window> diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/MainWindow.xaml.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/MainWindow.xaml.cs new file mode 100644 index 000000000..be5d4ce2b --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/MainWindow.xaml.cs @@ -0,0 +1,29 @@ +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; + +namespace Tango.Scripting.IDE.UI +{ + /// <summary> + /// Interaction logic for MainWindow.xaml + /// </summary> + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + DataContext = new MainWindowVM(); + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/MainWindowVM.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/MainWindowVM.cs new file mode 100644 index 000000000..2ced386b3 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/MainWindowVM.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; + +namespace Tango.Scripting.IDE.UI +{ + public class MainWindowVM : ViewModel + { + public ScriptIDEViewVM IdeVM { get; set; } + + public MainWindowVM() + { + IdeVM = new ScriptIDEViewVM(); + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..56c3e1308 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.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.Scripting.IDE.UI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.Scripting.IDE.UI")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[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 +//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file +//inside a <PropertyGroup>. For example, if you are using US english +//in your source files, set the <UICulture> 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/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/Resources.Designer.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/Resources.Designer.cs new file mode 100644 index 000000000..45fc62ce0 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.Scripting.IDE.UI.Properties +{ + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.Scripting.IDE.UI.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/Resources.resx b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/Settings.Designer.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/Settings.Designer.cs new file mode 100644 index 000000000..fb153fa4c --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.Scripting.IDE.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/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/Settings.settings b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Properties/Settings.settings @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Tango.Scripting.IDE.UI.csproj b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Tango.Scripting.IDE.UI.csproj new file mode 100644 index 000000000..db8eff963 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/Tango.Scripting.IDE.UI.csproj @@ -0,0 +1,125 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{B0EFE7A0-7039-4DC4-8B39-465E521299F6}</ProjectGuid> + <OutputType>WinExe</OutputType> + <RootNamespace>Tango.Scripting.IDE.UI</RootNamespace> + <AssemblyName>Tango.Scripting.IDE.UI</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL"> + <HintPath>..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath> + </Reference> + <Reference Include="System.Xml" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xaml"> + <RequiredTargetFramework>4.0</RequiredTargetFramework> + </Reference> + <Reference Include="Tango.Core"> + <HintPath>..\..\..\Build\Core\Debug\Tango.Core.dll</HintPath> + </Reference> + <Reference Include="Tango.SharedUI"> + <HintPath>..\..\..\Build\Core\Debug\Tango.SharedUI.dll</HintPath> + </Reference> + <Reference Include="WindowsBase" /> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + </ItemGroup> + <ItemGroup> + <ApplicationDefinition Include="App.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </ApplicationDefinition> + <Page Include="MainWindow.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Compile Include="App.xaml.cs"> + <DependentUpon>App.xaml</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="MainWindow.xaml.cs"> + <DependentUpon>MainWindow.xaml</DependentUpon> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <ItemGroup> + <Compile Include="MainWindowVM.cs" /> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <None Include="packages.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Tango.Scripting.Editors\Tango.Scripting.Editors.csproj"> + <Project>{6c55b776-26d4-4db3-a6ab-87e783b2f3d1}</Project> + <Name>Tango.Scripting.Editors</Name> + </ProjectReference> + <ProjectReference Include="..\Tango.Scripting.IDE\Tango.Scripting.IDE.csproj"> + <Project>{c9f60285-91fb-4293-bcf5-164d76755cdd}</Project> + <Name>Tango.Scripting.IDE</Name> + </ProjectReference> + <ProjectReference Include="..\Tango.Scripting\Tango.Scripting.csproj"> + <Project>{1e938fd2-c669-4738-98c9-77f96ce4d451}</Project> + <Name>Tango.Scripting</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/packages.config b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/packages.config new file mode 100644 index 000000000..07b683c3f --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="MahApps.Metro" version="1.5.0" targetFramework="net461" /> +</packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IScriptFile.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IScriptFile.cs new file mode 100644 index 000000000..f26a0064f --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IScriptFile.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Scripting.IDE +{ + public interface IScriptFile + { + String Name { get; set; } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IScriptProject.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IScriptProject.cs new file mode 100644 index 000000000..f68114e8b --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IScriptProject.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Scripting.IDE +{ + public interface IScriptProject + { + String Name { get; set; } + + String FilePath { get; set; } + + ObservableCollection<ReferenceAssembly> References { get; set; } + + ObservableCollection<IScriptFile> Items { get; set; } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/AssemblyInfo.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..3ac597e08 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/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.Scripting.IDE")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.Scripting.IDE")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[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 +//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file +//inside a <PropertyGroup>. For example, if you are using US english +//in your source files, set the <UICulture> 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/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Resources.Designer.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Resources.Designer.cs new file mode 100644 index 000000000..ec92331cb --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.Scripting.IDE.Properties { + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if ((resourceMan == null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.Scripting.IDE.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Resources.resx b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Settings.Designer.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Settings.Designer.cs new file mode 100644 index 000000000..2a0fdc6a9 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.Scripting.IDE.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/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Settings.settings b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Settings.settings @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Resources.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Resources.xaml new file mode 100644 index 000000000..3393e6888 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Resources.xaml @@ -0,0 +1,8 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.Scripting.IDE"> + + <Color x:Key="IdeBackgroundColor">#202020</Color> + <SolidColorBrush x:Key="IdeBackgroundBrush" Color="{StaticResource IdeBackgroundColor}"></SolidColorBrush> + +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView.xaml new file mode 100644 index 000000000..3636089da --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView.xaml @@ -0,0 +1,90 @@ +<UserControl x:Class="Tango.Scripting.IDE.ScriptIDEView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Tango.Scripting.IDE" + mc:Ignorable="d" + d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:ScriptIDEViewVM, IsDesignTimeCreatable=False}"> + + <UserControl.Resources> + <ResourceDictionary> + <ResourceDictionary.MergedDictionaries> + <!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! --> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" /> + + <!-- Accent and AppTheme setting --> + + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml" /> + + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Colors.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Styles.xaml" /> + + <ResourceDictionary Source="Resources.xaml" /> + </ResourceDictionary.MergedDictionaries> + </ResourceDictionary> + </UserControl.Resources> + + <Grid Background="{StaticResource IdeBackgroundBrush}"> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="40"/> + <RowDefinition Height="41*"/> + </Grid.RowDefinitions> + + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="20"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + + <Grid> + <Menu> + <MenuItem Header="File"></MenuItem> + <MenuItem Header="Edit"></MenuItem> + <MenuItem Header="View"></MenuItem> + <MenuItem Header="Project"></MenuItem> + <MenuItem Header="Build"></MenuItem> + <MenuItem Header="Debug"></MenuItem> + <MenuItem Header="Tools"></MenuItem> + </Menu> + </Grid> + </Grid> + + <Grid Grid.Row="1"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*" MinWidth="100" /> + <ColumnDefinition Width="5"/> + <ColumnDefinition Width="200" MinWidth="20" /> + </Grid.ColumnDefinitions> + + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="1*" MinHeight="100" /> + <RowDefinition Height="5"/> + <RowDefinition Height="100" MinHeight="20" /> + </Grid.RowDefinitions> + + <Grid> + + </Grid> + + <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1" Background="Red" /> + + <Grid Grid.Row="2"> + + </Grid> + </Grid> + + <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Background="Red" /> + + <Grid Grid.Column="2"> + + </Grid> + </Grid> + </Grid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView.xaml.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView.xaml.cs new file mode 100644 index 000000000..3c816be05 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView.xaml.cs @@ -0,0 +1,28 @@ +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; + +namespace Tango.Scripting.IDE +{ + /// <summary> + /// Interaction logic for ScriptIDEControl.xaml + /// </summary> + public partial class ScriptIDEView : UserControl + { + public ScriptIDEView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEViewVM.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEViewVM.cs new file mode 100644 index 000000000..16644b6da --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEViewVM.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; + +namespace Tango.Scripting.IDE +{ + public class ScriptIDEViewVM : ViewModel + { + private IScriptProject _project; + public IScriptProject Project + { + get { return _project; } + set { _project = value; RaisePropertyChangedAuto(); } + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/StubsProject.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/StubsProject.cs new file mode 100644 index 000000000..88f538e7c --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/StubsProject.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Scripting.IDE +{ + public class StubsProject : IScriptProject + { + public string Name { get; set; } + public string FilePath { get; set; } + public ObservableCollection<ReferenceAssembly> References { get; set; } + public ObservableCollection<IScriptFile> Items { get; set; } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Tango.Scripting.IDE.csproj b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Tango.Scripting.IDE.csproj new file mode 100644 index 000000000..7c3b47ea6 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Tango.Scripting.IDE.csproj @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{C9F60285-91FB-4293-BCF5-164D76755CDD}</ProjectGuid> + <OutputType>library</OutputType> + <RootNamespace>Tango.Scripting.IDE</RootNamespace> + <AssemblyName>Tango.Scripting.IDE</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL"> + <HintPath>..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath> + </Reference> + <Reference Include="System.Xml" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xaml"> + <RequiredTargetFramework>4.0</RequiredTargetFramework> + </Reference> + <Reference Include="Tango.Core, Version=2.0.33.1608, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\Build\Core\Debug\Tango.Core.dll</HintPath> + </Reference> + <Reference Include="Tango.SharedUI"> + <HintPath>..\..\..\Build\Core\Debug\Tango.SharedUI.dll</HintPath> + </Reference> + <Reference Include="WindowsBase" /> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + </ItemGroup> + <ItemGroup> + <Compile Include="IScriptFile.cs" /> + <Compile Include="IScriptProject.cs" /> + <Compile Include="ScriptIDEView.xaml.cs"> + <DependentUpon>ScriptIDEView.xaml</DependentUpon> + </Compile> + <Compile Include="ScriptIDEViewVM.cs" /> + <Compile Include="StubsProject.cs" /> + <Page Include="Resources.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="ScriptIDEView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Themes\Generic.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <None Include="packages.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Tango.Scripting.Editors\Tango.Scripting.Editors.csproj"> + <Project>{6c55b776-26d4-4db3-a6ab-87e783b2f3d1}</Project> + <Name>Tango.Scripting.Editors</Name> + </ProjectReference> + <ProjectReference Include="..\Tango.Scripting\Tango.Scripting.csproj"> + <Project>{1e938fd2-c669-4738-98c9-77f96ce4d451}</Project> + <Name>Tango.Scripting</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/Generic.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/Generic.xaml new file mode 100644 index 000000000..d7cedf6c6 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/Generic.xaml @@ -0,0 +1,8 @@ +<ResourceDictionary + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.Scripting.IDE"> + + + +</ResourceDictionary> diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/packages.config b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/packages.config new file mode 100644 index 000000000..07b683c3f --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="MahApps.Metro" version="1.5.0" targetFramework="net461" /> +</packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.sln b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.sln index bd59e05d9..e77aad451 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.sln +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.sln @@ -9,6 +9,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Scripting.Editors", "Tango.Scripting.Editors\Tango.Scripting.Editors.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Scripting.IDE", "Tango.Scripting.IDE\Tango.Scripting.IDE.csproj", "{C9F60285-91FB-4293-BCF5-164D76755CDD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Scripting.IDE.UI", "Tango.Scripting.IDE.UI\Tango.Scripting.IDE.UI.csproj", "{B0EFE7A0-7039-4DC4-8B39-465E521299F6}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,6 +31,14 @@ Global {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Any CPU.Build.0 = Debug|Any CPU {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Any CPU.ActiveCfg = Release|Any CPU {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Any CPU.Build.0 = Release|Any CPU + {C9F60285-91FB-4293-BCF5-164D76755CDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9F60285-91FB-4293-BCF5-164D76755CDD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9F60285-91FB-4293-BCF5-164D76755CDD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9F60285-91FB-4293-BCF5-164D76755CDD}.Release|Any CPU.Build.0 = Release|Any CPU + {B0EFE7A0-7039-4DC4-8B39-465E521299F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0EFE7A0-7039-4DC4-8B39-465E521299F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0EFE7A0-7039-4DC4-8B39-465E521299F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0EFE7A0-7039-4DC4-8B39-465E521299F6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting/Parsing/ScriptParser.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting/Parsing/ScriptParser.cs index 508801037..15760c950 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting/Parsing/ScriptParser.cs +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting/Parsing/ScriptParser.cs @@ -48,6 +48,8 @@ namespace Tango.Scripting.Parsing { var currentNode = GetCaretOffsetNode(code, caretOffset); + if (currentNode == null) return new List<ScriptSymbol>(); + if (currentNode.Ancestors().OfType<BaseTypeDeclarationSyntax>().Count() == 0) { var usings = GetUsingsFull(code); @@ -368,5 +370,13 @@ namespace Tango.Scripting.Parsing return parameters; } + + public String IndentCSharpCode(String code) + { + var tree = CSharpSyntaxTree.ParseText(code); + var root = tree.GetRoot().NormalizeWhitespace(); + var ret = root.ToFullString(); + return ret; + } } } diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/MainWindow.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/MainWindow.xaml index e9cc002ba..56fe9da3c 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/MainWindow.xaml +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/MainWindow.xaml @@ -5,22 +5,10 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:editors="clr-namespace:Tango.Scripting.Editors;assembly=Tango.Scripting.Editors" xmlns:local="clr-namespace:TestApp" + xmlns:ide="clr-namespace:Tango.Scripting.IDE;assembly=Tango.Scripting.IDE" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> <Grid> - <Grid.RowDefinitions> - <RowDefinition Height="42"/> - <RowDefinition Height="377*"/> - </Grid.RowDefinitions> - - <StackPanel Orientation="Horizontal"> - <Button Padding="20 10" Click="Button_Click">START</Button> - <Button Padding="20 10" Click="Button_Click_1">STOP</Button> - <CheckBox Margin="10 0 0 0" VerticalAlignment="Center" IsChecked="{Binding ElementName=editor,Path=EnableFolding}">Enable Folding</CheckBox> - </StackPanel> - - <editors:ScriptEditor Grid.Row="1" x:Name="editor" Margin="0 5 0 0"> - - </editors:ScriptEditor> + <ide:ScriptIDEView/> </Grid> </Window> diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/MainWindow.xaml.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/MainWindow.xaml.cs index 59bd4ef50..8ae84b20e 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/MainWindow.xaml.cs +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/MainWindow.xaml.cs @@ -34,7 +34,13 @@ namespace TestApp private async void Button_Click(object sender, RoutedEventArgs e) { Script s = new Script(); - s.Code = editor.Text; + s.Code = +@" +using System; +using System.Windows.Forms; + +MessageBox.Show(""Hi Roy""); +"; try { diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/TestApp.csproj b/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/TestApp.csproj index 1f264b981..ebcb2f004 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/TestApp.csproj +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/TestApp.csproj @@ -38,8 +38,14 @@ <Reference Include="FontAwesome.WPF, Version=4.7.0.37774, Culture=neutral, PublicKeyToken=0758b07a11a4f466, processorArchitecture=MSIL"> <HintPath>..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll</HintPath> </Reference> + <Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL"> + <HintPath>..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath> + </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> + <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath> + </Reference> <Reference Include="System.Xml" /> <Reference Include="Microsoft.CSharp" /> <Reference Include="System.Core" /> @@ -103,6 +109,10 @@ <Project>{6c55b776-26d4-4db3-a6ab-87e783b2f3d1}</Project> <Name>Tango.Scripting.Editors</Name> </ProjectReference> + <ProjectReference Include="..\Tango.Scripting.IDE\Tango.Scripting.IDE.csproj"> + <Project>{c9f60285-91fb-4293-bcf5-164d76755cdd}</Project> + <Name>Tango.Scripting.IDE</Name> + </ProjectReference> <ProjectReference Include="..\Tango.Scripting\Tango.Scripting.csproj"> <Project>{1e938fd2-c669-4738-98c9-77f96ce4d451}</Project> <Name>Tango.Scripting</Name> diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/packages.config b/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/packages.config index f69b3c48f..893958c68 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/packages.config +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/TestApp/packages.config @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> <package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net461" /> + <package id="MahApps.Metro" version="1.5.0" targetFramework="net461" /> </packages>
\ No newline at end of file |
