예제 #1
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);
        }
    protected void AddStatistics(string name)
    {
        TesterItem item = this.tester.Components[name];

        if (item is SeriesTesterItem)
        {
            (item as SeriesTesterItem).Enabled = true;
        }
    }
예제 #3
0
        public static TesterItem GetComponent(string name)
        {
            TesterComponentRecord testerComponentRecord = TesterComponentManager.G1d22oBB0[name];
            TesterItem            testerItem            = Activator.CreateInstance(testerComponentRecord.Type, new object[1]
            {
                (object)name
            }) as TesterItem;

            testerItem.Name        = testerComponentRecord.Name;
            testerItem.Description = testerComponentRecord.Description;
            return(testerItem);
        }
예제 #4
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);
        }
예제 #5
0
        private static void WFNAaUJL5([In] TesterItem obj0, [In] PropertyInfo obj1, [In] StreamWriter obj2)
        {
            string name = obj1.Name;
            string str  = "";

            if (obj1.PropertyType.IsSubclassOf(typeof(TesterItem)))
            {
                TesterItem testerItem = obj1.GetValue((object)obj0, (object[])null) as TesterItem;
                if (testerItem != null)
                {
                    str = testerItem.Name;
                }
            }
            else
            {
                str = obj1.GetValue((object)obj0, (object[])null).ToString();
            }
            obj2.WriteLine(name + str);
        }
예제 #6
0
        public static void SaveComponent(TesterItem component, string fileDir)
        {
            StreamWriter streamWriter = new StreamWriter(fileDir + component.Name + "");

            streamWriter.WriteLine("" + component.GetType().Name);
            foreach (PropertyInfo propertyInfo in component.GetType().GetProperties())
            {
                BrowsableAttribute[] browsableAttributeArray = propertyInfo.GetCustomAttributes(typeof(BrowsableAttribute), true) as BrowsableAttribute[];
                bool flag = true;
                foreach (BrowsableAttribute browsableAttribute in browsableAttributeArray)
                {
                    if (!browsableAttribute.Browsable)
                    {
                        flag = false;
                    }
                }
                if (flag)
                {
                    TesterComponentManager.WFNAaUJL5(component, propertyInfo, streamWriter);
                }
            }
            streamWriter.Close();
        }