private void treeViewTraces_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            object tagObject = e.Node.Tag;

            if (tagObject is DebugTracePanel)
            {
                DebugTracePanel tracePanel = tagObject as DebugTracePanel;
                string          radName    = tracePanel.RADName;
                string          panelName  = tracePanel.PanelInfo.PanelName;
                RADPanel        radPanel   = GetRADPanel(radName, panelName);
                if (radPanel != null)
                {
                    tracePanel.PanelInfo = radPanel;
                }
                string formatName = tracePanel.PanelInfo.Format;

                Format        format        = GetFormatInfo(formatName, "en");
                FormatControl formatControl = new FormatControl(format);
                formatControl.DebugTrace = tracePanel;
                panelRADDetail.Controls.Clear();
                panelRADDetail.Controls.Add(formatControl);
                PopulateFormData(tracePanel.PanelInfo, formatControl);

                ShowContext(tracePanel);
            }
        }
        private void button4_Click(object sender, EventArgs e)
        {
            //GetRADPanel("cc.router", "cleanup");
            //DebugEntity entity = new DebugEntity();
            //entity.Test();
            Format        format        = GetFormatInfo("Test", "en");
            FormatControl formatControl = new FormatControl(format);

            panel1.Controls.Add(formatControl);
        }
        private void PopulateFormData(RADPanel panelData, FormatControl formatControl)
        {
            Dictionary <string, string> fieldMappings = new Dictionary <string, string>();

            fieldMappings.Add("application", "RADName");
            fieldMappings.Add("label", "PanelName");
            fieldMappings.Add("comments", "Comments");
            fieldMappings.Add("normal", "Normal");
            fieldMappings.Add("error", "Error");
            fieldMappings.Add("format", "Format");
            fieldMappings.Add("file", "File");
            fieldMappings.Add("all_null", "AllNull");
            fieldMappings.Add("key_null", "KeyNull");
            fieldMappings.Add("key_dupl", "KeyDupl");
            fieldMappings.Add("second_file", "SecondFile");
            fieldMappings.Add("target_file", "TargetFile");
            fieldMappings.Add("record", "Record");
            fieldMappings.Add("query", "Query");
            fieldMappings.Add("name", "Name");
            fieldMappings.Add("names", "Names");
            fieldMappings.Add("values", "Values");
            fieldMappings.Add("prompt", "Prompt");
            fieldMappings.Add("condition", "Conditions");
            fieldMappings.Add("option", "Option");
            fieldMappings.Add("description", "Description");
            fieldMappings.Add("exit", "Exit");
            fieldMappings.Add("empty", "Empty");
            fieldMappings.Add("one_rec", "OneRec");
            fieldMappings.Add("text", "Text");
            fieldMappings.Add("statements", "Statements");
            fieldMappings.Add("cond_input", "CondInput");
            fieldMappings.Add("sort", "Sort");
            fieldMappings.Add("types", "Types");
            fieldMappings.Add("levels", "Levels");
            fieldMappings.Add("numbers", "Numbers");
            fieldMappings.Add("number1", "Number1");
            fieldMappings.Add("string1", "String1");
            fieldMappings.Add("time1", "Time1");
            fieldMappings.Add("boolean1", "Boolean1");
            fieldMappings.Add("times", "Times");
            fieldMappings.Add("expressions", "Expressions");
            fieldMappings.Add("comments_more", "CommentsMore");
            fieldMappings.Add("file_variables", "FileVariables");
            fieldMappings.Add("second_record", "SecondRecord");
            fieldMappings.Add("booleans", "Booleans");
            fieldMappings.Add("table", "Table");
            fieldMappings.Add("tables", "Tables");

            foreach (Control subControl in formatControl.Controls)
            {
                PopulateChildData(panelData, subControl, fieldMappings);
            }
        }