/// <summary> /// Initializes a new instance of the <see cref="MainForm"/> class. /// </summary> public MainForm() { InitializeComponent(); if (DesignMode) { return; } LogManager.DefaultLogManager.AddLogger(new TestLogger(consoleControl1)); _shell = this; appManager.Map = map; appManager.DockManager = new SpatialDockManager(); var hc = new MenuBarHeaderControl(); hc.Initialize(new ToolStripPanel(), msTest); appManager.HeaderControl = hc; var sss = new SpatialStatusStrip(); appManager.ProgressHandler = sss; appManager.ShowExtensionsDialogMode = ShowExtensionsDialogMode.Default; try { appManager.LoadExtensions(); } finally { map.FunctionMode = FunctionMode.Pan; _infos = new ProjectionInfo[] { KnownCoordinateSystems.Projected.World.WebMercator, KnownCoordinateSystems.Projected.Europe.EuropeLambertConformalConic, KnownCoordinateSystems.Projected.World.Sinusoidalworld, KnownCoordinateSystems.Projected.World.Polyconicworld, ProjectionInfo.FromEpsgCode(28992) }; map.Projection = _infos[0]; map.MouseClick += map_MouseClick; } }
public void Activate() { if (_isActivated) return; var statusControls = App.CompositionContainer.GetExportedValues<IStatusControl>().ToList(); // Activate only if there are no other IStatusControl implementations and // custom ProgressHandler not yet set if (App.ProgressHandler == null && statusControls.Count == 1 && statusControls[0].GetType() == GetType()) { _isActivated = true; // adding the status strip control _statusStrip = new SpatialStatusStrip(); Shell.Controls.Add(_statusStrip); // adding initial status panel to the status strip control Add(new ProgressStatusPanel()); } }
/// <inheritdoc /> public void Activate() { if (_isActivated) { return; } var statusControls = App.CompositionContainer.GetExportedValues <IStatusControl>().ToList(); // Activate only if there are no other IStatusControl implementations and // custom ProgressHandler not yet set if (App.ProgressHandler == null && statusControls.Count == 1 && statusControls[0].GetType() == GetType()) { _isActivated = true; // adding the status strip control _statusStrip = new SpatialStatusStrip(); Shell.Controls.Add(_statusStrip); // adding initial status panel to the status strip control Add(new ProgressStatusPanel()); } }