Skip to content

Instantly share code, notes, and snippets.

@vivainio
Created July 14, 2018 15:36
Show Gist options
  • Save vivainio/c23a7545e613674e5a4553b4976dbad6 to your computer and use it in GitHub Desktop.
Save vivainio/c23a7545e613674e5a4553b4976dbad6 to your computer and use it in GitHub Desktop.
using System.Windows.Forms;
using TrivialBehind;
namespace MathManDesign
{
public partial class MathManForm: Form
{
public MathManForm()
{
InitializeComponent();
// boilerplate starts
var disposer = TrivialBehinds.CreateBehind(this, new MathManUi
{
button1 = button1,
label1 = label1
});
this.FormClosed += (o,e) =>
disposer.Dispose();
// boilerplate ends
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment