개정판 ed705a3d
m talk 추가 오류 수정
Change-Id: I45e15e87686fbc67f7b8d87563ca1b6c526a75d0
KCOM/Messenger/ConversationView.xaml.cs | ||
---|---|---|
6 | 6 |
using System.Diagnostics; |
7 | 7 |
using System.Linq; |
8 | 8 |
using System.Text; |
9 |
using System.Threading.Tasks; |
|
9 | 10 |
using System.Windows; |
10 | 11 |
using System.Windows.Controls; |
11 | 12 |
using System.Windows.Data; |
... | ... | |
74 | 75 |
} |
75 | 76 |
|
76 | 77 |
//강인구 추가 |
77 |
private void BtnSend_Click(object sender, MouseButtonEventArgs e) |
|
78 |
private async void BtnSend_Click(object sender, MouseButtonEventArgs e)
|
|
78 | 79 |
{ |
79 |
AddText();
|
|
80 |
await AddTextAsync();
|
|
80 | 81 |
} |
81 | 82 |
|
82 | 83 |
private void MarkupNameUpdatePromptClose(WindowClosedEventArgs args) |
... | ... | |
228 | 229 |
} |
229 | 230 |
} |
230 | 231 |
|
231 |
private void OnKeyDownHandler(object sender, KeyEventArgs e) |
|
232 |
private async void OnKeyDownHandler(object sender, KeyEventArgs e)
|
|
232 | 233 |
{ |
233 | 234 |
if (e.Key == Key.Return) |
234 | 235 |
{ |
235 | 236 |
if (Keyboard.Modifiers != ModifierKeys.Shift) |
236 | 237 |
{ |
237 |
AddText();
|
|
238 |
await AddTextAsync();
|
|
238 | 239 |
e.Handled = true; |
239 | 240 |
} |
240 | 241 |
else |
... | ... | |
246 | 247 |
} |
247 | 248 |
} |
248 | 249 |
|
249 |
private void AddText()
|
|
250 |
private async Task AddTextAsync()
|
|
250 | 251 |
{ |
251 | 252 |
Common.ViewerDataModel.Instance.k_talkMessageSet.Clear(); |
252 | 253 |
|
... | ... | |
263 | 264 |
|
264 | 265 |
//Logger.sendReqLog("AddMessage", App.ViewInfo.ProjectNO + "," + message, 1); |
265 | 266 |
//Logger.sendResLog("AddMessage", Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.AddMessage(App.ViewInfo.ProjectNO, message).ToString(), 1); |
266 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.AddMessage(App.ViewInfo.ProjectNO, message); |
|
267 |
|
|
268 |
//Logger.sendReqLog("GetMessage: ", App.ViewInfo.ProjectNO + "," + App.ViewInfo.DocumentItemID, 1); |
|
269 |
List<KCOMDataModel.DataModel.TALK> messagelist = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetMessage(App.ViewInfo.ProjectNO, App.ViewInfo.DocumentItemID); |
|
270 |
if (messagelist.Count() > 0) |
|
271 |
{ |
|
272 |
//Logger.sendResLog("GetMessage", "TRUE", 1); |
|
273 |
} |
|
274 |
else |
|
267 |
if(await Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseTaskClient.AddMessageAsync(App.ViewInfo.ProjectNO, message)) |
|
275 | 268 |
{ |
276 |
//Logger.sendResLog("GetMessage", "FALSE", 1); |
|
269 |
var messagelist = await Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseTaskClient.GetMessageAsync(App.ViewInfo.ProjectNO, App.ViewInfo.DocumentItemID); |
|
270 |
|
|
271 |
if (messagelist.Count() > 0) |
|
272 |
{ |
|
273 |
//Logger.sendResLog("GetMessage", "TRUE", 1); |
|
274 |
} |
|
275 |
else |
|
276 |
{ |
|
277 |
//Logger.sendResLog("GetMessage", "FALSE", 1); |
|
278 |
} |
|
279 |
|
|
280 |
messagelist.ForEach(a => |
|
281 |
{ |
|
282 |
Common.ViewerDataModel.Instance.k_talkMessageSet.Add(a); |
|
283 |
}); |
|
284 |
tbContent.Text = ""; |
|
285 |
tbContent.Focus(); |
|
286 |
(lstMessage.Parent as ScrollViewer).ScrollToEnd(); |
|
277 | 287 |
} |
278 | 288 |
|
279 |
messagelist.ForEach(a => |
|
280 |
{ |
|
281 |
Common.ViewerDataModel.Instance.k_talkMessageSet.Add(a); |
|
282 |
}); |
|
283 |
tbContent.Text = ""; |
|
284 |
tbContent.Focus(); |
|
285 |
(lstMessage.Parent as ScrollViewer).ScrollToEnd(); |
|
289 |
//Logger.sendReqLog("GetMessage: ", App.ViewInfo.ProjectNO + "," + App.ViewInfo.DocumentItemID, 1); |
|
290 |
|
|
286 | 291 |
|
287 | 292 |
} |
288 | 293 |
} |
내보내기 Unified diff