Add SteamDB link
This commit is contained in:
parent
95361440f6
commit
cfb9be69f7
@ -86,6 +86,8 @@ namespace auto_creamapi.ViewModels
|
||||
|
||||
public IMvxCommand GoToForumThreadCommand => new MvxCommand(GoToForumThread);
|
||||
|
||||
public IMvxCommand GoToSteamdbCommand => new MvxCommand(GoToSteamdb);
|
||||
|
||||
// // ATTRIBUTES // //
|
||||
|
||||
public bool MainWindowEnabled
|
||||
@ -383,9 +385,29 @@ namespace auto_creamapi.ViewModels
|
||||
{
|
||||
var searchTerm = AppId; //$"{GameName.Replace(" ", "+")}+{appId}";
|
||||
var destinationUrl =
|
||||
"https://cs.rin.ru/forum/search.php?keywords=" +
|
||||
searchTerm +
|
||||
"&terms=any&fid[]=10&sf=firstpost&sr=topics&submit=Search";
|
||||
$"https://cs.rin.ru/forum/search.php?keywords={searchTerm}&terms=any&fid[]=10&sf=firstpost&sr=topics&submit=Search";
|
||||
var uri = new Uri(destinationUrl);
|
||||
var process = new ProcessStartInfo(uri.AbsoluteUri)
|
||||
{
|
||||
UseShellExecute = true
|
||||
};
|
||||
Process.Start(process);
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogError("OpenURL: Invalid AppID {AppId}", AppId);
|
||||
Status = $"Could not open URL: Invalid AppID {AppId}";
|
||||
}
|
||||
}
|
||||
|
||||
private void GoToSteamdb()
|
||||
{
|
||||
Status = "Opening URL...";
|
||||
if (AppId > 0)
|
||||
{
|
||||
var searchTerm = AppId; //$"{GameName.Replace(" ", "+")}+{appId}";
|
||||
var destinationUrl =
|
||||
$"https://steamdb.info/app/{searchTerm}/dlc/";
|
||||
var uri = new Uri(destinationUrl);
|
||||
var process = new ProcessStartInfo(uri.AbsoluteUri)
|
||||
{
|
||||
|
@ -56,9 +56,18 @@
|
||||
<wcl:WatermarkTextBox Text="{Binding AppId, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
HorizontalAlignment="Right" Margin="0,10,10,0" Watermark="AppID" TextWrapping="Wrap"
|
||||
VerticalAlignment="Top" Width="120" Padding="0" Grid.Row="1" />
|
||||
<TextBlock Grid.Row="2" Margin="10,10,10,0">
|
||||
<Hyperlink Command="{Binding GoToForumThreadCommand}">Search for cs.rin.ru thread</Hyperlink>
|
||||
</TextBlock>
|
||||
<Grid Grid.Row="2" Margin="10,10,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Margin="0,0,10,0">
|
||||
<Hyperlink Command="{Binding GoToForumThreadCommand}">Search for cs.rin.ru thread...</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" Margin="0,0,0,0">
|
||||
<Hyperlink Command="{Binding GoToSteamdbCommand}">Open SteamDB DLC page...</Hyperlink>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
<ComboBox ItemsSource="{Binding Path=Languages}" SelectedItem="{Binding Path=Lang, Mode=TwoWay}"
|
||||
HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="120" Grid.Row="3" />
|
||||
<CheckBox Content="Force offline mode" IsChecked="{Binding Offline, Mode=TwoWay}"
|
||||
|
Loading…
Reference in New Issue
Block a user