protected virtual void OnRenameFacet(FacetEventArgs e) { if (Created) { RenameFacet(this, e); } }
private void FacetName_TextChanged(object sender, System.EventArgs e) { if (FacetName.Text.Length == 0) { return; } FacetEventArgs args = new FacetEventArgs(FacetActions.RenameFacet, FacetName.Text, false); OnRenameFacet(args); }
private void ButtonAddRegion_Click(object sender, System.EventArgs e) { if (RegionName.Text.Length == 0) { MessageBox.Show("Please enter a name for the new region. The region name can't be empty"); return; } FacetEventArgs args = new FacetEventArgs(FacetActions.AddRegion, RegionName.Text, RegionFocus.Checked); OnNewRegion(args); }
private void ButtonDelFacet_Click(object sender, System.EventArgs e) { if ( MessageBox.Show( this, "This action will delete the current facet and all its regions, and it can't be undone. Are you sure you want to delete it?", "Confirm facet deletion", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { FacetEventArgs args = new FacetEventArgs(FacetActions.DeleteFacet, "", false); OnDeleteFacet(args); } }
protected virtual void OnNewRegion(FacetEventArgs e) { NewRegion(this, e); }
protected virtual void OnDeleteFacet(FacetEventArgs e) { DeleteFacet(this, e); }