<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;
namespace SmartPLC_Commander
{
    class node
    {
        public struct transform
        {
           public  float x, y;
        }

        public int idnr;
        public int nid;
        public transform pos;
        public string xml_name;
        public string title;
        public string category;

        public string description;
        public string param_string;
        public string input_con_string;
        public string output_con_string;

        public string param_properties;

        public string connection_string;


        public void create_property_plane(ref Panel parameter_panel, ref Label ltitle, ref Label lnid, ref Label lnsi)
        {

            ltitle.Text = title;
            lnid.Text = nid.ToString();
            lnsi.Text = xml_name;
            parameter_panel.Controls.Clear();
            //  List<System.Windows.Forms> forms = new List<System.Windows.Forms>();
            //param_properties auslesen nach [0,type,desc,()]
            //fdazu passend die elementer erstelln und nach 0 anordnen
            int param_id = 0;

            //CREATE LABEL
            Label lable_tmp = new Label();
            lable_tmp.Enabled = true;
            lable_tmp.Location = new Point(6, 25 + (40 * param_id));
            lable_tmp.Text = "PARAM 0";
            lable_tmp.Name = "desc_param_";
            lable_tmp.Size = new Size(60, 13);
            parameter_panel.Controls.Add(lable_tmp);
            //VREATE TEXTBOX
            TextBox textbox_tmp = new TextBox();
            textbox_tmp.Enabled = true;
            textbox_tmp.Location = new Point(70,20+ (40* param_id));
            textbox_tmp.Size = new Size(100, 20);
            textbox_tmp.Name = "param_" + param_id.ToString();
            parameter_panel.Controls.Add(textbox_tmp);





            load_parameters(ref parameter_panel);
        }

        public void load_parameters(ref Panel param_panel)
        {
            //wenn string != ""
            //durchsteppen und in die boxen schreiben

        }
    }
}<commit_msg>working creating labels dynamicly<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;
namespace SmartPLC_Commander
{
    class node
    {
        public struct transform
        {
           public  float x, y;
        }

        public int idnr;
        public int nid;
        public transform pos;
        public string xml_name;
        public string title;
        public string category;

        public string description;
        public string param_string;
        public string input_con_string;
        public string output_con_string;

        public string param_properties;

        public string connection_string;


        public void create_property_plane(ref Panel parameter_panel, ref Label ltitle, ref Label lnid, ref Label lnsi)
        {

            ltitle.Text = title;
            lnid.Text = nid.ToString();
            lnsi.Text = xml_name;
            parameter_panel.Controls.Clear();
            //  List<System.Windows.Forms> forms = new List<System.Windows.Forms>();
            //param_properties auslesen nach [0,type,desc,()]
            //fdazu passend die elementer erstelln und nach 0 anordnen

            if(param_properties == "") { return; } //dan gibts nichts zu laden
            string[] split_comma = param_properties.Split('%');

            for (int i = 0; i < split_comma.Length; i++)
            {
                if(split_comma[i] == "") { break; } //reach end ?
                string param_construct = split_comma[i];
                param_construct =  param_construct.Substring(1, param_construct.Length - 2);
                string[] split_construct = param_construct.Split(',');


                // 0 = paramid 
                //1 = typ
                //2 = desc
                //3 = range ()c


                int param_id = Int16.Parse(split_construct[0]);
                //CREATE LABEL
                Label lable_tmp = new Label();
                lable_tmp.Enabled = true;
                lable_tmp.Location = new Point(6, 25 + (40 * param_id));
                lable_tmp.Text = split_construct[2];
                lable_tmp.Name = "desc_param_" +param_id.ToString();
                lable_tmp.Size = new Size(60, 13);
                parameter_panel.Controls.Add(lable_tmp);




                //if typ -....

            }






 
          /*
            //VREATE TEXTBOX
            TextBox textbox_tmp = new TextBox();
            textbox_tmp.Enabled = true;
            textbox_tmp.Location = new Point(70,20+ (40* param_id));
            textbox_tmp.Size = new Size(100, 20);
            textbox_tmp.Name = "param_" + param_id.ToString();
            parameter_panel.Controls.Add(textbox_tmp);
            */




            load_parameters(ref parameter_panel);
        }

        public void load_parameters(ref Panel param_panel)
        {
            //wenn string != ""
            //durchsteppen und in die boxen schreiben

        }
    }
}
{'fraction_non_alphanumeric': 0.0894278135657446, 'fraction_numerical': 0.010799545282303903, 'mean_word_length': 1.7754994742376446, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1785470', 'n_tokens_mistral': 1522, 'n_tokens_neox': 1417, 'n_words': 369}