コード例 #1
0
        private void ProcessFileDrop(string[] filePaths, bool isMove)
        {
            IFileOperation fileOp = new FileOperationG1();

            Data.FolderWidgetData data = DataContext as Data.FolderWidgetData;

            if (data == null)
            {
                return;
            }

            fileOp.ParentWindow = Window.GetWindow(this);
            fileOp.Operation    = isMove ? FILEOP_CODES.FO_MOVE :
                                  FILEOP_CODES.FO_COPY;
            fileOp.From = filePaths;
            fileOp.To   = new string[1] {
                data.Path
            };
            fileOp.Flags = FILEOP_FLAGS.FOF_ALLOWUNDO;

            fileOp.Execute();
        }
コード例 #2
0
ファイル: FolderWidgetControl.cs プロジェクト: dxm007/Droppy
        private void ProcessFileDrop( string[] filePaths, bool isMove )
        {
            IFileOperation          fileOp = new FileOperationG1();
            Data.FolderWidgetData   data = DataContext as Data.FolderWidgetData;

            if( data == null ) return;

            fileOp.ParentWindow = Window.GetWindow( this );
            fileOp.Operation = isMove ? FILEOP_CODES.FO_MOVE :
                                        FILEOP_CODES.FO_COPY;
            fileOp.From = filePaths;
            fileOp.To = new string[ 1 ] { data.Path };
            fileOp.Flags = FILEOP_FLAGS.FOF_ALLOWUNDO;

            fileOp.Execute();
        }