コード例 #1
0
        private void StartSave(Model.CompactList list)
        {
            string type = null;

            if (_itemType == "venue")
            {
                type = "venueId";
            }
            if (_itemType == "tip")
            {
                type = "tipId";
            }
            if (_itemType == "item")
            {
                type = "itemId";
            }
            if (type == null)
            {
                return;
            }

            if (_optionalListId == null)
            {
                FourSquare.Instance.UpdateListAddItem(list.Id, type, _itemId, "Saving to list", () => RefreshList(list), (ex) => Warn(list));
            }
            else
            {
                // this is a list and item clone/save operation. ugly code dupe.
                FourSquare.Instance.UpdateListAddItemFromList(
                    list.Id,
                    _optionalListId,
                    _itemId,
                    "Saving to list", () => RefreshList(list), (ex) => Warn(list));
            }
        }
コード例 #2
0
 private void Warn(Model.CompactList list)
 {
     if (_warned == false)
     {
         PriorityQueue.AddUiWorkItem(() =>
         {
             if (!_warned)
             {
                 _warned = true;
                 System.Windows.MessageBox.Show("Wasn't able to save the item to " + list.Name);
             }
         });
     }
 }
コード例 #3
0
        private void OnListCreateSuccess(Model.CompactList list)
        {
            NewlyCreatedList = list;

            _refreshToken = CentralStatusManager.Instance.BeginLoading("Preparing your list");

            IntervalDispatcher.BeginInvoke(TimeSpan.FromSeconds(1.0), () =>
            {
                var temporary = DataManager.Current.Refresh <Model.UserLists>(
                    new LoadContext("self"),
                    OnListsLoaded,
                    OnListsFailed);
            });
        }
コード例 #4
0
 private void RefreshList(Model.CompactList list)
 {
     DataManager.Current.Refresh <Model.List>(new LoadContext(list.Id), null, null);
 }
コード例 #5
0
 public WrappedList(Model.CompactList cl) : this()
 {
     Item = cl;
 }
コード例 #6
0
        private void OnListCreateSuccess(Model.CompactList list)
        {
            NewlyCreatedList = list;

            _refreshToken = CentralStatusManager.Instance.BeginLoading("Preparing your list");

            IntervalDispatcher.BeginInvoke(TimeSpan.FromSeconds(1.0), () =>
                {
                    var temporary = DataManager.Current.Refresh<Model.UserLists>(
                        new LoadContext("self"),
                        OnListsLoaded,
                        OnListsFailed);
                });
        }