//서브 스레드에서 호출하는 말풍선 메시지 함수 public static void setMSGsub(ILwin.MainWindow thisWin, Balloon thisballoon, string text) { //만일 말풍선이 켜져있던 상태라면 if (thisballoon.isShowing) { thisballoon.showing.Abort(); //일단 그 스레드를 종료한다. thisWin.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate { thisballoon.rec.Visibility = Visibility.Hidden; //그리고 말풍선을 모두 닫아버린다. thisballoon.textbox.Visibility = Visibility.Hidden; thisballoon.textbox.Text = ""; })); thisballoon.isShowing = false; } thisballoon.isShowing = true; thisWin.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate { thisballoon.rec.Visibility = Visibility.Visible; thisballoon.textbox.Visibility = Visibility.Visible; thisballoon.textbox.Text = text; //말풍선 내용이 response 창에도 나오도록 하자 thisWin.getTextboxReference().printMSG(thisWin.responseMsgs, ((thisballoon.TALKER == Constants.IS_NAMYONG) ? "남용이 : " : "아버지 : ") + text); thisWin.responseMsgs.ScrollToEnd(); })); thisballoon.showing = new Thread(() => setMSG(thisballoon, thisballoon.screen.getMWinReference())); thisballoon.showing.Start(); }