private void whileToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            var vWhile = new Vwhile()
            {
                Width = ScopePanel.Width
            };

            foreach (var var in Scope.LocalVariables)
            {
                vWhile.ScopeControl.Scope.ScopeAccessVariable.Add(var);
            }

            vWhile.PopulateScopeVariables(Scope.LocalVariables);

            ScopePanel.Controls.Add(vWhile);
            UpdateScope();
        }
        //Pass the the items of a scope and it will generate necessary controls

        public void VcodeToVblock(Scope scope)
        {
            foreach (VCode item in scope.Items)
            {
                switch (item.VType)
                {
                case Enums.VType.Variable:
                    Vvariable vvariable = new Vvariable(item);
                    ScopePanel.Controls.Add(vvariable);
                    break;

                case Enums.VType.Function:
                    Function function = (Function)item;

                    if (function.IsBody)
                    {
                        Vfunction vfunction = new Vfunction(function)
                        {
                            Width = ScopePanel.Width
                        };
                        vfunction.ScopeControl.VcodeToVblock(function.Scope);
                        ScopePanel.Controls.Add(vfunction);
                    }
                    else
                    {
                        FunctionCall vFunctionCall = new FunctionCall(function, scope.LocalVariables);
                        ScopePanel.Controls.Add(vFunctionCall);
                    }

                    break;

                case Enums.VType.If:
                    If  iif = (If)item;
                    Vif vif = new Vif(iif)
                    {
                        Width = ScopePanel.Width
                    };
                    vif.ScopeControl.VcodeToVblock(iif.Scope);
                    ScopePanel.Controls.Add(vif);
                    break;

                case Enums.VType.While:
                    While  wWhile = (While)item;
                    Vwhile vwhile = new Vwhile(wWhile)
                    {
                        Width = ScopePanel.Width
                    };
                    vwhile.ScopeControl.VcodeToVblock(wWhile.Scope);
                    ScopePanel.Controls.Add(vwhile);
                    break;

                case Enums.VType.Assignment:
                    Assignment      assignment      = (Assignment)item;
                    AssignmentBlock assignmentBlock = new AssignmentBlock(assignment, false);
                    ScopePanel.Controls.Add(assignmentBlock);
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
        }