Exemplo n.º 1
0
        /// <summary>
        /// 得到推焦计划和装煤计划
        /// </summary>
        /// <param name="stokingPlan">装煤计划</param>
        /// <returns>推焦计划</returns>
        private List <TPushPlan> GetPushPlan()
        {
            List <TPushPlan> plan = new List <TPushPlan>();
            //if (Setting.IsServer) return plan;
            TPushPlan currentTPlan;
            Dictionary <int, BurnTime> dic = BurnStatus;
            string        path             = @"Config\RoomPlanInfo.config";
            OperateConfig Config           = new OperateConfig(path);

            foreach (XmlNode xmlNode in Config.XmlNodeList)
            {
                int  valid     = Convert.ToInt32(xmlNode.Attributes.Item(1).Value);
                bool planValid = Convert.ToBoolean(valid);
                if (!planValid)
                {
                    continue;
                }
                currentTPlan = new TPushPlan();
                //计划有效,执行下列语句
                currentTPlan.Period      = Convert.ToInt32(xmlNode.Attributes.Item(2).Value);
                currentTPlan.Group       = Convert.ToInt32(xmlNode.Attributes.Item(3).Value);
                currentTPlan.RoomNum     = Convert.ToByte(xmlNode.Attributes.Item(0).Value);
                currentTPlan.PushTime    = Convert.ToDateTime(xmlNode.Attributes.Item(5).Value);
                currentTPlan.StokingTime = BurnStatus[currentTPlan.RoomNum].StokingTime;
                DateTime time = Convert.ToDateTime(xmlNode.Attributes.Item(7).Value);
                //currentTPlan.StandardBurnTime = (short)(time.Hour * 60 + time.Minute);
                currentTPlan.BurnTime = currentTPlan.GetBurnTime();
                DateTime t = currentTPlan.PushTime;
                plan.Add(currentTPlan);
            }
            //Array.Sort()
            plan.Sort(TPushPlan.CompareByTime);
            return(plan);
        }
Exemplo n.º 2
0
 public MStokingPlan(TPushPlan plan)
 {
     RoomNum = plan.RoomNum;
     //数字5的意义:计划装煤时间应在计划出焦时间之后的第五分钟
     StokingTime = plan.PushTime.AddMinutes(5);
     Period      = (byte)plan.Period;
     Group       = (byte)plan.Group;
 }
Exemplo n.º 3
0
 public TPushPlan(TPushPlan t)
 {
     RoomNum     = t.RoomNum;
     Period      = t.Period;
     Group       = t.Group;
     PushTime    = t.PushTime;
     StokingTime = CokeRoom.BurnStatus[RoomNum].StokingTime;
     BurnTime    = GetBurnTime();
 }
Exemplo n.º 4
0
 public static int CompareByTime(TPushPlan p1, TPushPlan p2)
 {
     return(p1.PushTime.CompareTo(p2.PushTime));
 }
Exemplo n.º 5
0
 public void GetCopyFrom(TPushPlan plan)
 {
     RoomNum  = plan.RoomNum;
     PushTime = plan.PushTime;
 }