예제 #1
0
파일: CommandSet.cs 프로젝트: malain/candle
        /// <summary>
        /// Copy command
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void OnCopy(object sender, EventArgs e)
        {
            Diagram     diagram   = this.CurrentDocView.CurrentDiagram;
            ICollection selection = this.CurrentSelection;

            CopyCommand copy = new CopyCommand(diagram.Store, selection);

            copy.Exec();
        }
예제 #2
0
        /// <summary>
        /// Handles the Click event of the RowCopy control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void RowCopy_Click(object sender, EventArgs e)
        {
            VirtualTreeGridItem item = GetRowValue(_contextMenuRowIndex);
            ArrayList           list = new ArrayList();

            list.Add(item.DataItem);

            CopyCommand cc = new CopyCommand(((ModelElement)_root).Store, list);

            if (cc.Enabled && cc.Visible())
            {
                cc.Exec();
            }
        }
예제 #3
0
        /// <summary>
        /// Копирование файлов и папок
        /// </summary>
        protected void CommandCopy()
        {
            var defaultPath = GetPasiveFilePanel().GetCurrentDir().FullName;

            PrintCommand($"Введите полный путь для копирования (по умл. {defaultPath}):");
            var _activePanel = GetActiveFilePanel();
            var newPath      = Console.ReadLine();

            var command = new CopyCommand();

            newPath = newPath == String.Empty || newPath == null ? defaultPath : newPath;
            command.Exec(_activePanel.GetCurrentFile().FullName, newPath, AcceptMessage);

            _leftPanel.RefrashFileList();
            _rightPanel.RefrashFileList();
        }