示例#1
0
 /// <summary>
 /// 改变content面板中的内容
 /// </summary>
 /// <param name="info">内容</param>
 private void changeThisContent(string info)
 {
     if (contentbox.InvokeRequired)
     {
         ChangeContent cc = new ChangeContent(changeThisContent);
         this.Invoke(cc, new object[] { info });
     }
     else
     {
         try
         {
             contentbox.Text += info;
             //移动光标
             contentbox.Select(contentbox.Text.Length, 0);
             contentbox.ScrollToCaret();
         }
         catch (Exception) { }
     }
 }
 private void btnExit_Click(object sender, RoutedEventArgs e)
 {
     ChangeContent?.Invoke(this, null);
 }