GoldbergGUI/GoldbergGUI.WPF/Views/MainView.xaml

197 lines
15 KiB
Plaintext
Raw Normal View History

2021-01-08 12:36:57 -05:00
<views:MvxWpfView x:Class="GoldbergGUI.WPF.Views.MainView"
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:viewmodel="clr-namespace:GoldbergGUI.Core.ViewModels;assembly=GoldbergGUI.Core"
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="400" d:DataContext="{d:DesignInstance Type=viewmodel:MainViewModel }">
<views:MvxWpfView.Resources>
<BooleanToVisibilityConverter x:Key="B2V" />
</views:MvxWpfView.Resources>
2021-01-13 16:15:00 -05:00
<Grid Margin="0,0,0,0">
2021-01-08 12:36:57 -05:00
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
2021-01-13 16:15:00 -05:00
<Grid IsEnabled="{Binding MainWindowEnabled}" Margin="5,5,5,5">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TabControl Margin="5,5,5,5">
<!-- General -->
<TabItem Header="General">
<!--
<TabItem.InputBindings>
<KeyBinding Key="V" Modifiers="Control"
Command="{Binding PasteDlcCommand}"/>
</TabItem.InputBindings>
-->
2021-01-13 16:15:00 -05:00
<Grid Margin="10,20,10,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBox Text="{Binding DllPath, Mode=OneWay}" TextWrapping="Wrap" Margin="0,0,85,5" VerticalAlignment="Center" Padding="1,0,0,0" Height="20" IsEnabled="False"/>
<Button Content="Select... (_O)" Command="{Binding OpenFileCommand}" HorizontalAlignment="Right" Width="80" Height="20" Grid.Row="0" Margin="0,0,0,5"/>
<Button Content="_Generate steam__interfaces.txt" IsEnabled="{Binding SteamInterfacesTxtExists, UpdateSourceTrigger=PropertyChanged}" Command="{Binding GenerateSteamInterfacesCommand}" Height="20" Grid.Row="1" Margin="0,5,0,5" />
2021-01-13 16:15:00 -05:00
<TextBox Text="{Binding GameName, Mode=TwoWay}" TextWrapping="Wrap" VerticalAlignment="Center" Padding="1,0,0,0" Grid.Row="2" Margin="0,5,215,5" Height="20"/>
<Button Content="_Find ID..." Command="{Binding FindIdCommand}" Width="80" Grid.Row="2" Margin="0,5,130,5" HorizontalAlignment="Right" Height="20"/>
2021-01-13 16:15:00 -05:00
<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/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<DataGrid Margin="0,0,0,5" ItemsSource="{Binding DLCs, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectionMode="Extended" SelectionUnit="FullRow" HeadersVisibility="Column" AutoGenerateColumns="False" CanUserResizeColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="App ID" Binding="{Binding AppId}" Width="80" />
<DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="*" />
<!--<DataGridTextColumn Header="Depot ID" Binding="{Binding DepotId}" Width="80" Visibility="{Binding Source={x:Reference ShowOptionalDlcSettings}, Path=IsChecked, Converter={StaticResource B2V}}"/>
<DataGridTextColumn Header="Depot Name" Binding="{Binding DepotName}" Width="*" Visibility="{Binding Source={x:Reference ShowOptionalDlcSettings}, Path=IsChecked, Converter={StaticResource B2V}}" />-->
<DataGridTextColumn Header="App Path" Binding="{Binding AppPath}" Width="*" Visibility="{Binding Source={x:Reference ShowOptionalDlcSettings}, Path=IsChecked, Converter={StaticResource B2V}}" />
2021-01-13 16:15:00 -05:00
</DataGrid.Columns>
</DataGrid>
<CheckBox Grid.Row="1" x:Name="ShowOptionalDlcSettings" Margin="0,5,0,0" Content="Show optional settings"/>
<Button Content="Get _DLCs for AppID" Command="{Binding GetListOfDlcCommand}" Grid.Row="1" Width="120" HorizontalAlignment="Right" Margin="0,5,0,0" Height="20"/>
2021-01-13 16:15:00 -05:00
</Grid>
</GroupBox>
</Grid>
</TabItem>
<!-- Advanced -->
<TabItem Header="Advanced" IsEnabled="{Binding DllSelected, UpdateSourceTrigger=PropertyChanged}">
<Grid HorizontalAlignment="Stretch" Margin="10,20,10,10" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel IsEnabled="False" HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="0" VerticalAlignment="Top" Margin="0,0,0,0">
<StackPanel Margin="0,0,5,0">
<Button Content="Subscribed Groups" Width="120" Height="20" Margin="0,0,0,5"/>
<Button Content="Mods" Width="120" Height="20" Margin="0,5,0,5"/>
<Button Content="Items, Inventory" Width="120" Height="20" Margin="0,5,0,5"/>
</StackPanel>
<StackPanel Margin="5,0,0,0">
<Button Content="Achievements" Width="120" Height="20" Margin="0,0,0,5"/>
<Button Content="Stats, Leaderboards" Width="120" Height="20" Margin="0,5,0,5"/>
<Button Content="Controller" Width="120" Height="20" Margin="0,5,0,5"/>
</StackPanel>
</StackPanel>
<GroupBox Header="Miscellaneous" Grid.Row="1" Margin="0,5,0,0">
<StackPanel Margin="5,5,5,5">
<CheckBox Content="Offline" IsChecked="{Binding Offline, Mode=TwoWay}" Height="20" VerticalAlignment="Stretch" VerticalContentAlignment="Center"/>
<CheckBox Content="Disable Networking" IsChecked="{Binding DisableNetworking, Mode=TwoWay}" Height="20" VerticalContentAlignment="Center"/>
<CheckBox Content="Disable Overlay" IsChecked="{Binding DisableOverlay, Mode=TwoWay}" Height="20" VerticalContentAlignment="Center" IsEnabled="False"/>
2021-01-13 16:15:00 -05:00
</StackPanel>
</GroupBox>
</Grid>
</TabItem>
<!-- Settings -->
<TabItem Header="Global Settings">
<StackPanel Margin="10,20,10,10">
<Grid Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
2021-01-13 16:15:00 -05:00
</Grid.ColumnDefinitions>
2021-01-08 12:36:57 -05:00
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
2021-01-08 12:36:57 -05:00
</Grid.RowDefinitions>
2021-01-13 16:15:00 -05:00
<Label Content="Account name" HorizontalAlignment="Left" Margin="0,0,10,0" />
<TextBox Text="{Binding AccountName, Mode=TwoWay}" Height="20" Grid.Row="0" Grid.Column="1"/>
<CheckBox Content="Global" Grid.Row="0" Grid.Column="2" HorizontalAlignment="Right"
Margin="10,0,5,0" VerticalAlignment="Center" IsChecked="True"
IsEnabled="False"/>
<!--
IsEnabled="{Binding DllSelected, UpdateSourceTrigger=PropertyChanged}"/>
-->
2021-01-13 16:15:00 -05:00
<Label Content="Steam64ID" HorizontalAlignment="Left" Grid.Row="1"
Grid.Column="0" Margin="0,0,10,0" />
<TextBox Text="{Binding SteamId, Mode=TwoWay}" Grid.Column="1" Height="20" Grid.Row="1"/>
<CheckBox Content="Global" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Right"
Margin="10,0,5,0" VerticalAlignment="Center" IsChecked="True"
IsEnabled="False"/>
<!--
IsEnabled="{Binding DllSelected, UpdateSourceTrigger=PropertyChanged}"/>
-->
2021-01-13 16:15:00 -05:00
<Label Content="Language" HorizontalAlignment="Left" Grid.Row="2"
Grid.Column="0" Margin="0,0,10,0" />
<ComboBox Grid.Row="2" Grid.Column="1" ItemsSource="{Binding SteamLanguages}" SelectedItem="{Binding SelectedLanguage}" VerticalAlignment="Center"/>
<CheckBox Content="Global" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Right"
Margin="10,0,5,0" VerticalAlignment="Center" IsChecked="True"
IsEnabled="False"/>
<!--
IsEnabled="{Binding DllSelected, UpdateSourceTrigger=PropertyChanged}"/>
-->
<Label Content="Custom Broadcast Addresses:" HorizontalAlignment="Left"
Grid.ColumnSpan="2" Grid.Row="3" Grid.Column="0" Margin="0,0,10,0"/>
<CheckBox Content="Global" Grid.Row="3" Grid.Column="2" HorizontalAlignment="Right"
Margin="10,0,5,0" VerticalAlignment="Center" IsChecked="True"
IsEnabled="False"/>
2021-02-17 08:27:54 -05:00
<TextBox Grid.Row="4" Grid.ColumnSpan="3" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
TextWrapping="Wrap"
AcceptsReturn="True"
2021-02-17 08:27:54 -05:00
VerticalScrollBarVisibility="Auto" MaxHeight="120" MinHeight="120"/>
<TextBlock TextWrapping="Wrap" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="5" Margin="5,10,5,5">
<Run Text="{Binding G.Header, Mode=OneTime}" FontWeight="Bold"/><!--
--><Run Text="{Binding G.TextPreLink, Mode=OneTime}"/>
<Hyperlink Command="{Binding OpenGlobalSettingsFolderCommand}"><Run
Text="{Binding G.Link, Mode=OneTime}"/></Hyperlink><!--
--><Run Text="{Binding G.TextPostLink, Mode=OneTime}"/>
</TextBlock>
2021-01-08 12:36:57 -05:00
</Grid>
</StackPanel>
2021-01-13 16:15:00 -05:00
</TabItem>
<TabItem Header="About" HorizontalAlignment="Center" Height="20" VerticalAlignment="Center" Width="54">
<StackPanel Margin="10,20,10,10">
<Label VerticalAlignment="Stretch" Content="{Binding AboutVersionText, Mode=OneTime}">
2021-01-13 16:15:00 -05:00
<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>
2021-01-13 16:15:00 -05:00
</DataTemplate>
</Label.ContentTemplate>
</Label>
</StackPanel>
</TabItem>
</TabControl>
<!-- Bottom Row -->
<Grid Grid.Row="1" Margin="5,5,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<CheckBox Content="Goldberg applied" IsChecked="{Binding GoldbergApplied}" IsEnabled="False" Height="20" />
<Button Content="_Save" Command="{Binding SaveConfigCommand}" Width="80" Grid.Column="1" Height="20" Margin="0,0,5,0"/>
<Button Content="_Reset" Command="{Binding ResetConfigCommand}" Width="80" Grid.Column="2" Height="20"/>
2021-01-13 16:15:00 -05:00
</Grid>
2021-01-08 12:36:57 -05:00
</Grid>
<!-- Status Bar -->
2021-01-13 16:15:00 -05:00
<StatusBar Grid.Column="0" Grid.Row="1" Padding="2,2,2,2" BorderBrush="#33000000" BorderThickness="0,2,0,0">
<StatusBarItem Content="{Binding StatusText}"/>
</StatusBar>
2021-01-08 12:36:57 -05:00
</Grid>
</views:MvxWpfView>