diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-18 13:25:48 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-18 13:25:48 +0300 |
| commit | 1356c4682507fe3c7bdfebc7316fcad1b67594a1 (patch) | |
| tree | 4c1f3db6588dc1be3d323f09779a532dd2c848d7 /Software/Visual_Studio/Tango.Documents | |
| parent | a5ec5d754dd516dfadbb34fe1b167eff817ded6e (diff) | |
| download | Tango-1356c4682507fe3c7bdfebc7316fcad1b67594a1.tar.gz Tango-1356c4682507fe3c7bdfebc7316fcad1b67594a1.zip | |
Modified Tech_IOS according to Avidan spec.
Added Tango.Documents library.
Implemented Ports List Generator.
Diffstat (limited to 'Software/Visual_Studio/Tango.Documents')
8 files changed, 745 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Documents/ExcelReader.cs b/Software/Visual_Studio/Tango.Documents/ExcelReader.cs new file mode 100644 index 000000000..b212678ae --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/ExcelReader.cs @@ -0,0 +1,427 @@ +using DocumentFormat.OpenXml.Packaging; +using DocumentFormat.OpenXml.Spreadsheet; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text.RegularExpressions; + +namespace Tango.Documents +{ + /// <summary> + /// Represents a class for reading excel document rows by the specified model. + /// </summary> + public class ExcelReader : IDisposable + { + private SpreadsheetDocument document; //Will contain the Excel document. + private List<DefinedName> names; //Will contain the collection of Excel defined names. + private bool throwError; //Determines whether to throw exceptions while parsing the Excel file. + private string sheetN; //Will contain the specified Excel sheet name. + private Stream fileStream; //Will contain the Excel file stream. + + #region Constructors + + /// <summary> + /// Initializes a new instance of the ExcelReader. + /// </summary> + /// <param name="source">Document Stream.</param> + /// <param name="throwOnError">Throw exceptions if encountering an error while parsing the document.</param> + public ExcelReader(Stream source, bool throwOnError = true) + { + sheetN = String.Empty; + fileStream = source; + document = SpreadsheetDocument.Open(source, false); + names = new List<DefinedName>(); + if (document.WorkbookPart.Workbook.GetFirstChild<DefinedNames>() != null) + { + foreach (DefinedName name in document.WorkbookPart.Workbook.GetFirstChild<DefinedNames>()) + names.Add(name); + } + throwError = throwOnError; + } + + /// <summary> + /// Initializes a new instance of ExcelReader. + /// </summary> + /// <param name="templatePath">File path to the Excel document.</param> + /// <param name="throwOnError">Throw exceptions if encountering an error while parsing the document.</param> + public ExcelReader(string templatePath, bool throwOnError = true) + : this(File.OpenRead(templatePath), throwOnError) { } + + + #endregion + + #region Public Methods + + public List<T> GetDataByIndex<T>(String sheetName, int firstRowIndex) + { + sheetN = sheetName; + + List<T> results = new List<T>(); + + Worksheet currWorksheet = GetWorkSheetPart().Worksheet; + int rowCount = currWorksheet.Descendants<Row>().Count(); + + PropertyInfo[] properties = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance); + + for (int rowIndex = firstRowIndex; rowIndex < rowCount; rowIndex++) + { + Row row = GetRow(currWorksheet, rowIndex); + if (row == null) + break; + + T newObj = (T)Activator.CreateInstance<T>(); + + List<Cell> cells = GetRowCells(row).ToList(); + + for (int cellIndex = 0; cellIndex < Math.Min(properties.Count(), cells.Count); cellIndex++) + { + Cell cell = cells[cellIndex] as Cell; + String value = CellValue(cell); + + properties[cellIndex].SetValue(newObj, value); + } + + results.Add(newObj); + } + + return results; + } + + /// <summary> + /// Parse the document and populate the specified model collection using reflections. + /// </summary> + /// <typeparam name="T">Type of model.</typeparam> + /// <param name="sheetName">Document Sheet name.</param> + /// <returns>Collection of models reflecting the parsed rows.</returns> + public List<T> GetData<T>(String sheetName) + { + sheetN = sheetName; + + List<T> ret = new List<T>(); + + PropertyInfo[] PropColl = typeof(T).GetProperties(); + names = (from pr in PropColl + join n in names + on pr.Name equals n.Name.ToString() + select n).ToList(); + + if (this.names.Any()) + { + int Rowindex = GetFirstRowNumber() + 1; + Worksheet currWorksheet = GetWorkSheetPart().Worksheet; + int rowCount = currWorksheet.Descendants<Row>().Count(); + while (Rowindex <= rowCount) + { + string a = ""; + try + { + Row curr = GetRow(currWorksheet, Rowindex); + if (curr == null) + break; + + bool isEmptyRow = true; + T newObj = (T)Activator.CreateInstance<T>(); + + foreach (DefinedName name in names) + { + Stopwatch watchCol = new Stopwatch(); + watchCol.Start(); + + + var t = curr.ElementAtOrDefault(12); + + Cell theCell = + curr.Descendants<Cell>().Where(c => c.CellReference == GetColumn(name) + Rowindex.ToString()).FirstOrDefault(); + PropertyInfo Prop = PropColl.FirstOrDefault(pr => pr.Name == name.Name); + + a = CellValue(theCell); + if (a != null) + { + isEmptyRow = false; + SetPropValue(a, newObj, Prop); + } + } + if (isEmptyRow) + break; + ret.Add(newObj); + } + catch (Exception ex) + { + if (throwError) + { + throw ex; + } + } + Rowindex++; + } + } + return ret.ToList(); + } + + /// <summary> + /// Disposes the document stream. + /// </summary> + public void Close() + { + fileStream.Close(); + fileStream.Dispose(); + } + + #endregion + + #region Private Methods + + ///<summary>returns an empty cell when a blank cell is encountered + ///</summary> + public static IEnumerable<Cell> GetRowCells(Row row) + { + int currentCount = 0; + + foreach (Cell cell in row.Descendants<Cell>()) + { + string columnName = GetColumnName(cell.CellReference); + + int currentColumnIndex = ConvertColumnNameToNumber(columnName); + + for (; currentCount < currentColumnIndex; currentCount++) + { + yield return new DocumentFormat.OpenXml.Spreadsheet.Cell(); + } + + yield return cell; + currentCount++; + } + } + + /// <summary> + /// Given a cell name, parses the specified cell to get the column name. + /// </summary> + /// <param name="cellReference">Address of the cell (ie. B2)</param> + /// <returns>Column Name (ie. B)</returns> + public static string GetColumnName(string cellReference) + { + // Match the column name portion of the cell name. + var regex = new System.Text.RegularExpressions.Regex("[A-Za-z]+"); + var match = regex.Match(cellReference); + + return match.Value; + } + + /// <summary> + /// Given just the column name (no row index), + /// it will return the zero based column index. + /// </summary> + /// <param name="columnName">Column Name (ie. A or AB)</param> + /// <returns>Zero based index if the conversion was successful</returns> + /// <exception cref="ArgumentException">thrown if the given string + /// contains characters other than uppercase letters</exception> + public static int ConvertColumnNameToNumber(string columnName) + { + var alpha = new System.Text.RegularExpressions.Regex("^[A-Z]+$"); + if (!alpha.IsMatch(columnName)) throw new ArgumentException(); + + char[] colLetters = columnName.ToCharArray(); + Array.Reverse(colLetters); + + int convertedValue = 0; + for (int i = 0; i < colLetters.Length; i++) + { + char letter = colLetters[i]; + int current = i == 0 ? letter - 65 : letter - 64; // ASCII 'A' = 65 + convertedValue += current * (int)Math.Pow(26, i); + } + + return convertedValue; + } + + /// <summary> + /// Cells the value. + /// </summary> + /// <param name="cell">The cell.</param> + /// <returns></returns> + private string CellValue(Cell cell) + { + if (cell == null) return null; + string value = (cell.CellFormula == null) ? cell.InnerText : cell.CellValue.InnerText; + if (String.IsNullOrEmpty(value)) return null; + + if (cell.DataType != null) + { + switch (cell.DataType.Value) + { + case CellValues.SharedString: + var stringTable = document.WorkbookPart.SharedStringTablePart; + if (stringTable != null) + { + value = stringTable.SharedStringTable. + ElementAt(int.Parse(value)).InnerText; + } + break; + + case CellValues.Boolean: + switch (value) + { + case "0": + value = "FALSE"; + break; + default: + value = "TRUE"; + break; + } + break; + } + } + return value; + } + + /// <summary> + /// Determines whether [is empty row] [the specified row]. + /// </summary> + /// <param name="row">The row.</param> + /// <returns></returns> + private bool IsEmptyRow(Row row) + { + Worksheet currWorksheet = GetWorkSheetPart().Worksheet; + foreach (DefinedName name in names) + { + Cell theCell = row.Descendants<Cell>(). + Where(c => c.CellReference == GetColumn(name) + row.RowIndex.ToString()).FirstOrDefault(); + + if (theCell == null || theCell.CellValue == null) + continue; + if (!string.IsNullOrEmpty(theCell.CellValue.Text)) + return false; + } + return true; + } + + /// <summary> + /// Gets the first row number. + /// </summary> + /// <returns></returns> + private int GetFirstRowNumber() + { + Regex rowPatern = new Regex("^.*\\!\\$.*\\$(\\d*)$"); + Match match = rowPatern.Match(names[0].Text); + return Convert.ToInt32(match.Groups[1].Value); + } + + /// <summary> + /// Gets the column. + /// </summary> + /// <param name="name">The name.</param> + /// <returns></returns> + private string GetColumn(DefinedName name) + { + Regex rowPatern = new Regex("^.*\\!\\$(.*)\\$\\d*$"); + Match match = rowPatern.Match(name.Text); + return match.Groups[1].Value; + } + + /// <summary> + /// Gets the row. + /// </summary> + /// <param name="worksheet">The worksheet.</param> + /// <param name="rowIndex">Index of the row.</param> + /// <returns></returns> + private Row GetRow(Worksheet worksheet, int rowIndex) + { + var row = worksheet.GetFirstChild<SheetData>(). + Elements<Row>().Where(r => r.RowIndex == rowIndex).FirstOrDefault(); + return row; + } + + /// <summary> + /// Gets the work sheet part. + /// </summary> + /// <returns></returns> + private WorksheetPart GetWorkSheetPart() + { + //get worksheet based on defined name + var sheet = document.WorkbookPart.Workbook.Descendants<Sheet>().FirstOrDefault(x => x.Name.Value == sheetN); + string relId = sheet.Id; + + return (WorksheetPart)document.WorkbookPart.GetPartById(relId); + } + + + /// <summary> + /// Gets the name of the sheet. + /// </summary> + /// <returns></returns> + private string GetSheetName() + { + Regex rowPatern = new Regex("^(.*)\\!\\$.*\\$\\d*$"); + Match match = rowPatern.Match(names[0].Text); + return match.Groups[1].Value; + } + + /// <summary> + /// Sets the property value. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="val">The value.</param> + /// <param name="obj">The object.</param> + /// <param name="prop">The property.</param> + private static void SetPropValue<T>(object val, T obj, PropertyInfo prop) + { + try + { + Type PType = prop.PropertyType; + if (val == null) + prop.SetValue(obj, null, null); + else if (PType == typeof(int) || PType == typeof(int?)) + prop.SetValue(obj, Convert.ToInt32(val), null); + else if (PType == typeof(Int16) || PType == typeof(Int16?)) + prop.SetValue(obj, Convert.ToInt16(val), null); + else if (PType == typeof(Int64) || PType == typeof(Int64?)) + prop.SetValue(obj, Convert.ToInt64(val), null); + else if (PType == typeof(Double) || PType == typeof(Double?)) + { + double? tDouble = null; + if (val.ToString().ToLower().Contains("e")) + tDouble = double.Parse(val.ToString(), NumberStyles.Any); + else + tDouble = Convert.ToDouble(val); + prop.SetValue(obj, tDouble, null); + } + else if (PType == typeof(decimal) || PType == typeof(decimal?)) + { + decimal? tDecimal = null; + if (val.ToString().ToLower().Contains("e")) + tDecimal = decimal.Parse(val.ToString(), NumberStyles.Any); + else + tDecimal = Convert.ToDecimal(val); + prop.SetValue(obj, tDecimal, null); + } + else if (PType == typeof(DateTime) || PType == typeof(DateTime?)) + prop.SetValue(obj, Convert.ToDateTime(val), null); + else if (PType == typeof(bool) || PType == typeof(bool?)) + prop.SetValue(obj, Convert.ToBoolean(val), null); + else if (PType == typeof(byte) || PType == typeof(byte?)) + prop.SetValue(obj, Convert.ToByte(val), null); + else + prop.SetValue(obj, val, null); + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region IDisposable + + public void Dispose() + { + Close(); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Documents/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Documents/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..6d98f948c --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/Properties/AssemblyInfo.cs @@ -0,0 +1,6 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Tango - Documents Library")] +[assembly: ComVisible(false)]
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Documents/Properties/Resources.Designer.cs b/Software/Visual_Studio/Tango.Documents/Properties/Resources.Designer.cs new file mode 100644 index 000000000..b9679f298 --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/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.Documents.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.Documents.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/Tango.Documents/Properties/Resources.resx b/Software/Visual_Studio/Tango.Documents/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Documents/Properties/Settings.Designer.cs b/Software/Visual_Studio/Tango.Documents/Properties/Settings.Designer.cs new file mode 100644 index 000000000..30a9edec0 --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/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.Documents.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/Tango.Documents/Properties/Settings.settings b/Software/Visual_Studio/Tango.Documents/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/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/Tango.Documents/Tango.Documents.csproj b/Software/Visual_Studio/Tango.Documents/Tango.Documents.csproj new file mode 100644 index 000000000..0eb8d366e --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/Tango.Documents.csproj @@ -0,0 +1,90 @@ +<?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>{CA87A608-7B17-4C98-88F2-42ABEE10F4C1}</ProjectGuid> + <OutputType>library</OutputType> + <RootNamespace>Tango.Documents</RootNamespace> + <AssemblyName>Tango.Documents</AssemblyName> + <TargetFrameworkVersion>v4.6</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>..\Build\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>..\Build\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="DocumentFormat.OpenXml, Version=2.7.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL"> + <HintPath>..\packages\DocumentFormat.OpenXml.2.7.2\lib\net46\DocumentFormat.OpenXml.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.IO.FileSystem.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.IO.FileSystem.Primitives.4.0.1\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath> + </Reference> + <Reference Include="System.IO.Packaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.IO.Packaging.4.0.0\lib\net46\System.IO.Packaging.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="WindowsBase" /> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + </ItemGroup> + <ItemGroup> + <Compile Include="..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + </ItemGroup> + <ItemGroup> + <Compile Include="ExcelReader.cs" /> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType> + </SubType> + </Compile> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <None Include="packages.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Documents/packages.config b/Software/Visual_Studio/Tango.Documents/packages.config new file mode 100644 index 000000000..fd4d0d0aa --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/packages.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="DocumentFormat.OpenXml" version="2.7.2" targetFramework="net46" /> + <package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net46" /> + <package id="System.IO.Packaging" version="4.0.0" targetFramework="net46" /> +</packages>
\ No newline at end of file |
