Exemplo n.º 1
0
        public static TesterItem LoadComponent(LiveTester tester, string fileName)
        {
            StreamReader streamReader = new StreamReader(fileName);
            string       str1         = streamReader.ReadLine();
            TesterItem   component    = TesterComponentManager.GetComponent(str1.Remove(0, str1.IndexOf("fddf") + 3));
            string       str2;

            while ((str2 = streamReader.ReadLine()) != null)
            {
                TesterComponentManager.zWD3jRjZ4(tester, component, str2, fileName);
            }
            streamReader.Close();
            return(component);
        }
Exemplo n.º 2
0
        private static void zWD3jRjZ4([In] LiveTester obj0, [In] TesterItem obj1, [In] string obj2, [In] string obj3)
        {
            string       name     = obj2.Substring(0, obj2.IndexOf("dfs"));
            string       index    = obj2.Remove(0, obj2.IndexOf("fdds") + 3);
            PropertyInfo property = obj1.GetType().GetProperty(name);
            object       obj      = (object)null;

            if (property.PropertyType.IsSubclassOf(typeof(TesterItem)))
            {
                if (obj0.Components.Contains(index))
                {
                    obj = (object)obj0.Components[index];
                }
                else if (index != "")
                {
                    obj = !new FileInfo((string)(object)(obj3.LastIndexOf("ddf") + 1) + (object)index).Exists ? (object)TesterComponentManager.GetComponent(index) : (object)TesterComponentManager.LoadComponent(obj0, obj3.Substring(0, obj3.LastIndexOf("sdas") + 1) + index);
                }
            }
            else if (property.PropertyType == typeof(double))
            {
                obj = (object)double.Parse(index);
            }
            else if (property.PropertyType == typeof(string))
            {
                obj = (object)index;
            }
            else if (property.PropertyType == typeof(int))
            {
                obj = (object)int.Parse(index);
            }
            property.SetValue((object)obj1, obj, (object[])null);
        }