예제 #1
0
 public static void ChildFormClosed(object sender, FormClosedEventArgs e)
 {
     if (sender is ColourMap)
         _colourMapForm = null;
     else if (sender is MappingListForm)
         _mapListForm = null;
     else if (sender is HelpForm)
         _helpForm = null;
     else if (sender is ColourEditor)
     {
         ColourEditor ce = (ColourEditor)sender ;
         if (editorForms.ContainsKey(ce.Effect))
             editorForms.Remove(ce.Effect);
     }
     _mainForm.RegenerateMenuExternal();
 }
예제 #2
0
        public static void ToggleColourMapForm()
        {
            if (_colourMapForm != null)
            {
                _colourMapForm.Close();
                return;
            }

            _colourMapForm = new ColourMap();

            Properties.Settings userSettings = new Properties.Settings();

            Point formLocation = userSettings.ColourListFormLocation;

            if (formLocation.IsEmpty)
            {
                PositionColourMapForm();
            }
            else
            {
                _colourMapForm.Location = formLocation;
            }

            _colourMapForm.FormClosed += ChildFormClosed;
            _colourMapForm.Show(_mainForm);
        }