/// <summary>
 /// EditProperties event handler of the layerControl control
 /// </summary>
 /// <param name="sender">The source object of this event.</param>
 /// <param name="target">The target object to be edited.</param>
 void layerControl_EditProperties(object sender, MapObjectHolder target)
 {
     try
     {
         MapPropertyEditorForm mapPropertyEditor = new MapPropertyEditorForm(target);
         mapPropertyEditor.ShowDialog(this);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Пример #2
0
 /// <summary>
 /// Event handled to edit a sub-object.
 /// </summary>
 /// <param name="sender">The source object of this event.</param>
 /// <param name="target">The object to be edited.</param>
 void editor_EditProperties(object sender, MapObjectHolder target)
 {
     try
     {
         MapPropertyEditorForm mapPropertyEditor = new MapPropertyEditorForm(target);
         mapPropertyEditor.HelpRequested += new HelpEventHandler(mapPropertyEditor_HelpRequested);
         mapPropertyEditor.ShowDialog(this);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Пример #3
0
        /// <summary>
        /// EditProperties Event handler for the layerControlStyles object.
        /// </summary>
        /// <param name="sender">The source object of this event.</param>
        /// <param name="e">Event parameters.</param>
        private void layerControlStyles_EditProperties(object sender, MapObjectHolder target)
        {
            try
            {
                MapPropertyEditorForm mapPropertyEditor;
                if (target.GetType() == typeof(classObj))
                {
                    classObj classobj = target;

                    if (classobj.numstyles <= 0)
                    {
                        // adding an empty style to this class
                        styleObj style = new styleObj(classobj);
                    }

                    mapPropertyEditor = new MapPropertyEditorForm(
                        new MapObjectHolder(classobj.getStyle(0), target), new StyleLibraryPropertyEditor());
                }
                else if (target.GetType() == typeof(styleObj))
                {
                    mapPropertyEditor = new MapPropertyEditorForm(target, new StyleLibraryPropertyEditor());
                }
                else
                {
                    return;
                }
                propertyChanged         = false;
                target.PropertyChanged += new EventHandler(target_PropertyChanged);
                mapPropertyEditor.ShowDialog(this);
                if (propertyChanged)
                {
                    layerControlStyles.RefreshView();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Пример #4
0
 /// <summary>
 /// EditProperties event handler of the layerControl control
 /// </summary>
 /// <param name="sender">The source object of this event.</param>
 /// <param name="target">The target object to be edited.</param>
 void layerControl_EditProperties(object sender, MapObjectHolder target)
 {
     try
     {
         MapPropertyEditorForm mapPropertyEditor = new MapPropertyEditorForm(target);
         mapPropertyEditor.ShowDialog(this);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Пример #5
0
 /// <summary>
 /// Event handled to edit a sub-object.
 /// </summary>
 /// <param name="sender">The source object of this event.</param>
 /// <param name="target">The object to be edited.</param>
 void editor_EditProperties(object sender, MapObjectHolder target)
 {
     try
     {
         MapPropertyEditorForm mapPropertyEditor = new MapPropertyEditorForm(target);
         mapPropertyEditor.HelpRequested += new HelpEventHandler(mapPropertyEditor_HelpRequested);
         mapPropertyEditor.ShowDialog(this);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Пример #6
0
        /// <summary>
        /// EditProperties Event handler for the layerControlStyles object.
        /// </summary>
        /// <param name="sender">The source object of this event.</param>
        /// <param name="e">Event parameters.</param>
        private void layerControlStyles_EditProperties(object sender, MapObjectHolder target)
        {
            try
            {
                MapPropertyEditorForm mapPropertyEditor;
                if (target.GetType() == typeof(classObj))
                {
                    classObj classobj = target;

                    if (classobj.numstyles <= 0)
                    {
                        // adding an empty style to this class
                        styleObj style = new styleObj(classobj);
                    }

                    mapPropertyEditor = new MapPropertyEditorForm(
                        new MapObjectHolder(classobj.getStyle(0), target), new StyleLibraryPropertyEditor());
                }
                else if (target.GetType() == typeof(styleObj))
                    mapPropertyEditor = new MapPropertyEditorForm(target, new StyleLibraryPropertyEditor());
                else
                    return;
                propertyChanged = false;
                target.PropertyChanged += new EventHandler(target_PropertyChanged);
                mapPropertyEditor.ShowDialog(this);
                if (propertyChanged)
                    layerControlStyles.RefreshView();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Пример #7
0
 /// <summary>
 /// Click event handler of the mapPropertiesToolStripMenuItem control.
 /// </summary>
 /// <param name="sender">The source object of this event.</param>
 /// <param name="e">The event parameters.</param>
 private void mapPropertiesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MapPropertyEditorForm mapPropertyEditor = new MapPropertyEditorForm(mapControl.Target);
     mapPropertyEditor.HelpRequested += new HelpEventHandler(editor_HelpRequested);
     mapPropertyEditor.ShowDialog(this);
 }