/// <summary>
 /// </summary>
 /// <param name="fastColoredTextBox"></param>
 /// <param name="responces"></param>
 public void FastColoredTextBox(FastColoredTextBox fastColoredTextBox, List <string> responces)
 {
     if (fastColoredTextBox.InvokeRequired)
     {
         FastColoredTextBoxCallback d = FastColoredTextBox;
         _frm3DprinterTool.Invoke(d, fastColoredTextBox, responces);
     }
     else
     {
         fastColoredTextBox.Clear();
         foreach (string responce in responces)
         {
             fastColoredTextBox.Lines.Add(responce);
         }
     }
 }
Exemple #2
0
        /// <summary>
        /// </summary>
        /// <param name="fastColoredTextBox"></param>
        /// <param name="responces"></param>
        public static void FastColoredTextBox(FastColoredTextBox fastColoredTextBox, List <string> responces)
        {
            if (fastColoredTextBox.InvokeRequired)
            {
                FastColoredTextBoxCallback d = FastColoredTextBox;
                _frm3DprinterTool.Invoke(d, fastColoredTextBox, responces);
            }
            else
            {
                fastColoredTextBox.Clear();
                string textLines = "";

                foreach (string responce in responces)
                {
                    textLines += responce + Environment.NewLine;
                }
                fastColoredTextBox.Text = textLines;
            }
        }