public async override Task <bool> ActionAsync(string action) { bool result = base.Action(action); if (result) { if (Utils.API.GeocachingLiveV6.CheckAPIAccessAvailable(Core, true)) { using (ImportForm dlg = new ImportForm(Core)) { if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _gcList = dlg.SelectedGCCodes; if (_gcList != null && _gcList.Count > 0) { _gcList = Utils.GeocacheIgnoreSupport.Instance.FilterGeocaches(_gcList); if (_gcList != null && _gcList.Count > 0) { _errormessage = null; 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 void ImportBookmark(string name, string url) { if (Utils.API.GeocachingLiveV6.CheckAPIAccessAvailable(Core, true)) { using (ImportForm dlg = new ImportForm(Core, name, url)) { if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _gcList = dlg.SelectedGCCodes; if (_gcList != null && _gcList.Count > 0) { _errormessage = null; 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); } } } } } }
public async override Task<bool> ActionAsync(string action) { bool result = base.Action(action); if (result) { if (Utils.API.GeocachingLiveV6.CheckAPIAccessAvailable(Core, true)) { using (ImportForm dlg = new ImportForm(Core)) { if (dlg.ShowDialog()== System.Windows.Forms.DialogResult.OK) { _gcList = dlg.SelectedGCCodes; if (_gcList != null && _gcList.Count > 0) { _gcList = Utils.GeocacheIgnoreSupport.Instance.FilterGeocaches(_gcList); if (_gcList != null && _gcList.Count > 0) { _errormessage = null; 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; }