Skip to content

Commit

Permalink
Version 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
awaescher committed Oct 4, 2020
1 parent 8679221 commit a366a7d
Show file tree
Hide file tree
Showing 9 changed files with 280 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/FluentDragDrop.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ VisualStudioVersion = 16.0.29920.165
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentDragDrop", "FluentDragDrop\FluentDragDrop.csproj", "{E1C8F65D-84CC-474E-A7FE-C0891C15456B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentDragDropExample", "FluentDragDropExample\FluentDragDropExample.csproj", "{05DAD2B7-D198-42AF-9B06-BB38D171CED6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentDragDropExample", "FluentDragDropExample\FluentDragDropExample.csproj", "{05DAD2B7-D198-42AF-9B06-BB38D171CED6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentDragDropNuGetExample", "FluentDragDropNuGetExample\FluentDragDropNuGetExample.csproj", "{AAF1A53A-37D3-4F0F-8070-73C00FEEE3ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -21,6 +23,10 @@ Global
{05DAD2B7-D198-42AF-9B06-BB38D171CED6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05DAD2B7-D198-42AF-9B06-BB38D171CED6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{05DAD2B7-D198-42AF-9B06-BB38D171CED6}.Release|Any CPU.Build.0 = Release|Any CPU
{AAF1A53A-37D3-4F0F-8070-73C00FEEE3ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AAF1A53A-37D3-4F0F-8070-73C00FEEE3ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AAF1A53A-37D3-4F0F-8070-73C00FEEE3ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AAF1A53A-37D3-4F0F-8070-73C00FEEE3ED}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 1 addition & 0 deletions src/FluentDragDrop/FluentDragDrop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ This package brings rich Drag and Drop experience to your app, just by adding a

The app icon was made by Freepik from www.flaticon.com and is licensed by Creative Commons BY 3.0. Thank you for your awesome work, mates!</Description>
<PackageTags>Fluent;Drag;Drop;Windows;Forms;UI</PackageTags>
<Copyright>Andreas Wäscher 2020</Copyright>
</PropertyGroup>
</Project>
9 changes: 9 additions & 0 deletions src/FluentDragDropNuGetExample/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2"/>
</System.Windows.Forms.ApplicationConfigurationSection>
</configuration>
18 changes: 18 additions & 0 deletions src/FluentDragDropNuGetExample/FluentDragDropNuGetExample.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net471;netcoreapp3.1</TargetFrameworks>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>

<PropertyGroup Condition="!$(TargetFramework.StartsWith('net4')) Or '$(MSBuildRuntimeType)'=='Core'">
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
</PropertyGroup>
<ItemGroup Condition="!$(TargetFramework.StartsWith('net4')) Or '$(MSBuildRuntimeType)'=='Core'">
<PackageReference Include="System.Resources.Extensions" Version="4.7.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FluentDragDrop" Version="1.0.0" />
</ItemGroup>
</Project>
22 changes: 22 additions & 0 deletions src/FluentDragDropNuGetExample/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Windows.Forms;

namespace FluentDragDropNuGetExample
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
private static void Main()
{
#if !NET471
Application.SetHighDpiMode(HighDpiMode.SystemAware);
#endif
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new TestForm());
}
}
}
72 changes: 72 additions & 0 deletions src/FluentDragDropNuGetExample/TestForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions src/FluentDragDropNuGetExample/TestForm.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using FluentDragDrop;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FluentDragDropNuGetExample
{
public partial class TestForm : Form
{
public TestForm()
{
InitializeComponent();
}

private void buttonDrag_MouseDown(object sender, MouseEventArgs e)
{
buttonDrag.InitializeDragAndDrop()
.Link()
.OnMouseMove()
.WithData(() => true)
.To(pnlDrop, (_, __) => MessageBox.Show("Successfully dropped.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information));
}
}
}
120 changes: 120 additions & 0 deletions src/FluentDragDropNuGetExample/TestForm.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<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" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
2 changes: 1 addition & 1 deletion src/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "0.3",
"version": "1.0",
"publicReleaseRefSpec": [
".*/master$" // we release out of master
],
Expand Down

0 comments on commit a366a7d

Please sign in to comment.