2017-02-14 07:22:48 +04:00
|
|
|
|
using System.Windows;
|
|
|
|
|
|
|
|
|
|
namespace GARbro.GUI
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaction logic for UpdateDialog.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class UpdateDialog : Window
|
|
|
|
|
{
|
|
|
|
|
public UpdateDialog (GarUpdateInfo info, bool enable_release, bool enable_formats)
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent ();
|
|
|
|
|
this.ReleasePane.Visibility = enable_release ? Visibility.Visible : Visibility.Collapsed;
|
|
|
|
|
this.FormatsPane.Visibility = enable_formats ? Visibility.Visible : Visibility.Collapsed;
|
|
|
|
|
if (string.IsNullOrEmpty (info.ReleaseNotes))
|
|
|
|
|
this.ReleaseNotes.Visibility = Visibility.Collapsed;
|
|
|
|
|
this.DataContext = info;
|
2017-02-15 02:24:25 +04:00
|
|
|
|
this.Closed += (s, e) => IsClosed = true;
|
2017-02-14 07:22:48 +04:00
|
|
|
|
}
|
|
|
|
|
|
2017-02-15 02:24:25 +04:00
|
|
|
|
public bool IsClosed { get; private set; }
|
|
|
|
|
|
2017-02-14 07:22:48 +04:00
|
|
|
|
private void Hyperlink_RequestNavigate (object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (App.NavigateUri (e.Uri))
|
|
|
|
|
e.Handled = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Button_Click (object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.DialogResult = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|