Example #1
0
        public async Task <bool> DisposeRequest()
        {
            foreach (var doc in DocList.ToArray())
            {
                await doc.Close.ExecuteAsync(null);

                if (DocList.Contains(doc)) // Закрытие отменено
                {
                    return(false);
                }
            }

            return(true);
        }
Example #2
0
 private async void SaveAll_Executed(object arg)
 {
     foreach (var item in DocList.ToArray())
     {
         try
         {
             await item.SaveIfNeeded(false);
         }
         catch (Exception exc)
         {
             ShowError(exc);
         }
     }
 }
Example #3
0
 public async void AutoSave()
 {
     foreach (var item in DocList.ToArray())
     {
         try
         {
             await item.SaveIfNeeded(true);
         }
         catch (Exception exc)
         {
             ShowError(exc);
         }
     }
 }