About content updated.

Minor change to search function.
This commit is contained in:
Jeddunk 2021-01-13 15:37:30 +01:00
parent aacdd3bf25
commit 386daa126b
4 changed files with 54 additions and 13 deletions

View File

@ -2,12 +2,9 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<FileVersion>0.1.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<Folder Include="Models\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AngleSharp" Version="0.14.0" />
<PackageReference Include="MvvmCross" Version="7.1.2" />

View File

@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using GoldbergGUI.Core.Models;
using GoldbergGUI.Core.Services;
@ -232,6 +234,9 @@ namespace GoldbergGUI.Core.ViewModels
}
}
public string AboutVersionText =>
FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
// COMMANDS //
public IMvxCommand OpenFileCommand => new MvxAsyncCommand(OpenFile);
@ -274,14 +279,28 @@ namespace GoldbergGUI.Core.ViewModels
}
else
{
var startSearch = false;
var list = _steam.GetListOfAppsByName(GameName);
var steamApps = list as SteamApp[] ?? list.ToArray();
if (steamApps.Length == 1)
{
GameName = steamApps[0].Name;
AppId = steamApps[0].AppId;
var steamApp = steamApps[0];
if (steamApp != null)
{
GameName = steamApp.Name;
AppId = steamApp.AppId;
}
else
{
startSearch = true;
}
}
else
{
startSearch = true;
}
if (startSearch)
{
var navigateTask = _navigationService
.Navigate<SearchResultViewModel, IEnumerable<SteamApp>, SteamApp>(steamApps);
@ -395,6 +414,11 @@ namespace GoldbergGUI.Core.ViewModels
MainWindowEnabled = true;
}
public IMvxCommand PasteDlcCommand => new MvxCommand(() =>
{
_log.Debug("Received CTRL+V");
});
// OTHER METHODS //
private void ResetForm()

View File

@ -15,6 +15,12 @@
<TabControl Margin="5,5,5,5">
<!-- General -->
<TabItem Header="General">
<!--
<TabItem.InputBindings>
<KeyBinding Key="V" Modifiers="Control"
Command="{Binding PasteDlcCommand}"/>
</TabItem.InputBindings>
-->
<Grid Margin="10,20,10,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@ -29,6 +35,10 @@
<Button Content="Find ID..." Command="{Binding FindIdCommand}" Width="80" Grid.Row="2" Margin="0,5,130,5" HorizontalAlignment="Right" Height="20"/>
<TextBox Text="{Binding AppId, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" HorizontalAlignment="Right" VerticalAlignment="Center" Padding="1,0,0,0" Grid.Row="2" Width="125" Margin="0,5,0,5" Height="20"/>
<GroupBox Header="DLC" Grid.Row="3" Padding="0,0,0,0" Margin="0,5,0,0">
<GroupBox.InputBindings>
<KeyBinding Key="V" Modifiers="Control"
Command="{Binding PasteDlcCommand}"/>
</GroupBox.InputBindings>
<Grid Margin="10,10,10,10">
<Grid.RowDefinitions>
<RowDefinition/>
@ -100,11 +110,21 @@
</TabItem>
<TabItem Header="About" HorizontalAlignment="Center" Height="20" VerticalAlignment="Center" Width="54">
<StackPanel Margin="10,20,10,10">
<Label Content="GoldbergGUI" VerticalAlignment="Stretch"/>
<Label Content="Version 0.1.0"/>
<Label Content="Developed by Jeddunk"/>
<Label Content="Licensed under GNU GPLv3"/>
<Label Content="Goldberg Emulator is owned by Mr. Goldberg and licensed under GNU LGPLv3" />
<Label VerticalAlignment="Stretch" Content="{Binding AboutVersionText}">
<Label.ContentTemplate>
<DataTemplate>
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
<TextBlock Text="GoldbergGUI" FontWeight="Bold" FontSize="16" Padding="0,0,10,0"/>
<TextBlock Text="{Binding}" VerticalAlignment="Bottom" />
</StackPanel>
<TextBlock Text="Developed by Jeddunk" />
<TextBlock Text="Licensed under GNU GPLv3" />
<TextBlock Text="Goldberg Emulator is owned by Mr. Goldberg and licensed under GNU LGPLv3" Margin="0,10,0,0"/>
</StackPanel>
</DataTemplate>
</Label.ContentTemplate>
</Label>
</StackPanel>
</TabItem>
</TabControl>

View File

@ -1,13 +1,13 @@
using MvvmCross.Platforms.Wpf.Presenters.Attributes;
using MvvmCross.Platforms.Wpf.Views;
// ReSharper disable UnusedType.Global
namespace GoldbergGUI.WPF.Views
{
/// <summary>
/// Interaction logic for MainView.xaml
/// </summary>
[MvxContentPresentation(WindowIdentifier = nameof(MainWindow))]
public partial class MainView : MvxWpfView
public partial class MainView
{
public MainView()
{