Okay, so I have a pretty basic form. I'm having quite a bit of trouble though, trying to create an OO program keeping my design etc separate. In other words, having a utility class or something like that. Basically I'm unsure if I should only put my calculations there, or also the event handling(like if something was enabled). I have some code below that shows my troubles calling my method. Any help is appreciated, I have a long way to go to finish this.
namespace FuzzyDiceCompany
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// <summary>
/// TODO: Update summary.
/// </summary>
public class Events
{
public void RedCheckBoxEvent()
{
RedCheckBox.Enabled = true;
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FuzzyDiceCompany
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Events redEvent = new Events();
}
private void RedCheckBox_CheckedChanged(object sender, EventArgs e)
{
redEvent.RedCheckBoxEvent();
}
}
}