Ejemplo n.º 1
0
 protected virtual void OnRenameFacet(FacetEventArgs e)
 {
     if (Created)
     {
         RenameFacet(this, e);
     }
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
            }
        }
Ejemplo n.º 5
0
 protected virtual void OnNewRegion(FacetEventArgs e)
 {
     NewRegion(this, e);
 }
Ejemplo n.º 6
0
 protected virtual void OnDeleteFacet(FacetEventArgs e)
 {
     DeleteFacet(this, e);
 }
Ejemplo n.º 7
0
        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;
        }
Ejemplo n.º 8
0
        private void facetPanel_RenameFacet(object sender, FacetEventArgs e)
        {
            // Just rename the tree node
            Tree.SelectedNode.Text = e.Name;

            m_Modified = true;
        }
Ejemplo n.º 9
0
        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 );
        }
Ejemplo n.º 10
0
        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;
        }
Ejemplo n.º 11
0
        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 );
            }
        }
Ejemplo n.º 12
0
        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 );
        }
Ejemplo n.º 13
0
 protected virtual void OnRenameFacet( FacetEventArgs e )
 {
     if ( Created )
         RenameFacet( this, e );
 }
Ejemplo n.º 14
0
 protected virtual void OnNewRegion( FacetEventArgs e )
 {
     NewRegion( this, e );
 }
Ejemplo n.º 15
0
 protected virtual void OnDeleteFacet( FacetEventArgs e )
 {
     DeleteFacet( this, e );
 }