コード例 #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
ファイル: SettingsViewModel.cs プロジェクト: tanerhasret/DMS
        /// <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
ファイル: DocumentViewModel.cs プロジェクト: tanerhasret/DMS
 /// <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;
     }
 }