public override void Activate() { App.Map.SelectionChanged += Map_SelectionChanged; App.Map.MapFrame.LayerSelected += MapFrame_LayerSelected; panel = new StatusPanel {Width = 180}; App.ProgressHandler.Add(panel); base.Activate(); }
public override void Activate() { _Map = App.Map as Map; _Map.GeoMouseMove += Map_GeoMouseMove; xPanel = new StatusPanel() { Width = 160 }; yPanel = new StatusPanel() { Width = 160 }; App.ProgressHandler.Add(xPanel); App.ProgressHandler.Add(yPanel); base.Activate(); }
public void OnImportsSatisfied() { statusStrip = new StatusStrip { ForeColor = Color.Blue }; // adding the status strip control Shell.Controls.Add(statusStrip); // adding one initial status panel to the status strip control defaultStatusPanel = new StatusPanel(); Add(defaultStatusPanel); }
public void OnImportsSatisfied() { statusStrip = new StatusStrip(); statusStrip.Location = new Point(0, 285); statusStrip.Name = "statusStrip1"; statusStrip.Size = new Size(508, 22); statusStrip.TabIndex = 0; statusStrip.Text = String.Empty; //adding the status strip control Shell.Controls.Add(this.statusStrip); //adding one initial status panel to the status strip control defaultStatusPanel = new StatusPanel(); this.Add(defaultStatusPanel); }
/// <summary> /// Adds a status panel to the status strip /// </summary> /// <param name="panel">the user-specified status panel</param> public void Add(StatusPanel panel) { ToolStripStatusLabel myLabel = new ToolStripStatusLabel(); myLabel.Name = panel.Key; myLabel.Text = panel.Caption; myLabel.Width = panel.Width; myLabel.Spring = (panel.Width == 0); myLabel.TextAlign = ContentAlignment.MiddleLeft; panel.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e) { var item = sender as StatusPanel; myLabel.Text = item.Caption; myLabel.Width = item.Width; }; statusStrip.Items.Add(myLabel); }
public void Remove(StatusPanel panel) { if (!_isActivated) return; _statusStrip.Remove(panel); }
public void Add(StatusPanel panel) { if (!_isActivated) return; _statusStrip.Add(panel); }
public void Remove(StatusPanel panel) { statusStrip.Items.RemoveByKey(panel.Key); }