mirror of
https://github.com/4sval/FModel.git
synced 2026-03-27 04:05:18 -05:00
model export format hyperlink click
This commit is contained in:
parent
e19a25e517
commit
c8a97c5984
|
|
@ -392,6 +392,8 @@
|
|||
<ContentControl.Style>
|
||||
<Style TargetType="{x:Type ContentControl}">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<EventSetter Event="Hyperlink.Click" Handler="OnHyperlinkClick" />
|
||||
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.SettingsView.SelectedMeshExportFormat, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Views.SettingsView}}}" Value="{x:Static c4pMeshes:EMeshFormat.UEFormat}">
|
||||
<Setter Property="ContentTemplate">
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using FModel.Services;
|
||||
using FModel.Settings;
|
||||
using FModel.ViewModels;
|
||||
|
|
@ -241,4 +243,12 @@ public partial class SettingsView
|
|||
out value
|
||||
);
|
||||
}
|
||||
|
||||
private void OnHyperlinkClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.OriginalSource is not Hyperlink hyperlink)
|
||||
return;
|
||||
|
||||
Process.Start(new ProcessStartInfo(hyperlink.NavigateUri.AbsoluteUri) { UseShellExecute = true });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user