add manual modlist selection mode

This commit is contained in:
Timothy Baldridge 2019-10-22 06:05:57 -06:00
parent c12603e69f
commit 59e34b7e73
3 changed files with 24 additions and 2 deletions

View File

@ -20,6 +20,7 @@
<RowDefinition Height="*"/>
<RowDefinition Height="70"/>
<RowDefinition Height="70"/>
<RowDefinition Height="70"/>
</Grid.RowDefinitions>
<Image MouseLeftButtonDown="GitHub_MouseLeftButtonDown" Margin="5,0,0,0" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Name="GitHub"/>
<Image MouseLeftButtonDown="Patreon_MouseLeftButtonDown" Margin="5,0,0,0" Grid.Row="0" Grid.Column="1" Name="Patreon"/>
@ -54,9 +55,12 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button Name="InstallModlist" Grid.ColumnSpan="3" Grid.Row="3" Margin="2" Click="InstallModlist_Click">
<Button Name="InstallModlist" Grid.ColumnSpan="3" Grid.Row="3" Margin="2" Click="InstallModlist_Click" IsEnabled="{Binding CanInstall}">
<TextBlock FontSize="40">Download and Install</TextBlock>
</Button>
<Button Name="InstallFromList" Grid.ColumnSpan="3" Grid.Row="4" Margin="2" Click="InstallFromList_Click">
<TextBlock FontSize="40">Install from Disk</TextBlock>
</Button>
<Button Name="CreateModlist" Grid.ColumnSpan="3" Grid.Row="5" Margin="2" Click="CreateModlist_Click">
<TextBlock FontSize="40">Create a ModList</TextBlock>
</Button>

View File

@ -86,5 +86,11 @@ namespace Wabbajack
{
Process.Start("https://discord.gg/zgbrkmA");
}
private void InstallFromList_Click(object sender, RoutedEventArgs e)
{
OpenMainWindow(RunMode.Install,
UIUtils.OpenFileDialog($"*{Consts.ModlistExtension}|*{Consts.ModlistExtension}"));
}
}
}

View File

@ -32,7 +32,19 @@ namespace Wabbajack.UI
public ModlistMetadata SelectedModList
{
get => _selectedModList;
set => RaiseAndSetIfChanged(ref _selectedModList, value);
set
{
CanInstall = true;
RaiseAndSetIfChanged(ref _selectedModList, value);
}
}
private bool _canInstall;
public bool CanInstall
{
get => _canInstall;
set => RaiseAndSetIfChanged(ref _canInstall, value);
}
internal string Download()