Exemple #1
0
        private Database GetNewDatabase(List <int> customProperties)
        {
            Database database = ReflectionUtils.CreateDatabaseInstance(SourceDatabase.GetType());

            for (int i = 0; i < customProperties.Count; i++)
            {
                ReflectionUtils.ChangePropertyValue(Values[i].Key, customProperties[i], database);
            }

            database.Name  = string.Format("{0} {1}", SourceDatabase.Name, String.Join("x", customProperties));
            database.Color = Color.FromArgb(random.Next(0, 250), random.Next(0, 250), random.Next(0, 250));

            return(database);
        }