Beispiel #1
0
        private void ModifyPlanState(Int64 PlanID, cGlobalParas.PlanState pState)
        {
            cXmlIO xmlConfig = new cXmlIO(Program.getPrjPath() + "tasks\\plan\\plan.xml");

            xmlConfig.EditNodeValue("Plans", "ID", PlanID.ToString(), "PlanState", ((int)pState).ToString());
            xmlConfig.Save();
            xmlConfig = null;
        }
Beispiel #2
0
        //根据计划的状态获取计划
        public void GetPlanByState(cGlobalParas.PlanState pState)
        {
            string PlanPath = Program.getPrjPath() + "tasks\\plan";

            xmlConfig = new cXmlIO(PlanPath + "\\index.xml");

            //获取TaskClass节点
            Plans = xmlConfig.GetData("TaskIndex");
        }
Beispiel #3
0
        //插入一个计划索引
        //插入计划是需要判断计划的状态,通常情况下,新建计划都是有效的。
        //当前计划中有生效时间,但此时间当前并不做计划状态的判断
        public void InsertPlanIndex(string strXml, cGlobalParas.PlanState pState)
        {
            switch (pState)
            {
            case cGlobalParas.PlanState.Disabled:
                xmlConfig.InsertElement("PlanIndex\\Disabled", "Plan", strXml);
                break;

            case cGlobalParas.PlanState.Enabled:
                xmlConfig.InsertElement("PlanIndex\\Enabled", "Plan", strXml);
                break;

            case cGlobalParas.PlanState.Expired:
                xmlConfig.InsertElement("PlanIndex\\Expired", "Plan", strXml);
                break;

            default:
                break;
            }

            xmlConfig.Save();
        }