public void ShowScreenCapture() { if (screenCaptureUI == null || screenCaptureUI.isClosed) { screenCaptureUI = new ScreenCapture.MainWindow(); //test Action callback = delegate { Console.WriteLine("뭔가가 선택 됨"); }; screenCaptureUI.Show(); //screenCaptureUI.Visibility = System.Windows.Visibility.Hidden; screenCaptureUI.Start(callback); } else { screenCaptureUI.DoCapture(); } }
public void ShowScreenCapture() { if (screenCaptureUI == null || screenCaptureUI.isClosed) { screenCaptureUI = new ScreenCapture.MainWindow(); //test Action callback = delegate { MyMainForm.MySettingManager.isUseAttachedCapture = true; Console.WriteLine("뭔가가 선택 됨"); }; Action stopCallback = delegate { if (this != null && MyMainForm != null && MyMainForm.MySettingManager != null) { MyMainForm.MySettingManager.isUseAttachedCapture = false; } }; Action closeCallback = delegate { if (this != null && MyMainForm != null && MyMainForm.MySettingManager != null) { MyMainForm.MySettingManager.isUseAttachedCapture = false; screenCaptureUI = null; } }; screenCaptureUI.Show(); //screenCaptureUI.Visibility = System.Windows.Visibility.Hidden; screenCaptureUI.Start(callback, closeCallback, stopCallback); } else { screenCaptureUI.Activate(); } }