This content originally appeared on DEV Community and was authored by fischgeek
I made a little diddy I wanted to share with you all. It's nothing too grand or impressive. I just really like how it turned out and even more happy with the cleanliness of the code.
It's a simple form to play around with date formats in .NET. Here's the GitHub and a screenshot.
It was all written with F# (minus the C# Forms project bit). What is neat though is I only laid out the basic locations of where I wanted things to go using FlowLayoutPanels.
Then passed those to my F# to handle the rest.
using System.Windows.Forms;
using DotNetDates.FSharp;
namespace DotNetDates
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
var form = this;
FormBuilder.Build(form, flpFormatMethods, flpFormatSpecifiers, flpCustomFormats, flpCreateYourOwn, flpCreateYourOwnResult);
}
}
}
I'm curious to read what you think and thanks for checking it out!
This content originally appeared on DEV Community and was authored by fischgeek
fischgeek | Sciencx (2021-05-28T14:25:47+00:00) DotNetDates. Retrieved from https://www.scien.cx/2021/05/28/dotnetdates/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.