Content packages & MD5 hash comparison between client and server

This commit is contained in:
Regalis
2015-07-20 21:27:44 +03:00
parent 4aa3d9d7ee
commit 326b46cf18
45 changed files with 1217 additions and 158 deletions
+28
View File
@@ -17,6 +17,7 @@ namespace Launcher
{
public partial class LauncherMain : Form
{
public static string ContentPackageFolder = "Data/ContentPackages/";
private const string configPath = "config.xml";
private Subsurface.GameSettings settings;
@@ -41,6 +42,9 @@ namespace Launcher
{
InitializeComponent();
ContentPackage.LoadAll(LauncherMain.ContentPackageFolder);
contentPackageBox.DataSource = ContentPackage.list;
supportedModes = new List<GraphicsMode>();
DEVMODE vDevMode = new DEVMODE();
@@ -77,6 +81,15 @@ namespace Launcher
fullscreenBox.DataBindings.Add("Checked", this, "FullscreenEnabled");
if (settings.SelectedContentPackage == null)
{
if (contentPackageBox.Items.Count > 0) contentPackageBox.SelectedItem = contentPackageBox.Items[0];
}
else
{
contentPackageBox.SelectedItem = settings.SelectedContentPackage;
}
//resolutionBox.SelectedItem = selectedMode;
}
@@ -95,6 +108,21 @@ namespace Launcher
Process.Start(Directory.GetCurrentDirectory() + "/Subsurface.exe");
Application.Exit();
}
private void packageManagerButton_Click(object sender, EventArgs e)
{
var packageManager = new PackageManager(settings.SelectedContentPackage);
packageManager.Show();
}
private void contentPackageBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (settings == null) return;
ComboBox comboBox = sender as ComboBox;
settings.SelectedContentPackage = comboBox.SelectedItem as ContentPackage;
}
}
public class GraphicsMode