public ShowWhileExecuting ( System.Action execute, bool animated ) : void | ||
execute | System.Action | |
animated | bool | |
return | void |
public void ShowWhileExecuting(Action execute, bool animated)
{
// Launch execution in new thread
_TaskInProgress = true;
// Show HUD view
Show(animated);
var thread = new System.Threading.Thread(() =>
{
using (NSAutoreleasePool pool = new NSAutoreleasePool())
{
execute();
Completed();
}
});
thread.Start();
}
public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path) { tableView.DeselectRow(path, true); if (ShowHud) { _ProgressHud = new ProgressHud() { TitleText = Title, DetailText = DetailsText, Mode = HudProgressMode.Indeterminate }; if (Command != null && Command.CanExecute(CommandParameter)) { _ProgressHud.ShowWhileExecuting(()=>Command.Execute(CommandParameter), true); } } else { ShowIndicator(()=>Command.Execute(CommandParameter)); } }