forked from Viniixd/Remastered-AssetsEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLegacyAssetsOptionsDialog.xaml.cs
More file actions
38 lines (35 loc) · 1.17 KB
/
LegacyAssetsOptionsDialog.xaml.cs
File metadata and controls
38 lines (35 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System.Linq;
using System.Windows;
namespace Assets_Editor
{
public partial class LegacyAssetsOptionsDialog : Window
{
public int SelectedVersion { get; private set; }
public bool UseTransparency { get; private set; }
public LegacyAssetsOptionsDialog()
{
InitializeComponent();
var versions = MainWindow.datStructure.GetAllVersions()
.OrderByDescending(v => v.Number)
.ToList();
VersionCombo.ItemsSource = versions;
if (versions.Count > 0)
{
VersionCombo.SelectedIndex = 0;
}
}
private void Ok_Click(object sender, RoutedEventArgs e)
{
if (VersionCombo.SelectedItem is VersionInfo versionInfo)
{
SelectedVersion = versionInfo.Number;
UseTransparency = TransparencyCheckBox.IsChecked == true;
DialogResult = true;
}
else
{
MessageBox.Show("Please select a client version.", "Assets Editor", MessageBoxButton.OK, MessageBoxImage.Information);
}
}
}
}