示例#1
0
 //==========================================================================
 //Update text
 //==========================================================================
 public void UpdateCode(List <string> text)
 {
     for (int i = 0; i < text.Count(); i++)
     {
         CodeBox.AppendText(text[i]);
         if (i + 1 < text.Count())
         {
             CodeBox.AppendText(Environment.NewLine);
         }
     }
 }
        public SectionCreator(string id)
        {
            _update = true;

            InitializeComponent();
            MySql sql = new MySql();

            sql.OpenConnection();

            _section = sql.GetSection(id);

            SectionTitleText.Text = _section.Title;
            SectionDescText.Text  = _section.Desc;

            foreach (string c in _section.Codes)
            {
                CodeBox.AppendText(c + Environment.NewLine);
            }


            sql.CloseConnection();
        }