Skip to content

Commit

Permalink
Migration of code from app to separate component
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Apr 19, 2017
1 parent 14f0f8b commit 152625f
Show file tree
Hide file tree
Showing 61 changed files with 3,133 additions and 11 deletions.
7 changes: 6 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ license the code was delivered upon. Below is a list of other components / licen

Note: if you feel an item is missing in this list, please let us know!

* AvalonEdit
https://github.com/icsharpcode/AvalonEdit
Original license: MIT

* Catel
https://github.com/catel/catel
Original license: MIT
Original license: MIT

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
![Version](https://img.shields.io/nuget/v/[NUGET.PACKAGENAME].svg)
![Pre-release version](https://img.shields.io/nuget/vpre/Orc.CsvTextEditor.svg)

To be described.
Csv text editor component based on AvalonEdit.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<owners>WildGums</owners>

<description>
Orc.CsvTextEditor description.
Csv text editor component based on AvalonEdit.
</description>
<summary>
</summary>
Expand All @@ -24,7 +24,9 @@
<!--<iconUrl>http://www.catenalogic.com/catel.png</iconUrl>-->

<dependencies>
<!-- <dependency id="Catel.Core" version="[replaced]" /> -->
<dependency id="Catel.Core" version="[replaced]" />
<dependency id="Catel.MVVM" version="[replaced]" />
<dependency id="AvalonEdit" version="[replaced]" />
</dependencies>
</metadata>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
<Reference Include="Catel.MVVM, Version=4.5.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.MVVM.4.5.4\lib\net40\Catel.MVVM.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Threading.Tasks">
<HintPath>..\..\..\lib\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
<Private>True</Private>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net40" developmentDependency="true" />
<package id="AvalonEdit" version="5.0.3" targetFramework="net40" />
<package id="Catel.Core" version="4.5.4" targetFramework="net40" />
<package id="Catel.Extensions.Controls" version="4.5.4" targetFramework="net40" />
<package id="Catel.Fody" version="2.15.0" targetFramework="net40" developmentDependency="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
<Reference Include="Catel.MVVM, Version=4.5.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.MVVM.4.5.4\lib\net45\Catel.MVVM.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.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">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net40" developmentDependency="true" />
<package id="AvalonEdit" version="5.0.3" targetFramework="net45" />
<package id="Catel.Core" version="4.5.4" targetFramework="net45" />
<package id="Catel.Extensions.Controls" version="4.5.4" targetFramework="net45" />
<package id="Catel.Fody" version="2.15.0" targetFramework="net45" developmentDependency="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
<Reference Include="Catel.MVVM, Version=4.5.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.MVVM.4.5.4\lib\net46\Catel.MVVM.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.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">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net40" developmentDependency="true" />
<package id="AvalonEdit" version="5.0.3" targetFramework="net46" />
<package id="Catel.Core" version="4.5.4" targetFramework="net46" />
<package id="Catel.Extensions.Controls" version="4.5.4" targetFramework="net46" />
<package id="Catel.Fody" version="2.15.0" targetFramework="net46" developmentDependency="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
<Reference Include="Catel.Fody.Attributes, Version=2.15.0.0, Culture=neutral, PublicKeyToken=1c8163524cbe02e6, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.Fody.2.15.0\lib\portable-net4+sl4+wp7+win8+wpa81+MonoAndroid14+MonoTouch40\Catel.Fody.Attributes.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Threading.Tasks">
<HintPath>..\..\..\lib\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
<Private>True</Private>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net40" developmentDependency="true" />
<package id="AvalonEdit" version="5.0.3" targetFramework="net40" />
<package id="Catel.Core" version="4.5.4" targetFramework="net40" />
<package id="Catel.Fody" version="2.15.0" targetFramework="net40" developmentDependency="true" />
<package id="Fody" version="1.29.4" targetFramework="net40" developmentDependency="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
<Reference Include="Catel.Fody.Attributes, Version=2.15.0.0, Culture=neutral, PublicKeyToken=1c8163524cbe02e6, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.Fody.2.15.0\lib\portable-net4+sl4+wp7+win8+wpa81+MonoAndroid14+MonoTouch40\Catel.Fody.Attributes.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net40" developmentDependency="true" />
<package id="AvalonEdit" version="5.0.3" targetFramework="net45" />
<package id="Catel.Core" version="4.5.4" targetFramework="net45" />
<package id="Catel.Fody" version="2.15.0" targetFramework="net45" developmentDependency="true" />
<package id="Fody" version="1.29.4" targetFramework="net45" developmentDependency="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
<Reference Include="Catel.Fody.Attributes, Version=2.15.0.0, Culture=neutral, PublicKeyToken=1c8163524cbe02e6, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.Fody.2.15.0\lib\portable-net4+sl4+wp7+win8+wpa81+MonoAndroid14+MonoTouch40\Catel.Fody.Attributes.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net40" developmentDependency="true" />
<package id="AvalonEdit" version="5.0.3" targetFramework="net46" />
<package id="Catel.Core" version="4.5.4" targetFramework="net46" />
<package id="Catel.Fody" version="2.15.0" targetFramework="net46" developmentDependency="true" />
<package id="Fody" version="1.29.4" targetFramework="net46" developmentDependency="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
<Reference Include="Catel.Fody.Attributes, Version=2.15.0.0, Culture=neutral, PublicKeyToken=1c8163524cbe02e6, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.Fody.2.15.0\lib\portable-net4+sl4+wp7+win8+wpa81+MonoAndroid14+MonoTouch40\Catel.Fody.Attributes.dll</HintPath>
</Reference>
<Reference Include="Catel.MVVM, Version=4.5.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.MVVM.4.5.4\lib\net40\Catel.MVVM.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Threading.Tasks">
<HintPath>..\..\..\lib\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
</Reference>
Expand All @@ -64,6 +70,8 @@
<HintPath>..\..\..\lib\Obsolete.Fody.4.1.0\Lib\portable-net4+sl5+wp8+win8+wpa81+MonoAndroid16+MonoTouch40\Obsolete.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
Expand All @@ -77,11 +85,17 @@
<Reference Include="System.Threading.Tasks">
<HintPath>..\..\..\lib\Microsoft.Bcl.1.1.10\lib\net40\System.Threading.Tasks.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.MVVM.4.5.4\lib\net40\System.Windows.Interactivity.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
Expand Down
2 changes: 2 additions & 0 deletions src/Orc.CsvTextEditor/Orc.CsvTextEditor.NET40/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net40" developmentDependency="true" />
<package id="AvalonEdit" version="5.0.3" targetFramework="net40" />
<package id="Catel.Core" version="4.5.4" targetFramework="net40" />
<package id="Catel.Fody" version="2.15.0" targetFramework="net40" developmentDependency="true" />
<package id="Catel.MVVM" version="4.5.4" targetFramework="net40" />
<package id="Fody" version="1.29.4" targetFramework="net40" developmentDependency="true" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net4" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,31 @@
<Reference Include="Catel.Fody.Attributes, Version=2.15.0.0, Culture=neutral, PublicKeyToken=1c8163524cbe02e6, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.Fody.2.15.0\lib\portable-net4+sl4+wp7+win8+wpa81+MonoAndroid14+MonoTouch40\Catel.Fody.Attributes.dll</HintPath>
</Reference>
<Reference Include="Catel.MVVM, Version=4.5.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.MVVM.4.5.4\lib\net45\Catel.MVVM.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
</Reference>
<Reference Include="Obsolete, Version=4.1.0.0, Culture=neutral, PublicKeyToken=1ca091877d12ca03, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Obsolete.Fody.4.1.0\Lib\dotnet\Obsolete.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.MVVM.4.5.4\lib\net45\System.Windows.Interactivity.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Orc.CsvTextEditor/Orc.CsvTextEditor.NET45/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net40" developmentDependency="true" />
<package id="AvalonEdit" version="5.0.3" targetFramework="net45" />
<package id="Catel.Core" version="4.5.4" targetFramework="net45" />
<package id="Catel.Fody" version="2.15.0" targetFramework="net45" developmentDependency="true" />
<package id="Catel.MVVM" version="4.5.4" targetFramework="net45" />
<package id="Fody" version="1.29.4" targetFramework="net45" developmentDependency="true" />
<package id="ModuleInit.Fody" version="1.5.9.0" targetFramework="net45" developmentDependency="true" />
<package id="Obsolete.Fody" version="4.1.0" targetFramework="net45" developmentDependency="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,32 @@
<Reference Include="Catel.Fody.Attributes, Version=2.15.0.0, Culture=neutral, PublicKeyToken=1c8163524cbe02e6, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.Fody.2.15.0\lib\portable-net4+sl4+wp7+win8+wpa81+MonoAndroid14+MonoTouch40\Catel.Fody.Attributes.dll</HintPath>
</Reference>
<Reference Include="Catel.MVVM, Version=4.5.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.MVVM.4.5.4\lib\net46\Catel.MVVM.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
</Reference>
<Reference Include="Obsolete, Version=4.1.0.0, Culture=neutral, PublicKeyToken=1ca091877d12ca03, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Obsolete.Fody.4.1.0\lib\dotnet\Obsolete.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\lib\Catel.MVVM.4.5.4\lib\net46\System.Windows.Interactivity.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xaml" />
<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" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
Expand Down
2 changes: 2 additions & 0 deletions src/Orc.CsvTextEditor/Orc.CsvTextEditor.NET46/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net40" developmentDependency="true" />
<package id="AvalonEdit" version="5.0.3" targetFramework="net46" />
<package id="Catel.Core" version="4.5.4" targetFramework="net46" />
<package id="Catel.Fody" version="2.15.0" targetFramework="net46" developmentDependency="true" />
<package id="Catel.MVVM" version="4.5.4" targetFramework="net46" />
<package id="Fody" version="1.29.4" targetFramework="net46" developmentDependency="true" />
<package id="ModuleInit.Fody" version="1.5.9.0" targetFramework="net46" developmentDependency="true" />
<package id="Obsolete.Fody" version="4.1.0" targetFramework="net46" developmentDependency="true" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="DisableDropBehavior.cs" company="WildGums">
// Copyright (c) 2008 - 2017 WildGums. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------


namespace Orc.CsvTextEditor
{
using Catel.Windows.Interactivity;
using ICSharpCode.AvalonEdit;

internal class DisableDropBehavior : BehaviorBase<TextEditor>
{
protected override void OnAssociatedObjectLoaded()
{
base.OnAssociatedObjectLoaded();

var textArea = AssociatedObject?.TextArea;
if (textArea == null)
{
return;
}

textArea.SetCurrentValue(System.Windows.UIElement.AllowDropProperty, false);
}

protected override void OnAssociatedObjectUnloaded()
{
base.OnAssociatedObjectUnloaded();

var textArea = AssociatedObject?.TextArea;
if (textArea == null)
{
return;
}

textArea.SetCurrentValue(System.Windows.UIElement.AllowDropProperty, true);
}
}
}
Loading

0 comments on commit 152625f

Please sign in to comment.