mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
UI improvements
This commit is contained in:
parent
5811380241
commit
13e839156d
@ -11,4 +11,5 @@
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
</configuration>
|
@ -4,5 +4,10 @@
|
||||
xmlns:local="clr-namespace:Wabbajack"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Themes\Styles.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
@ -9,7 +10,7 @@ using Wabbajack.Common;
|
||||
|
||||
namespace Wabbajack
|
||||
{
|
||||
internal class AppState
|
||||
internal class AppState : INotifyPropertyChanged
|
||||
{
|
||||
public class CPUStatus
|
||||
{
|
||||
@ -22,11 +23,46 @@ namespace Wabbajack
|
||||
|
||||
private Dispatcher dispatcher;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
public void OnPropertyChanged(string name)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
|
||||
}
|
||||
|
||||
public ObservableCollection<string> Log { get; }
|
||||
public ObservableCollection<CPUStatus> Status { get; }
|
||||
|
||||
|
||||
public String Mode { get; set; }
|
||||
private string _mode;
|
||||
public string Mode
|
||||
{
|
||||
get
|
||||
{
|
||||
return _mode;
|
||||
}
|
||||
set
|
||||
{
|
||||
_mode = value;
|
||||
OnPropertyChanged("Mode");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string _modListName;
|
||||
public string ModListName
|
||||
{
|
||||
get
|
||||
{
|
||||
return _modListName;
|
||||
}
|
||||
set
|
||||
{
|
||||
_modListName = value;
|
||||
OnPropertyChanged("ModListName");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private List<CPUStatus> InternalStatus { get; }
|
||||
public string LogFile { get; private set; }
|
||||
|
@ -5,18 +5,19 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Wabbajack"
|
||||
mc:Ignorable="d"
|
||||
Title="Wabbajack" Height="600" Width="800">
|
||||
<Grid>
|
||||
Title="Wabbajack" Height="600" Width="800"
|
||||
Style="{StaticResource {x:Type Window}}" Icon="square_transparent_icon.ico" WindowStyle="ToolWindow">
|
||||
<Grid Margin="16">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Mode}"></TextBlock>
|
||||
<TextBlock Text=":"></TextBlock>
|
||||
<TextBlock Text="YAHSED GUIDE"></TextBlock>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0, 16, 0, 16">
|
||||
<TextBlock Text="{Binding Mode}" FontSize="16" FontWeight="Bold"></TextBlock>
|
||||
<TextBlock Text=" : " FontSize="16"></TextBlock>
|
||||
<TextBlock Text="{Binding ModListName}" FontSize="16"></TextBlock>
|
||||
</StackPanel>
|
||||
<ListBox Grid.Row ="1" ItemsSource="{Binding Status}" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<ListBox.ItemTemplate>
|
||||
@ -29,7 +30,18 @@
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto" ></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ProgressBar Minimum="0" Maximum="100" Value="{Binding Progress, Mode=OneTime}" Width="100" Grid.Column="0"></ProgressBar>
|
||||
<ProgressBar Minimum="0" Maximum="100" Value="{Binding Progress, Mode=OneTime}" Width="100" Grid.Column="0">
|
||||
<ProgressBar.Style>
|
||||
<Style TargetType="ProgressBar">
|
||||
<Setter Property="Visibility" Value="Visible"></Setter>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Progress}" Value="0">
|
||||
<Setter Property="Visibility" Value="Collapsed"></Setter>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ProgressBar.Style>
|
||||
</ProgressBar>
|
||||
<TextBlock Text=" CPU " Grid.Column="1"></TextBlock>
|
||||
<TextBlock Text="{Binding ID}" Grid.Column="2"></TextBlock>
|
||||
<TextBlock Text=" - " Grid.Column="3"></TextBlock>
|
||||
@ -38,7 +50,7 @@
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<TextBlock Text="Log:" Grid.Row="2"></TextBlock>
|
||||
<TextBlock Text="Log:" Grid.Row="2" FontSize="14" Margin="0, 16, 0, 8"></TextBlock>
|
||||
<ListBox local:AutoScrollBehavior.ScrollOnNewItem="True" Grid.Row ="3" ItemsSource="{Binding Log}">
|
||||
</ListBox>
|
||||
</Grid>
|
||||
|
@ -28,15 +28,24 @@ namespace Wabbajack
|
||||
InitializeComponent();
|
||||
|
||||
var context = new AppState(Dispatcher, "Building");
|
||||
this.DataContext = context;
|
||||
|
||||
WorkQueue.Init((id, msg, progress) => context.SetProgress(id, msg, progress));
|
||||
|
||||
var compiler = new Compiler("c:\\Mod Organizer 2", msg => context.LogMsg(msg));
|
||||
|
||||
compiler.MO2Profile = "DEV"; //"Basic Graphics and Fixes";
|
||||
context.ModListName = compiler.MO2Profile;
|
||||
context.Mode = "Building";
|
||||
|
||||
|
||||
new Thread(() =>
|
||||
{
|
||||
compiler.LoadArchives();
|
||||
compiler.MO2Profile = "DEV"; //"Basic Graphics and Fixes";
|
||||
compiler.Compile();
|
||||
|
||||
|
||||
|
||||
compiler.ModList.ToJSON("C:\\tmp\\modpack.json");
|
||||
var modlist = compiler.ModList;
|
||||
var create = modlist.Directives.OfType<CreateBSA>().ToList();
|
||||
@ -47,7 +56,6 @@ namespace Wabbajack
|
||||
}).Start();
|
||||
|
||||
|
||||
this.DataContext = context;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,9 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>square_transparent_icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Costura, Version=4.0.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Costura.Fody.4.0.0\lib\net40\Costura.dll</HintPath>
|
||||
@ -71,6 +74,8 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="Themes\LeftMarginMultiplierConverter.cs" />
|
||||
<Compile Include="Themes\TreeViewItemExtensions.cs" />
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@ -87,6 +92,10 @@
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="Themes\Styles.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="NexusAPI.cs" />
|
||||
@ -130,6 +139,12 @@
|
||||
<Name>Wabbajack.Common</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="square_Nxs_icon.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="square_transparent_icon.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\Fody.5.1.1\build\Fody.targets" Condition="Exists('..\packages\Fody.5.1.1\build\Fody.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
@ -5,4 +5,5 @@
|
||||
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net472" />
|
||||
<package id="SharpCompress" version="0.23.0" targetFramework="net472" />
|
||||
<package id="WebSocketSharpFork" version="1.0.4.0" targetFramework="net472" />
|
||||
<package id="WPFThemes.DarkBlend" version="1.0.8" targetFramework="net472" />
|
||||
</packages>
|
BIN
logos/square.jpg
Normal file
BIN
logos/square.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 102 KiB |
BIN
logos/square_Nxs_icon.ico
Normal file
BIN
logos/square_Nxs_icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 92 KiB |
BIN
logos/square_transparent.png
Normal file
BIN
logos/square_transparent.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 77 KiB |
BIN
logos/square_transparent_icon.ico
Normal file
BIN
logos/square_transparent_icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 92 KiB |
Loading…
Reference in New Issue
Block a user