mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Compiler window will change state after clicking save
This commit is contained in:
parent
b7a2279a3a
commit
b85d27bb38
@ -20,11 +20,16 @@ namespace Wabbajack
|
||||
/// </summary>
|
||||
public partial class ModlistPropertiesWindow : Window
|
||||
{
|
||||
public ModlistPropertiesWindow()
|
||||
internal string newBannerFile;
|
||||
internal readonly AppState state;
|
||||
internal ModlistPropertiesWindow(AppState _state)
|
||||
{
|
||||
InitializeComponent();
|
||||
var bannerImage = UIUtils.BitmapImageFromResource("Wabbajack.banner.png");
|
||||
SplashScreenProperty.Source = bannerImage;
|
||||
|
||||
newBannerFile = null;
|
||||
state = _state;
|
||||
}
|
||||
|
||||
private void Window_Closing(object sender, CancelEventArgs e)
|
||||
@ -37,8 +42,28 @@ namespace Wabbajack
|
||||
var file = UIUtils.OpenFileDialog("Banner image|*.png");
|
||||
if(file != null)
|
||||
{
|
||||
newBannerFile = file;
|
||||
SplashScreenProperty.Source = new BitmapImage(new Uri(file));
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveProperties_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
BitmapImage splashScreen = null;
|
||||
if (newBannerFile != null)
|
||||
{
|
||||
splashScreen = new BitmapImage(new Uri(newBannerFile));
|
||||
}
|
||||
string modListName = ModlistNameProperty.Text;
|
||||
string modListAuthor = ModlistAuthorProperty.Text;
|
||||
string modListDescription = ModlistDescriptionProperty.Text;
|
||||
|
||||
state.SplashScreenImage = splashScreen;
|
||||
state.SplashScreenModName = modListName;
|
||||
state.SplashScreenSummary = modListDescription;
|
||||
state.SplashScreenAuthorName = modListAuthor;
|
||||
|
||||
Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user