protected override sealed void Invoke(Object parameter) { InteractionRequestedEventArgs e = parameter as InteractionRequestedEventArgs ?? InteractionRequestEventArgsNullObject.Empty; if (this.dispatcher == null || this.dispatcher.Thread == Thread.CurrentThread) { this.InvokeAction(e); } else { this.dispatcher.Invoke((Delegate) new Action <InteractionRequestedEventArgs>(this.InvokeAction), (Object)e); } }
protected override void InvokeAction(InteractionRequestedEventArgs e) { var dlgConf = e.Context as FolderBrowserDialogConfirmation ?? NullObject; var dlg = new FolderBrowserDialog(); this.ApplyMessagePropertyeValues(dlgConf, dlg); var conf = e.Context as Confirmation; var result = dlg.ShowDialog(); if (conf != null) { // 同意したときにtrueにする conf.Confirmed = result == DialogResult.OK || result == DialogResult.Yes; } this.ApplyDialogPropertyValues(dlgConf, dlg); e.Callback(); }
protected abstract void InvokeAction(InteractionRequestedEventArgs e);