private void triggerSavedImage(CloseEvent closeEvent, Uri file) { closeHandler handler = onSavedImage; if (handler != null) { handler(closeEvent, file); } }
public static void Show(Panel parent, ImageSource picture, closeHandler handler) { CropDialog cropDialog = new CropDialog(); cropDialog.frameImage.Source = picture; cropDialog.onSavedImage += handler; new Dialog(parent, cropDialog, false, true, false, null, new DialogButton("Forget", DialogButton.Alignment.Right, DialogButton.Style.Flat, delegate() { cropDialog.forget(); return(DialogButton.ReturnEvent.Close); }), new DialogButton("Save", DialogButton.Alignment.Right, DialogButton.Style.Normal, delegate() { cropDialog.cropAndSaveImage(); return(DialogButton.ReturnEvent.Close); })); }
public static void Show(Panel parent, ImageSource picture, closeHandler handler) { CropDialog cropDialog = new CropDialog(); cropDialog.frameImage.Source = picture; cropDialog.onSavedImage += handler; new Dialog(parent, cropDialog, false, true, false, null, new DialogButton("Forget", DialogButton.Alignment.Right, DialogButton.Style.Flat, delegate () { cropDialog.forget(); return DialogButton.ReturnEvent.Close; }), new DialogButton("Save", DialogButton.Alignment.Right, DialogButton.Style.Normal, delegate () { cropDialog.cropAndSaveImage(); return DialogButton.ReturnEvent.Close; })); }