Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #188 from NewSpring/develop
Browse files Browse the repository at this point in the history
Rock updates and more helpful error messages
  • Loading branch information
dcs619 authored Jan 16, 2018
2 parents 1c2e67c + 0401936 commit 3808d11
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 98 deletions.
25 changes: 0 additions & 25 deletions Excavator.BinaryFile/App.config

This file was deleted.

6 changes: 4 additions & 2 deletions Excavator.BinaryFile/Excavator.BinaryFile.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@
</Reference>
<Reference Include="EntityFramework">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Private>False</Private>
</Reference>
<Reference Include="Rock">
<HintPath>..\packages\Rock\Rock.dll</HintPath>
Expand Down Expand Up @@ -77,6 +79,7 @@
<ProjectReference Include="..\Excavator.Utility\Excavator.Utility.csproj">
<Project>{42dc1a5d-0637-4595-90f6-fa97dac69e95}</Project>
<Name>Excavator.Utility</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Excavator\Excavator.csproj">
<Project>{6c4100b7-6b6b-40d7-a150-deba50512c95}</Project>
Expand All @@ -85,7 +88,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
25 changes: 0 additions & 25 deletions Excavator.CSV/App.config

This file was deleted.

2 changes: 1 addition & 1 deletion Excavator.CSV/CSVComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ private static string GetFileRootName( string fileName )
/// <returns></returns>
private static bool FileTypeMatches( CSVInstance.RockDataType filetype, string name )
{
if ( name.ToUpper().StartsWith( filetype.ToString() ) )
if ( name.ToUpper().StartsWith( filetype.ToString() ) || name.ToUpper().EndsWith( filetype.ToString() ) )
{
return true;
}
Expand Down
7 changes: 5 additions & 2 deletions Excavator.CSV/Excavator.CSV.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,19 @@
</Reference>
<Reference Include="EntityFramework">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="LumenWorks.Framework.IO, Version=3.9.1.0, Culture=neutral, PublicKeyToken=5ad3ea2f85776344, processorArchitecture=MSIL">
<HintPath>..\packages\LumenWorksCsvReader.3.9.1\lib\net20\LumenWorks.Framework.IO.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Private>False</Private>
</Reference>
<Reference Include="Rock">
<HintPath>..\packages\Rock\Rock.dll</HintPath>
Expand Down Expand Up @@ -80,6 +83,7 @@
<ProjectReference Include="..\Excavator.Utility\Excavator.Utility.csproj">
<Project>{42dc1a5d-0637-4595-90f6-fa97dac69e95}</Project>
<Name>Excavator.Utility</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Excavator\Excavator.csproj">
<Project>{6c4100b7-6b6b-40d7-a150-deba50512c95}</Project>
Expand All @@ -88,7 +92,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
8 changes: 5 additions & 3 deletions Excavator.CSV/Maps/Family.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,19 @@ private int LoadFamily( CSVInstance csvData )
{
ForeignKey = rowFamilyKey,
ForeignId = rowFamilyId,
Name = row[FamilyName],
CreatedByPersonAliasId = ImportPersonAliasId,
GroupTypeId = FamilyGroupTypeId
};
newFamilyList.Add( currentFamilyGroup );
}
else
else if ( !lookupContext.ChangeTracker.Entries<Group>().Any( g => g.Entity.ForeignId == rowFamilyId || g.Entity.ForeignKey == rowFamilyKey ) )
{
currentFamilyGroup.Name = row[FamilyName];
// track changes if not currently tracking
lookupContext.Groups.Attach( currentFamilyGroup );
}

currentFamilyGroup.Name = row[FamilyName];

// Set the family campus
var campusName = row[Campus];
if ( !string.IsNullOrWhiteSpace( campusName ) )
Expand Down Expand Up @@ -146,6 +147,7 @@ private int LoadFamily( CSVInstance csvData )

// Reset lookup context
lookupContext.SaveChanges();
lookupContext.Dispose();
lookupContext = new RockContext();
locationService = new LocationService( lookupContext );
newFamilyList.Clear();
Expand Down
7 changes: 6 additions & 1 deletion Excavator.Example/Excavator.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,25 @@
</Reference>
<Reference Include="EntityFramework">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Private>False</Private>
</Reference>
<Reference Include="OrcaMDF.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Rock\OrcaMDF.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OrcaMDF.Framework, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Rock\OrcaMDF.Framework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rock">
<HintPath>..\packages\Rock\Rock.dll</HintPath>
Expand All @@ -79,6 +83,7 @@
<ProjectReference Include="..\Excavator.Utility\Excavator.Utility.csproj">
<Project>{42dc1a5d-0637-4595-90f6-fa97dac69e95}</Project>
<Name>Excavator.Utility</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Excavator\Excavator.csproj">
<Project>{6c4100b7-6b6b-40d7-a150-deba50512c95}</Project>
Expand Down
26 changes: 0 additions & 26 deletions Excavator.FellowshipOne/App.config

This file was deleted.

7 changes: 5 additions & 2 deletions Excavator.FellowshipOne/Excavator.F1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,19 @@
</Reference>
<Reference Include="EntityFramework">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Private>False</Private>
</Reference>
<Reference Include="OrcaMDF.Core">
<HintPath>..\packages\Rock\OrcaMDF.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rock">
<HintPath>..\packages\Rock\Rock.dll</HintPath>
Expand Down Expand Up @@ -111,6 +114,7 @@
<ProjectReference Include="..\Excavator.Utility\Excavator.Utility.csproj">
<Project>{42dc1a5d-0637-4595-90f6-fa97dac69e95}</Project>
<Name>Excavator.Utility</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\excavator\Excavator.csproj">
<Project>{6c4100b7-6b6b-40d7-a150-deba50512c95}</Project>
Expand All @@ -119,7 +123,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
4 changes: 4 additions & 0 deletions Excavator.Utility/Excavator.Utility.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,19 @@
<ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OrcaMDF.Core">
<HintPath>..\packages\Rock\OrcaMDF.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rock">
<HintPath>..\packages\Rock\Rock.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
Expand Down
Binary file modified Excavator.zip
Binary file not shown.
25 changes: 21 additions & 4 deletions Excavator/Excavator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,25 @@
<ApplicationIcon>Resources\rock.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Costura, Version=1.6.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="DotLiquid">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Rock\DotLiquid.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Humanizer, Version=2.1.0.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL">
<HintPath>..\packages\Rock\Humanizer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="LumenWorks.Framework.IO, Version=3.9.1.0, Culture=neutral, PublicKeyToken=5ad3ea2f85776344, processorArchitecture=MSIL">
<HintPath>..\packages\LumenWorksCsvReader.3.9.1\lib\net20\LumenWorks.Framework.IO.dll</HintPath>
Expand Down Expand Up @@ -140,9 +147,11 @@
</Reference>
<Reference Include="OrcaMDF.Core">
<HintPath>..\packages\Rock\OrcaMDF.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OrcaMDF.Framework">
<HintPath>..\packages\Rock\OrcaMDF.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Rock">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -155,6 +164,7 @@
</Reference>
<Reference Include="StackExchange.Redis">
<HintPath>..\packages\Rock\StackExchange.Redis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
Expand Down Expand Up @@ -307,7 +317,9 @@
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<None Include="FodyWeavers.xml" />
<None Include="FodyWeavers.xml">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<UsingTask TaskName="CosturaCleanup" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" TaskFactory="CodeTaskFactory">
Expand Down Expand Up @@ -351,10 +363,15 @@ foreach (var item in filesToCleanup)
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
<Error Condition="!Exists('..\packages\Fody.1.29.4\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.29.4\build\dotnet\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets'))" />
<Error Condition="!Exists('..\packages\Fody.2.3.20\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.2.3.20\build\Fody.targets'))" />
</Target>
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Import Project="..\packages\Fody.1.29.4\build\dotnet\Fody.targets" Condition="Exists('..\packages\Fody.1.29.4\build\dotnet\Fody.targets')" />
<Import Project="..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets')" />
<Target AfterTargets="AfterBuild;NonWinFodyTarget" Name="CleanReferenceCopyLocalPaths" Condition=" '$(Configuration)' == 'Release' ">
<Delete Files="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')" />
</Target>
<Import Project="..\packages\Fody.2.3.20\build\Fody.targets" Condition="Exists('..\packages\Fody.2.3.20\build\Fody.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
2 changes: 1 addition & 1 deletion Excavator/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers>
<Costura/>
<Costura IncludeDebugSymbols='false' />
</Weavers>
4 changes: 2 additions & 2 deletions Excavator/Views/ConnectPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
Grid.ColumnSpan="2" VerticalAlignment="Bottom"
Margin="0 0 0 20"
Style="{StaticResource labelStyleAlert}">
Could not open source file. Please make sure the file is not in use.
Could not read source file. It could be in use or the filename does not match an import type.
</Label>

<!-- Connect to Destination -->
Expand Down Expand Up @@ -120,4 +120,4 @@
</Button>
</Grid>
</Grid>
</Page>
</Page>
4 changes: 2 additions & 2 deletions Excavator/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Icon="..\Resources\rock.ico"
Title="Rock Excavator"
Height="500" Width="750"
Height="600" Width="800"
MinHeight="450" MinWidth="600"
Background="{StaticResource windowBackground}"
ShowsNavigationUI="False"
Source=".\ConnectPage.xaml"
FontFamily="Resources/#Open Sans Regular" FontSize="14"
WindowStartupLocation="CenterScreen">
</NavigationWindow>
</NavigationWindow>
Loading

0 comments on commit 3808d11

Please sign in to comment.