Beispiel #1
0
        private void ShowCoordinatesToolStripButtonClick(object sender, EventArgs e)
        {
            showCoordinatesToolStripButton.Checked = !showCoordinatesToolStripButton.Checked;

            if (showCoordinatesToolStripButton.Checked)
            {
                mouseCoordinatesMapExtension.Activate();
            }
            else
            {
                mouseCoordinatesMapExtension.Deactivate();
            }
        }
Beispiel #2
0
        public void Activate_Always_AddsControlToMap()
        {
            // Setup
            using (var map = new Map())
                using (var extension = new RdNewMouseCoordinatesMapExtension(map))
                {
                    // Call
                    extension.Activate();

                    // Assert
                    Assert.AreEqual(1, map.Controls.Count);
                }
        }
Beispiel #3
0
        public void Deactivate_Always_RemovesControlFromMap()
        {
            // Setup
            using (var map = new Map())
                using (var extension = new RdNewMouseCoordinatesMapExtension(map))
                {
                    extension.Activate();

                    // Precondition
                    Assert.AreEqual(1, map.Controls.Count);

                    // Call
                    extension.Deactivate();

                    // Assert
                    Assert.AreEqual(0, map.Controls.Count);
                }
        }