Ejemplo n.º 1
0
        private bool getBookmarkList(Guid guid)
        {
            bool result = false;

            Cursor = Cursors.WaitCursor;
            try
            {
                using (Utils.API.GeocachingLiveV6 api = new Utils.API.GeocachingLiveV6(_core))
                {
                    var req = new Utils.API.LiveV6.GetBookmarkListByGuidRequest();
                    req.AccessToken      = api.Token;
                    req.BookmarkListGuid = guid;
                    var resp = api.Client.GetBookmarkListByGuid(req);
                    if (resp.Status.StatusCode == 0)
                    {
                        _gcCodes = (from c in resp.BookmarkList select c.CacheCode).ToList();
                        result   = true;
                    }
                    else
                    {
                        MessageBox.Show(resp.Status.StatusMessage, Utils.LanguageSupport.Instance.GetTranslation(STR_ERROR));
                    }
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, Utils.LanguageSupport.Instance.GetTranslation(STR_ERROR));
            }
            Cursor = Cursors.Default;

            return(result);
        }
Ejemplo n.º 2
0
        private bool getBookmarkList(Guid guid)
        {
            bool result = false;

            Cursor = Cursors.WaitCursor;
            try
            {
                using (Utils.API.GeocachingLiveV6 api = new Utils.API.GeocachingLiveV6(_core))
                {
                    var req = new Utils.API.LiveV6.GetBookmarkListByGuidRequest();
                    req.AccessToken = api.Token;
                    req.BookmarkListGuid = guid;
                    var resp = api.Client.GetBookmarkListByGuid(req);
                    if (resp.Status.StatusCode == 0)
                    {
                        _gcCodes = (from c in resp.BookmarkList select c.CacheCode).ToList();
                        result = true;
                    }
                    else
                    {
                        MessageBox.Show(resp.Status.StatusMessage, Utils.LanguageSupport.Instance.GetTranslation(STR_ERROR));
                    }
                }
            }
            catch(Exception e)
            {
                MessageBox.Show(e.Message, Utils.LanguageSupport.Instance.GetTranslation(STR_ERROR));
            }
            Cursor = Cursors.Default;

            return result;
        }