Ejemplo n.º 1
0
		private async Task SavingEntrails()
		{
			try
			{
				if (string.IsNullOrEmpty(m_textFile.Name))
				{
					var saveDlg = new SaveDialog();
					var result = saveDlg.ShowDialog();
					if (result == true)
						m_textFile.Name = saveDlg.FileName;
					else
						return;
					await m_repository.SaveAsync();
				}
				else
				{
					await m_repository.UpdateAsync(m_textFile);
				}
			}
			catch (Exception exc)
			{
				MessageBox.Show(this, exc.Message + "\n" + exc.StackTrace, "Exception on saving text file", MessageBoxButton.OK,
					MessageBoxImage.Error);
			}
		}
Ejemplo n.º 2
0
 private async Task SavingEntrails()
 {
     try
     {
         if (string.IsNullOrEmpty(m_textFile.Name))
         {
             var saveDlg = new SaveDialog();
             var result  = saveDlg.ShowDialog();
             if (result == true)
             {
                 m_textFile.Name = saveDlg.FileName;
             }
             else
             {
                 return;
             }
             await m_repository.SaveAsync();
         }
         else
         {
             await m_repository.UpdateAsync(m_textFile);
         }
     }
     catch (Exception exc)
     {
         MessageBox.Show(this, exc.Message + "\n" + exc.StackTrace, "Exception on saving text file", MessageBoxButton.OK,
                         MessageBoxImage.Error);
     }
 }
Ejemplo n.º 3
0
 public void SaveText(object sender, RoutedEventArgs e)
 {
     SaveDialog save = new SaveDialog();
     save.Show();
    
 }