Beispiel #1
0
        public override void ViewWillDisappear(bool animated)
        {
            base.ViewWillDisappear(animated);

            if (finishGatheringToken != null)
            {
                finishGatheringToken.Dispose();
            }

            if (IsTodayAvailable)
            {
                document.Close(null);
            }
        }
Beispiel #2
0
        public override void ViewWillDisappear(bool animated)
        {
            base.ViewWillDisappear(animated);

            if (document != null)
            {
                document.Close(null);
            }

            // Unsibscribe from UIDocument.StateChangedNotification
            if (docStateChangeToken != null)
            {
                docStateChangeToken.Dispose();
            }

            // Hide the toolbar so the list can't be edited.
            NavigationController.SetToolbarHidden(true, animated);
        }
Beispiel #3
0
        async void FetchInfo(TaskCompletionSource <object> tcs)
        {
            ListDocument document = new ListDocument(Url);

            bool success = await document.OpenAsync();

            if (success)
            {
                Color = document.List.Color;
                Name  = document.LocalizedName;

                tcs.SetResult(null);
                document.Close(null);
            }
            else
            {
                tcs.SetException(new InvalidOperationException("Your attempt to open the document failed."));
            }
        }