예제 #1
0
 private void SetText(string text)
 {
     if (this.outputTextBox.InvokeRequired)
     {
         SetTextBoxText s = new SetTextBoxText(SetText);
         this.Invoke(s, new object[] { text });
     }
     else
     {
         outputTextBox.AppendText(text + Environment.NewLine);
     }
 }
예제 #2
0
        private void SetText(string text, string says = "")
        {
            if (text == String.Empty)
            {
                return;
            }

            if (this.mainOutputTxtBox.InvokeRequired)
            {
                SetTextBoxText s = new SetTextBoxText(SetText);
                this.Invoke(s, new object[] { text, says });
            }
            else
            {
                mainOutputTxtBox.AppendText(String.Format("{0} {1} says: {2}{3}", DateTime.Now.ToString(), says, text, Environment.NewLine + Environment.NewLine));
            }
        }