public void WriteToTestLocation(
            TestConfiguration testConfig,
            ClassInformation classInfo,
            string fileContent)
        {
            var fileName = classInfo.ClassName + "UnitTests.cs";

            var relativeNamespace = classInfo.NamespaceDecl.Replace(testConfig.ApplicationProjectBaseNamespace, string.Empty);

            var namespaceParts = relativeNamespace.Split(new[] { '.' }, StringSplitOptions.RemoveEmptyEntries);
            var namespaceQueue = new Queue <string>(namespaceParts);

            var currentDirInfo = _fileSystem
                                 .DirectoryInfo
                                 .FromDirectoryName(testConfig.TestProjectBasePath);

            AssurePathExists(currentDirInfo, namespaceQueue);

            var pathParts = new List <string>
            {
                testConfig.TestProjectBasePath
            }.Concat(namespaceParts).ToArray();

            var fullPath = _fileSystem.Path.Combine(pathParts);

            var fullFileName = _fileSystem.Path.Combine(fullPath, fileName);

            _fileSystem.File.WriteAllText(fullFileName, fileContent);
        }
Beispiel #2
0
 public Character(string characterName, RaceInformation race, ClassInformation clazz, Image characterImage)
 {
     this.characterName  = characterName;
     this.race           = race;
     this.clazz          = clazz;
     this.characterImage = characterImage;
 }
Beispiel #3
0
        private void BindClassDetails(int classID)
        {
            string constr = ConfigurationManager.ConnectionStrings["CS414_FasTestConnectionString"].ConnectionString;

            using (SqlConnection con = new SqlConnection(constr))
            {
                using (con)
                {
                    using (SqlCommand getcmd = new SqlCommand("Get_Class_Details", con))
                    {
                        con.Open();
                        //Get details for the selected class
                        SqlDataAdapter da = new SqlDataAdapter(getcmd);
                        da.SelectCommand.CommandType = CommandType.StoredProcedure;
                        da.SelectCommand.Parameters.AddWithValue("@pClassID", Convert.ToInt32(classID));
                        DataSet ds = new DataSet();

                        da.Fill(ds, "Assignment");
                        ClassInformation.DataSource = ds.Tables["Assignment"];
                        ClassInformation.DataBind();
                        da.Dispose();
                        con.Close();
                    }
                }
            }
            ClassStudents.SelectParameters["pClassID"].DefaultValue = classID.ToString();
            ClassStudents.DataBind();
            StudentsEnrolledgrid.DataBind();
        }
Beispiel #4
0
        private ExpressionStatementSyntax CreateSutStatement(ClassInformation classInfo)
        {
            var argumentList = new List <ArgumentSyntax>();

            foreach (var param in classInfo.Constructor.Parameters)
            {
                var argument = SyntaxFactory.Argument(
                    SyntaxFactory.MemberAccessExpression(
                        SyntaxKind.SimpleMemberAccessExpression,
                        SyntaxFactory.IdentifierName(_valueAligner.CreateMockFieldName(param.ParameterName)),
                        SyntaxFactory.IdentifierName("Object")));

                argumentList.Add(argument);
            }

            var sutStatement = SyntaxFactory.ExpressionStatement(
                SyntaxFactory.AssignmentExpression(
                    SyntaxKind.SimpleAssignmentExpression,
                    SyntaxFactory.IdentifierName("_sut"),
                    SyntaxFactory.ObjectCreationExpression(
                        SyntaxFactory.IdentifierName(classInfo.ClassName))
                    .WithArgumentList(
                        SyntaxFactory.ArgumentList(
                            SyntaxFactory.SeparatedList(argumentList)))));

            return(sutStatement);
        }
 public void OnRightClassButtonPress()
 {
     classIndex++;
     classIndex = classIndex % availableClasses.Length;
     classInfo  = availableClasses[classIndex];
     RefreshUI();
 }
Beispiel #6
0
        private IReadOnlyCollection <StatementSyntax> CreateConstructorStatements(ClassInformation classInfo)
        {
            var result = new List <StatementSyntax>();

            foreach (var param in classInfo.Constructor.Parameters)
            {
                var statement = SyntaxFactory.ExpressionStatement(
                    SyntaxFactory.AssignmentExpression(
                        SyntaxKind.SimpleAssignmentExpression,
                        SyntaxFactory.IdentifierName(_valueAligner.CreateMockFieldName(param.ParameterName)),
                        SyntaxFactory.ObjectCreationExpression(
                            SyntaxFactory.GenericName(
                                SyntaxFactory.Identifier("Mock"))
                            .WithTypeArgumentList(
                                SyntaxFactory.TypeArgumentList(
                                    SyntaxFactory.SingletonSeparatedList <TypeSyntax>(
                                        SyntaxFactory.IdentifierName(param.ParameterType)))))
                        .WithArgumentList(
                            SyntaxFactory.ArgumentList())));

                result.Add(statement);
            }

            var emptyLine = SyntaxFactory.ParseStatement(string.Empty).WithTrailingTrivia(SyntaxFactory.CarriageReturnLineFeed);

            result.Add(emptyLine);

            var sutStatement = CreateSutStatement(classInfo);

            result.Add(sutStatement);

            return(result);
        }
Beispiel #7
0
    public override void Shoot(Vector3 position, float rotation, float timeFloat, Vector3 speed, HealthPoints damageAddition,
                               Fraction currentFraction)
    {
        if (_rigidbody2D == null)
        {
            _rigidbody2D = GetComponent <Rigidbody2D>();
        }
        if (_damageSkill == null)
        {
            _damageSkill = GetComponent <DamageSkill>();
        }
        if (_classInformation == null)
        {
            _classInformation = GetComponent <ClassInformation>();
        }
        if (_timer == null)
        {
            _timer = new ExpirationTimer(timeFloat);
            _timer.OnExpiredTimer += DespawnAction;
        }
        if (_timer.ExpirationTime != timeFloat)
        {
            _timer.ExpirationTime = timeFloat;
        }
        _timer.Start();

        _damageSkill.DamageValue          = damageAddition;
        _classInformation.CurrentFraction = currentFraction;

        _rigidbody2D.position = position;
        //_rigidbody2D.rotation = rotation;
        _rigidbody2D.velocity = speed;
    }
Beispiel #8
0
        public async Task <IActionResult> Edit(int id, [Bind("ClassID,ClassName,NoOfStudent")] ClassInformation classInformation)
        {
            if (id != classInformation.ClassID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(classInformation);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ClassInformationExists(classInformation.ClassID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(classInformation));
        }
Beispiel #9
0
        public Guid AddClass(Guid assemblyId, ClassInformation cls)
        {
            var clsId = Guid.NewGuid();
            var ns    = cls.FullName.Substring(0, cls.FullName.LastIndexOf('.') - 1);

            // adds the class to be searched
            this.writer.AddDocument(new Document
            {
                new StringField("_id", clsId.ToString(), Field.Store.YES),
                new StringField("_assemblyId", assemblyId.ToString(), Field.Store.NO),
                new TextField("name", cls.FullName, Field.Store.YES),
                new StringField("type", "Class", Field.Store.YES),
                new StoredField("clrType", cls.FullName),
                new StringField("namespace", ns, Field.Store.YES),
            });

            foreach (var m in cls.Methods)
            {
                this.AddMethod(clsId, m);
            }

            foreach (var p in cls.Properties)
            {
                this.AddProperty(clsId, p);
            }

            return(clsId);
        }
Beispiel #10
0
        public IClassBuilder Initialize(ClassInformation classInfo, ITestFramework testFramework)
        {
            _classInfo = classInfo;
            _testFramework = testFramework;
            InitializeClassDeclaration();

            return this;
        }
Beispiel #11
0
 public Form1()
 {
     InitializeImages();
     InitializeComponent();
     panel1.Paint     += panel1_Paint;
     _classInformation = new ClassInformation(@"C:\Users\user\source\repos\Solution1\Task8\bin\Debug\ClassLibrary.dll");
     InitializeForklifts();
     _repaintThread = null;
 }
Beispiel #12
0
        /// <summary>
        /// Saves the open command for this shell class in the registry.
        /// </summary>
        /// <returns>A value indicating whether the value was successfully saved or not.</returns>
        public bool Save()
        {
            var info = new ClassInformation(this.ClassName)
            {
                DefaultOpenCommand = this.OpenCommand
            };

            return(SetClassInformation(info));
        }
 public FormInformation(ClassInformation information)
 {
     InitializeComponent();
     classInformation = information;
     LoadDossierListToForm();
     LoadHelpfullLinksToForm();
     LoadHelpfullInformationToForm();
     setDossierVisible(false);
     setInfoVisible(false);
 }
Beispiel #14
0
        public ConstructorDeclarationSyntax CreateConstructor(ClassInformation classInfo)
        {
            var statements = CreateConstructorStatements(classInfo);

            var ctor = SyntaxFactory
                       .ConstructorDeclaration($"{classInfo.ClassName}UnitTests")
                       .AddModifiers(SyntaxFactory.Token(SyntaxKind.PublicKeyword))
                       .WithBody(SyntaxFactory.Block(statements));

            return(ctor);
        }
Beispiel #15
0
        public async Task <IActionResult> Create([Bind("ClassID,ClassName,NoOfStudent")] ClassInformation classInformation)
        {
            if (ModelState.IsValid)
            {
                _context.Add(classInformation);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(classInformation));
        }
    private void FillDefaultUI()
    {
        if (availableRaces.Length > 0)
        {
            raceInfo = availableRaces[raceIndex];
        }

        if (availableClasses.Length > 0)
        {
            classInfo = availableClasses[classIndex];
        }
    }
Beispiel #17
0
        public int Record(string className, string classSourceFile)
        {
            if (_classes.TryGetValue(className, out var classInformation))
            {
                return(classInformation.Id);
            }

            var classId = _nextClassId++;

            _classes[className] = new ClassInformation(classId, className, classSourceFile);

            return(classId);
        }
        public IReadOnlyCollection <MemberDeclarationSyntax> CreateFields(ClassInformation classInfo)
        {
            var fieldDeclarations = new List <FieldDeclarationSyntax>
            {
                CreateField(classInfo.ClassName, "_sut")
            };

            var mockFields = classInfo.Constructor.Parameters.Select(param => CreateMockField(param.ParameterType, param.ParameterName));

            fieldDeclarations.AddRange(mockFields);

            return(fieldDeclarations);
        }
Beispiel #19
0
        private static NamespaceDeclarationSyntax CreateNamespace(ClassInformation classInfo, TestConfiguration testConfig)
        {
            var relativeNamespacePart = classInfo
                                        .NamespaceDecl
                                        .Replace(testConfig.ApplicationProjectBaseNamespace, string.Empty);

            var nameSpace = testConfig.TestProjectBaseNamespace + relativeNamespacePart;
            var ns        = SyntaxFactory
                            .NamespaceDeclaration(SyntaxFactory.ParseName(nameSpace))
                            .NormalizeWhitespace();

            return(ns);
        }
Beispiel #20
0
 // NOTE: This is not hooked up in Shifflett code. This window may not be used.
 private void tvObjects_SelectedItemChanged(object sender,
                                            RoutedPropertyChangedEventArgs <object> e)
 {
     if (e.NewValue is ClassInformation)
     {
         btnNext.IsEnabled = true;
         SelectedAssemblyNamespaceClass = e.NewValue as ClassInformation;
     }
     else
     {
         btnNext.IsEnabled = false;
         SelectedAssemblyNamespaceClass = null;
     }
 }
    public void OnLeftClassButtonPress()
    {
        if (classIndex > 0)
        {
            classIndex--;
        }
        else
        {
            classIndex = availableClasses.Length - 1;
        }

        classInfo = availableClasses[classIndex];
        RefreshUI();
    }
        public ClassInformation Create(string filePath)
        {
            var fileContent = _fileSystem.File.ReadAllText(filePath);
            var tree        = CSharpSyntaxTree.ParseText(fileContent);
            var root        = tree.GetRoot();

            var classDeclaration = root
                                   .DescendantNodes()
                                   .OfType <ClassDeclarationSyntax>()
                                   .FirstOrDefault();

            var fullNamespace = root
                                .DescendantNodes()
                                .OfType <NamespaceDeclarationSyntax>().First()
                                .Name
                                .ToString();

            var className        = classDeclaration?.Identifier.Text;
            var ctorDeclarations = root.DescendantNodes().OfType <ConstructorDeclarationSyntax>();
            var ctors            = ctorDeclarations.Select(
                ctorDecl =>
            {
                var ctorParams = ctorDecl.DescendantNodes()
                                 .OfType <ParameterSyntax>()
                                 .Select(
                    f =>
                {
                    var typeName      = ((IdentifierNameSyntax)f.Type).Identifier.Text;
                    var parameterName = f.Identifier.Text;
                    return(new Parameter(typeName, parameterName));
                })
                                 .ToList();

                return(new Constructor(ctorParams));
            }).ToList();

            var usingEntries = root
                               .DescendantNodes()
                               .OfType <UsingDirectiveSyntax>()
                               .Select(f => UsingEntry.CreateFrom(f.Name.ToString()))
                               .ToList();

            var classInfo = new ClassInformation(className, fullNamespace, ctors.First(), usingEntries);

            return(classInfo);
        }
Beispiel #23
0
        private static CompilationUnitSyntax AppendUsings(
            CompilationUnitSyntax syntaxFactory,
            ClassInformation classInfo,
            ITestFramework testFramework)
        {
            classInfo.AppendUsing(UsingEntry.CreateFrom("Moq"));
            classInfo.AppendUsing(testFramework.UsingEntry);
            classInfo.AppendUsing(UsingEntry.CreateFrom(classInfo.NamespaceDecl));

            foreach (var usingName in classInfo.SortedUsingEntries)
            {
                syntaxFactory = syntaxFactory
                                .AddUsings(
                    SyntaxFactory.UsingDirective(
                        SyntaxFactory.ParseName(usingName.Value)));
            }

            return(syntaxFactory);
        }
Beispiel #24
0
        public string WriteSetup(ClassInformation classInfo)
        {
            var ctor   = _ctorSyntaxFactory.CreateConstructor(classInfo);
            var fields = _fieldSyntaxFactory.CreateFields(classInfo);

            var allMembers = new List <MemberDeclarationSyntax>();

            allMembers.AddRange(fields);
            allMembers.Add(ctor);

            var compUnit = SyntaxFactory.CompilationUnit()
                           .WithMembers(
                SyntaxFactory.List(allMembers));

            var result = compUnit
                         .NormalizeWhitespace()
                         .ToFullString();

            return(result);
        }
        private static void RunRetargetToDLL()
        {
            string[] allFilesUnderAssets = Directory.GetFiles(Application.dataPath, "*", SearchOption.AllDirectories);

            Dictionary <string, ClassInformation> scriptFilesReferences = ProcessScripts(allFilesUnderAssets);

            Debug.Log($"Found {scriptFilesReferences.Count} script file references.");

            // DLL name to Guid
            Dictionary <string, string> asmDefMappings = RetrieveAsmDefGuids(allFilesUnderAssets);

            Dictionary <string, AssemblyInformation> compiledClassReferences = ProcessCompiledDLLs("PackagedAssemblies", Application.dataPath.Replace("Assets", $"NuGet/Plugins/WindowsStandalone32{InEditorOutputFolderSuffix}"), asmDefMappings);

            Debug.Log($"Found {compiledClassReferences.Select(t => t.Value.CompiledClasses.Count).Sum()} compiled class references.");

            Dictionary <string, Tuple <string, long> > remapDictionary = new Dictionary <string, Tuple <string, long> >();

            foreach (KeyValuePair <string, AssemblyInformation> pair in compiledClassReferences)
            {
                foreach (KeyValuePair <string, ClassInformation> compiledClass in pair.Value.CompiledClasses)
                {
                    ClassInformation compiledClassInfo = compiledClass.Value;
                    if (scriptFilesReferences.TryGetValue(compiledClass.Key, out ClassInformation scriptClassInfo))
                    {
                        if (scriptClassInfo.ExecutionOrder != 0)
                        {
                            pair.Value.ExecutionOrderEntries.Add($"{scriptClassInfo.Namespace}.{scriptClassInfo.Name}", scriptClassInfo.ExecutionOrder);
                        }

                        remapDictionary.Add(scriptClassInfo.Guid, new Tuple <string, long>(compiledClassInfo.Guid, compiledClassInfo.FileId));
                        scriptFilesReferences.Remove(compiledClass.Key);
                    }
                    else
                    {
                        Debug.LogWarning($"Can't find a script version of the compiled class: {compiledClass.Key}; {pair.Key}.dll. This generally means the compiled class is second or later in a script file, and Unity doesn't parse it as two different assets.");
                    }
                }
            }

            ProcessYAMLAssets(allFilesUnderAssets, Application.dataPath.Replace("Assets", "NuGet/Content"), remapDictionary, compiledClassReferences);
        }
Beispiel #26
0
        /// <summary>
        /// Writes to the registry the specified class information.
        /// </summary>
        /// <param name="info">The information to write.</param>
        /// <returns>A value indicating success.</returns>
        private static bool SetClassInformation(ClassInformation info)
        {
            var classKey = GetClassKey(info.ClassName, true);

            if (classKey == null)
            {
                throw new InvalidOperationException("Failed to open a writable instance of the class key");
            }

            classKey.SetValue(string.Empty, string.Format("{0} File", info.ClassName));

            if (!string.IsNullOrEmpty(info.DefaultOpenCommand))
            {
                if (!SetShellOpenCommand(classKey, info.DefaultOpenCommand))
                {
                    return(false);
                }
            }

            return(true);
        }
Beispiel #27
0
        /// <summary>
        /// Reads class information from the registry.
        /// </summary>
        /// <param name="className">The name of the shell class to get information about.</param>
        /// <returns>A <see cref="ClassInformation"/>.</returns>
        private static ClassInformation GetClassInformation(string className)
        {
            var info = new ClassInformation(className);

            var classKey = GetClassKey(className, false);

            if (classKey != null)
            {
                var commandKey = classKey.OpenSubKey(OpenCommandKey, false);

                if (commandKey != null)
                {
                    var commandValue = commandKey.GetValue(string.Empty);

                    if (commandValue != null)
                    {
                        info.DefaultOpenCommand = commandValue.ToString();
                    }
                }
            }

            return(info);
        }
Beispiel #28
0
        public string CreateContent(ClassInformation classInfo, TestConfiguration testConfig)
        {
            var cls = _classBuilder.Initialize(classInfo, testConfig.TestFramework)
                      .AppendFields()
                      .AppendSetupMethod()
                      .AppendExamplaryMethod()
                      .Build();

            var nameSpace = CreateNamespace(classInfo, testConfig);

            nameSpace = nameSpace.AddMembers(cls);

            var syntaxFactory = SyntaxFactory.CompilationUnit();

            syntaxFactory = AppendUsings(syntaxFactory, classInfo, testConfig.TestFramework);
            syntaxFactory = syntaxFactory.AddMembers(nameSpace);

            var classContent = syntaxFactory
                               .NormalizeWhitespace()
                               .ToFullString();

            return(classContent);
        }
        public static ClassInformationModel Map(this ClassInformation original)
        {
            if (original == null)
            {
                return(null);
            }

            var row = new ClassInformationModel()
            {
                ID = original.ID,
                DoesTheSchoolPlatoon                      = original.DoesTheSchoolPlatoon,
                DoesTheSchoolHaveDoubleShifts             = original.DoesTheSchoolHaveDoubleShifts,
                DoesTheSchoolHaveMultiGradeclasses        = original.DoesTheSchoolHaveMultiGradeclasses,
                NoOfLearnersAccommodatedForDailyRotation  = original.NoOfLearnersAccommodatedForDailyRotation,
                NoOfLearnersAccommodatedForWeeklyRotation = original.NoOfLearnersAccommodatedForWeeklyRotation,
                NoOfLearnersAccommodatedForHybrid         = original.NoOfLearnersAccommodatedForHybrid,
                LearnerCapacityOfSchoolNormsAndStandardForSchoolInfrastructure = original.LearnerCapacityOfSchoolNormsAndStandardForSchoolInfrastructure,
                WasTheSchoolAbleToAccommodatePhysicalDistancingID = original.WasTheSchoolAbleToAccommodatePhysicalDistancingID.HasValue ? original.WasTheSchoolAbleToAccommodatePhysicalDistancingID.Value: 0,
                HasTheSchoolAdjustedTheSchoolDayToCoverTheRegulatedHoursForCurriculumDelivery = original.HasTheSchoolAdjustedTheSchoolDayToCoverTheRegulatedHoursForCurriculumDelivery,
                TotalTeachingTimeOverTheCycle = original.TotalTeachingTimeOverTheCycle.HasValue ? original.TotalTeachingTimeOverTheCycle.Value : 0.0D,
                WereAdditionalMobileClassroomsRequestedByTheSchool = original.WereAdditionalMobileClassroomsRequestedByTheSchool,
                NoOfMobileClassroomsRequestedByTheSchool           = original.NoOfMobileClassroomsRequestedByTheSchool,
                NoOfAdditionalMobileClassroomsDelivered            = original.NoOfAdditionalMobileClassroomsDelivered,
                NoOfClassroomsNotUsedDueToPoorCondition            = original.NoOfClassroomsNotUsedDueToPoorCondition,
                WasTheSchoolClosedDueToCovid19             = original.WasTheSchoolClosedDueToCovid19.HasValue ? original.WasTheSchoolClosedDueToCovid19.Value : false,
                NoOfOccasionsTheSchoolClosedDueToCovid19   = original.NoOfOccasionsTheSchoolClosedDueToCovid19,
                LongestDurationTheSchoolClosedDueToCovid19 = original.LongestDurationTheSchoolClosedDueToCovid19,
                WasTheSchoolDisinfected  = original.WasTheSchoolDisinfected,
                IntroducedRotationID     = original.IntroducedRotationID,
                TimetableCycleID         = original.TimetableCycleID,
                SchoolRotationApproachID = original.SchoolRotationApproachID,
                SchoolID   = original.SchoolID,
                DateLogged = original.DateLogged
            };

            return(row);
        }
Beispiel #30
0
        /// <summary>
        /// Writes to the registry the specified class information.
        /// </summary>
        /// <param name="info">The information to write.</param>
        /// <returns>A value indicating success.</returns>
        private static bool SetClassInformation(ClassInformation info)
        {
            var classKey = GetClassKey(info.ClassName, true);

            if (classKey == null)
            {
                throw new InvalidOperationException("Failed to open a writable instance of the class key");
            }

            classKey.SetValue(string.Empty, string.Format("{0} File", info.ClassName));

            if (!string.IsNullOrEmpty(info.DefaultOpenCommand))
            {
                if (!SetShellOpenCommand(classKey, info.DefaultOpenCommand))
                {
                    return false;
                }
            }

            return true;
        }
Beispiel #31
0
        /// <summary>
        /// Reads class information from the registry.
        /// </summary>
        /// <param name="className">The name of the shell class to get information about.</param>
        /// <returns>A <see cref="ClassInformation"/>.</returns>
        private static ClassInformation GetClassInformation(string className)
        {
            var info = new ClassInformation(className);

            var classKey = GetClassKey(className, false);

            if (classKey != null)
            {
                var commandKey = classKey.OpenSubKey(OpenCommandKey, false);

                if (commandKey != null)
                {
                    var commandValue = commandKey.GetValue(string.Empty);

                    if (commandValue != null)
                    {
                        info.DefaultOpenCommand = commandValue.ToString();
                    }
                }
            }

            return info;
        }
Beispiel #32
0
        /// <summary>
        /// Saves the open command for this shell class in the registry.
        /// </summary>
        /// <returns>A value indicating whether the value was successfully saved or not.</returns>
        public bool Save()
        {
            var info = new ClassInformation(this.ClassName)
            {
                DefaultOpenCommand = this.OpenCommand
            };

            return SetClassInformation(info);
        }
    public void OnGUI(Vector2 screenDimensions)
    {
        if (!initializeClass)
        {
            information           = new ClassInformation();
            information.Variables = new List <string>();
            information.Functions = new List <string>();
            initializeClass       = true;
        }
        GUI.Box(new Rect(0, 0, screenDimensions.x, screenDimensions.y), "Create Class");

        //class name
        //classAccessModifiers = (AccessModifiers)EditorGUILayout.EnumPopup(classAccessModifiers);
        GUI.Label(new Rect(screenDimensions.x * 0.15f, screenDimensions.y * 0.05f, 100, 20), "Class Name");
        className = GUI.TextField(new Rect(screenDimensions.x * 0.15f, screenDimensions.y * 0.1f, 100, 20), className);

        GUI.Label(new Rect(screenDimensions.x * 0.23f, screenDimensions.y * 0.1f, 10, 20), ":");

        GUI.Label(new Rect(screenDimensions.x * 0.25f, screenDimensions.y * 0.05f, 100, 20), "Inhieritance");
        inheritance = GUI.TextField(new Rect(screenDimensions.x * 0.25f, screenDimensions.y * 0.1f, 100, 20), inheritance);

        // add variables to the class.
        //variableAccessModifiers = (AccessModifiers)EditorGUILayout.EnumPopup((AccessModifiers)variableAccessModifiers);
        GUI.Label(new Rect(screenDimensions.x * 0.15f, screenDimensions.y * 0.2f, 300, 20), "Variable Type");
        variableTypeTemp = GUI.TextField(new Rect(screenDimensions.x * 0.15f, screenDimensions.y * 0.25f, 100, 20), variableTypeTemp);

        //add the variable name.
        GUI.Label(new Rect(screenDimensions.x * 0.25f, screenDimensions.y * 0.2f, 300, 20), "Variable Name");
        variableNameTemp = GUI.TextField(new Rect(screenDimensions.x * 0.25f, screenDimensions.y * 0.25f, 100, 20), variableNameTemp);

        //add vaiables to the class button
        if (GUI.Button(new Rect(screenDimensions.x * 0.35f, screenDimensions.y * 0.25f, 50, 20), "Add"))
        {
            information.Variables.Add(variableTypeTemp + " " + variableNameTemp);
            variableNameTemp = string.Empty;
            variableTypeTemp = string.Empty;
        }

        // add functions to the class.
        //functionAccessModifiers = (AccessModifiers)EditorGUILayout.EnumPopup((AccessModifiers)functionAccessModifiers);
        GUI.Label(new Rect(screenDimensions.x * 0.15f, screenDimensions.y * 0.35f, 300, 20), "Return Type");
        returnTypeTemp = GUI.TextField(new Rect(screenDimensions.x * 0.15f, screenDimensions.y * 0.4f, 100, 20), returnTypeTemp);


        // add the function name
        GUI.Label(new Rect(screenDimensions.x * 0.25f, screenDimensions.y * 0.35f, 300, 20), "Function Name");
        functionNameTemp = GUI.TextField(new Rect(screenDimensions.x * 0.25f, screenDimensions.y * 0.4f, 100, 20), functionNameTemp);

        //add functions to the class button
        if (GUI.Button(new Rect(screenDimensions.x * 0.35f, screenDimensions.y * 0.4f, 50, 20), "Add"))
        {
            information.Functions.Add(returnTypeTemp + " " + functionNameTemp);
            functionNameTemp = string.Empty;
            returnTypeTemp   = string.Empty;
        }

        //cancel
        if (GUI.Button(new Rect(screenDimensions.x * 0.8f, screenDimensions.y * 0.9f, 100, 30), "Cancel"))
        {
            ClearVariableToggle = !ClearVariableToggle;
            ClearVariables();
        }

        ShowInformation(screenDimensions);
    }