개정판 75f6ff19
wix setup 수정
Change-Id: Ib2b85bb930675bc158e42d7884f8429c42e63a80
KCOM/MainWindow.xaml.cs | ||
---|---|---|
229 | 229 |
{ |
230 | 230 |
base.OnClosing(e); |
231 | 231 |
|
232 |
SaveCheck(); |
|
232 |
if(!SaveCheck()) |
|
233 |
{ |
|
234 |
if(SaveConfirm()) |
|
235 |
{ |
|
236 |
dzTopMenu.SaveEventCallback(null, null); |
|
237 |
} |
|
238 |
else |
|
239 |
{ |
|
240 |
e.Cancel = true; |
|
241 |
} |
|
242 |
} |
|
233 | 243 |
|
234 | 244 |
//Update Check 를 통해 update url 을 Get 하고 결과값이 있을 경우에는 SmartUpdater 실행. |
235 | 245 |
//KeyValuePair<bool, string> updatecheck = UpdateCheck(); |
... | ... | |
239 | 249 |
//} |
240 | 250 |
} |
241 | 251 |
|
242 |
private void SaveCheck()
|
|
252 |
private bool SaveCheck()
|
|
243 | 253 |
{ |
254 |
bool result = false; |
|
255 |
|
|
244 | 256 |
if (ViewerDataModel.Instance.UndoDataList.Count > 0) |
245 | 257 |
{ |
246 | 258 |
DateTime undoTime = ViewerDataModel.Instance.UndoDataList.OrderByDescending(order => order.EventTime).FirstOrDefault().EventTime; |
... | ... | |
252 | 264 |
|
253 | 265 |
if (undoTime > updatetime) |
254 | 266 |
{ |
255 |
DialogParameters parameters = new DialogParameters() |
|
256 |
{ |
|
257 |
Owner = Application.Current.MainWindow, |
|
258 |
Content = new TextBlock() |
|
259 |
{ |
|
260 |
MinWidth = 400, |
|
261 |
FontSize = 11, |
|
262 |
Text = "Found unsaved comments. Save now?", |
|
263 |
TextWrapping = System.Windows.TextWrapping.Wrap |
|
264 |
}, |
|
265 |
Header = "Confirm", |
|
266 |
Theme = new VisualStudio2013Theme(), |
|
267 |
ModalBackground = new SolidColorBrush { Color = Colors.Black, Opacity = 0.6 }, |
|
268 |
Closed = OnClosingSave, |
|
269 |
}; |
|
270 |
RadWindow.Confirm(parameters); |
|
267 |
result = false; |
|
271 | 268 |
} |
272 | 269 |
else |
273 | 270 |
{ |
274 |
isSaveCheck = true;
|
|
271 |
result = true;
|
|
275 | 272 |
} |
276 | 273 |
} |
277 | 274 |
else |
278 | 275 |
{ |
279 |
isSaveCheck = true;
|
|
276 |
result = true;
|
|
280 | 277 |
} |
278 |
|
|
279 |
return result; |
|
281 | 280 |
} |
282 |
private void OnClosingSave(object sender, WindowClosedEventArgs e) |
|
281 |
|
|
282 |
private bool SaveConfirm() |
|
283 | 283 |
{ |
284 |
if (e.DialogResult == true) |
|
284 |
bool result = false; |
|
285 |
|
|
286 |
EventHandler<WindowClosedEventArgs> Closedhandler = null; |
|
287 |
|
|
288 |
Closedhandler = (snd, evt) => |
|
285 | 289 |
{ |
286 |
dzTopMenu.SaveEventCallback(null, null); |
|
287 |
} |
|
288 |
isSaveCheck = true; |
|
290 |
result = evt.DialogResult.GetValueOrDefault(); |
|
291 |
}; |
|
292 |
|
|
293 |
|
|
294 |
DialogParameters parameters = new DialogParameters() |
|
295 |
{ |
|
296 |
Owner = Application.Current.MainWindow, |
|
297 |
Content = new TextBlock() |
|
298 |
{ |
|
299 |
MinWidth = 400, |
|
300 |
FontSize = 11, |
|
301 |
Text = "Found unsaved comments. Save now?", |
|
302 |
TextWrapping = System.Windows.TextWrapping.Wrap |
|
303 |
}, |
|
304 |
Header = "Confirm", |
|
305 |
Theme = new VisualStudio2013Theme(), |
|
306 |
ModalBackground = new SolidColorBrush { Color = Colors.Black, Opacity = 0.6 }, |
|
307 |
Closed = Closedhandler |
|
308 |
}; |
|
309 |
|
|
310 |
RadWindow.Confirm(parameters); |
|
311 |
|
|
312 |
return result; |
|
289 | 313 |
} |
290 | 314 |
|
291 | 315 |
private void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e) |
내보내기 Unified diff