DEK,
Are these method calls doing anything that could trigger the click
event? Is your click event handler hooked up to multiple event handlers and
then you are calling other methods that could possibly cause those events to
be fired?
Can you post some sample code?
MainForm is a singleton form, InfoView is a user control.
the class is a panel of buttons and has methods to set them
enabled/disabled in certain ways, I.e. (this.ShowAddEditButtons).
private void add_Click(object sender, EventArgs e)
{
MainForm form = MainForm.GetInstance();
Contestant contestant = form.CurrentNode.Tag as Contestant;
// Root View
if (!form.InfoView.Visible && form.TableListView.Visible)
{
form.TableListView.Visible = false;
form.InfoView.Visible = true;
form.InfoView.Table = contestant.Blank.Tables
[Constants.Info];
form.InfoView.HeadingCat = "Adding a new";
form.InfoView.RefreshControl(true);
}
// Composite View
else if(form.InfoView.Visible && form.TableListView.Visible)
{
form.TableListView.Visible = false;
form.InfoView.Table = Season.GetInstance
(null).Individuals.Blank.Tables[Constants.Info];
form.InfoView.HeadingCat = contestant.Name + " - Adding a
new";
form.InfoView.RefreshControl(true);
}
// Change button views
this.ShowAddEditButtons();