public FarPodOperationService(FarPodExplorerBase fs, ExplorerModes om)
        {
            // OPM_FIND or OPM_EDIT or OPM_VIEW or OPM_QUICKVIEW - get one file for view
            // OPM_SILENT with no message

            _fs = fs;
            _operationModes = om;
        }
 public DirectCopyToDeviceOperation(
     FarPodExplorerBase sourceContext,
     IEnumerable<Track> tracks,
     FarPodExplorerBase targetContext,
     string targetPlayListName,
     bool isMove)
     : this(sourceContext, targetContext, targetPlayListName, isMove)
 {
     _tracks = tracks;
 }
 public DirectCopyToDeviceOperation(
     FarPodExplorerBase sourceContext,
     IEnumerable<Playlist> playlists,
     FarPodExplorerBase targetContext,
     string targetPlayListName,
     bool isMove)
     : this(sourceContext, targetContext, targetPlayListName, isMove)
 {
     _playlists = playlists;
 }
        private DirectCopyToDeviceOperation(
            FarPodExplorerBase sourceContext,
            FarPodExplorerBase targetContext,
            string targetPlayListName,
            bool isMove)
            : base(sourceContext.CurrentDevice)
        {
            _sourceContext = sourceContext;
            _targetContext = targetContext;

            _targetPlayListName = targetPlayListName;

            _isMove = isMove;

            isWriteMode = true;

            setText(MsgStr.MsgCopyOrMoveToDevice);
        }
        public OperationResult DirectCopyOrMoveToDevice(IList<FarFile> files, FarPodExplorerBase anotherController, bool isMove)
        {
            // IsSilentOperation() || ???

            OnDeviceOperation doc = null;

            string playListName = anotherController.CurrentPlayList != null ?
                anotherController.CurrentPlayList.Name : string.Empty;

            if (_fs.CurrentLevel == EFileSystemLevel.OnDevice)
            {
                // copy selected playlists
                var playLists = files.Select(p => (Playlist)p.Data);

                if (CommonDialog.ForDirectCopyPlayLists(playLists, ref playListName, isMove) == 0)
                {
                    doc = new DirectCopyToDeviceOperation(
                         _fs, playLists, anotherController, playListName, isMove);
                }
            }
            else if (_fs.CurrentLevel == EFileSystemLevel.OnPlayList)
            {
                // copy selected tracks
                var tracks = files.Select(p => (Track)p.Data);

                if (CommonDialog.ForDirectCopyTracks(tracks, ref playListName, isMove) == 0)
                {
                    doc = new DirectCopyToDeviceOperation(
                        _fs, tracks, anotherController, playListName, isMove);
                }
            }

            return execOperation(doc, files);
        }
 protected FarPodOperationService get(ExplorerEventArgs e, FarPodExplorerBase expl = null)
 {
     return new FarPodOperationService(expl ?? this, e.Mode);
 }
 public FarPodCommandMenu(FarPodPanel panel, FarPodExplorerBase controller)
 {
     _panel = panel;
     _controller = controller;
 }