public void AddLoaders(DataFileLoader content, DataFileLoader loc)
 {
     Content.Add(content);
     Loc.Add(loc);
 }
示例#2
0
        public C_WellParas(List <C_WellPara> paras)
        {
            AllParas = paras;
            UnitCat.Clear();
            Loc.Clear();
            TubeMat.Clear();
            PumpModel.Clear();
            UseFor.Clear();

            if (paras == null)
            {
                return;
            }
            if (paras.Count == 0)
            {
                return;
            }

            foreach (C_WellPara node in paras)
            {
                switch (node.Type)
                {
                case E_WellParaType.Loc:
                    Loc.Add(node);
                    break;

                case E_WellParaType.PumpModel:
                    PumpModel.Add(node);
                    break;

                case E_WellParaType.TubeMat:
                    TubeMat.Add(node);
                    break;

                case E_WellParaType.UnitCat:
                    UnitCat.Add(node);
                    break;

                case E_WellParaType.UseFor:
                    UseFor.Add(node);
                    break;

                default:
                    break;
                }
            }

            if (UnitCat.Count != 0)
            {
                UnitCatIndex = UnitCat[0];
            }
            if (Loc.Count != 0)
            {
                LocIndex = Loc[0];
            }
            if (PumpModel.Count != 0)
            {
                PumpModelIndex = PumpModel[0];
            }
            if (TubeMat.Count != 0)
            {
                TubeMatIndex = TubeMat[0];
            }
            if (UseFor.Count != 0)
            {
                UseForIndex = UseFor[0];
            }
        }