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); }
private void facetPanel_NewRegion(object sender, FacetEventArgs e) { TreeNode rNode = new TreeNode(e.Name); // Create the new region object and add it as Tag for the tree node MapRegion region = new MapRegion(e.Name); rNode.Tag = region; Tree.SelectedNode.Nodes.Add(rNode); if (e.FocusRegion) Tree.SelectedNode = rNode; m_Modified = true; }
private void facetPanel_RenameFacet(object sender, FacetEventArgs e) { // Just rename the tree node Tree.SelectedNode.Text = e.Name; m_Modified = true; }
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 facetPanel_DeleteFacet(object sender, FacetEventArgs e) { // Delete the currently selected facet. Just delete the tree node Tree.Nodes.Remove(Tree.SelectedNode); SelectPanel(); m_Modified = true; }
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 ); } }
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 ); }
protected virtual void OnRenameFacet( FacetEventArgs e ) { if ( Created ) RenameFacet( this, e ); }
protected virtual void OnNewRegion( FacetEventArgs e ) { NewRegion( this, e ); }
protected virtual void OnDeleteFacet( FacetEventArgs e ) { DeleteFacet( this, e ); }