Пример #1
0
 /// <summary>
 /// Logs the user in.
 /// </summary>
 /// <returns>A <see cref="Task"/> representing the asynchronous login operation.</returns>
 public Task <bool> Login()
 {
     using (IsBusySwitcher switcher = this.StartBusySection())
     {
         throw new NotImplementedException();
     }
 }
Пример #2
0
        /// <summary>
        /// Saves the current configuration to the disk.
        /// </summary>
        public void Save()
        {
            using (IsBusySwitcher switcher = this.StartBusySection())
            {
                Contract.Assume(this.config.CurrentConfiguration != null);

                this.config.CurrentConfiguration.Save();
            }
        }
Пример #3
0
 /// <summary>
 /// Loads more data (e.g. if the user is scrolling down) into the model.
 /// </summary>
 /// <param name="count">The amount of additional items to load.</param>
 /// <returns>A <see cref="Task"/> representing the asynchronous loading operation.</returns>
 public override async Task LoadMore(int count)
 {
     using (IsBusySwitcher section = this.StartBusySection())
     {
         foreach (Category cat in await this.Client.GetCategoriesAsync(new CategoryCollectionParameters()
         {
             Start = this.Items.Count, Count = 100
         }))
         {
             this.Items.Add(cat);
         }
     }
 }
Пример #4
0
 /// <summary>
 /// Loads more data (e.g. if the user is scrolling down) into the model.
 /// </summary>
 /// <param name="count">The amount of additional items to load.</param>
 /// <returns>A <see cref="Task"/> representing the asynchronous loading operation.</returns>
 public override async Task LoadMore(int count)
 {
     using (IsBusySwitcher section = this.StartBusySection())
     {
         foreach (Tag tag in await this.Client.GetTagsAsync(new TagCollectionParameters()
         {
             Start = this.Items.Count, Count = 100
         }))
         {
             this.Items.Add(tag);
         }
     }
 }
Пример #5
0
 /// <summary>
 /// Loads more data (e.g. if the user is scrolling down) into the model.
 /// </summary>
 /// <param name="count">The amount of additional items to load.</param>
 /// <returns>A <see cref="Task"/> representing the asynchronous loading operation.</returns>
 public override async Task LoadMore(int count)
 {
     using (IsBusySwitcher section = this.StartBusySection())
     {
         foreach (Document doc in await this.Client.GetDocumentsAsync(new DocumentCollectionParameters()
         {
             Start = this.Items.Count, Count = 100
         }))
         {
             this.Items.Add(doc);
         }
     }
 }
Пример #6
0
 /// <summary>
 /// Loads the data into the model.
 /// </summary>
 /// <returns>A <see cref="Task"/> representing the asynchronous loading operation.</returns>
 public override async Task LoadData()
 {
     using (IsBusySwitcher section = this.StartBusySection())
     {
         this.Items = new ObservableCollection <Tag>(
             await this.Client.GetTagsAsync(
                 new TagCollectionParameters()
         {
             Count = 100
         }
                 )
             );
     }
 }
Пример #7
0
 /// <summary>
 /// Loads the data into the model.
 /// </summary>
 /// <returns>A <see cref="Task"/> representing the asynchronous loading operation.</returns>
 public override async Task LoadData()
 {
     try
     {
         using (IsBusySwitcher section = this.StartBusySection())
         {
             this.Items = new ObservableCollection <Category>(
                 await this.Client.GetCategoriesAsync(
                     new CategoryCollectionParameters()
             {
                 Count = 100
             }
                     )
                 );
         }
     }
     catch (Exception)
     {
         throw;
     }
 }