Esempio n. 1
0
        //拷贝任务操作,将一个任务从原有分类拷贝到另一个分类下
        public void CopyTask(string TaskName, string OldTaskClass, string NewTaskClass)
        {
            cTaskClass tc      = new cTaskClass();
            string     oldPath = "";
            string     NewPath = "";

            if (OldTaskClass == "")
            {
                oldPath = Program.getPrjPath() + "tasks";
            }
            else
            {
                oldPath = tc.GetTaskClassPathByName(OldTaskClass);
            }

            if (NewTaskClass == "")
            {
                NewPath = Program.getPrjPath() + "tasks";
            }
            else
            {
                NewPath = tc.GetTaskClassPathByName(NewTaskClass);
            }

            tc = null;

            string FileName = "";

            if (OldTaskClass == NewTaskClass || (File.Exists(NewPath + "\\" + TaskName + ".xml")))
            {
                FileName = TaskName + "-复制.xml";

                System.IO.File.Copy(oldPath + "\\" + TaskName + ".xml", NewPath + "\\" + FileName);
                TaskName = TaskName + "-复制";
            }
            else
            {
                FileName = TaskName + ".xml";
                System.IO.File.Copy(oldPath + "\\" + FileName, NewPath + "\\" + FileName);
            }

            LoadTask(NewPath + "\\" + FileName);

            //修改任务的名称
            this.TaskName = TaskName;

            if (NewTaskClass == "")
            {
                this.TaskClass = "";
            }
            else
            {
                this.TaskClass = NewTaskClass;
            }

            Save("");
        }
Esempio n. 2
0
        //更改任务的所属分类
        /// <summary>
        ///
        /// </summary>
        /// <param name="TaskName">任务名称</param>
        /// <param name="OldTaskClass">原有任务分类</param>
        /// <param name="NewTaskClass">新任务分类</param>
        ///
        public void ChangeTaskClass(string TaskName, string OldTaskClass, string NewTaskClass)
        {
            cTaskClass tc      = new cTaskClass();
            string     oldPath = "";
            string     NewPath = "";

            if (OldTaskClass == "")
            {
                oldPath = Program.getPrjPath() + "tasks";
            }
            else
            {
                oldPath = tc.GetTaskClassPathByName(OldTaskClass);
            }

            if (NewTaskClass == "")
            {
                NewPath = Program.getPrjPath() + "tasks";
            }
            else
            {
                NewPath = tc.GetTaskClassPathByName(NewTaskClass);
            }

            string FileName = TaskName + ".xml";

            System.IO.File.Copy(oldPath + "\\" + FileName, NewPath + "\\" + FileName);

            LoadTask(NewPath + "\\" + FileName);

            if (NewTaskClass == "")
            {
                this.TaskClass = "";
            }
            else
            {
                this.TaskClass = NewTaskClass;
            }

            Save("");

            DeleTask(oldPath, TaskName);

            tc = null;
        }
Esempio n. 3
0
        private string GetTaskClassPath()
        {
            string TClassName = this.TaskClass;
            string Path;

            if (TClassName == null || TClassName == "" || TClassName == "任务分类")
            {
                Path = Program.getPrjPath() + "Tasks";
            }
            else
            {
                cTaskClass tClass = new cTaskClass();
                Path   = tClass.GetTaskClassPathByName(TClassName);
                tClass = null;
            }
            return(Path);
        }
        private bool SaveTask(string TaskPath)
        {
            Task.cTask t = new Task.cTask();

            //����DZ༭״̬������Ҫɾ��ԭ���ļ�
            if (this.FormState == cGlobalParas.FormState.Edit)
            {
                t.TaskName = this.tTask.Text;

                if (this.comTaskClass.SelectedIndex == 0)
                {
                    try
                    {
                        //ɾ��ԭ���������ҪĿ����Ϊ�˱��ݣ�������������������
                        t.DeleTask("", this.tTask.Text);
                    }
                    catch (System.Exception)
                    {
                    }
                }
                else
                {
                    //��ȡ����������·��
                    Task.cTaskClass tClass = new Task.cTaskClass();
                    string tPath = tClass.GetTaskClassPathByName(this.comTaskClass.SelectedItem.ToString());
                    try
                    {
                        //ɾ��ԭ���������ҪĿ����Ϊ�˱��ݣ�������������������
                        t.DeleTask(tPath, this.tTask.Text);
                    }
                    catch (System.Exception)
                    {

                    }
                }
            }

            int i = 0;
            int UrlCount = 0;

            //��������

            //�½�һ������
            t.New();

            t.TaskName = this.tTask.Text;
            t.TaskDemo = this.txtTaskDemo.Text;

            if (this.comTaskClass.SelectedIndex == 0)
            {
                t.TaskClass = "";
            }
            else
            {
                t.TaskClass = this.comTaskClass.SelectedItem.ToString();
            }

            t.TaskType = cGlobalParas.ConvertID(this.TaskType.SelectedItem.ToString()).ToString();
            t.RunType = cGlobalParas.ConvertID(this.comRunType.SelectedItem.ToString()).ToString();
            if (this.txtSavePath.Text.Trim().ToString() == "")
                t.SavePath = Program.getPrjPath() + "data";
            else
                t.SavePath = this.txtSavePath.Text;
            t.ThreadCount = int.Parse(this.udThread.Value.ToString());
            t.StartPos = this.txtStartPos.Text;
            t.EndPos = this.txtEndPos.Text;
            t.DemoUrl = this.txtWeblinkDemo.Text;
            t.Cookie = this.txtCookie.Text;
            t.WebCode = cGlobalParas.ConvertID(this.comWebCode.SelectedItem.ToString()).ToString();
            t.IsLogin = this.IsLogin.Checked;
            t.LoginUrl = this.txtLoginUrl.Text;
            t.IsUrlEncode = this.IsUrlEncode.Checked;
            if (this.IsUrlEncode.Checked == false)
            {
                t.UrlEncode = "";
            }
            else
            {
                t.UrlEncode = cGlobalParas.ConvertID(this.comUrlEncode.SelectedItem.ToString()).ToString();
            }

            //�ж��Ƿ񵼳��ļ����洢������������Ϣ
            if (this.comRunType.SelectedIndex == 0)
            {

                if (this.raExportTxt.Checked == true)
                {
                    t.ExportType = ((int)cGlobalParas.PublishType.PublishTxt).ToString();
                }
                else if (this.raExportExcel.Checked == true)
                {
                    t.ExportType = ((int)cGlobalParas.PublishType.PublishExcel).ToString();
                }
                else if (this.raExportAccess.Checked == true)
                {
                    t.ExportType = ((int)cGlobalParas.PublishType.PublishAccess).ToString();
                }
                else if (this.raExportMSSQL.Checked == true)
                {
                    t.ExportType = ((int)cGlobalParas.PublishType.PublishMSSql).ToString();
                }
                else if (this.raExportMySql.Checked == true)
                {
                    t.ExportType = ((int)cGlobalParas.PublishType.PublishMySql).ToString();
                }
                else if (this.raExportWeb.Checked == true)
                {
                    t.ExportType = ((int)cGlobalParas.PublishType.PublishWeb).ToString();
                }

                t.ExportFile = this.txtFileName.Text.ToString();
                t.DataSource = this.txtDataSource.Text.ToString();

                t.DataTableName = this.comTableName.Text.ToString();
                t.InsertSql = this.txtInsertSql.Text;
                t.ExportUrl = this.txtExportUrl.Text;
                t.ExportUrlCode = cGlobalParas.ConvertID(this.comExportUrlCode.SelectedItem.ToString()).ToString();
                t.ExportCookie = this.txtExportCookie.Text;
            }
            else
            {

                t.ExportFile = "";
                t.DataSource = "";

                t.ExportType = ((int)cGlobalParas.PublishType.NoPublish).ToString();
                t.DataSource = "";
                t.DataTableName = "";
            }

            //��ʼ�洢�߼�������Ϣ
            t.GatherAgainNumber = int.Parse(this.udAgainNumber.Value.ToString());
            t.IsIgnore404 = this.IsIgnore404.Checked;
            t.IsExportHeader = this.IsIncludeHeader.Checked;
            t.IsDelRepRow = this.IsDelRepRow.Checked;
            t.IsErrorLog = this.IsSaveErrorLog.Checked;

            t.IsTrigger = this.IsStartTrigger.Checked;

            if (this.raGatheredRun.Checked == true)
                t.TriggerType = ((int)cGlobalParas.TriggerType.GatheredRun).ToString();
            else if (this.raPublishedRun.Checked == true)
                t.TriggerType = ((int)cGlobalParas.TriggerType.PublishedRun).ToString();

            cTriggerTask tt;

            //��ʼ��Ӵ�����ִ�е�����
            for (i = 0; i < this.listTask.Items.Count; i++)
            {
                tt = new cTriggerTask();
                tt.RunTaskType = cGlobalParas.ConvertID(this.listTask.Items[i].Text);

                if (cGlobalParas.ConvertID(this.listTask.Items[i].Text) == (int)cGlobalParas.RunTaskType.DataTask)
                    tt.RunTaskName = cGlobalParas.ConvertID(this.listTask.Items[i].SubItems[1].Text.ToString()).ToString();
                else
                    tt.RunTaskName = this.listTask.Items[i].SubItems[1].Text.ToString();

                tt.RunTaskPara = this.listTask.Items[i].SubItems[2].Text.ToString();

                t.TriggerTask.Add(tt);
            }

            for (i = 0; i < this.listWeblink.Items.Count; i++)
            {
                UrlCount += int.Parse(this.listWeblink.Items[i].SubItems[4].Text);
            }
            t.UrlCount = UrlCount;

            Task.cWebLink w;
            for (i = 0; i < this.listWeblink.Items.Count; i++)
            {
                w = new Task.cWebLink();
                w.id = i;
                w.Weblink = this.listWeblink.Items[i].Text;
                if (this.listWeblink.Items[i].SubItems[1].Text == "N")
                {
                    w.IsNavigation = false;
                }
                else
                {
                    w.IsNavigation = true;

                    //��ӵ�������
                    for (int m = 0; m < m_listNaviRules.Count; m++)
                    {
                        if (m_listNaviRules[m].Url == this.listWeblink.Items[i].Text)
                        {
                            w.NavigRules = m_listNaviRules[m].NavigRule;
                            break;
                        }
                    }

                }

                if (this.listWeblink.Items[i].SubItems[3].Text == "" || this.listWeblink.Items[i].SubItems[3].Text == null)
                {
                    w.IsNextpage = false;
                }
                else
                {
                    w.IsNextpage = true;
                    w.NextPageRule = this.listWeblink.Items[i].SubItems[3].Text;
                }

                t.WebpageLink.Add(w);
                w = null;
            }

            Task.cWebpageCutFlag c;
            for (i = 0; i < this.listWebGetFlag.Items.Count; i++)
            {
                c = new Task.cWebpageCutFlag();
                c.id = i;
                c.Title = this.listWebGetFlag.Items[i].Text;
                c.DataType = cGlobalParas.ConvertID(this.listWebGetFlag.Items[i].SubItems[1].Text);
                c.StartPos = this.listWebGetFlag.Items[i].SubItems[2].Text;
                c.EndPos = this.listWebGetFlag.Items[i].SubItems[3].Text;
                c.LimitSign = cGlobalParas.ConvertID(this.listWebGetFlag.Items[i].SubItems[4].Text);

                try
                {
                    c.RegionExpression = this.listWebGetFlag.Items[i].SubItems[5].Text;
                    c.ExportLimit = cGlobalParas.ConvertID(this.listWebGetFlag.Items[i].SubItems[6].Text);
                    c.ExportExpression = this.listWebGetFlag.Items[i].SubItems[7].Text;
                }
                catch (System.Exception)
                {
                    //������󲻴��������1.0�汾
                }

                t.WebpageCutFlag.Add(c);
                c = null;

            }

            t.Save(TaskPath);
            t = null;

            return true;
        }
Esempio n. 5
0
        //根据taskid修改任务的名称
        public bool RenameTask(string TClass, string OldTaskName, string NewTaskName)
        {
            try
            {
                //根据任务分类获取任务的所属路径
                cTaskClass tc         = new cTaskClass();
                string     tClassPath = "";

                //判断新的任务路径是否存在,如果存在则报错
                if (TClass == "")
                {
                    tClassPath = Program.getPrjPath() + "tasks";
                }
                else
                {
                    tClassPath = tc.GetTaskClassPathByName(TClass);
                }

                tc = null;

                if (File.Exists(tClassPath + "\\" + NewTaskName + ".xml"))
                {
                    throw new cSoukeyException("您修改的任务名称已经存在,请重新修改!");
                }

                cTaskIndex xmlTasks = new cTaskIndex();

                if (TClass == "")
                {
                    xmlTasks.GetTaskDataByClass();
                }
                else
                {
                    xmlTasks.GetTaskDataByClass(TClass);
                }

                //开始初始化此分类下的任务
                int count = xmlTasks.GetTaskClassCount();

                for (int i = 0; i < count; i++)
                {
                    if (xmlTasks.GetTaskName(i) == NewTaskName)
                    {
                        xmlTasks = null;
                        throw new cSoukeyException("您修改的任务名称已经存在,请重新修改!");
                    }
                }
                xmlTasks = null;

                //开始修改任务的名称
                //先开始修改index.xml的名称
                cXmlIO xmlIndex = new cXmlIO(tClassPath + "\\index.xml");
                xmlIndex.EditNodeValue("TaskIndex", "Name", OldTaskName, "Name", NewTaskName);
                xmlIndex.Save();
                xmlIndex = null;

                //开始修改任务的名称
                cXmlIO xmlTask = new cXmlIO(tClassPath + "\\" + OldTaskName + ".xml");
                xmlTask.EditNodeValue("Task/BaseInfo/Name", NewTaskName);
                xmlTask.Save();
                xmlTask = null;

                File.SetAttributes(tClassPath + "\\" + OldTaskName + ".xml", System.IO.FileAttributes.Normal);
                File.Move(tClassPath + "\\" + OldTaskName + ".xml", tClassPath + "\\" + NewTaskName + ".xml");
            }
            catch (System.Exception ex)
            {
                throw ex;
                return(false);
            }

            return(true);
        }
Esempio n. 6
0
        //����taskid�޸����������
        public bool RenameTask(string TClass,string OldTaskName, string NewTaskName)
        {
            try
            {
                //������������ȡ���������·��
                cTaskClass tc = new cTaskClass();
                string tClassPath = "";

                //�ж��µ�����·���Ƿ���ڣ���������򱨴�
                if (TClass == "")
                {
                    tClassPath = Program.getPrjPath() + "tasks";
                }
                else
                {
                    tClassPath = tc.GetTaskClassPathByName(TClass);
                }

                tc = null;

                if (File.Exists(tClassPath + "\\" + NewTaskName + ".xml"))
                    throw new cSoukeyException("���޸ĵ����������Ѿ����ڣ��������޸ģ�");

                cTaskIndex xmlTasks = new cTaskIndex();

                if (TClass == "")
                {
                    xmlTasks.GetTaskDataByClass();
                }
                else
                {
                    xmlTasks.GetTaskDataByClass(TClass);
                }

                //��ʼ��ʼ���˷����µ�����
                int count = xmlTasks.GetTaskClassCount();

                for (int i = 0; i < count; i++)
                {
                    if (xmlTasks.GetTaskName(i) == NewTaskName)
                    {
                        xmlTasks = null;
                        throw new cSoukeyException("���޸ĵ����������Ѿ����ڣ��������޸ģ�");
                    }
                }
                xmlTasks = null;

                //��ʼ�޸����������
                //�ȿ�ʼ�޸�index.xml������
                cXmlIO xmlIndex = new cXmlIO(tClassPath + "\\index.xml");
                xmlIndex.EditNodeValue("TaskIndex", "Name", OldTaskName, "Name", NewTaskName);
                xmlIndex.Save();
                xmlIndex = null;

                //��ʼ�޸����������
                cXmlIO xmlTask = new cXmlIO(tClassPath + "\\" + OldTaskName + ".xml");
                xmlTask.EditNodeValue("Task/BaseInfo/Name", NewTaskName);
                xmlTask.Save();
                xmlTask = null;

                File.SetAttributes(tClassPath + "\\" + OldTaskName + ".xml", System.IO.FileAttributes.Normal);
                File.Move(tClassPath + "\\" + OldTaskName + ".xml", tClassPath + "\\" + NewTaskName + ".xml");
            }
            catch (System.Exception ex)
            {
                throw ex;
                return false;
            }

            return true;
        }
Esempio n. 7
0
        private string GetTaskClassPath()
        {
            string TClassName = this.TaskClass;
            string Path;

            if (TClassName == null || TClassName == "" || TClassName =="�������")
            {
                Path = Program.getPrjPath() + "Tasks";
            }
            else
            {
                cTaskClass tClass = new cTaskClass();
                Path = tClass.GetTaskClassPathByName(TClassName);
                tClass = null;
            }
            return Path;
        }
Esempio n. 8
0
        //���������������һ�������ԭ�з��࿽������һ��������
        public void CopyTask(string TaskName, string OldTaskClass, string NewTaskClass)
        {
            cTaskClass tc = new cTaskClass();
            string oldPath = "";
            string NewPath = "";

            if (OldTaskClass == "")
                oldPath = Program.getPrjPath() + "tasks";
            else
                oldPath = tc.GetTaskClassPathByName(OldTaskClass);

            if (NewTaskClass == "")
                NewPath = Program.getPrjPath() + "tasks";
            else
                NewPath = tc.GetTaskClassPathByName(NewTaskClass);

            tc = null;

            string FileName = "";

            if (OldTaskClass == NewTaskClass || (File.Exists(NewPath + "\\" + TaskName + ".xml")))
            {
                FileName = TaskName + "-����.xml";

                System.IO.File.Copy(oldPath + "\\" + TaskName + ".xml", NewPath + "\\" + FileName);
                TaskName = TaskName + "-����";

            }
            else
            {
                FileName = TaskName + ".xml";
                System.IO.File.Copy(oldPath + "\\" + FileName, NewPath + "\\" + FileName);
            }

            LoadTask(NewPath + "\\" + FileName);

            //�޸����������
            this.TaskName = TaskName;

            if (NewTaskClass == "")
                this.TaskClass = "";
            else
                this.TaskClass = NewTaskClass;

            Save("");
        }
Esempio n. 9
0
        //����������������
        /// <summary>
        /// 
        /// </summary>
        /// <param name="TaskName">��������</param>
        /// <param name="OldTaskClass">ԭ���������</param>
        /// <param name="NewTaskClass">���������</param>
        /// 
        public void ChangeTaskClass(string TaskName, string OldTaskClass, string NewTaskClass)
        {
            cTaskClass tc = new cTaskClass();
            string oldPath="";
            string NewPath="";

            if (OldTaskClass == "")
                oldPath = Program.getPrjPath() + "tasks";
            else
                oldPath = tc.GetTaskClassPathByName(OldTaskClass);

            if (NewTaskClass =="")
                NewPath = Program.getPrjPath() + "tasks";
            else
                NewPath = tc.GetTaskClassPathByName(NewTaskClass);

            string FileName = TaskName + ".xml";

            System.IO.File.Copy(oldPath + "\\" + FileName, NewPath + "\\" + FileName);

            LoadTask(NewPath + "\\" + FileName);

            if (NewTaskClass =="")
                this.TaskClass ="";
            else
                this.TaskClass = NewTaskClass;

            Save("");

            DeleTask(oldPath, TaskName);

            tc = null;
        }
        public void AutoAddTask()
        {
            //��ȡ���з��࣬Ȼ����ݷ����������
            cTaskClass xmlTClass = new cTaskClass();
            cTaskIndex xmlTasks;

            //��ȡ���ж��ٸ��������
            int TClassCount = xmlTClass.GetTaskClassCount();

            for (int i = 0; i < TClassCount; i++)
            {
                xmlTasks = new cTaskIndex();

                //��ȡ�˷����¹��й��ٸ�����
                xmlTasks.GetTaskDataByClass(xmlTClass.GetTaskClassName(i));

                int count = xmlTasks.GetTaskClassCount();

                cTask t;

                ListViewItem Litem;

                for (int j = 0; j < count; j++)
                {
                    t = new cTask();
                    try
                    {
                        t.LoadTask(xmlTClass.GetTaskClassPathByName(xmlTClass.GetTaskClassName(i)) + "\\" + xmlTasks.GetTaskName(j) + ".xml");
                        t = null;
                    }
                    catch (cSoukeyException)
                    {
                        Litem = new ListViewItem();

                        Litem.ImageIndex = 0;
                        Litem.Text = "�ȴ�����";
                        Litem.SubItems.Add(xmlTasks.GetTaskName(j));
                        Litem.SubItems.Add(t.TaskVersion.ToString());
                        Litem.SubItems.Add(xmlTClass.GetTaskClassName(i));
                        Litem.SubItems.Add(xmlTClass.GetTaskClassPathByName(xmlTClass.GetTaskClassName(i)));
                        Litem.SubItems.Add("");
                        //���½�������Ϣ
                        m_sender.BeginInvoke(m_senderDelegate, new object[] { TClassCount + count, j + i, Litem, false });

                        Application.DoEvents();
                    }
                    catch (System.Exception ex)
                    {

                    }

                }

                //���½�������Ϣ
                m_sender.BeginInvoke(m_senderDelegate, new object[] { TClassCount, i, null, false });
            }

            m_sender.BeginInvoke(m_senderDelegate, new object[] { TClassCount, TClassCount,null, true  });

            xmlTClass = null;
        }
Esempio n. 11
0
        //����ɼ�����
        private cGatherTask AddRunTask(string tClassName, string tName)
        {
            //��ѡ���������ӵ�������
            //�����жϴ������Ƿ��Ѿ���ӵ�������,
            //����Ѿ���ӵ�����������Ҫѯ���Ƿ�����һ������ʵ��
            bool IsExist = false;

            //��ʼ��ʼ���������е�����
            Task.cTaskRun xmlTasks = new Task.cTaskRun();
            xmlTasks.LoadTaskRunData();
            for (int i=0 ;i<xmlTasks.GetCount() ;i++)
            {
                if (xmlTasks.GetTaskName(i) == tName)
                {
                    IsExist = true;
                    break;
                }
            }
            xmlTasks = null;

            if (IsExist == true)
            {
                //if (MessageBox.Show("��ѡ������������Ѿ������������ڻ�������ͬ���Ƶ������Ѿ��������������Ƿ�ȷ�ϴ�������Ҫ���л���Ҫ���������еڶ���ʵ����",
                //    "ϵͳѯ��", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                //{
                //    return null;
                //}

                if (cTool.MyMessageBox(rm.GetString("Quaere12"), rm.GetString("MessageboxQuaere"), MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                {
                    return null;
                }

            }

            cTaskRun tr = new cTaskRun();
            cTaskClass tc = new cTaskClass();
            cTaskData tData=new cTaskData ();

            string tPath="";

            if (tClassName == "")
            {
                tPath = Program.getPrjPath() + "tasks";
            }
            else
            {
                tPath = tc.GetTaskClassPathByName(tClassName);
            }

            tc=null;

            string tFileName = tName + ".xml";

            //��ȡ����ִ��ID
            Int64 NewID = tr.InsertTaskRun(tPath, tFileName);

            tr.LoadSingleTask(NewID);

            tData = new cTaskData();
            tData.TaskID = tr.GetTaskID(0);
            tData.TaskName = tr.GetTaskName(0);
            tData.TaskType = tr.GetTaskType(0);
            tData.RunType = tr.GetTaskRunType(0);
            tData.tempFileName = tr.GetTempFile(0);
            tData.TaskState = tr.GetTaskState(0);
            tData.UrlCount = tr.GetUrlCount(0);
            tData.TrueUrlCount = tr.GetTrueUrlCount(0);
            tData.ThreadCount = tr.GetThreadCount(0);
            tData.GatheredUrlCount = tr.GetGatheredUrlCount(0);
            tData.GatherErrUrlCount = tr.GetErrUrlCount(0);

            //�������������
            m_GatherControl.AddGatherTask(tData);

            tData = null;

            //������ӵ���������,��Ҫ����ӵ�����ִ���б���
            tr = null;

            return  m_GatherControl.TaskManage.FindTask(NewID);
        }
Esempio n. 12
0
        private void PasteTask()
        {
            IDataObject cdata;
            cdata = Clipboard.GetDataObject();

            string TaskClass;
            string TaskName;

            //�ж������Ƿ�Ϊ�ı�
            if (IsClipboardSoukeyData())
            {
                string tInfo = cdata.GetData(DataFormats.Text).ToString();
                tInfo = tInfo.Substring(17, tInfo.Length - 17);

                //���Էֽ��ȡ���ı����п��ܼ������е���Ϣ����Soukey��ժ����Ϣ
                if (tInfo.IndexOf("/") >= 0)
                {
                    try
                    {
                        bool IsTaskClass = false;
                        bool IsTaskName = false;

                        TaskClass = tInfo.Substring(0, tInfo.IndexOf("/") );
                        TaskName = tInfo.Substring(tInfo.IndexOf("/") + 1, tInfo.Length - tInfo.IndexOf("/") - 1);

                        if (TaskClass == "" && TaskName == "")
                            return;

                        //��Ϣ�ֽ���ٴ���ָ֤������������Ƿ����
                        cTaskClass tc = new cTaskClass();
                        int TClassCount = tc.GetTaskClassCount();

                        for (int i = 0; i < TClassCount; i++)
                        {
                            //taskclassΪ�ձ�ʾ���ڷ���ĸ��ڵ���
                            if (tc.GetTaskClassName(i) == TaskClass || TaskClass=="")
                            {
                                IsTaskClass = true;
                                break;
                            }
                        }

                        if (IsTaskClass == false)
                        {
                            throw new cSoukeyException(rm.GetString("Error17"));
                            return;
                        }

                        string tClassPath = tc.GetTaskClassPathByName(TaskClass);

                        tc = null;

                        //ճ���������
                        string NewTClass="";

                        if (this.treeMenu.SelectedNode.Name == "nodTaskClass")
                            NewTClass = "";
                        else
                            NewTClass = this.treeMenu.SelectedNode.Text;

                        cTask t = new cTask();

                        t.CopyTask(TaskName, TaskClass, NewTClass);

                        //����datagridview���У���ʾ�����ɹ�

                        this.dataTask.Rows.Add(imageList1.Images["task"], t.TaskID, cGlobalParas.TaskState.UnStart, this.treeMenu.SelectedNode.Name, t.TaskName,
                            cGlobalParas.ConvertName(int.Parse(t.TaskType)), (t.IsLogin == true ? rm.GetString("Logon") : rm.GetString("NoLogon")),
                           t.WebpageLink.Count.ToString(), cGlobalParas.ConvertName(int.Parse(t.RunType)),
                           cGlobalParas.ConvertName(int.Parse ( t.ExportType)));

                        t = null;
                    }
                    catch (System.Exception ex)
                    {
                        MessageBox.Show(rm.GetString("Info68") + ex.Message, rm.GetString("MessageboxInfo"), MessageBoxButtons.OK, MessageBoxIcon.Error);

                    }
                }
            }
        }