Some design changes

Again fixed open url bug
This commit is contained in:
Geoffroy BONNEVILLE
2020-05-13 15:14:58 +02:00
parent d38d6461bd
commit 0adb44bc81
6 changed files with 7 additions and 21 deletions

View File

@@ -1,7 +1,5 @@
using System;
using Windows.UI.Xaml;
using GalaSoft.MvvmLight.Views;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Xaml.Interactivity;
namespace ModernKeePass.Actions
@@ -24,10 +22,8 @@ namespace ModernKeePass.Actions
var uri = new Uri(Url);
return Windows.System.Launcher.LaunchUriAsync(uri).GetAwaiter().GetResult();
}
catch (Exception ex)
catch (Exception)
{
var dialogService = App.Services.GetRequiredService<IDialogService>();
dialogService.ShowError(ex, ex.Message, null, () => {}).Wait();
return false;
}
}

View File

@@ -69,19 +69,6 @@ namespace ModernKeePass.Controls
typeof(TextBoxWithButton),
new PropertyMetadata(null, (o, args) => { }));
public bool IsButtonEnabled
{
get { return (bool)GetValue(IsButtonEnabledProperty); }
set { SetValue(IsButtonEnabledProperty, value); }
}
public static readonly DependencyProperty IsButtonEnabledProperty =
DependencyProperty.Register(
nameof(IsButtonEnabled),
typeof(bool),
typeof(TextBoxWithButton),
new PropertyMetadata(true, (o, args) => { }));
public TextBoxWithButton()
{
DefaultStyleKey = typeof(TextBoxWithButton);