Пример #1
0
        private bool DelPlanLog()
        {
            if (this.dataTask.SelectedRows.Count == 0)
            {
                return false;
            }

            if (MessageBox.Show(rm.GetString("Quaere7"), rm.GetString("MessageboxQuaere"), MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
            {
                return false;
            }

            cPlanRunLog rLog = new cPlanRunLog();
            rLog.DelLog();
            rLog = null;

            //�����ʾ
            try
            {
                this.dataTask.Rows.Clear();
            }
            catch (System.Exception)
            {
            }

            return true;
        }
Пример #2
0
        private void LoadPlanLog()
        {
            ShowPlanLog();

            cPlanRunLog rLog = new cPlanRunLog();

            rLog.LoadLog();

            int Count = rLog.GetLogCount();

            for (int i = 0; i < Count; i++)
            {
                dataTask.Rows.Add(imageList1.Images["log"], rLog.GetPlanID(i), cGlobalParas.ConvertID ( rLog.GetLogType(i)), this.treeMenu.SelectedNode.Name,
                        rLog.GetPlanName (i),rLog.GetTaskType (i),
                        rLog.GetFileName (i),
                       rLog.GetFilePara (i),rLog.GetRunTime (i));
            }

            rLog = null;

            this.dataTask.Sort(this.dataTask.Columns[4], ListSortDirection.Ascending);

            this.dataTask.ClearSelection();
        }
Пример #3
0
        //ִ������
        private void RunTask()
        {
            cPlanRunLog rLog = new cPlanRunLog();
            rLog.OpenLogFile();

            while (m_runningTasks.Count > 0)
            {
                cTaskPlan tp = m_runningTasks.Dequeue();

                switch (tp.RunTaskType)
                {
                    case (int)cGlobalParas.RunTaskType.SoukeyTask :
                        RunSoukeyTask(tp.RunTaskName);
                        break ;
                    case (int)cGlobalParas.RunTaskType.OtherTask :
                        RunOtherTask(tp.RunTaskName, tp.RunTaskPara);
                        break ;
                    case (int)cGlobalParas.RunTaskType.DataTask :
                        RunDataTask(tp.RunTaskName, tp.RunTaskPara);
                        break;
                }

                //д��־
                rLog.InsertLog(cGlobalParas.LogType.RunPlanTask,tp.PlanID ,tp.PlanName , (cGlobalParas.RunTaskType)tp.RunTaskType, tp.RunTaskName, tp.RunTaskPara);

            }

            rLog.CloseLogFile();
            rLog = null;
        }