public void Change_BtnContent(TextBlock txText, string msg) { try { if (!Dispatcher.CheckAccess()) // 컨트롤 요청이 들어올 경우 { // 델리게이트를 이용해 Change_BtnContent 메서드를 다시 호출 SET_BTNCONTENT d = new SET_BTNCONTENT(Change_BtnContent); Dispatcher.Invoke(d, new object[] { txText, msg }); } else { // 컨트롤 접근이 가능할 경우, 다음 구문 처리 txText.Text = msg; } } catch { } // 멀티 스레드 환경에서 뜻하지 않은 예외가 발생할 경우 처리 }