This commit is contained in:
Wiesław Šoltés 2018-06-15 16:39:17 +02:00
Родитель 5c9aedb0e6
Коммит e9c2fa8296
14 изменённых файлов: 50 добавлений и 196 удалений

Просмотреть файл

@ -5,10 +5,6 @@ VisualStudioVersion = 15.0.27703.2026
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MicroStationTagExplorer", "src\MicroStationTagExplorer\MicroStationTagExplorer.csproj", "{59F5B5F5-2569-4263-9E94-D53DA097FCAD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MicroStationTagExplorerInterop", "src\MicroStationTagExplorerInterop\MicroStationTagExplorerInterop.csproj", "{CDDC9304-E54C-4E6C-A647-4C6FC78DB2A6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MicroStationTagExplorerModel", "src\MicroStationTagExplorerModel\MicroStationTagExplorerModel.csproj", "{E75B1451-B4EA-4806-87BA-11C596EB6B3E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -19,14 +15,6 @@ Global
{59F5B5F5-2569-4263-9E94-D53DA097FCAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59F5B5F5-2569-4263-9E94-D53DA097FCAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59F5B5F5-2569-4263-9E94-D53DA097FCAD}.Release|Any CPU.Build.0 = Release|Any CPU
{CDDC9304-E54C-4E6C-A647-4C6FC78DB2A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CDDC9304-E54C-4E6C-A647-4C6FC78DB2A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CDDC9304-E54C-4E6C-A647-4C6FC78DB2A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CDDC9304-E54C-4E6C-A647-4C6FC78DB2A6}.Release|Any CPU.Build.0 = Release|Any CPU
{E75B1451-B4EA-4806-87BA-11C596EB6B3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E75B1451-B4EA-4806-87BA-11C596EB6B3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E75B1451-B4EA-4806-87BA-11C596EB6B3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E75B1451-B4EA-4806-87BA-11C596EB6B3E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Просмотреть файл

@ -123,6 +123,27 @@ namespace MicroStationTagExplorer
{
}
private void ToValues(Tag[] tags, out object[,] values)
{
values = new object[tags.Length + 1, 6];
values[0, 0] = "TagSetName";
values[0, 1] = "TagDefinitionName";
values[0, 2] = "Value";
values[0, 3] = "ID";
values[0, 4] = "HostID";
values[0, 5] = "Path";
for (int i = 0; i < tags.Length; i++)
{
values[i + 1, 0] = tags[i].TagSetName;
values[i + 1, 1] = tags[i].TagDefinitionName;
values[i + 1, 2] = tags[i].Value.ToString();
values[i + 1, 3] = tags[i].ID.ToString();
values[i + 1, 4] = tags[i].HostID.ToString();
values[i + 1, 5] = tags[i].Path;
}
}
private void ExportTags()
{
if (DataGridFiles.DataContext == null)
@ -137,26 +158,9 @@ namespace MicroStationTagExplorer
try
{
var tags = files.SelectMany(f => f.Tags).ToArray();
var values = new object[tags.Length + 1, 6];
values[0, 0] = "TagSetName";
values[0, 1] = "TagDefinitionName";
values[0, 2] = "Value";
values[0, 3] = "ID";
values[0, 4] = "HostID";
values[0, 5] = "Path";
for (int i = 0; i < tags.Length; i++)
{
values[i + 1, 0] = tags[i].TagSetName;
values[i + 1, 1] = tags[i].TagDefinitionName;
values[i + 1, 2] = tags[i].Value.ToString();
values[i + 1, 3] = tags[i].ID.ToString();
values[i + 1, 4] = tags[i].HostID.ToString();
values[i + 1, 5] = tags[i].Path;
}
object[,] values;
Tag[] tags = files.SelectMany(f => f.Tags).ToArray();
ToValues(tags, out values);
Excelnterop.ExportTags(values, tags.Length + 1, 6);
}
catch (Exception ex)

Просмотреть файл

@ -34,6 +34,25 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Interop.MicroStationDGN">
<HintPath>..\..\interop\View V8i\Interop.MicroStationDGN.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
<HintPath>..\..\interop\Excel 2016\Microsoft.Office.Interop.Excel.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Vbe.Interop, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
<HintPath>..\..\interop\Excel 2016\Microsoft.Vbe.Interop.dll</HintPath>
</Reference>
<Reference Include="Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
<HintPath>..\..\interop\Excel 2016\Office.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
@ -61,12 +80,19 @@
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Interop\Excelnterop.cs" />
<Compile Include="Interop\MicrostationInterop.cs" />
<Compile Include="Interop\Utilities.cs" />
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Model\File.cs" />
<Compile Include="Model\Tag.cs" />
<Compile Include="Model\TagDefinition.cs" />
<Compile Include="Model\TagSet.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
@ -74,15 +100,5 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MicroStationTagExplorerInterop\MicroStationTagExplorerInterop.csproj">
<Project>{cddc9304-e54c-4e6c-a647-4c6fc78db2a6}</Project>
<Name>MicroStationTagExplorerInterop</Name>
</ProjectReference>
<ProjectReference Include="..\MicroStationTagExplorerModel\MicroStationTagExplorerModel.csproj">
<Project>{e75b1451-b4ea-4806-87ba-11c596eb6b3e}</Project>
<Name>MicroStationTagExplorerModel</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

Просмотреть файл

@ -1,74 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.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>{CDDC9304-E54C-4E6C-A647-4C6FC78DB2A6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MicroStationTagExplorerInterop</RootNamespace>
<AssemblyName>MicroStationTagExplorerInterop</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</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="Interop.MicroStationDGN">
<HintPath>..\..\interop\View V8i\Interop.MicroStationDGN.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
<HintPath>..\..\interop\Excel 2016\Microsoft.Office.Interop.Excel.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Vbe.Interop, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
<HintPath>..\..\interop\Excel 2016\Microsoft.Vbe.Interop.dll</HintPath>
</Reference>
<Reference Include="Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
<HintPath>..\..\interop\Excel 2016\Office.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Excelnterop.cs" />
<Compile Include="MicrostationInterop.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utilities.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MicroStationTagExplorerModel\MicroStationTagExplorerModel.csproj">
<Project>{e75b1451-b4ea-4806-87ba-11c596eb6b3e}</Project>
<Name>MicroStationTagExplorerModel</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

Просмотреть файл

@ -1,15 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("MicroStationTagExplorerInterop")]
[assembly: AssemblyDescription("MicroStation Tag Explorer Interop")]
[assembly: AssemblyConfiguration("Wiesław Šoltés")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MicroStationTagExplorerInterop")]
[assembly: AssemblyCopyright("Copyright © Wiesław Šoltés 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("cddc9304-e54c-4e6c-a647-4c6fc78db2a6")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Просмотреть файл

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.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>{E75B1451-B4EA-4806-87BA-11C596EB6B3E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MicroStationTagExplorerModel</RootNamespace>
<AssemblyName>MicroStationTagExplorerModel</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</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="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="File.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Tag.cs" />
<Compile Include="TagDefinition.cs" />
<Compile Include="TagSet.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

Просмотреть файл

@ -1,15 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("MicroStationTagExplorerModel")]
[assembly: AssemblyDescription("MicroStation Tag Explorer Model")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Wiesław Šoltés")]
[assembly: AssemblyProduct("MicroStationTagExplorerModel")]
[assembly: AssemblyCopyright("Copyright © Wiesław Šoltés 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("e75b1451-b4ea-4806-87ba-11c596eb6b3e")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]