예제 #1
0
            void sub(SType t, params string[] str)
            {
                List <string> lst = new List <string>();

                foreach (string s in str)
                {
                    lst.Add(Lib.ToLat(s).ToLower().Replace(" ", ""));
                }
                SectionTab.Add(t.ToString(), lst);
            }
예제 #2
0
        // if field of stype not recognized, return -1
        //.. f.e. it happaned with constant like "M:C245"
        public int Col(SType stype)
        {
            if (stype.ToString().Contains("UNIT_"))
            {
                return(-1);
            }
            string str = string.Empty;

            try { str = dpar[stype]; }
            catch { }
            return(Lib.ToInt(str));
        }
예제 #3
0
        //--- FP constructor 2 for Component
#if DEBUG   //--- 29-Mar-2017 Вариант конструктора для UT
        public FingerPrint(SType stype, dynamic obj)
        {
            typeFP = type.Component;
            if (stype == SType.Description)
            {
                Par p = new Par(obj);
                p.par = p.tx = obj;
                pars.Add(p);
                return;
            }
            section = new Sec(stype.ToString() + ":");
            string str = "";
            if (obj.GetType() == typeof(string)) str = (string)obj;
            if (obj.GetType() == typeof(double)) str = ((double)obj).ToString();
            pars.Add(new Par(str));
        }