Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
christiannagel committed Nov 7, 2023
2 parents 39c0a1c + 4a61b5f commit 44d3fa7
Show file tree
Hide file tree
Showing 9 changed files with 235 additions and 157 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
Expand All @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.8.0" />
<PackageReference Include="Azure.Identity" Version="1.10.2" />
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="5.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="5.1.0" />
<PackageReference Include="Microsoft.FeatureManagement.AspNetCore" Version="2.5.1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

using System.Runtime.InteropServices;
using System.Text;
using Windows.Storage;
Expand Down Expand Up @@ -61,8 +63,7 @@ public async void OnOpen()
}
catch (Exception ex)
{
MessageDialog dlg = new(ex.Message, "Error");
await dlg.ShowAsync();
await ShowErrorAsync(ex.Message);
}
}

Expand Down Expand Up @@ -91,8 +92,7 @@ public async void OnOpenDotnet()
}
catch (Exception ex)
{
MessageDialog dlg = new(ex.Message, "Error");
await dlg.ShowAsync();
await ShowErrorAsync(ex.Message);
}
}

Expand Down Expand Up @@ -125,8 +125,7 @@ public async void OnSaveDotnet()
}
catch (Exception ex)
{
MessageDialog dlg = new(ex.Message, "Error");
await dlg.ShowAsync();
await ShowErrorAsync(ex.Message);
}
}

Expand Down Expand Up @@ -157,8 +156,19 @@ public async void OnSave()
}
catch (Exception ex)
{
MessageDialog dlg = new(ex.Message, "Error");
await dlg.ShowAsync();
await ShowErrorAsync(ex.Message);
}
}

private async Task ShowErrorAsync(string message)
{
ContentDialog dlg = new()
{
Title = "Error",
Content = message,
PrimaryButtonText = "OK",
XamlRoot = Content.XamlRoot
};
await dlg.ShowAsync();
}
}
Loading

0 comments on commit 44d3fa7

Please sign in to comment.