public bool CheckAccessibility(profileNode profile, INPUTMODE type)
        {
            Type t = Type.GetType(internalList[profile]);
            InternalProfileBase c = Activator.CreateInstance(t) as InternalProfileBase;

            if (c.destination.Contains(type))
            {
                return(true);
            }

            return(false);
        }
        public static Dictionary <string, protInfo> GetProfile(profileNode node, DCDFile dcd)
        {
            profileNode n = GetNode(node.internalName);

            if (n != null)
            {
                Type t = Type.GetType(internalList[n]);
                InternalProfileBase c = Activator.CreateInstance(t) as InternalProfileBase;

                return(c.GetProfile(node, null, dcd));
            }
            return(null);
        }
        public void RunProfile(string name, string listFile)
        {
            profileNode node = GetNode(name);

            if (node != null)
            {
                Type t = Type.GetType(internalList[node]);
                InternalProfileBase c = Activator.CreateInstance(t) as InternalProfileBase;
                c.CheckIfAvailable();
                progressInfo = c;
                c.RunThreads(listFile);
                progressInfo = null;
                progress++;
            }
        }
        public Dictionary <string, protInfo> GetProfile(profileNode node, string listFile)
        {
            profileNode n = GetNode(node.internalName);

            if (n != null)
            {
                Type t = Type.GetType(internalList[n]);
                InternalProfileBase c = Activator.CreateInstance(t) as InternalProfileBase;
                progressInfo = c;
                Dictionary <string, protInfo> res = c.GetProfile(node, listFile, null);
                progressInfo = null;
                progress++;

                return(res);
            }
            return(null);
        }
        public static List <InternalProfileBase> InitProfiles()
        {
            //Type[] types = GetLoadableTypes(Assembly.GetExecutingAssembly());
            //Type[] types = Assembly.GetExecutingAssembly().GetTypes();
            Type [] types;
            List <InternalProfileBase> myTypes = new List <InternalProfileBase>();

            if (Assembly.GetExecutingAssembly() == null)
            {
                throw new ArgumentNullException("Assembly cannot be readed");
            }
            try
            {
                types = Assembly.GetExecutingAssembly().GetTypes();
            }
            catch (ReflectionTypeLoadException e)
            {
                types = e.Types;
            }


            RemoveProfilesFile();
            foreach (Type t in  types)
            {
                if (t != null && t.IsSubclassOf(typeof(InternalProfileBase)))
                {
                    try
                    {
                        InternalProfileBase c = Activator.CreateInstance(t) as InternalProfileBase;
                        c.CheckIfAvailable();
                        myTypes.Add(c);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex);
                    }
                }
            }
            return(myTypes);
        }