프로젝트

일반

사용자정보

개정판 75f6ff19

ID75f6ff194a86714933941cea51149cdd03ecf2fc
상위 2421b3ea
하위 94c6e9ae

김태성이(가) 4년 이상 전에 추가함

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

클립보드 이미지 추가 (최대 크기: 500 MB)