feat.修改了作业链接显示方式

This commit is contained in:
ABA2396
2022-06-06 02:23:41 +08:00
parent 0acd8441bf
commit 2586e400d2
2 changed files with 6 additions and 7 deletions

View File

@@ -260,17 +260,17 @@ namespace MeoAsstGui
public string Url
{
get => _url;
get => _url.Length > 0 ? "视频链接" : "";
set => SetAndNotify(ref _url, value);
}
public void Hyperlink_Click(string url)
public void Hyperlink_Click()
{
try
{
if (!string.IsNullOrEmpty(url))
if (!string.IsNullOrEmpty(_url))
{
Process.Start(new ProcessStartInfo(url));
Process.Start(new ProcessStartInfo(_url));
}
}
catch (Exception)

View File

@@ -24,10 +24,9 @@
<CheckBox IsChecked="{Binding Form}" HorizontalAlignment="Center" IsHitTestVisible="{Binding Idle}" Content="自动编队" Height="50" Margin="10" />
<Button Command="{s:Action Start}" IsEnabled="{Binding Idle}" Content="开始" Width="120" Height="50" Margin="10" />
<Button Command="{s:Action Stop}" Content="停止" Width="120" Height="50" Margin="10" />
<!-- 暂时移除显示攻略视频来源,后面想到更好的显示方式后再加回来 -->
<!-- TextBlock Style="{StaticResource TextBlockDefault}" Block.TextAlignment="Center" Margin="10" Visibility="Collapsed" >
<TextBlock Style="{StaticResource TextBlockDefault}" Block.TextAlignment="Center" Margin="10" >
<Hyperlink Command="{s:Action Hyperlink_Click}" CommandParameter="{Binding Url}"><TextBlock Text="{Binding Url}"/></Hyperlink>
</TextBlock -->
</TextBlock>
</StackPanel>
<ScrollViewer Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center"