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();
        }
예제 #2
0
        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();
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        /// <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);
        }
예제 #6
0
 public void Remove(StatusPanel panel)
 {
     if (!_isActivated) return;
     _statusStrip.Remove(panel);
 }
예제 #7
0
 public void Add(StatusPanel panel)
 {
     if (!_isActivated) return;
     _statusStrip.Add(panel);
 }
예제 #8
0
 public void Remove(StatusPanel panel)
 {
     statusStrip.Items.RemoveByKey(panel.Key);
 }