コード例 #1
0
 private void InitCommands()
 {
     ShowLayerDetailsCommand = new ShowLayerDetailsCommand(this);
     CalculateCommand        = new CalculateCommand(this);
     DeleteLayerCommand      = new DeleteLayerCommand(this);
     MoveLayerCommand        = new MoveLayerCommand(this);
 }
コード例 #2
0
        /// <summary>
        /// Moves the currently selected layer down by one.
        /// </summary>
        private void MoveLayerDown_Click(object sender, EventArgs e)
        {
            Map map = mainMapControl.Map;

            if (map == null || TryGetLayerIndex(map, out int layerIndex) == false)
            {
                return;
            }

            if (layerIndex == 0)
            {
                return;
            }

            MoveLayerCommand mlc = new MoveLayerCommand(map, false, layerIndex);

            CommandManager.Add(mlc, true);
            layerListBox.SelectedIndex = layerIndex - 1;
        }