using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Windows.Forms;
using IReaper.FileData;
using IReaper.CourseData;
using IReaper.Command;
namespace IReaper.CommonGui{
public partial class FileOperationToolStrip : ToolStrip
{
public FileOperationToolStrip()
{
InitializeComponent();
}
public FileOperationToolStrip(IContainer container)
{
container.Add(this);
InitializeComponent();
}
private void OrganizeCourseFiles(object sender, EventArgs e)
{
//
List<CourseFileData> files = CourseFileDataManager.CreateFileList(CourseDataManager.AllCourses, FileStatue.Completed | FileStatue.InCompleted);
CourseFileData[] fileArray = new CourseFileData[files.Count];
files.CopyTo(fileArray, 0);
//
CommandBase command = CommandManager.GetCommand(CommandFamily.Command_FileTransfer);
command.ExecuteAsync(this, fileArray, //CourseFileData[], the source
IReaper.FileUtils.OperationType.Move, // the operation type
true, //
IReaper.Properties.Settings.Default.RootPath, //
(PathManager.PathPolicyType)Properties.Settings.Default.PathPolicy);
}
private void ImportFiles(object sender, EventArgs e)
{
CommandBase command = CommandManager.GetCommand(CommandFamily.Command_ImportFiles);
command.ExecuteAsync(this);
}
}
}
|