From 7748ab33ffab07c52f43d695af6b4b2c6150231b Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Wed, 29 Aug 2018 03:47:45 +0100 Subject: [PATCH] create a console project. Add references/NuGets to console project. Include basic logic to create image in console. --- SmoulderingBeachBall/SmoulderingBeachBall.sln | 6 ++ .../SmoulderingBeachBallCLI/App.config | 6 ++ .../SmoulderingBeachBallCLI/AssemblyInfo.fs | 41 +++++++++ .../SmoulderingBeachBallCLI/Program.fs | 15 ++++ .../SmoulderingBeachBallCLI.fsproj | 83 +++++++++++++++++++ .../SmoulderingBeachBallCLI/packages.config | 6 ++ .../SmoulderingBeachBallCLICore/Program.fs | 13 +++ .../SmoulderingBeachBallCLICore.fsproj | 20 +++++ 8 files changed, 190 insertions(+) create mode 100644 SmoulderingBeachBall/SmoulderingBeachBallCLI/App.config create mode 100644 SmoulderingBeachBall/SmoulderingBeachBallCLI/AssemblyInfo.fs create mode 100644 SmoulderingBeachBall/SmoulderingBeachBallCLI/Program.fs create mode 100644 SmoulderingBeachBall/SmoulderingBeachBallCLI/SmoulderingBeachBallCLI.fsproj create mode 100644 SmoulderingBeachBall/SmoulderingBeachBallCLI/packages.config create mode 100644 SmoulderingBeachBall/SmoulderingBeachBallCLICore/Program.fs create mode 100644 SmoulderingBeachBall/SmoulderingBeachBallCLICore/SmoulderingBeachBallCLICore.fsproj diff --git a/SmoulderingBeachBall/SmoulderingBeachBall.sln b/SmoulderingBeachBall/SmoulderingBeachBall.sln index bbb4752..7806d8b 100644 --- a/SmoulderingBeachBall/SmoulderingBeachBall.sln +++ b/SmoulderingBeachBall/SmoulderingBeachBall.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.28010.2016 MinimumVisualStudioVersion = 10.0.40219.1 Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "SmoulderingBeachBall", "SmoulderingBeachBall\SmoulderingBeachBall.fsproj", "{279C546F-588A-4343-9E11-8EB21188DA70}" EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "SmoulderingBeachBallCLI", "SmoulderingBeachBallCLI\SmoulderingBeachBallCLI.fsproj", "{F3027063-706C-442F-8C88-11A33E8EA222}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {279C546F-588A-4343-9E11-8EB21188DA70}.Debug|Any CPU.Build.0 = Debug|Any CPU {279C546F-588A-4343-9E11-8EB21188DA70}.Release|Any CPU.ActiveCfg = Release|Any CPU {279C546F-588A-4343-9E11-8EB21188DA70}.Release|Any CPU.Build.0 = Release|Any CPU + {F3027063-706C-442F-8C88-11A33E8EA222}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3027063-706C-442F-8C88-11A33E8EA222}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3027063-706C-442F-8C88-11A33E8EA222}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3027063-706C-442F-8C88-11A33E8EA222}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/SmoulderingBeachBall/SmoulderingBeachBallCLI/App.config b/SmoulderingBeachBall/SmoulderingBeachBallCLI/App.config new file mode 100644 index 0000000..787dcbe --- /dev/null +++ b/SmoulderingBeachBall/SmoulderingBeachBallCLI/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SmoulderingBeachBall/SmoulderingBeachBallCLI/AssemblyInfo.fs b/SmoulderingBeachBall/SmoulderingBeachBallCLI/AssemblyInfo.fs new file mode 100644 index 0000000..b13b321 --- /dev/null +++ b/SmoulderingBeachBall/SmoulderingBeachBallCLI/AssemblyInfo.fs @@ -0,0 +1,41 @@ +namespace SmoulderingBeachBallCLI.AssemblyInfo + +open System.Reflection +open System.Runtime.CompilerServices +open System.Runtime.InteropServices + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[] +[] +[] +[] +[] +[] +[] +[] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [] +[] +[] + +do + () \ No newline at end of file diff --git a/SmoulderingBeachBall/SmoulderingBeachBallCLI/Program.fs b/SmoulderingBeachBall/SmoulderingBeachBallCLI/Program.fs new file mode 100644 index 0000000..894ff75 --- /dev/null +++ b/SmoulderingBeachBall/SmoulderingBeachBallCLI/Program.fs @@ -0,0 +1,15 @@ +open SmoulderingBeachBall.ImageMaker +open System.Drawing +open System + +// Learn more about F# at http://fsharp.org +// See the 'F# Tutorial' project for more help. + +[] +let main argv = + printfn "%A" argv + let result = + makeImage 500 500 Brushes.PaleVioletRed "C:/users/craig/desktop/test.png" + |> Async.RunSynchronously + //Console.ReadLine |> ignore + 0 // return an integer exit code diff --git a/SmoulderingBeachBall/SmoulderingBeachBallCLI/SmoulderingBeachBallCLI.fsproj b/SmoulderingBeachBall/SmoulderingBeachBallCLI/SmoulderingBeachBallCLI.fsproj new file mode 100644 index 0000000..818f2b6 --- /dev/null +++ b/SmoulderingBeachBall/SmoulderingBeachBallCLI/SmoulderingBeachBallCLI.fsproj @@ -0,0 +1,83 @@ + + + + + Debug + AnyCPU + 2.0 + f3027063-706c-442f-8c88-11a33e8ea222 + Exe + SmoulderingBeachBallCLI + SmoulderingBeachBallCLI + v4.7.1 + true + true + SmoulderingBeachBallCLI + + + true + full + false + false + bin\$(Configuration)\ + DEBUG;TRACE + 3 + AnyCPU + bin\$(Configuration)\$(AssemblyName).XML + true + + + pdbonly + true + true + bin\$(Configuration)\ + TRACE + 3 + AnyCPU + bin\$(Configuration)\$(AssemblyName).XML + true + + + 11 + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets + + + + + + + + + + + ..\packages\FSharp.Core.4.5.2\lib\net45\FSharp.Core.dll + + + + + + + ..\packages\System.Drawing.Common.4.5.0\lib\net461\System.Drawing.Common.dll + + + + True + + + + + SmoulderingBeachBall + {279c546f-588a-4343-9e11-8eb21188da70} + True + + + + \ No newline at end of file diff --git a/SmoulderingBeachBall/SmoulderingBeachBallCLI/packages.config b/SmoulderingBeachBall/SmoulderingBeachBallCLI/packages.config new file mode 100644 index 0000000..82d5083 --- /dev/null +++ b/SmoulderingBeachBall/SmoulderingBeachBallCLI/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SmoulderingBeachBall/SmoulderingBeachBallCLICore/Program.fs b/SmoulderingBeachBall/SmoulderingBeachBallCLICore/Program.fs new file mode 100644 index 0000000..d1744b9 --- /dev/null +++ b/SmoulderingBeachBall/SmoulderingBeachBallCLICore/Program.fs @@ -0,0 +1,13 @@ +// Learn more about F# at http://fsharp.org + +open System +open SmoulderingBeachBall.ImageMaker +open System.Drawing + +[] +let main argv = + printfn "Hello World from F#!" + let result = + makeImage 500 500 Brushes.PaleVioletRed "C:/users/craig/desktop/test.png" + |> Async.RunSynchronously + 0 // return an integer exit code diff --git a/SmoulderingBeachBall/SmoulderingBeachBallCLICore/SmoulderingBeachBallCLICore.fsproj b/SmoulderingBeachBall/SmoulderingBeachBallCLICore/SmoulderingBeachBallCLICore.fsproj new file mode 100644 index 0000000..7984f9b --- /dev/null +++ b/SmoulderingBeachBall/SmoulderingBeachBallCLICore/SmoulderingBeachBallCLICore.fsproj @@ -0,0 +1,20 @@ + + + + Exe + netcoreapp2.1 + + + + + + + + + + + + + + +