public async override Task <bool> ActionAsync(string action) { bool result = base.Action(action); if (result && action == ACTION_IMPORT) { if (SiteManager.Instance.CheckAPIAccess()) { using (SelectByAreaForm dlg = new SelectByAreaForm(Core)) { if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _minLat = dlg.MinLat; _minLon = dlg.MinLon; _maxLat = dlg.MaxLat; _maxLon = dlg.MaxLon; await PerformImport(); if (!string.IsNullOrEmpty(_errormessage)) { System.Windows.Forms.MessageBox.Show(_errormessage, Utils.LanguageSupport.Instance.GetTranslation(Utils.LanguageSupport.Instance.GetTranslation(STR_ERROR)), System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } } } } } return(result); }
public async override Task<bool> ActionAsync(string action) { bool result = base.Action(action); if (result && action == ACTION_IMPORT) { if (SiteManager.Instance.CheckAPIAccess()) { using (SelectByAreaForm dlg = new SelectByAreaForm(Core)) { if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _minLat = dlg.MinLat; _minLon = dlg.MinLon; _maxLat = dlg.MaxLat; _maxLon = dlg.MaxLon; await PerformImport(); if (!string.IsNullOrEmpty(_errormessage)) { System.Windows.Forms.MessageBox.Show(_errormessage, Utils.LanguageSupport.Instance.GetTranslation(Utils.LanguageSupport.Instance.GetTranslation(STR_ERROR)), System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } } } } } return result; }