//Start Button
//Check all Infomation..
private void button1_Click(object sender, EventArgs e)
{
if (!File.Exists("SeparatorCore.dll"))
{
MessageBox.Show("Cannot find SeparatorCore.dll in current path!");
return;
}
if (this.SelectFile && !string.IsNullOrEmpty(this.FileName))
{
StringBuilder sFileName = new StringBuilder(this.FileName);
StringBuilder sArgs = new StringBuilder(this.SPArgs);
StringBuilder sPlugin = new StringBuilder(this.PluginName);
//this.Hide();
//Wait
this.Enabled = false;
APIWarpper.SeparatorEntry(TaskInfo.FileTask, sFileName, sPlugin, sArgs, this.CPULogicCores);
this.Enabled = true;
//this.Show();
}
else if (this.SelectFolder && !string.IsNullOrEmpty(this.FolderName))
{
StringBuilder sFolderName = new StringBuilder(this.FolderName);
StringBuilder sArgs = new StringBuilder(this.SPArgs);
StringBuilder sPlugin = new StringBuilder(this.PluginName);
APIWarpper.SeparatorEntry(TaskInfo.FolderTask, sFolderName, sPlugin, sArgs, this.CPULogicCores);
}
else if (this.SelectScript && !string.IsNullOrEmpty(this.ScriptName))
{
StringBuilder sScriptName = new StringBuilder(this.ScriptName);
StringBuilder sArgs = new StringBuilder(this.SPArgs);
StringBuilder sPlugin = new StringBuilder(this.PluginName);
APIWarpper.SeparatorEntry(TaskInfo.ScriptTask, sScriptName, sPlugin, sArgs, this.CPULogicCores);
}
else
{
MessageBox.Show("Cannot launch task!");
return;
}
}