private void updatePropertiesGrid()
    {
        if (_propMapData.Count == 0)
        {
            return;
        }

        //   StringBuilder sb = new StringBuilder();
        foreach (var key in _propMapData.Keys)
        {
            PropertyBoundItem propertyBoundItem = _propMapData[key];

            // Submit for compile/run
            if (propertyBoundItem.CompileHandle == null)
            {
                string errorText;
                propertyBoundItem.CompileHandle = CSCompile.DoCompile(propertyBoundItem.CodeBehind, out errorText);

                if (errorText != null)
                {
                    SetProp(key, "Compile Fail - See Output for Details");
                    _outputText.Text = errorText;
                    propertyBoundItem.CompileHandle = null;
                    continue;
                }
                else
                {
                    _outputText.Text = "Compiled Successfully";
                }
            }

            try
            {
                propertyBoundItem.RunResults = CSCompile.DoRun(propertyBoundItem.CompileHandle);
                SetProp(key, propertyBoundItem.RunResults);
            }
            catch (Exception ex)
            {
                SetProp(key, "Code Execution Fail on Row " + key + " - See Output for Details");
                _outputText.Text = ex.ToString();
            }
        }
        _propertyControlGrid.ClearSelection();
        _propertyControlGrid.Refresh();
    }
    private void doOnTickCompile()
    {
        string sourceCode;

        if ((sourceCode = DequeueOnTickSourceCode()) == null)
        {
            return;
        }

        string errorText;

        _compiledHandle = CSCompile.DoCompile(sourceCode, out errorText);

        if (errorText != null)
        {
            setCompileRunResult(errorText);
            _compiledHandle = null;
        }
    }