예제 #1
0
        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);
        }
예제 #2
0
 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);
                     }
                 }
             }
         }
     }
 }
예제 #3
0
파일: Import.cs 프로젝트: gahadzikwa/GAPP
        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;
        }
예제 #4
0
파일: Import.cs 프로젝트: gahadzikwa/GAPP
 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);
                     }
                 }
             }
         }
     }
 }