From 295ac5afcd62a7642bf9add5c6e40fd897115318 Mon Sep 17 00:00:00 2001 From: gk Date: Sun, 11 Dec 2016 17:02:47 +0100 Subject: [PATCH 01/19] Introduced KspVersionCriteria, started to use it across the application --- Cmdline/Action/List.cs | 2 +- Cmdline/Action/Search.cs | 2 +- Cmdline/Action/Show.cs | 2 +- Cmdline/Action/Update.cs | 4 +-- Cmdline/Action/Upgrade.cs | 2 +- Cmdline/Main.cs | 2 +- Core/CKAN-core.csproj | 2 ++ Core/KSP.cs | 6 +++++ Core/ModuleInstaller.cs | 6 ++--- Core/Net/Repo.cs | 4 +-- Core/Registry/AvailableModule.cs | 2 +- Core/Registry/IRegistryQuerier.cs | 10 +++---- Core/Registry/Registry.cs | 10 +++---- Core/Relationships/RelationshipResolver.cs | 8 +++--- Core/Types/CkanModule.cs | 12 ++++----- .../GameComparator/BaseGameComparator.cs | 23 ++++++++++++++++ .../GameComparator/GrasGameComparator.cs | 19 ++++++++----- Core/Types/GameComparator/IGameComparator.cs | 2 +- .../GameComparator/StrictGameComparator.cs | 4 +-- .../GameComparator/YoyoGameComparator.cs | 2 +- Core/Versioning/KspVersionCriteria.cs | 27 +++++++++++++++++++ GUI/CKAN-GUI.csproj | 12 ++++----- GUI/ChooseKSPInstance.Designer.cs | 15 +++++++++++ GUI/ChooseKSPInstance.cs | 6 ++++- GUI/GUIMod.cs | 2 +- GUI/Main.cs | 6 ++--- GUI/MainInstall.cs | 6 ++--- GUI/MainModInfo.cs | 4 +-- GUI/MainModList.cs | 16 +++++------ Tests/Core/ModuleInstaller.cs | 4 +-- Tests/Core/Net/Repo.cs | 4 +-- Tests/Core/Registry/Registry.cs | 4 +-- Tests/Core/Registry/RegistryLive.cs | 3 ++- .../Relationships/RelationshipResolver.cs | 2 +- Tests/Core/Types/GameComparator.cs | 8 +++--- Tests/Core/Types/Module.cs | 3 ++- Tests/GUI/GH1866.cs | 2 +- Tests/GUI/GUIMod.cs | 4 +-- Tests/GUI/MainModList.cs | 21 ++++++++------- 39 files changed, 179 insertions(+), 94 deletions(-) create mode 100644 Core/Types/GameComparator/BaseGameComparator.cs create mode 100644 Core/Versioning/KspVersionCriteria.cs diff --git a/Cmdline/Action/List.cs b/Cmdline/Action/List.cs index 9ce6a992dd..0dcd405538 100644 --- a/Cmdline/Action/List.cs +++ b/Cmdline/Action/List.cs @@ -72,7 +72,7 @@ public int RunCommand(CKAN.KSP ksp, object raw_options) try { // Check if upgrades are available, and show appropriately. - CkanModule latest = registry.LatestAvailable(mod.Key, ksp.Version()); + CkanModule latest = registry.LatestAvailable(mod.Key, ksp.VersionCriteria()); log.InfoFormat("Latest {0} is {1}", mod.Key, latest); diff --git a/Cmdline/Action/Search.cs b/Cmdline/Action/Search.cs index 23ba55ed34..5173798cb2 100644 --- a/Cmdline/Action/Search.cs +++ b/Cmdline/Action/Search.cs @@ -56,7 +56,7 @@ public List PerformSearch(CKAN.KSP ksp, string term) { var registry = RegistryManager.Instance(ksp).registry; return registry - .Available(ksp.Version()) + .Available(ksp.VersionCriteria()) .Where((module) => { // Extract the description. This is an optional field and may be null. diff --git a/Cmdline/Action/Show.cs b/Cmdline/Action/Show.cs index b3070c1ffe..5ad147b891 100644 --- a/Cmdline/Action/Show.cs +++ b/Cmdline/Action/Show.cs @@ -38,7 +38,7 @@ public int RunCommand(CKAN.KSP ksp, object raw_options) // Module was not installed, look for an exact match in the available modules, // either by "name" (the user-friendly display name) or by identifier CkanModule moduleToShow = registry - .Available(ksp.Version()) + .Available(ksp.VersionCriteria()) .SingleOrDefault( mod => mod.name == options.Modname || mod.identifier == options.Modname diff --git a/Cmdline/Action/Update.cs b/Cmdline/Action/Update.cs index cfa49cbff4..50302a2f4a 100644 --- a/Cmdline/Action/Update.cs +++ b/Cmdline/Action/Update.cs @@ -26,7 +26,7 @@ public int RunCommand(CKAN.KSP ksp, object raw_options) { // Get a list of available modules prior to the update. var registry = RegistryManager.Instance(ksp).registry; - available_prior = registry.Available(ksp.Version()); + available_prior = registry.Available(ksp.VersionCriteria()); } // If no repository is selected, select all. @@ -56,7 +56,7 @@ public int RunCommand(CKAN.KSP ksp, object raw_options) if (options.list_changes) { var registry = RegistryManager.Instance(ksp).registry; - PrintChanges(available_prior, registry.Available(ksp.Version())); + PrintChanges(available_prior, registry.Available(ksp.VersionCriteria())); } return Exit.OK; diff --git a/Cmdline/Action/Upgrade.cs b/Cmdline/Action/Upgrade.cs index 2d1460213f..7ea95fe122 100644 --- a/Cmdline/Action/Upgrade.cs +++ b/Cmdline/Action/Upgrade.cs @@ -86,7 +86,7 @@ public int RunCommand(CKAN.KSP ksp, object raw_options) try { // Check if upgrades are available - var latest = registry.LatestAvailable(mod.Key, ksp.Version()); + var latest = registry.LatestAvailable(mod.Key, ksp.VersionCriteria()); // This may be an unindexed mod. If so, // skip rather than crash. See KSP-CKAN/CKAN#841. diff --git a/Cmdline/Main.cs b/Cmdline/Main.cs index 81aa0f21a6..bd356ea811 100644 --- a/Cmdline/Main.cs +++ b/Cmdline/Main.cs @@ -322,7 +322,7 @@ private static int Version(IUser user) private static int Available(CKAN.KSP current_instance, IUser user) { - List available = RegistryManager.Instance(current_instance).registry.Available(current_instance.Version()); + List available = RegistryManager.Instance(current_instance).registry.Available(current_instance.VersionCriteria()); user.RaiseMessage("Mods available for KSP {0}", current_instance.Version()); user.RaiseMessage(""); diff --git a/Core/CKAN-core.csproj b/Core/CKAN-core.csproj index 88ddc0b460..52d4909790 100644 --- a/Core/CKAN-core.csproj +++ b/Core/CKAN-core.csproj @@ -110,6 +110,8 @@ + + diff --git a/Core/KSP.cs b/Core/KSP.cs index c9c85b9f8f..605ba801d9 100644 --- a/Core/KSP.cs +++ b/Core/KSP.cs @@ -334,6 +334,12 @@ public KspVersion Version() return version = DetectVersion(GameDir()); } + + public KspVersionCriteria VersionCriteria () + { + return new KspVersionCriteria(version); + } + #endregion #region CKAN/GameData Directory Maintenance diff --git a/Core/ModuleInstaller.cs b/Core/ModuleInstaller.cs index f99898a9b1..1c3e96f167 100644 --- a/Core/ModuleInstaller.cs +++ b/Core/ModuleInstaller.cs @@ -152,7 +152,7 @@ public void InstallList( IDownloader downloader = null ) { - var resolver = new RelationshipResolver(modules, options, registry_manager.registry, ksp.Version()); + var resolver = new RelationshipResolver(modules, options, registry_manager.registry, ksp.VersionCriteria()); var modsToInstall = resolver.ModList().ToList(); InstallList(modsToInstall, options, downloader); } @@ -173,7 +173,7 @@ public void InstallList( IDownloader downloader = null ) { - var resolver = new RelationshipResolver(modules, options, registry_manager.registry, ksp.Version()); + var resolver = new RelationshipResolver(modules, options, registry_manager.registry, ksp.VersionCriteria()); var modsToInstall = resolver.ModList().ToList(); List downloads = new List (); @@ -993,7 +993,7 @@ public void Upgrade(IEnumerable identifiers, NetAsyncModulesDownloader n options.with_recommends = false; options.with_suggests = false; - var resolver = new RelationshipResolver(identifiers.ToList(), options, registry_manager.registry, ksp.Version()); + var resolver = new RelationshipResolver(identifiers.ToList(), options, registry_manager.registry, ksp.VersionCriteria()); Upgrade(resolver.ModList(), netAsyncDownloader, enforceConsistency); } diff --git a/Core/Net/Repo.cs b/Core/Net/Repo.cs index 0314635281..3240cb71e9 100644 --- a/Core/Net/Repo.cs +++ b/Core/Net/Repo.cs @@ -107,7 +107,7 @@ public static int UpdateAllRepositories(RegistryManager registry_manager, KSP ks ShowUserInconsistencies(registry_manager.registry, user); // Return how many we got! - return registry_manager.registry.Available(ksp.Version()).Count; + return registry_manager.registry.Available(ksp.VersionCriteria()).Count; } public static int Update(RegistryManager registry_manager, KSP ksp, IUser user, Boolean clear = true, string repo = null) @@ -414,7 +414,7 @@ private static int Update(RegistryManager registry_manager, KSP ksp, IUser user, ShowUserInconsistencies(registry_manager.registry, user); // Return how many we got! - return registry_manager.registry.Available(ksp.Version()).Count; + return registry_manager.registry.Available(ksp.VersionCriteria()).Count; } /// diff --git a/Core/Registry/AvailableModule.cs b/Core/Registry/AvailableModule.cs index 03b8edf783..8e8d5f8a0c 100644 --- a/Core/Registry/AvailableModule.cs +++ b/Core/Registry/AvailableModule.cs @@ -72,7 +72,7 @@ public void Remove(Version version) /// If not null only consider mods which match this ksp version. /// If not null only consider mods which satisfy the RelationshipDescriptor. /// - public CkanModule Latest(KspVersion ksp_version = null, RelationshipDescriptor relationship=null) + public CkanModule Latest(KspVersionCriteria ksp_version = null, RelationshipDescriptor relationship=null) { var available_versions = new List(module_version.Keys); CkanModule module; diff --git a/Core/Registry/IRegistryQuerier.cs b/Core/Registry/IRegistryQuerier.cs index 36bc855a96..81b777aca3 100644 --- a/Core/Registry/IRegistryQuerier.cs +++ b/Core/Registry/IRegistryQuerier.cs @@ -16,7 +16,7 @@ public interface IRegistryQuerier /// the specified version of KSP. /// // TODO: This name is misleading. It's more a LatestAvailable's' - List Available(KspVersion ksp_version); + List Available(KspVersionCriteria ksp_version); /// /// Returns the latest available version of a module that @@ -25,7 +25,7 @@ public interface IRegistryQuerier /// If no ksp_version is provided, the latest module for *any* KSP is returned. /// Throws if asked for a non-existent module. /// - CkanModule LatestAvailable(string identifier, KspVersion ksp_version, RelationshipDescriptor relationship_descriptor = null); + CkanModule LatestAvailable(string identifier, KspVersionCriteria ksp_version, RelationshipDescriptor relationship_descriptor = null); /// /// Returns the latest available version of a module that satisifes the specified version and @@ -34,7 +34,7 @@ public interface IRegistryQuerier /// Returns an empty list if nothing is available for our system, which includes if no such module exists. /// If no KSP version is provided, the latest module for *any* KSP version is given. /// - List LatestAvailableWithProvides(string identifier, KspVersion ksp_version, RelationshipDescriptor relationship_descriptor = null); + List LatestAvailableWithProvides(string identifier, KspVersionCriteria ksp_version, RelationshipDescriptor relationship_descriptor = null); /// /// Checks the sanity of the registry, to ensure that all dependencies are met, @@ -65,7 +65,7 @@ public interface IRegistryQuerier /// Returns a simple array of all incompatible modules for /// the specified version of KSP. /// - List Incompatible(KspVersion ksp_version); + List Incompatible(KspVersionCriteria ksp_version); /// /// Returns a dictionary of all modules installed, along with their @@ -128,7 +128,7 @@ public static bool IsAutodetected(this IRegistryQuerier querier, string identifi /// Is the mod installed and does it have a newer version compatible with version /// We can't update AD mods /// - public static bool HasUpdate(this IRegistryQuerier querier, string identifier, KspVersion version) + public static bool HasUpdate(this IRegistryQuerier querier, string identifier, KspVersionCriteria version) { CkanModule newest_version; try diff --git a/Core/Registry/Registry.cs b/Core/Registry/Registry.cs index 177544dd2d..d879c9d1e4 100644 --- a/Core/Registry/Registry.cs +++ b/Core/Registry/Registry.cs @@ -403,7 +403,7 @@ public void RemoveAvailable(CkanModule module) /// /// /// - public List Available(KspVersion ksp_version) + public List Available(KspVersionCriteria ksp_version) { var candidates = new List(available_modules.Keys); var compatible = new List(); @@ -461,7 +461,7 @@ public List Available(KspVersion ksp_version) /// /// /// - public List Incompatible(KspVersion ksp_version) + public List Incompatible(KspVersionCriteria ksp_version) { var candidates = new List(available_modules.Keys); var incompatible = new List(); @@ -492,7 +492,7 @@ public List Incompatible(KspVersion ksp_version) // be calling LatestAvailableWithProvides() public CkanModule LatestAvailable( string module, - KspVersion ksp_version, + KspVersionCriteria ksp_version, RelationshipDescriptor relationship_descriptor =null) { log.DebugFormat("Finding latest available for {0}", module); @@ -514,7 +514,7 @@ public CkanModule LatestAvailable( /// /// /// - public List LatestAvailableWithProvides(string module, KspVersion ksp_version, RelationshipDescriptor relationship_descriptor = null) + public List LatestAvailableWithProvides(string module, KspVersionCriteria ksp_version, RelationshipDescriptor relationship_descriptor = null) { // This public interface calculates a cache of modules which // are compatible with the current version of KSP, and then @@ -530,7 +530,7 @@ public List LatestAvailableWithProvides(string module, KspVersion ks /// the `available_for_current_version` list has been correctly /// calculated. Not for direct public consumption. ;) /// - private List LatestAvailableWithProvides(string module, KspVersion ksp_version, + private List LatestAvailableWithProvides(string module, KspVersionCriteria ksp_version, IEnumerable available_for_current_version, RelationshipDescriptor relationship_descriptor=null) { log.DebugFormat("Finding latest available with provides for {0}", module); diff --git a/Core/Relationships/RelationshipResolver.cs b/Core/Relationships/RelationshipResolver.cs index f9d621fbbd..503d91a8a6 100644 --- a/Core/Relationships/RelationshipResolver.cs +++ b/Core/Relationships/RelationshipResolver.cs @@ -89,7 +89,7 @@ public class RelationshipResolver new Dictionary(new NameComparer()); private readonly IRegistryQuerier registry; - private readonly KspVersion kspversion; + private readonly KspVersionCriteria kspversion; private readonly RelationshipResolverOptions options; private readonly HashSet installed_modules; @@ -99,7 +99,7 @@ public class RelationshipResolver /// /// The registry to use /// The version of the install that the registry corresponds to - public RelationshipResolver(RelationshipResolverOptions options, IRegistryQuerier registry, KspVersion kspversion) + public RelationshipResolver(RelationshipResolverOptions options, IRegistryQuerier registry, KspVersionCriteria kspversion) { this.registry = registry; this.kspversion = kspversion; @@ -121,7 +121,7 @@ public RelationshipResolver(RelationshipResolverOptions options, IRegistryQuerie /// /// public RelationshipResolver(IEnumerable module_names, RelationshipResolverOptions options, IRegistryQuerier registry, - KspVersion kspversion) : + KspVersionCriteria kspversion) : this(module_names.Select(name => CkanModule.FromIDandVersion(registry, name, kspversion)).ToList(), options, registry, @@ -134,7 +134,7 @@ public RelationshipResolver(IEnumerable module_names, RelationshipResolv /// Creates a new resolver that will find a way to install all the modules specified. /// public RelationshipResolver(IEnumerable modules, RelationshipResolverOptions options, IRegistryQuerier registry, - KspVersion kspversion):this(options,registry,kspversion) + KspVersionCriteria kspversion):this(options,registry,kspversion) { AddModulesToInstall(modules); } diff --git a/Core/Types/CkanModule.cs b/Core/Types/CkanModule.cs index 2a0af64009..3a333d9be5 100644 --- a/Core/Types/CkanModule.cs +++ b/Core/Types/CkanModule.cs @@ -416,7 +416,7 @@ private static bool validate_json_against_schema(string json) /// Tries to parse an identifier in the format Modname=version /// If the module cannot be found in the registry, throws a ModuleNotFoundKraken. /// - public static CkanModule FromIDandVersion(IRegistryQuerier registry, string mod, KspVersion ksp_version) + public static CkanModule FromIDandVersion(IRegistryQuerier registry, string mod, KspVersionCriteria ksp_version) { CkanModule module; @@ -503,15 +503,15 @@ internal static bool UniConflicts(CkanModule mod1, CkanModule mod2) /// /// Returns true if our mod is compatible with the KSP version specified. /// - public bool IsCompatibleKSP(string version) - { - return IsCompatibleKSP(KspVersion.Parse(version)); - } + //public bool IsCompatibleKSP(string version) + //{ + // return IsCompatibleKSP(KspVersion.Parse(version)); + //} /// /// Returns true if our mod is compatible with the KSP version specified. /// - public bool IsCompatibleKSP(KspVersion version) + public bool IsCompatibleKSP(KspVersionCriteria version) { log.DebugFormat("Testing if {0} is compatible with KSP {1}", this, version); diff --git a/Core/Types/GameComparator/BaseGameComparator.cs b/Core/Types/GameComparator/BaseGameComparator.cs new file mode 100644 index 0000000000..8b4d405664 --- /dev/null +++ b/Core/Types/GameComparator/BaseGameComparator.cs @@ -0,0 +1,23 @@ +using CKAN.Versioning; + +namespace CKAN +{ + public abstract class BaseGameComparator: IGameComparator + { + public BaseGameComparator () + { + } + + public virtual bool Compatible (KspVersionCriteria gameVersionCriteria, CkanModule module) + { + foreach (KspVersion gameVersion in gameVersionCriteria.Versions) { + if (SingleVersionsCompatible (gameVersion, module)) { + return true; + } + } + return false; + } + + public abstract bool SingleVersionsCompatible (KspVersion gameVersionCriteria, CkanModule module); + } +} diff --git a/Core/Types/GameComparator/GrasGameComparator.cs b/Core/Types/GameComparator/GrasGameComparator.cs index bfb2518655..f73275eca2 100644 --- a/Core/Types/GameComparator/GrasGameComparator.cs +++ b/Core/Types/GameComparator/GrasGameComparator.cs @@ -7,15 +7,15 @@ namespace CKAN /// with extra understanding of which KSP versions are "safe" (ie: 1.0.5 mostly works with 1.0.4 mods). /// If the mod has `ksp_version_strict` set then this is identical to strict checking. /// - public class GrasGameComparator : IGameComparator + public class GrasGameComparator : BaseGameComparator { - static readonly StrictGameComparator strict = new StrictGameComparator(); - static readonly KspVersion v103 = KspVersion.Parse("1.0.3"); + static readonly StrictGameComparator strict = new StrictGameComparator (); + static readonly KspVersion v103 = KspVersion.Parse ("1.0.3"); - public bool Compatible(KspVersion gameVersion, CkanModule module) + public override bool Compatible (KspVersionCriteria gameVersionCriteria, CkanModule module) { // If it's strictly compatible, then it's compatible. - if (strict.Compatible(gameVersion, module)) + if (strict.Compatible (gameVersionCriteria, module)) return true; // If we're in strict mode, and it's not strictly compatible, then it's @@ -23,12 +23,17 @@ public bool Compatible(KspVersion gameVersion, CkanModule module) if (module.ksp_version_strict) return false; + return base.Compatible (gameVersionCriteria, module); + } + + public override bool SingleVersionsCompatible (KspVersion gameVersion, CkanModule module){ + // Otherwise, check if it's "generally recognise as safe". // If we're running KSP 1.0.4, then allow the mod to run if we would have // considered it compatible under 1.0.3 (as 1.0.4 was "just a hotfix"). - if (gameVersion.Equals(KspVersion.Parse("1.0.4"))) - return strict.Compatible(v103, module); + if (gameVersion.Equals (KspVersion.Parse ("1.0.4"))) + return strict.SingleVersionsCompatible (v103, module); return false; } diff --git a/Core/Types/GameComparator/IGameComparator.cs b/Core/Types/GameComparator/IGameComparator.cs index 79e660b71f..c8ca2cfb1c 100644 --- a/Core/Types/GameComparator/IGameComparator.cs +++ b/Core/Types/GameComparator/IGameComparator.cs @@ -11,7 +11,7 @@ public interface IGameComparator /// Returns true if the given module is compatible with the supplied /// gameVersion, false otherwise. /// - bool Compatible(KspVersion gameVersion, CkanModule module); + bool Compatible(KspVersionCriteria gameVersion, CkanModule module); } } diff --git a/Core/Types/GameComparator/StrictGameComparator.cs b/Core/Types/GameComparator/StrictGameComparator.cs index 0049d8195f..e676941b41 100644 --- a/Core/Types/GameComparator/StrictGameComparator.cs +++ b/Core/Types/GameComparator/StrictGameComparator.cs @@ -6,9 +6,9 @@ namespace CKAN /// Test to see if a module is compatible with the user's installed game, /// using strict tests. /// - public class StrictGameComparator : IGameComparator + public class StrictGameComparator : BaseGameComparator { - public bool Compatible(KspVersion gameVersion, CkanModule module) + public override bool SingleVersionsCompatible(KspVersion gameVersion, CkanModule module) { var gameVersionRange = gameVersion.ToVersionRange(); diff --git a/Core/Types/GameComparator/YoyoGameComparator.cs b/Core/Types/GameComparator/YoyoGameComparator.cs index 8824cd43fb..77d18d8280 100644 --- a/Core/Types/GameComparator/YoyoGameComparator.cs +++ b/Core/Types/GameComparator/YoyoGameComparator.cs @@ -8,7 +8,7 @@ namespace CKAN /// public class YoyoGameComparator : IGameComparator { - public bool Compatible(KspVersion gameVersion, CkanModule module) + public bool Compatible(KspVersionCriteria gameVersion, CkanModule module) { return true; } diff --git a/Core/Versioning/KspVersionCriteria.cs b/Core/Versioning/KspVersionCriteria.cs new file mode 100644 index 0000000000..baa5daaaf0 --- /dev/null +++ b/Core/Versioning/KspVersionCriteria.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; + +namespace CKAN.Versioning +{ + public class KspVersionCriteria + { + private List versions = new List (); + + public KspVersionCriteria (KspVersion v) + { + this.versions.Add (v); + } + + public override int GetHashCode () + { + return base.GetHashCode (); + } + + public List Versions { + get { + return versions; + + } + } + } +} diff --git a/GUI/CKAN-GUI.csproj b/GUI/CKAN-GUI.csproj index bf181777dd..e3f91b4d07 100644 --- a/GUI/CKAN-GUI.csproj +++ b/GUI/CKAN-GUI.csproj @@ -60,12 +60,6 @@ - - Form - - - AboutDialog.cs - Form @@ -240,6 +234,12 @@ Component + + Form + + + AboutDialog.cs + diff --git a/GUI/ChooseKSPInstance.Designer.cs b/GUI/ChooseKSPInstance.Designer.cs index ecb92b6740..7189d5e19c 100644 --- a/GUI/ChooseKSPInstance.Designer.cs +++ b/GUI/ChooseKSPInstance.Designer.cs @@ -42,6 +42,7 @@ private void InitializeComponent() this.RenameButton = new System.Windows.Forms.Button(); this.SetAsDefaultCheckbox = new System.Windows.Forms.CheckBox(); this.ForgetButton = new System.Windows.Forms.Button(); + this.InstallSettingsButton = new System.Windows.Forms.Button (); this.SuspendLayout(); // // KSPInstancesListView @@ -143,12 +144,25 @@ private void InitializeComponent() this.ForgetButton.UseVisualStyleBackColor = true; this.ForgetButton.Click += new System.EventHandler(this.Forget_Click); // + // InstallSettings + // + this.InstallSettingsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.InstallSettingsButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.InstallSettingsButton.Location = new System.Drawing.Point (75, 320); + this.InstallSettingsButton.Name = "InstallSettingsButton"; + this.InstallSettingsButton.Size = new System.Drawing.Size (75, 23); + this.InstallSettingsButton.TabIndex = 6; + this.InstallSettingsButton.Text = "Settings"; + this.InstallSettingsButton.UseVisualStyleBackColor = true; + this.InstallSettingsButton.Click += new System.EventHandler (this.InstallSettingsButton_Click); + // // ChooseKSPInstance // this.AcceptButton = this.SelectButton; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(486, 355); + this.Controls.Add (this.InstallSettingsButton); this.Controls.Add(this.ForgetButton); this.Controls.Add(this.SetAsDefaultCheckbox); this.Controls.Add(this.RenameButton); @@ -174,5 +188,6 @@ private void InitializeComponent() private System.Windows.Forms.Button RenameButton; private System.Windows.Forms.CheckBox SetAsDefaultCheckbox; private System.Windows.Forms.Button ForgetButton; + private System.Windows.Forms.Button InstallSettingsButton; } } \ No newline at end of file diff --git a/GUI/ChooseKSPInstance.cs b/GUI/ChooseKSPInstance.cs index a0095ae867..663b76a309 100644 --- a/GUI/ChooseKSPInstance.cs +++ b/GUI/ChooseKSPInstance.cs @@ -121,9 +121,13 @@ private void Forget_Click(object sender, EventArgs e) } + private void InstallSettingsButton_Click (object sender, EventArgs e){ + + } + private void SetButtonsEnabled(bool has_instance) { - ForgetButton.Enabled = RenameButton.Enabled = SelectButton.Enabled = SetAsDefaultCheckbox.Enabled = has_instance; + ForgetButton.Enabled = RenameButton.Enabled = SelectButton.Enabled = SetAsDefaultCheckbox.Enabled = InstallSettingsButton.Enabled = has_instance; } } diff --git a/GUI/GUIMod.cs b/GUI/GUIMod.cs index 2ca1cfbe85..e7ae4ea8db 100644 --- a/GUI/GUIMod.cs +++ b/GUI/GUIMod.cs @@ -47,7 +47,7 @@ public string Version get { return IsInstalled ? InstalledVersion : LatestVersion; } } - public GUIMod(CkanModule mod, IRegistryQuerier registry, KspVersion current_ksp_version) + public GUIMod(CkanModule mod, IRegistryQuerier registry, KspVersionCriteria current_ksp_version) { IsCKAN = mod is CkanModule; //Currently anything which could alter these causes a full reload of the modlist diff --git a/GUI/Main.cs b/GUI/Main.cs index 415af46b4f..53d3d0c789 100644 --- a/GUI/Main.cs +++ b/GUI/Main.cs @@ -753,13 +753,13 @@ private async Task UpdateChangeSetAndConflicts(IRegistryQuerier registry) var module_installer = ModuleInstaller.GetInstance(CurrentInstance, GUI.user); full_change_set = await mainModList.ComputeChangeSetFromModList(registry, user_change_set, module_installer, - CurrentInstance.Version()); + CurrentInstance.VersionCriteria()); } catch (InconsistentKraken) { //Need to be recomputed due to ComputeChangeSetFromModList possibly changing it with too many provides handling. user_change_set = mainModList.ComputeUserChangeSet(); - new_conflicts = MainModList.ComputeConflictsFromModList(registry, user_change_set, CurrentInstance.Version()); + new_conflicts = MainModList.ComputeConflictsFromModList(registry, user_change_set, CurrentInstance.VersionCriteria()); full_change_set = null; } catch (TooManyModsProvideKraken) @@ -971,7 +971,7 @@ private void installFromckanToolStripMenuItem_Click(object sender, EventArgs e) var changeset = new List(); changeset.Add(new ModChange( - new GUIMod(module,registry_manager.registry,CurrentInstance.Version()), + new GUIMod(module,registry_manager.registry,CurrentInstance.VersionCriteria()), GUIModChangeType.Install, null)); menuStrip1.Enabled = false; diff --git a/GUI/MainInstall.cs b/GUI/MainInstall.cs index 37f88a382c..e69251502d 100644 --- a/GUI/MainInstall.cs +++ b/GUI/MainInstall.cs @@ -158,7 +158,7 @@ private void AddMod(IEnumerable relations, Dictionary GetShowableMods(Dictionary { pair.Key }, opts, - RegistryManager.Instance(manager.CurrentInstance).registry, CurrentInstance.Version()); + RegistryManager.Instance(manager.CurrentInstance).registry, CurrentInstance.VersionCriteria()); if (!resolver.ModList().Any()) { continue; } module = RegistryManager.Instance(manager.CurrentInstance) - .registry.LatestAvailable(pair.Key, CurrentInstance.Version()); + .registry.LatestAvailable(pair.Key, CurrentInstance.VersionCriteria()); } catch { diff --git a/GUI/MainModInfo.cs b/GUI/MainModInfo.cs index 37d54e1dc4..b507fb9cc6 100644 --- a/GUI/MainModInfo.cs +++ b/GUI/MainModInfo.cs @@ -111,13 +111,13 @@ private TreeNode UpdateModDependencyGraphRecursively(TreeNode parentNode, CkanMo try { var dependencyModule = registry.LatestAvailable - (dependency.name, manager.CurrentInstance.Version()); + (dependency.name, manager.CurrentInstance.VersionCriteria()); UpdateModDependencyGraphRecursively(node, dependencyModule, relationship, depth + 1); } catch (ModuleNotFoundKraken) { List dependencyModules = registry.LatestAvailableWithProvides - (dependency.name, manager.CurrentInstance.Version()); + (dependency.name, manager.CurrentInstance.VersionCriteria()); if (dependencyModules == null) { diff --git a/GUI/MainModList.cs b/GUI/MainModList.cs index c17b3f1f1f..bf0f535cd0 100644 --- a/GUI/MainModList.cs +++ b/GUI/MainModList.cs @@ -147,14 +147,14 @@ private void _UpdateModsList(bool repo_updated) { log.Debug("Updating the mod list"); - KspVersion version = CurrentInstance.Version(); + KspVersionCriteria versionCriteria = CurrentInstance.VersionCriteria(); IRegistryQuerier registry = RegistryManager.Instance(CurrentInstance).registry; - var gui_mods = new HashSet(registry.Available(version) - .Select(m => new GUIMod(m, registry, version))); - gui_mods.UnionWith(registry.Incompatible(version) - .Select(m => new GUIMod(m, registry, version))); + var gui_mods = new HashSet(registry.Available(versionCriteria) + .Select(m => new GUIMod(m, registry, versionCriteria))); + gui_mods.UnionWith(registry.Incompatible(versionCriteria) + .Select(m => new GUIMod(m, registry, versionCriteria))); var installed = registry.InstalledModules - .Select(m => new GUIMod(m.Module, registry, version)); + .Select(m => new GUIMod(m.Module, registry, versionCriteria)); //Hashset does not define if add/unionwith replaces existing elements. //In this case that could cause a CkanModule to be replaced by a Module. @@ -364,7 +364,7 @@ public string ModDescriptionFilter /// The version of the current KSP install public async Task> ComputeChangeSetFromModList( IRegistryQuerier registry, HashSet changeSet, ModuleInstaller installer, - KspVersion version) + KspVersionCriteria version) { var modules_to_install = new HashSet(); var modules_to_remove = new HashSet(); @@ -610,7 +610,7 @@ private bool IsModInFilter(GUIMod m) public static Dictionary ComputeConflictsFromModList(IRegistryQuerier registry, - IEnumerable change_set, KspVersion ksp_version) + IEnumerable change_set, KspVersionCriteria ksp_version) { var modules_to_install = new HashSet(); var modules_to_remove = new HashSet(); diff --git a/Tests/Core/ModuleInstaller.cs b/Tests/Core/ModuleInstaller.cs index 498bd4de51..52cbe85244 100644 --- a/Tests/Core/ModuleInstaller.cs +++ b/Tests/Core/ModuleInstaller.cs @@ -407,11 +407,11 @@ public void CanInstallMod() // Mark it as available in the registry. var registry = CKAN.RegistryManager.Instance(ksp.KSP).registry; - Assert.AreEqual(0, registry.Available(ksp.KSP.Version()).Count()); + Assert.AreEqual(0, registry.Available(ksp.KSP.VersionCriteria()).Count()); registry.AddAvailable(TestData.DogeCoinFlag_101_module()); - Assert.AreEqual(1, registry.Available(ksp.KSP.Version()).Count()); + Assert.AreEqual(1, registry.Available(ksp.KSP.VersionCriteria()).Count()); // Attempt to install it. List modules = new List {TestData.DogeCoinFlag_101_module().identifier}; diff --git a/Tests/Core/Net/Repo.cs b/Tests/Core/Net/Repo.cs index c349cef188..bd583edcc2 100644 --- a/Tests/Core/Net/Repo.cs +++ b/Tests/Core/Net/Repo.cs @@ -33,7 +33,7 @@ public void UpdateRegistryTarGz() CKAN.Repo.UpdateRegistry(TestData.TestKANTarGz(), registry, ksp.KSP, new NullUser()); // Test we've got an expected module. - CkanModule far = registry.LatestAvailable("FerramAerospaceResearch", KspVersion.Parse("0.25.0")); + CkanModule far = registry.LatestAvailable("FerramAerospaceResearch", new KspVersionCriteria(KspVersion.Parse("0.25.0"))); Assert.AreEqual("v0.14.3.2", far.version.ToString()); } @@ -44,7 +44,7 @@ public void UpdateRegistryZip() CKAN.Repo.UpdateRegistry(TestData.TestKANZip(), registry, ksp.KSP, new NullUser()); // Test we've got an expected module. - CkanModule far = registry.LatestAvailable("FerramAerospaceResearch", KspVersion.Parse("0.25.0")); + CkanModule far = registry.LatestAvailable("FerramAerospaceResearch", new KspVersionCriteria (KspVersion.Parse("0.25.0"))); Assert.AreEqual("v0.14.3.2", far.version.ToString()); } diff --git a/Tests/Core/Registry/Registry.cs b/Tests/Core/Registry/Registry.cs index 68a5e02e83..ab67197392 100644 --- a/Tests/Core/Registry/Registry.cs +++ b/Tests/Core/Registry/Registry.cs @@ -11,8 +11,8 @@ public class Registry { private static readonly CkanModule module = TestData.kOS_014_module(); private static readonly string identifier = module.identifier; - private static readonly KspVersion v0_24_2 = KspVersion.Parse("0.24.2"); - private static readonly KspVersion v0_25_0 = KspVersion.Parse("0.25.0"); + private static readonly KspVersionCriteria v0_24_2 = new KspVersionCriteria(KspVersion.Parse("0.24.2")); + private static readonly KspVersionCriteria v0_25_0 = new KspVersionCriteria (KspVersion.Parse("0.25.0")); private CKAN.Registry registry; diff --git a/Tests/Core/Registry/RegistryLive.cs b/Tests/Core/Registry/RegistryLive.cs index 233f964f28..683573a272 100644 --- a/Tests/Core/Registry/RegistryLive.cs +++ b/Tests/Core/Registry/RegistryLive.cs @@ -1,4 +1,5 @@ using CKAN; +using CKAN.Versioning; using NUnit.Framework; using Tests.Data; @@ -36,7 +37,7 @@ public void TearDown() public void LatestAvailable() { CkanModule module = - registry.LatestAvailable("AGExt", temp_ksp.KSP.Version()); + registry.LatestAvailable("AGExt", new KspVersionCriteria (temp_ksp.KSP.Version())); Assert.AreEqual("AGExt", module.identifier); Assert.AreEqual("1.24a", module.version.ToString()); diff --git a/Tests/Core/Relationships/RelationshipResolver.cs b/Tests/Core/Relationships/RelationshipResolver.cs index 4db2578198..0b94809b7f 100644 --- a/Tests/Core/Relationships/RelationshipResolver.cs +++ b/Tests/Core/Relationships/RelationshipResolver.cs @@ -806,7 +806,7 @@ public void AutodetectedCanSatisfyRelationships() new CKAN.CkanModule[] { mod }, RelationshipResolver.DefaultOpts(), registry, - KspVersion.Parse("1.0.0") + new KspVersionCriteria (KspVersion.Parse("1.0.0")) ); } } diff --git a/Tests/Core/Types/GameComparator.cs b/Tests/Core/Types/GameComparator.cs index aa953e4734..cf579e3af3 100644 --- a/Tests/Core/Types/GameComparator.cs +++ b/Tests/Core/Types/GameComparator.cs @@ -32,7 +32,7 @@ public void TotallyCompatible(Type type, bool expected) = KspVersion.Parse("1.0.4"); // Now test! - Assert.AreEqual(expected, comparator.Compatible(gameVersion, gameMod)); + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria (gameVersion), gameMod)); } [Test] @@ -48,7 +48,7 @@ public void GenerallySafeLax(Type type, bool expected) = KspVersion.Parse("1.0.3"); // Now test! - Assert.AreEqual(expected, comparator.Compatible(gameVersion, gameMod)); + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria (gameVersion), gameMod)); } [Test] @@ -66,7 +66,7 @@ public void GenerallySafeStrict(Type type, bool expected) gameMod.ksp_version_strict = true; // Now test! - Assert.AreEqual(expected, comparator.Compatible(gameVersion, gameMod)); + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria (gameVersion), gameMod)); } [Test] @@ -78,7 +78,7 @@ public void Incompatible(Type type, bool expected) var comparator = (CKAN.IGameComparator) Activator.CreateInstance(type); // The mod already starts off being incompatible, so just do the test. :) - Assert.AreEqual(expected, comparator.Compatible(gameVersion, gameMod)); + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria (gameVersion), gameMod)); } } } diff --git a/Tests/Core/Types/Module.cs b/Tests/Core/Types/Module.cs index 7a5aae53e5..3c656d875c 100644 --- a/Tests/Core/Types/Module.cs +++ b/Tests/Core/Types/Module.cs @@ -1,5 +1,6 @@ using System.Linq; using CKAN; +using CKAN.Versioning; using NUnit.Framework; using Tests.Data; using Newtonsoft.Json; @@ -15,7 +16,7 @@ public void CompatibleWith() { CkanModule module = CkanModule.FromJson(TestData.kOS_014()); - Assert.IsTrue(module.IsCompatibleKSP("0.24.2")); + Assert.IsTrue(module.IsCompatibleKSP(new KspVersionCriteria (KspVersion.Parse("0.24.2")))); } [Test] diff --git a/Tests/GUI/GH1866.cs b/Tests/GUI/GH1866.cs index b8bbb8ab61..684dd2a791 100644 --- a/Tests/GUI/GH1866.cs +++ b/Tests/GUI/GH1866.cs @@ -107,7 +107,7 @@ public void Sanity() public void TestSimple() { var modules = _registry.available_modules - .Select((mod) => new GUIMod(mod.Value.Latest(), _registry, _instance.KSP.Version())) + .Select((mod) => new GUIMod(mod.Value.Latest(), _registry, _instance.KSP.VersionCriteria())) .ToList(); // varargs method signature means we must call .ToArray() diff --git a/Tests/GUI/GUIMod.cs b/Tests/GUI/GUIMod.cs index 62859e91f8..16aaa9f207 100644 --- a/Tests/GUI/GUIMod.cs +++ b/Tests/GUI/GUIMod.cs @@ -21,7 +21,7 @@ public void NewGuiModsAreNotSelectedForUpgrade() var registry = Registry.Empty(); var ckan_mod = TestData.kOS_014_module(); registry.AddAvailable(ckan_mod); - var mod = new GUIMod(ckan_mod, registry, manager.CurrentInstance.Version()); + var mod = new GUIMod(ckan_mod, registry, manager.CurrentInstance.VersionCriteria()); Assert.False(mod.IsUpgradeChecked); } } @@ -38,7 +38,7 @@ public void HasUpdateReturnsTrueWhenUpdateAvailible() registry.RegisterModule(old_version, Enumerable.Empty(), null); registry.AddAvailable(new_version); - var mod = new GUIMod(old_version, registry, tidy.KSP.Version()); + var mod = new GUIMod(old_version, registry, tidy.KSP.VersionCriteria()); Assert.True(mod.HasUpdate); } } diff --git a/Tests/GUI/MainModList.cs b/Tests/GUI/MainModList.cs index af46aa8b92..9f407a62c1 100644 --- a/Tests/GUI/MainModList.cs +++ b/Tests/GUI/MainModList.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Threading.Tasks; using CKAN; +using CKAN.Versioning; using NUnit.Framework; using Tests.Core; using Tests.Data; @@ -66,14 +67,14 @@ public async Task ComputeChangeSetFromModList_WithConflictingMods_ThrowsInconsis registry.RegisterModule(module, Enumerable.Empty(), tidy.KSP); var mainList = new MainModList(null, null, new GUIUser()); - var mod = new GUIMod(module, registry, tidy.KSP.Version()); - var mod2 = new GUIMod(TestData.kOS_014_module(), registry, tidy.KSP.Version()); + var mod = new GUIMod(module, registry, tidy.KSP.VersionCriteria()); + var mod2 = new GUIMod(TestData.kOS_014_module(), registry, tidy.KSP.VersionCriteria()); var mods = new List() { mod, mod2 }; mainList.ConstructModList(mods, true); mainList.Modules = new ReadOnlyCollection(mods); mod2.IsInstallChecked = true; var computeTask = mainList.ComputeChangeSetFromModList(registry, mainList.ComputeUserChangeSet(), null, - tidy.KSP.Version()); + tidy.KSP.VersionCriteria()); await UtilStatic.Throws(() => computeTask); } @@ -90,7 +91,7 @@ public void IsVisible_WithAllAndNoNameFilter_ReturnsTrueForCompatible() var registry = Registry.Empty(); registry.AddAvailable(ckan_mod); var item = new MainModList(delegate { }, null); - Assert.That(item.IsVisible(new GUIMod(ckan_mod, registry, manager.CurrentInstance.Version()))); + Assert.That(item.IsVisible(new GUIMod(ckan_mod, registry, manager.CurrentInstance.VersionCriteria()))); } } @@ -118,8 +119,8 @@ public void ConstructModList_NumberOfRows_IsEqualToNumberOfMods() var main_mod_list = new MainModList(null, null); var mod_list = main_mod_list.ConstructModList(new List { - new GUIMod(TestData.FireSpitterModule(), registry, manager.CurrentInstance.Version()), - new GUIMod(TestData.kOS_014_module(), registry, manager.CurrentInstance.Version()) + new GUIMod(TestData.FireSpitterModule(), registry, manager.CurrentInstance.VersionCriteria()), + new GUIMod(TestData.kOS_014_module(), registry, manager.CurrentInstance.VersionCriteria()) }); Assert.That(mod_list, Has.Count.EqualTo(2)); } @@ -151,14 +152,14 @@ public async Task TooManyProvidesCallsHandlers() var main_mod_list = new MainModList(null, async kraken => await Task.FromResult(choice_of_provide)); var a = new HashSet { - new ModChange(new GUIMod(mod,registry,ksp_version), GUIModChangeType.Install, null) + new ModChange(new GUIMod(mod,registry,new KspVersionCriteria(ksp_version)), GUIModChangeType.Install, null) }; - var mod_list = await main_mod_list.ComputeChangeSetFromModList(registry, a, installer, ksp_version); + var mod_list = await main_mod_list.ComputeChangeSetFromModList(registry, a, installer, new KspVersionCriteria (ksp_version)); CollectionAssert.AreEquivalent( new[] { - new ModChange(new GUIMod(mod,registry,ksp_version), GUIModChangeType.Install, null), - new ModChange(new GUIMod(modb,registry,ksp_version),GUIModChangeType.Install, null) + new ModChange(new GUIMod(mod,registry,new KspVersionCriteria(ksp_version)), GUIModChangeType.Install, null), + new ModChange(new GUIMod(modb,registry,new KspVersionCriteria(ksp_version)),GUIModChangeType.Install, null) }, mod_list); } From 0fa45cb0ddd8f6652bbbb3583dc650640c646ba4 Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Mon, 12 Dec 2016 00:29:38 +0100 Subject: [PATCH 02/19] User can select compatible KSP versions - list is filtered & updated --- Core/GameVersionProviders/IKspBuildMap.cs | 3 + Core/GameVersionProviders/KspBuildMap.cs | 11 + Core/KSP.cs | 8 +- .../GameComparator/StrictGameComparator.cs | 26 +- Core/Versioning/KspVersionCriteria.cs | 6 + GUI/CKAN-GUI.csproj | 12 +- GUI/ChooseKSPInstance.Designer.cs | 22 +- GUI/ChooseKSPInstance.cs | 8 +- GUI/KspInstanceSettingsDialog.Designer.cs | 245 ++++++++++ GUI/KspInstanceSettingsDialog.cs | 74 +++ GUI/KspInstanceSettingsDialog.resx | 120 +++++ GUI/Main.Designer.cs | 459 ++++++++---------- GUI/Main.cs | 10 + Tests/Core/Types/GameComparator.cs | 192 ++++++++ 14 files changed, 919 insertions(+), 277 deletions(-) create mode 100644 GUI/KspInstanceSettingsDialog.Designer.cs create mode 100644 GUI/KspInstanceSettingsDialog.cs create mode 100644 GUI/KspInstanceSettingsDialog.resx diff --git a/Core/GameVersionProviders/IKspBuildMap.cs b/Core/GameVersionProviders/IKspBuildMap.cs index 549441bee2..4f81651ee4 100644 --- a/Core/GameVersionProviders/IKspBuildMap.cs +++ b/Core/GameVersionProviders/IKspBuildMap.cs @@ -1,4 +1,5 @@ using CKAN.Versioning; +using System.Collections.Generic; namespace CKAN.GameVersionProviders { @@ -6,6 +7,8 @@ public interface IKspBuildMap { KspVersion this[string buildId] { get; } + List getKnownVersions(); + void Refresh(); } } diff --git a/Core/GameVersionProviders/KspBuildMap.cs b/Core/GameVersionProviders/KspBuildMap.cs index b899ad26f3..6abbd8ed94 100644 --- a/Core/GameVersionProviders/KspBuildMap.cs +++ b/Core/GameVersionProviders/KspBuildMap.cs @@ -32,6 +32,17 @@ public KspVersion this[string buildId] } } + public List getKnownVersions() + { + EnsureBuildMap(); + List knownVersions = new List(); + foreach(var version in _jBuilds.Builds) + { + knownVersions.Add(KspVersion.Parse(version.Value)); + } + return knownVersions; + } + public KspBuildMap(IWin32Registry registry) { _registry = registry; diff --git a/Core/KSP.cs b/Core/KSP.cs index 605ba801d9..fdd7418df9 100644 --- a/Core/KSP.cs +++ b/Core/KSP.cs @@ -29,6 +29,7 @@ public class KSP : IDisposable private readonly string gameDir; private KspVersion version; + private List compatibleVersions = new List(); public NetFileCache Cache { get; private set; } @@ -95,6 +96,11 @@ private void Init() log.DebugFormat("Initialised {0}", CkanDir()); } + public void SetCompatibleVersions(List compatibleVersions) + { + this.compatibleVersions = compatibleVersions; + } + #endregion #region Destructors and Disposal @@ -337,7 +343,7 @@ public KspVersion Version() public KspVersionCriteria VersionCriteria () { - return new KspVersionCriteria(version); + return new KspVersionCriteria(version, compatibleVersions); } #endregion diff --git a/Core/Types/GameComparator/StrictGameComparator.cs b/Core/Types/GameComparator/StrictGameComparator.cs index e676941b41..59b0e6fe1d 100644 --- a/Core/Types/GameComparator/StrictGameComparator.cs +++ b/Core/Types/GameComparator/StrictGameComparator.cs @@ -1,4 +1,5 @@ using CKAN.Versioning; +using System; namespace CKAN { @@ -43,16 +44,35 @@ public override bool SingleVersionsCompatible(KspVersion gameVersion, CkanModule else if (module.ksp_version_max != null) { var maxRange = module.ksp_version_max.ToVersionRange(); - - moduleRange = new KspVersionRange(KspVersionBound.Unbounded, maxRange.Upper); + // + //e.g module.ksp_version_max.ToVersionRange() changes 1.0 to [1.0.0.0, 1.1.0.0) so we are + //interested in Lower bound + // + moduleRange = new KspVersionRange(KspVersionBound.Unbounded, maxRange.Lower); } } else { return true; } + + if (!moduleRange.Upper.Value.IsAny && isBoundLower(moduleRange.Upper, gameVersionRange.Lower)) + { + return false; + } - return moduleRange.IsSupersetOf(gameVersionRange); + if (!moduleRange.Lower.Value.IsAny && isBoundLower(gameVersionRange.Upper, moduleRange.Lower)) + { + return false; + } + + return true; + } + + private bool isBoundLower(KspVersionBound val1, KspVersionBound val2) + { + return val1.Value < val2.Value || (val1.Value == val2.Value && !val1.Inclusive); + } } } diff --git a/Core/Versioning/KspVersionCriteria.cs b/Core/Versioning/KspVersionCriteria.cs index baa5daaaf0..8dfe2fb8b1 100644 --- a/Core/Versioning/KspVersionCriteria.cs +++ b/Core/Versioning/KspVersionCriteria.cs @@ -12,6 +12,12 @@ public KspVersionCriteria (KspVersion v) this.versions.Add (v); } + public KspVersionCriteria(KspVersion v, List compatibleVersions) + { + this.versions.Add(v); + this.versions.AddRange(compatibleVersions); + } + public override int GetHashCode () { return base.GetHashCode (); diff --git a/GUI/CKAN-GUI.csproj b/GUI/CKAN-GUI.csproj index e3f91b4d07..598287dc8f 100644 --- a/GUI/CKAN-GUI.csproj +++ b/GUI/CKAN-GUI.csproj @@ -37,6 +37,7 @@ true + packages\ini-parser.2.1.1\lib\INIFileParser.dll @@ -100,6 +101,12 @@ KSPCommandLineOptionsDialog.cs + + Form + + + KspInstanceSettingsDialog.cs + Form @@ -189,6 +196,9 @@ KSPCommandLineOptionsDialog.cs + + KspInstanceSettingsDialog.cs + Main.cs Designer @@ -306,4 +316,4 @@ - + \ No newline at end of file diff --git a/GUI/ChooseKSPInstance.Designer.cs b/GUI/ChooseKSPInstance.Designer.cs index 7189d5e19c..8479e6977d 100644 --- a/GUI/ChooseKSPInstance.Designer.cs +++ b/GUI/ChooseKSPInstance.Designer.cs @@ -62,7 +62,7 @@ private void InitializeComponent() this.KSPInstancesListView.Location = new System.Drawing.Point(12, 13); this.KSPInstancesListView.MultiSelect = false; this.KSPInstancesListView.Name = "KSPInstancesListView"; - this.KSPInstancesListView.Size = new System.Drawing.Size(462, 301); + this.KSPInstancesListView.Size = new System.Drawing.Size(510, 301); this.KSPInstancesListView.TabIndex = 0; this.KSPInstancesListView.UseCompatibleStateImageBehavior = false; this.KSPInstancesListView.View = System.Windows.Forms.View.Details; @@ -90,7 +90,7 @@ private void InitializeComponent() this.SelectButton.DialogResult = System.Windows.Forms.DialogResult.OK; this.SelectButton.Enabled = false; this.SelectButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.SelectButton.Location = new System.Drawing.Point(399, 320); + this.SelectButton.Location = new System.Drawing.Point(447, 320); this.SelectButton.Name = "SelectButton"; this.SelectButton.Size = new System.Drawing.Size(75, 23); this.SelectButton.TabIndex = 1; @@ -102,7 +102,7 @@ private void InitializeComponent() // this.AddNewButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.AddNewButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.AddNewButton.Location = new System.Drawing.Point(318, 320); + this.AddNewButton.Location = new System.Drawing.Point(366, 320); this.AddNewButton.Name = "AddNewButton"; this.AddNewButton.Size = new System.Drawing.Size(75, 23); this.AddNewButton.TabIndex = 2; @@ -114,7 +114,7 @@ private void InitializeComponent() // this.RenameButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.RenameButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RenameButton.Location = new System.Drawing.Point(237, 320); + this.RenameButton.Location = new System.Drawing.Point(285, 320); this.RenameButton.Name = "RenameButton"; this.RenameButton.Size = new System.Drawing.Size(75, 23); this.RenameButton.TabIndex = 3; @@ -136,7 +136,7 @@ private void InitializeComponent() // this.ForgetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.ForgetButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.ForgetButton.Location = new System.Drawing.Point(156, 320); + this.ForgetButton.Location = new System.Drawing.Point(204, 320); this.ForgetButton.Name = "ForgetButton"; this.ForgetButton.Size = new System.Drawing.Size(75, 23); this.ForgetButton.TabIndex = 5; @@ -144,25 +144,25 @@ private void InitializeComponent() this.ForgetButton.UseVisualStyleBackColor = true; this.ForgetButton.Click += new System.EventHandler(this.Forget_Click); // - // InstallSettings + // InstallSettingsButton // this.InstallSettingsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.InstallSettingsButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.InstallSettingsButton.Location = new System.Drawing.Point (75, 320); + this.InstallSettingsButton.Location = new System.Drawing.Point(123, 320); this.InstallSettingsButton.Name = "InstallSettingsButton"; - this.InstallSettingsButton.Size = new System.Drawing.Size (75, 23); + this.InstallSettingsButton.Size = new System.Drawing.Size(75, 23); this.InstallSettingsButton.TabIndex = 6; this.InstallSettingsButton.Text = "Settings"; this.InstallSettingsButton.UseVisualStyleBackColor = true; - this.InstallSettingsButton.Click += new System.EventHandler (this.InstallSettingsButton_Click); + this.InstallSettingsButton.Click += new System.EventHandler(this.InstallSettingsButton_Click); // // ChooseKSPInstance // this.AcceptButton = this.SelectButton; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(486, 355); - this.Controls.Add (this.InstallSettingsButton); + this.ClientSize = new System.Drawing.Size(534, 355); + this.Controls.Add(this.InstallSettingsButton); this.Controls.Add(this.ForgetButton); this.Controls.Add(this.SetAsDefaultCheckbox); this.Controls.Add(this.RenameButton); diff --git a/GUI/ChooseKSPInstance.cs b/GUI/ChooseKSPInstance.cs index 663b76a309..3aa94bfe2a 100644 --- a/GUI/ChooseKSPInstance.cs +++ b/GUI/ChooseKSPInstance.cs @@ -121,14 +121,16 @@ private void Forget_Click(object sender, EventArgs e) } - private void InstallSettingsButton_Click (object sender, EventArgs e){ - + private void InstallSettingsButton_Click (object sender, EventArgs e) + { + var instanceName = (string)KSPInstancesListView.SelectedItems[0].Tag; + var instanceSettingsDialog = new KspInstanceSettingsDialog(manager.Instances[instanceName]); + instanceSettingsDialog.ShowDialog(); } private void SetButtonsEnabled(bool has_instance) { ForgetButton.Enabled = RenameButton.Enabled = SelectButton.Enabled = SetAsDefaultCheckbox.Enabled = InstallSettingsButton.Enabled = has_instance; } - } } diff --git a/GUI/KspInstanceSettingsDialog.Designer.cs b/GUI/KspInstanceSettingsDialog.Designer.cs new file mode 100644 index 0000000000..d905a48a2c --- /dev/null +++ b/GUI/KspInstanceSettingsDialog.Designer.cs @@ -0,0 +1,245 @@ +namespace CKAN +{ + partial class KspInstanceSettingsDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.gameVersionLabel = new System.Windows.Forms.Label(); + this.selectedVersionsCheckedListBox = new System.Windows.Forms.CheckedListBox(); + this.clearSelectionButton = new System.Windows.Forms.Button(); + this.addVersionToListButton = new System.Windows.Forms.Button(); + this.label5 = new System.Windows.Forms.Label(); + this.addVersionToListTextBox = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.saveButton = new System.Windows.Forms.Button(); + this.label8 = new System.Windows.Forms.Label(); + this.gameLocationLabel = new System.Windows.Forms.Label(); + this.cancelButton = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.Location = new System.Drawing.Point(12, 45); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(413, 35); + this.label1.TabIndex = 0; + this.label1.Text = "Assume that mods compatible with following KSP versions are also compatible with " + + "this installation:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(12, 27); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(75, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Game version:"; + // + // label3 + // + this.label3.ForeColor = System.Drawing.Color.Red; + this.label3.Location = new System.Drawing.Point(12, 80); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(401, 32); + this.label3.TabIndex = 2; + this.label3.Text = "Warning! There is no way to check if mod is trully compatible with versions selec" + + "ted here! Please act carefully."; + // + // gameVersionLabel + // + this.gameVersionLabel.AutoSize = true; + this.gameVersionLabel.Location = new System.Drawing.Point(92, 27); + this.gameVersionLabel.Name = "gameVersionLabel"; + this.gameVersionLabel.Size = new System.Drawing.Size(53, 13); + this.gameVersionLabel.TabIndex = 3; + this.gameVersionLabel.Text = ""; + // + // selectedVersionsCheckedListBox + // + this.selectedVersionsCheckedListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.selectedVersionsCheckedListBox.FormattingEnabled = true; + this.selectedVersionsCheckedListBox.Location = new System.Drawing.Point(18, 115); + this.selectedVersionsCheckedListBox.Name = "selectedVersionsCheckedListBox"; + this.selectedVersionsCheckedListBox.Size = new System.Drawing.Size(406, 124); + this.selectedVersionsCheckedListBox.TabIndex = 4; + // + // clearSelectionButton + // + this.clearSelectionButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.clearSelectionButton.Location = new System.Drawing.Point(18, 247); + this.clearSelectionButton.Name = "clearSelectionButton"; + this.clearSelectionButton.Size = new System.Drawing.Size(92, 23); + this.clearSelectionButton.TabIndex = 5; + this.clearSelectionButton.Text = "Clear selection"; + this.clearSelectionButton.UseVisualStyleBackColor = true; + this.clearSelectionButton.Click += new System.EventHandler(this.clearSelectionButton_Click); + // + // addVersionToListButton + // + this.addVersionToListButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.addVersionToListButton.Location = new System.Drawing.Point(349, 245); + this.addVersionToListButton.Name = "addVersionToListButton"; + this.addVersionToListButton.Size = new System.Drawing.Size(75, 23); + this.addVersionToListButton.TabIndex = 6; + this.addVersionToListButton.Text = "Add"; + this.addVersionToListButton.UseVisualStyleBackColor = true; + this.addVersionToListButton.Click += new System.EventHandler(this.addVersionToListButton_Click); + // + // label5 + // + this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(112, 252); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(93, 13); + this.label5.TabIndex = 7; + this.label5.Text = "Add version to list:"; + // + // addVersionToListTextBox + // + this.addVersionToListTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.addVersionToListTextBox.Location = new System.Drawing.Point(212, 247); + this.addVersionToListTextBox.Name = "addVersionToListTextBox"; + this.addVersionToListTextBox.Size = new System.Drawing.Size(131, 20); + this.addVersionToListTextBox.TabIndex = 8; + // + // label6 + // + this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label6.Location = new System.Drawing.Point(15, 276); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(422, 32); + this.label6.TabIndex = 9; + this.label6.Text = "Note: if you add version like \"1.2\" you will force all mods compatible with 1.2.x" + + "x (1.2.0, 1.2.1, etc) to be compatible with this KSP installation"; + // + // label7 + // + this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(15, 309); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(382, 13); + this.label7.TabIndex = 10; + this.label7.Text = "If KSP is updated this dialog will be shown again so you can adjust your settings" + + ""; + // + // saveButton + // + this.saveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.saveButton.Location = new System.Drawing.Point(362, 331); + this.saveButton.Name = "saveButton"; + this.saveButton.Size = new System.Drawing.Size(75, 23); + this.saveButton.TabIndex = 11; + this.saveButton.Text = "Save"; + this.saveButton.UseVisualStyleBackColor = true; + this.saveButton.Click += new System.EventHandler(this.saveButton_Click); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(12, 11); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(60, 13); + this.label8.TabIndex = 12; + this.label8.Text = "Installation:"; + // + // gameLocationLabel + // + this.gameLocationLabel.AutoSize = true; + this.gameLocationLabel.Location = new System.Drawing.Point(69, 11); + this.gameLocationLabel.Name = "gameLocationLabel"; + this.gameLocationLabel.Size = new System.Drawing.Size(56, 13); + this.gameLocationLabel.TabIndex = 13; + this.gameLocationLabel.Text = ""; + // + // cancelButton + // + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelButton.Location = new System.Drawing.Point(281, 331); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(75, 23); + this.cancelButton.TabIndex = 14; + this.cancelButton.Text = "Cancel"; + this.cancelButton.UseVisualStyleBackColor = true; + this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + // + // KspInstanceSettingsDialog + // + this.AcceptButton = this.saveButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.cancelButton; + this.ClientSize = new System.Drawing.Size(443, 364); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.gameLocationLabel); + this.Controls.Add(this.label8); + this.Controls.Add(this.saveButton); + this.Controls.Add(this.label7); + this.Controls.Add(this.label6); + this.Controls.Add(this.addVersionToListTextBox); + this.Controls.Add(this.label5); + this.Controls.Add(this.addVersionToListButton); + this.Controls.Add(this.clearSelectionButton); + this.Controls.Add(this.selectedVersionsCheckedListBox); + this.Controls.Add(this.gameVersionLabel); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.MaximizeBox = false; + this.Name = "KspInstanceSettingsDialog"; + this.Text = "Ksp Instance Settings"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label gameVersionLabel; + private System.Windows.Forms.CheckedListBox selectedVersionsCheckedListBox; + private System.Windows.Forms.Button clearSelectionButton; + private System.Windows.Forms.Button addVersionToListButton; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox addVersionToListTextBox; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Button saveButton; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label gameLocationLabel; + private System.Windows.Forms.Button cancelButton; + } +} \ No newline at end of file diff --git a/GUI/KspInstanceSettingsDialog.cs b/GUI/KspInstanceSettingsDialog.cs new file mode 100644 index 0000000000..c52fea0e4c --- /dev/null +++ b/GUI/KspInstanceSettingsDialog.cs @@ -0,0 +1,74 @@ +using CKAN.GameVersionProviders; +using System.Windows.Forms; +using System.Collections.Generic; +using Autofac; +using CKAN.Versioning; +using System; + +namespace CKAN +{ + public partial class KspInstanceSettingsDialog : Form + { + private KSP ksp; + + public KspInstanceSettingsDialog(KSP ksp) + { + this.ksp = ksp; + InitializeComponent(); + + gameVersionLabel.Text = ksp.Version().ToString(); + gameLocationLabel.Text = ksp.GameDir(); + var knownVersions = ServiceLocator.Container.Resolve().getKnownVersions(); + knownVersions.Reverse(); + foreach (var version in knownVersions) + { + if (!version.Equals(ksp.Version())) + { + selectedVersionsCheckedListBox.Items.Add(version, false); + } + } + } + + private void addVersionToListButton_Click(object sender, System.EventArgs e) + { + if(addVersionToListTextBox.Text.Length == 0) + { + return; + } + try + { + var version = KspVersion.Parse(addVersionToListTextBox.Text); + selectedVersionsCheckedListBox.Items.Insert(0, version); + } + catch(FormatException ex) + { + MessageBox.Show("Version has invalid format", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void clearSelectionButton_Click(object sender, EventArgs e) + { + foreach (int index in selectedVersionsCheckedListBox.CheckedIndices) + { + selectedVersionsCheckedListBox.SetItemChecked(index, false); + } + } + + private void cancelButton_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void saveButton_Click(object sender, EventArgs e) + { + List selectedVersion = new List(); + foreach (KspVersion item in selectedVersionsCheckedListBox.CheckedItems) + { + selectedVersion.Add(item); + } + ksp.SetCompatibleVersions(selectedVersion); + + this.Close(); + } + } +} diff --git a/GUI/KspInstanceSettingsDialog.resx b/GUI/KspInstanceSettingsDialog.resx new file mode 100644 index 0000000000..1af7de150c --- /dev/null +++ b/GUI/KspInstanceSettingsDialog.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/GUI/Main.Designer.cs b/GUI/Main.Designer.cs index e076ff8c02..bd10441ccc 100644 --- a/GUI/Main.Designer.cs +++ b/GUI/Main.Designer.cs @@ -44,6 +44,7 @@ private void InitializeComponent() this.pluginsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.kSPCommandlineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.reportAnIssueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.menuStrip2 = new System.Windows.Forms.MenuStrip(); @@ -65,7 +66,7 @@ private void InitializeComponent() this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ModList = new CKAN.MainModListGUI(); this.Installed = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.UpdateCol = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.Update = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.ModName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Author = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.InstalledVersion = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -107,12 +108,12 @@ private void InitializeComponent() this.StatusLabel = new System.Windows.Forms.Label(); this.MainTabControl = new CKAN.MainTabControl(); this.ManageModsTabPage = new System.Windows.Forms.TabPage(); - this.FilterByAuthorTextBox = new HintTextBox(); + this.FilterByAuthorTextBox = new CKAN.HintTextBox(); this.FilterByAuthorLabel = new System.Windows.Forms.Label(); this.FilterByNameLabel = new System.Windows.Forms.Label(); - this.FilterByNameTextBox = new HintTextBox(); + this.FilterByNameTextBox = new CKAN.HintTextBox(); this.FilterByDescriptionLabel = new System.Windows.Forms.Label(); - this.FilterByDescriptionTextBox = new HintTextBox(); + this.FilterByDescriptionTextBox = new CKAN.HintTextBox(); this.ChangesetTabPage = new System.Windows.Forms.TabPage(); this.CancelChangesButton = new System.Windows.Forms.Button(); this.ConfirmChangesButton = new System.Windows.Forms.Button(); @@ -141,7 +142,7 @@ private void InitializeComponent() this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.ChooseProvidedModsLabel = new System.Windows.Forms.Label(); - this.reportAnIssueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.kSPInstanceSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.menuStrip2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -177,8 +178,7 @@ private void InitializeComponent() this.helpToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Padding = new System.Windows.Forms.Padding(9, 3, 0, 3); - this.menuStrip1.Size = new System.Drawing.Size(1544, 35); + this.menuStrip1.Size = new System.Drawing.Size(1029, 27); this.menuStrip1.TabIndex = 0; this.menuStrip1.Text = "menuStrip1"; // @@ -192,46 +192,46 @@ private void InitializeComponent() this.toolStripSeparator1, this.ExitToolButton}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(50, 29); + this.fileToolStripMenuItem.Size = new System.Drawing.Size(41, 23); this.fileToolStripMenuItem.Text = "File"; // // selectKSPInstallMenuItem // this.selectKSPInstallMenuItem.Name = "selectKSPInstallMenuItem"; - this.selectKSPInstallMenuItem.Size = new System.Drawing.Size(281, 30); + this.selectKSPInstallMenuItem.Size = new System.Drawing.Size(222, 24); this.selectKSPInstallMenuItem.Text = "Select KSP Install..."; this.selectKSPInstallMenuItem.Click += new System.EventHandler(this.selectKSPInstallMenuItem_Click); // // openKspDirectoryToolStripMenuItem // this.openKspDirectoryToolStripMenuItem.Name = "openKspDirectoryToolStripMenuItem"; - this.openKspDirectoryToolStripMenuItem.Size = new System.Drawing.Size(281, 30); + this.openKspDirectoryToolStripMenuItem.Size = new System.Drawing.Size(222, 24); this.openKspDirectoryToolStripMenuItem.Text = "Open KSP Directory"; this.openKspDirectoryToolStripMenuItem.Click += new System.EventHandler(this.openKspDirectoryToolStripMenuItem_Click); // // installFromckanToolStripMenuItem // this.installFromckanToolStripMenuItem.Name = "installFromckanToolStripMenuItem"; - this.installFromckanToolStripMenuItem.Size = new System.Drawing.Size(281, 30); + this.installFromckanToolStripMenuItem.Size = new System.Drawing.Size(222, 24); this.installFromckanToolStripMenuItem.Text = "Install from .ckan..."; this.installFromckanToolStripMenuItem.Click += new System.EventHandler(this.installFromckanToolStripMenuItem_Click); // // exportModListToolStripMenuItem // this.exportModListToolStripMenuItem.Name = "exportModListToolStripMenuItem"; - this.exportModListToolStripMenuItem.Size = new System.Drawing.Size(281, 30); + this.exportModListToolStripMenuItem.Size = new System.Drawing.Size(222, 24); this.exportModListToolStripMenuItem.Text = "&Export installed mods..."; this.exportModListToolStripMenuItem.Click += new System.EventHandler(this.exportModListToolStripMenuItem_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(278, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(219, 6); // // ExitToolButton // this.ExitToolButton.Name = "ExitToolButton"; - this.ExitToolButton.Size = new System.Drawing.Size(281, 30); + this.ExitToolButton.Size = new System.Drawing.Size(222, 24); this.ExitToolButton.Text = "Exit"; this.ExitToolButton.Click += new System.EventHandler(this.ExitToolButton_Click); // @@ -240,29 +240,30 @@ private void InitializeComponent() this.settingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cKANSettingsToolStripMenuItem, this.pluginsToolStripMenuItem, - this.kSPCommandlineToolStripMenuItem}); + this.kSPCommandlineToolStripMenuItem, + this.kSPInstanceSettingsToolStripMenuItem}); this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; - this.settingsToolStripMenuItem.Size = new System.Drawing.Size(88, 29); + this.settingsToolStripMenuItem.Size = new System.Drawing.Size(70, 23); this.settingsToolStripMenuItem.Text = "Settings"; // // cKANSettingsToolStripMenuItem // this.cKANSettingsToolStripMenuItem.Name = "cKANSettingsToolStripMenuItem"; - this.cKANSettingsToolStripMenuItem.Size = new System.Drawing.Size(247, 30); + this.cKANSettingsToolStripMenuItem.Size = new System.Drawing.Size(211, 24); this.cKANSettingsToolStripMenuItem.Text = "CKAN settings"; this.cKANSettingsToolStripMenuItem.Click += new System.EventHandler(this.CKANSettingsToolStripMenuItem_Click); // // pluginsToolStripMenuItem // this.pluginsToolStripMenuItem.Name = "pluginsToolStripMenuItem"; - this.pluginsToolStripMenuItem.Size = new System.Drawing.Size(247, 30); + this.pluginsToolStripMenuItem.Size = new System.Drawing.Size(211, 24); this.pluginsToolStripMenuItem.Text = "CKAN plugins"; this.pluginsToolStripMenuItem.Click += new System.EventHandler(this.pluginsToolStripMenuItem_Click); // // kSPCommandlineToolStripMenuItem // this.kSPCommandlineToolStripMenuItem.Name = "kSPCommandlineToolStripMenuItem"; - this.kSPCommandlineToolStripMenuItem.Size = new System.Drawing.Size(247, 30); + this.kSPCommandlineToolStripMenuItem.Size = new System.Drawing.Size(211, 24); this.kSPCommandlineToolStripMenuItem.Text = "KSP command-line"; this.kSPCommandlineToolStripMenuItem.Click += new System.EventHandler(this.KSPCommandlineToolStripMenuItem_Click); // @@ -272,23 +273,29 @@ private void InitializeComponent() this.reportAnIssueToolStripMenuItem, this.aboutToolStripMenuItem}); this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; - this.helpToolStripMenuItem.Size = new System.Drawing.Size(61, 29); + this.helpToolStripMenuItem.Size = new System.Drawing.Size(49, 23); this.helpToolStripMenuItem.Text = "Help"; // + // reportAnIssueToolStripMenuItem + // + this.reportAnIssueToolStripMenuItem.Name = "reportAnIssueToolStripMenuItem"; + this.reportAnIssueToolStripMenuItem.Size = new System.Drawing.Size(185, 24); + this.reportAnIssueToolStripMenuItem.Text = "Report an issue..."; + this.reportAnIssueToolStripMenuItem.Click += new System.EventHandler(this.reportAnIssueToolStripMenuItem_Click); + // // aboutToolStripMenuItem // this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; - this.aboutToolStripMenuItem.Size = new System.Drawing.Size(230, 30); + this.aboutToolStripMenuItem.Size = new System.Drawing.Size(185, 24); this.aboutToolStripMenuItem.Text = "About"; this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); // // statusStrip1 // this.statusStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); - this.statusStrip1.Location = new System.Drawing.Point(0, 1016); + this.statusStrip1.Location = new System.Drawing.Point(0, 653); this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Padding = new System.Windows.Forms.Padding(2, 0, 21, 0); - this.statusStrip1.Size = new System.Drawing.Size(1544, 22); + this.statusStrip1.Size = new System.Drawing.Size(1029, 22); this.statusStrip1.TabIndex = 1; this.statusStrip1.Text = "statusStrip1"; // @@ -308,10 +315,9 @@ private void InitializeComponent() this.FilterToolButton, this.NavBackwardToolButton, this.NavForwardToolButton}); - this.menuStrip2.Location = new System.Drawing.Point(0, 5); + this.menuStrip2.Location = new System.Drawing.Point(0, 3); this.menuStrip2.Name = "menuStrip2"; - this.menuStrip2.Padding = new System.Windows.Forms.Padding(9, 3, 0, 3); - this.menuStrip2.Size = new System.Drawing.Size(5876, 62); + this.menuStrip2.Size = new System.Drawing.Size(3917, 40); this.menuStrip2.TabIndex = 2; this.menuStrip2.Text = "menuStrip2"; // @@ -320,7 +326,7 @@ private void InitializeComponent() this.launchKSPToolStripMenuItem.Image = global::CKAN.Properties.Resources.ksp; this.launchKSPToolStripMenuItem.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.launchKSPToolStripMenuItem.Name = "launchKSPToolStripMenuItem"; - this.launchKSPToolStripMenuItem.Size = new System.Drawing.Size(146, 56); + this.launchKSPToolStripMenuItem.Size = new System.Drawing.Size(124, 36); this.launchKSPToolStripMenuItem.Text = "Launch KSP"; this.launchKSPToolStripMenuItem.Click += new System.EventHandler(this.launchKSPToolStripMenuItem_Click); // @@ -329,7 +335,7 @@ private void InitializeComponent() this.RefreshToolButton.Image = global::CKAN.Properties.Resources.refresh; this.RefreshToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.RefreshToolButton.Name = "RefreshToolButton"; - this.RefreshToolButton.Size = new System.Drawing.Size(114, 56); + this.RefreshToolButton.Size = new System.Drawing.Size(98, 36); this.RefreshToolButton.Text = "Refresh"; this.RefreshToolButton.Click += new System.EventHandler(this.RefreshToolButton_Click); // @@ -338,7 +344,7 @@ private void InitializeComponent() this.UpdateAllToolButton.Image = global::CKAN.Properties.Resources.update; this.UpdateAllToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.UpdateAllToolButton.Name = "UpdateAllToolButton"; - this.UpdateAllToolButton.Size = new System.Drawing.Size(232, 56); + this.UpdateAllToolButton.Size = new System.Drawing.Size(187, 36); this.UpdateAllToolButton.Text = "Add available updates"; this.UpdateAllToolButton.Click += new System.EventHandler(this.MarkAllUpdatesToolButton_Click); // @@ -347,7 +353,7 @@ private void InitializeComponent() this.ApplyToolButton.Image = global::CKAN.Properties.Resources.apply; this.ApplyToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.ApplyToolButton.Name = "ApplyToolButton"; - this.ApplyToolButton.Size = new System.Drawing.Size(173, 56); + this.ApplyToolButton.Size = new System.Drawing.Size(142, 36); this.ApplyToolButton.Text = "Apply changes"; this.ApplyToolButton.Click += new System.EventHandler(this.ApplyToolButton_Click); // @@ -365,62 +371,62 @@ private void InitializeComponent() this.FilterToolButton.Image = global::CKAN.Properties.Resources.search; this.FilterToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.FilterToolButton.Name = "FilterToolButton"; - this.FilterToolButton.Size = new System.Drawing.Size(201, 56); + this.FilterToolButton.Size = new System.Drawing.Size(165, 36); this.FilterToolButton.Text = "Filter (Compatible)"; // // FilterCompatibleButton // this.FilterCompatibleButton.Name = "FilterCompatibleButton"; - this.FilterCompatibleButton.Size = new System.Drawing.Size(307, 30); + this.FilterCompatibleButton.Size = new System.Drawing.Size(244, 24); this.FilterCompatibleButton.Text = "Compatible"; this.FilterCompatibleButton.Click += new System.EventHandler(this.FilterCompatibleButton_Click); // // FilterInstalledButton // this.FilterInstalledButton.Name = "FilterInstalledButton"; - this.FilterInstalledButton.Size = new System.Drawing.Size(307, 30); + this.FilterInstalledButton.Size = new System.Drawing.Size(244, 24); this.FilterInstalledButton.Text = "Installed"; this.FilterInstalledButton.Click += new System.EventHandler(this.FilterInstalledButton_Click); // // FilterInstalledUpdateButton // this.FilterInstalledUpdateButton.Name = "FilterInstalledUpdateButton"; - this.FilterInstalledUpdateButton.Size = new System.Drawing.Size(307, 30); + this.FilterInstalledUpdateButton.Size = new System.Drawing.Size(244, 24); this.FilterInstalledUpdateButton.Text = "Installed (update available)"; this.FilterInstalledUpdateButton.Click += new System.EventHandler(this.FilterInstalledUpdateButton_Click); // // cachedToolStripMenuItem // this.cachedToolStripMenuItem.Name = "cachedToolStripMenuItem"; - this.cachedToolStripMenuItem.Size = new System.Drawing.Size(307, 30); + this.cachedToolStripMenuItem.Size = new System.Drawing.Size(244, 24); this.cachedToolStripMenuItem.Text = "Cached"; this.cachedToolStripMenuItem.Click += new System.EventHandler(this.cachedToolStripMenuItem_Click); // // FilterNewButton // this.FilterNewButton.Name = "FilterNewButton"; - this.FilterNewButton.Size = new System.Drawing.Size(307, 30); + this.FilterNewButton.Size = new System.Drawing.Size(244, 24); this.FilterNewButton.Text = "New in repository"; this.FilterNewButton.Click += new System.EventHandler(this.FilterNewButton_Click); // // FilterNotInstalledButton // this.FilterNotInstalledButton.Name = "FilterNotInstalledButton"; - this.FilterNotInstalledButton.Size = new System.Drawing.Size(307, 30); + this.FilterNotInstalledButton.Size = new System.Drawing.Size(244, 24); this.FilterNotInstalledButton.Text = "Not installed"; this.FilterNotInstalledButton.Click += new System.EventHandler(this.FilterNotInstalledButton_Click); // // FilterIncompatibleButton // this.FilterIncompatibleButton.Name = "FilterIncompatibleButton"; - this.FilterIncompatibleButton.Size = new System.Drawing.Size(307, 30); + this.FilterIncompatibleButton.Size = new System.Drawing.Size(244, 24); this.FilterIncompatibleButton.Text = "Incompatible"; this.FilterIncompatibleButton.Click += new System.EventHandler(this.FilterIncompatibleButton_Click); // // FilterAllButton // this.FilterAllButton.Name = "FilterAllButton"; - this.FilterAllButton.Size = new System.Drawing.Size(307, 30); + this.FilterAllButton.Size = new System.Drawing.Size(244, 24); this.FilterAllButton.Text = "All"; this.FilterAllButton.Click += new System.EventHandler(this.FilterAllButton_Click); // @@ -429,7 +435,7 @@ private void InitializeComponent() this.NavBackwardToolButton.Image = global::CKAN.Properties.Resources.backward; this.NavBackwardToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.NavBackwardToolButton.Name = "NavBackwardToolButton"; - this.NavBackwardToolButton.Size = new System.Drawing.Size(44, 56); + this.NavBackwardToolButton.Size = new System.Drawing.Size(44, 36); this.NavBackwardToolButton.ToolTipText = "Previous selected mod..."; this.NavBackwardToolButton.Click += new System.EventHandler(this.NavBackwardToolButton_Click); // @@ -438,7 +444,7 @@ private void InitializeComponent() this.NavForwardToolButton.Image = global::CKAN.Properties.Resources.forward; this.NavForwardToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.NavForwardToolButton.Name = "NavForwardToolButton"; - this.NavForwardToolButton.Size = new System.Drawing.Size(44, 56); + this.NavForwardToolButton.Size = new System.Drawing.Size(44, 36); this.NavForwardToolButton.ToolTipText = "Next selected mod..."; this.NavForwardToolButton.Click += new System.EventHandler(this.NavForwardToolButton_Click); // @@ -448,8 +454,7 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; - this.splitContainer1.Location = new System.Drawing.Point(0, 111); - this.splitContainer1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.splitContainer1.Location = new System.Drawing.Point(0, 72); this.splitContainer1.Name = "splitContainer1"; // // splitContainer1.Panel1 @@ -459,9 +464,8 @@ private void InitializeComponent() // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.ModInfoTabControl); - this.splitContainer1.Size = new System.Drawing.Size(1522, 836); - this.splitContainer1.SplitterDistance = 1156; - this.splitContainer1.SplitterWidth = 6; + this.splitContainer1.Size = new System.Drawing.Size(1015, 531); + this.splitContainer1.SplitterDistance = 649; this.splitContainer1.TabIndex = 7; // // ModList @@ -475,7 +479,7 @@ private void InitializeComponent() this.ModList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.ModList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Installed, - this.UpdateCol, + this.Update, this.ModName, this.Author, this.InstalledVersion, @@ -485,12 +489,11 @@ private void InitializeComponent() this.Description}); this.ModList.Dock = System.Windows.Forms.DockStyle.Fill; this.ModList.Location = new System.Drawing.Point(0, 0); - this.ModList.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ModList.MultiSelect = false; this.ModList.Name = "ModList"; this.ModList.RowHeadersVisible = false; this.ModList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.ModList.Size = new System.Drawing.Size(1156, 836); + this.ModList.Size = new System.Drawing.Size(649, 531); this.ModList.TabIndex = 3; this.ModList.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.ModList_CellContentClick); this.ModList.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.ModList_CellMouseDoubleClick); @@ -506,12 +509,12 @@ private void InitializeComponent() this.Installed.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; this.Installed.Width = 50; // - // UpdateCol + // Update // - this.UpdateCol.HeaderText = "Update"; - this.UpdateCol.Name = "Update"; - this.UpdateCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; - this.UpdateCol.Width = 46; + this.Update.HeaderText = "Update"; + this.Update.Name = "Update"; + this.Update.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; + this.Update.Width = 46; // // ModName // @@ -576,21 +579,19 @@ private void InitializeComponent() this.ModInfoTabControl.Controls.Add(this.ContentTabPage); this.ModInfoTabControl.Dock = System.Windows.Forms.DockStyle.Fill; this.ModInfoTabControl.Location = new System.Drawing.Point(0, 0); - this.ModInfoTabControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ModInfoTabControl.Name = "ModInfoTabControl"; this.ModInfoTabControl.SelectedIndex = 0; - this.ModInfoTabControl.Size = new System.Drawing.Size(360, 836); + this.ModInfoTabControl.Size = new System.Drawing.Size(362, 531); this.ModInfoTabControl.TabIndex = 0; this.ModInfoTabControl.SelectedIndexChanged += new System.EventHandler(this.ModInfoIndexChanged); // // MetadataTabPage // this.MetadataTabPage.Controls.Add(this.splitContainer2); - this.MetadataTabPage.Location = new System.Drawing.Point(4, 32); - this.MetadataTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.MetadataTabPage.Location = new System.Drawing.Point(4, 25); this.MetadataTabPage.Name = "MetadataTabPage"; - this.MetadataTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.MetadataTabPage.Size = new System.Drawing.Size(352, 800); + this.MetadataTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.MetadataTabPage.Size = new System.Drawing.Size(354, 502); this.MetadataTabPage.TabIndex = 0; this.MetadataTabPage.Text = "Metadata"; this.MetadataTabPage.UseVisualStyleBackColor = true; @@ -599,8 +600,7 @@ private void InitializeComponent() // this.splitContainer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer2.Location = new System.Drawing.Point(4, 5); - this.splitContainer2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.splitContainer2.Location = new System.Drawing.Point(3, 3); this.splitContainer2.Name = "splitContainer2"; this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; // @@ -611,9 +611,8 @@ private void InitializeComponent() // splitContainer2.Panel2 // this.splitContainer2.Panel2.Controls.Add(this.MetaDataLowerLayoutPanel); - this.splitContainer2.Size = new System.Drawing.Size(344, 790); - this.splitContainer2.SplitterDistance = 379; - this.splitContainer2.SplitterWidth = 6; + this.splitContainer2.Size = new System.Drawing.Size(348, 496); + this.splitContainer2.SplitterDistance = 237; this.splitContainer2.TabIndex = 0; // // MetaDataUpperLayoutPanel @@ -625,12 +624,11 @@ private void InitializeComponent() this.MetaDataUpperLayoutPanel.Controls.Add(this.MetadataModuleAbstractLabel, 0, 1); this.MetaDataUpperLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.MetaDataUpperLayoutPanel.Location = new System.Drawing.Point(0, 0); - this.MetaDataUpperLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.MetaDataUpperLayoutPanel.Name = "MetaDataUpperLayoutPanel"; this.MetaDataUpperLayoutPanel.RowCount = 2; this.MetaDataUpperLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); this.MetaDataUpperLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F)); - this.MetaDataUpperLayoutPanel.Size = new System.Drawing.Size(342, 377); + this.MetaDataUpperLayoutPanel.Size = new System.Drawing.Size(346, 235); this.MetaDataUpperLayoutPanel.TabIndex = 0; // // MetadataModuleNameLabel @@ -638,10 +636,9 @@ private void InitializeComponent() this.MetadataModuleNameLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.MetadataModuleNameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.MetadataModuleNameLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.MetadataModuleNameLabel.Location = new System.Drawing.Point(4, 0); - this.MetadataModuleNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.MetadataModuleNameLabel.Location = new System.Drawing.Point(3, 0); this.MetadataModuleNameLabel.Name = "MetadataModuleNameLabel"; - this.MetadataModuleNameLabel.Size = new System.Drawing.Size(334, 75); + this.MetadataModuleNameLabel.Size = new System.Drawing.Size(340, 47); this.MetadataModuleNameLabel.TabIndex = 0; this.MetadataModuleNameLabel.Text = "Mod Name"; this.MetadataModuleNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -650,11 +647,10 @@ private void InitializeComponent() // this.MetadataModuleAbstractLabel.BorderStyle = System.Windows.Forms.BorderStyle.None; this.MetadataModuleAbstractLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleAbstractLabel.Location = new System.Drawing.Point(4, 80); - this.MetadataModuleAbstractLabel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.MetadataModuleAbstractLabel.Location = new System.Drawing.Point(3, 50); this.MetadataModuleAbstractLabel.Name = "MetadataModuleAbstractLabel"; this.MetadataModuleAbstractLabel.ReadOnly = true; - this.MetadataModuleAbstractLabel.Size = new System.Drawing.Size(334, 292); + this.MetadataModuleAbstractLabel.Size = new System.Drawing.Size(340, 182); this.MetadataModuleAbstractLabel.TabIndex = 27; this.MetadataModuleAbstractLabel.Text = ""; // @@ -682,19 +678,18 @@ private void InitializeComponent() this.MetaDataLowerLayoutPanel.Controls.Add(this.MetadataModuleGitHubLinkLabel, 1, 4); this.MetaDataLowerLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.MetaDataLowerLayoutPanel.Location = new System.Drawing.Point(0, 0); - this.MetaDataLowerLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.MetaDataLowerLayoutPanel.Name = "MetaDataLowerLayoutPanel"; this.MetaDataLowerLayoutPanel.RowCount = 9; - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 31F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.MetaDataLowerLayoutPanel.Size = new System.Drawing.Size(342, 403); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 13F)); + this.MetaDataLowerLayoutPanel.Size = new System.Drawing.Size(346, 253); this.MetaDataLowerLayoutPanel.TabIndex = 0; // // IdentifierLabel @@ -702,10 +697,9 @@ private void InitializeComponent() this.IdentifierLabel.AutoSize = true; this.IdentifierLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.IdentifierLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.IdentifierLabel.Location = new System.Drawing.Point(4, 322); - this.IdentifierLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.IdentifierLabel.Location = new System.Drawing.Point(3, 210); this.IdentifierLabel.Name = "IdentifierLabel"; - this.IdentifierLabel.Size = new System.Drawing.Size(81, 31); + this.IdentifierLabel.Size = new System.Drawing.Size(84, 20); this.IdentifierLabel.TabIndex = 28; this.IdentifierLabel.Text = "Identifier"; // @@ -714,10 +708,9 @@ private void InitializeComponent() this.MetadataIdentifierLabel.AutoSize = true; this.MetadataIdentifierLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.MetadataIdentifierLabel.ForeColor = System.Drawing.Color.Black; - this.MetadataIdentifierLabel.Location = new System.Drawing.Point(93, 322); - this.MetadataIdentifierLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.MetadataIdentifierLabel.Location = new System.Drawing.Point(93, 210); this.MetadataIdentifierLabel.Name = "MetadataIdentifierLabel"; - this.MetadataIdentifierLabel.Size = new System.Drawing.Size(245, 31); + this.MetadataIdentifierLabel.Size = new System.Drawing.Size(250, 20); this.MetadataIdentifierLabel.TabIndex = 27; this.MetadataIdentifierLabel.Text = "-"; // @@ -726,10 +719,9 @@ private void InitializeComponent() this.KSPCompatibilityLabel.AutoSize = true; this.KSPCompatibilityLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.KSPCompatibilityLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.KSPCompatibilityLabel.Location = new System.Drawing.Point(4, 276); - this.KSPCompatibilityLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.KSPCompatibilityLabel.Location = new System.Drawing.Point(3, 180); this.KSPCompatibilityLabel.Name = "KSPCompatibilityLabel"; - this.KSPCompatibilityLabel.Size = new System.Drawing.Size(81, 46); + this.KSPCompatibilityLabel.Size = new System.Drawing.Size(84, 30); this.KSPCompatibilityLabel.TabIndex = 13; this.KSPCompatibilityLabel.Text = "Max KSP ver.:"; // @@ -738,10 +730,9 @@ private void InitializeComponent() this.ReleaseLabel.AutoSize = true; this.ReleaseLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.ReleaseLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.ReleaseLabel.Location = new System.Drawing.Point(4, 230); - this.ReleaseLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.ReleaseLabel.Location = new System.Drawing.Point(3, 150); this.ReleaseLabel.Name = "ReleaseLabel"; - this.ReleaseLabel.Size = new System.Drawing.Size(81, 46); + this.ReleaseLabel.Size = new System.Drawing.Size(84, 30); this.ReleaseLabel.TabIndex = 12; this.ReleaseLabel.Text = "Release status:"; // @@ -750,10 +741,9 @@ private void InitializeComponent() this.GitHubLabel.AutoSize = true; this.GitHubLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.GitHubLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.GitHubLabel.Location = new System.Drawing.Point(4, 184); - this.GitHubLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.GitHubLabel.Location = new System.Drawing.Point(3, 120); this.GitHubLabel.Name = "GitHubLabel"; - this.GitHubLabel.Size = new System.Drawing.Size(81, 46); + this.GitHubLabel.Size = new System.Drawing.Size(84, 30); this.GitHubLabel.TabIndex = 10; this.GitHubLabel.Text = "Source Code:"; // @@ -762,10 +752,9 @@ private void InitializeComponent() this.HomePageLabel.AutoSize = true; this.HomePageLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.HomePageLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.HomePageLabel.Location = new System.Drawing.Point(4, 138); - this.HomePageLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.HomePageLabel.Location = new System.Drawing.Point(3, 90); this.HomePageLabel.Name = "HomePageLabel"; - this.HomePageLabel.Size = new System.Drawing.Size(81, 46); + this.HomePageLabel.Size = new System.Drawing.Size(84, 30); this.HomePageLabel.TabIndex = 7; this.HomePageLabel.Text = "Homepage:"; // @@ -774,10 +763,9 @@ private void InitializeComponent() this.AuthorLabel.AutoSize = true; this.AuthorLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.AuthorLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.AuthorLabel.Location = new System.Drawing.Point(4, 92); - this.AuthorLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.AuthorLabel.Location = new System.Drawing.Point(3, 60); this.AuthorLabel.Name = "AuthorLabel"; - this.AuthorLabel.Size = new System.Drawing.Size(81, 46); + this.AuthorLabel.Size = new System.Drawing.Size(84, 30); this.AuthorLabel.TabIndex = 5; this.AuthorLabel.Text = "Author:"; // @@ -786,10 +774,9 @@ private void InitializeComponent() this.LicenseLabel.AutoSize = true; this.LicenseLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.LicenseLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.LicenseLabel.Location = new System.Drawing.Point(4, 46); - this.LicenseLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.LicenseLabel.Location = new System.Drawing.Point(3, 30); this.LicenseLabel.Name = "LicenseLabel"; - this.LicenseLabel.Size = new System.Drawing.Size(81, 46); + this.LicenseLabel.Size = new System.Drawing.Size(84, 30); this.LicenseLabel.TabIndex = 3; this.LicenseLabel.Text = "License:"; // @@ -798,9 +785,8 @@ private void InitializeComponent() this.MetadataModuleVersionLabel.AutoSize = true; this.MetadataModuleVersionLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.MetadataModuleVersionLabel.Location = new System.Drawing.Point(93, 0); - this.MetadataModuleVersionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.MetadataModuleVersionLabel.Name = "MetadataModuleVersionLabel"; - this.MetadataModuleVersionLabel.Size = new System.Drawing.Size(245, 46); + this.MetadataModuleVersionLabel.Size = new System.Drawing.Size(250, 30); this.MetadataModuleVersionLabel.TabIndex = 2; this.MetadataModuleVersionLabel.Text = "0.0.0"; // @@ -808,10 +794,9 @@ private void InitializeComponent() // this.MetadataModuleLicenseLabel.AutoSize = true; this.MetadataModuleLicenseLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleLicenseLabel.Location = new System.Drawing.Point(93, 46); - this.MetadataModuleLicenseLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.MetadataModuleLicenseLabel.Location = new System.Drawing.Point(93, 30); this.MetadataModuleLicenseLabel.Name = "MetadataModuleLicenseLabel"; - this.MetadataModuleLicenseLabel.Size = new System.Drawing.Size(245, 46); + this.MetadataModuleLicenseLabel.Size = new System.Drawing.Size(250, 30); this.MetadataModuleLicenseLabel.TabIndex = 4; this.MetadataModuleLicenseLabel.Text = "None"; // @@ -819,10 +804,9 @@ private void InitializeComponent() // this.MetadataModuleAuthorLabel.AutoSize = true; this.MetadataModuleAuthorLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleAuthorLabel.Location = new System.Drawing.Point(93, 92); - this.MetadataModuleAuthorLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.MetadataModuleAuthorLabel.Location = new System.Drawing.Point(93, 60); this.MetadataModuleAuthorLabel.Name = "MetadataModuleAuthorLabel"; - this.MetadataModuleAuthorLabel.Size = new System.Drawing.Size(245, 46); + this.MetadataModuleAuthorLabel.Size = new System.Drawing.Size(250, 30); this.MetadataModuleAuthorLabel.TabIndex = 6; this.MetadataModuleAuthorLabel.Text = "Nobody"; // @@ -831,10 +815,9 @@ private void InitializeComponent() this.VersionLabel.AutoSize = true; this.VersionLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.VersionLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.VersionLabel.Location = new System.Drawing.Point(4, 0); - this.VersionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.VersionLabel.Location = new System.Drawing.Point(3, 0); this.VersionLabel.Name = "VersionLabel"; - this.VersionLabel.Size = new System.Drawing.Size(81, 46); + this.VersionLabel.Size = new System.Drawing.Size(84, 30); this.VersionLabel.TabIndex = 1; this.VersionLabel.Text = "Version:"; // @@ -842,10 +825,9 @@ private void InitializeComponent() // this.MetadataModuleReleaseStatusLabel.AutoSize = true; this.MetadataModuleReleaseStatusLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleReleaseStatusLabel.Location = new System.Drawing.Point(93, 230); - this.MetadataModuleReleaseStatusLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.MetadataModuleReleaseStatusLabel.Location = new System.Drawing.Point(93, 150); this.MetadataModuleReleaseStatusLabel.Name = "MetadataModuleReleaseStatusLabel"; - this.MetadataModuleReleaseStatusLabel.Size = new System.Drawing.Size(245, 46); + this.MetadataModuleReleaseStatusLabel.Size = new System.Drawing.Size(250, 30); this.MetadataModuleReleaseStatusLabel.TabIndex = 11; this.MetadataModuleReleaseStatusLabel.Text = "Stable"; // @@ -853,10 +835,9 @@ private void InitializeComponent() // this.MetadataModuleHomePageLinkLabel.AutoEllipsis = true; this.MetadataModuleHomePageLinkLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleHomePageLinkLabel.Location = new System.Drawing.Point(93, 138); - this.MetadataModuleHomePageLinkLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.MetadataModuleHomePageLinkLabel.Location = new System.Drawing.Point(93, 90); this.MetadataModuleHomePageLinkLabel.Name = "MetadataModuleHomePageLinkLabel"; - this.MetadataModuleHomePageLinkLabel.Size = new System.Drawing.Size(245, 46); + this.MetadataModuleHomePageLinkLabel.Size = new System.Drawing.Size(250, 30); this.MetadataModuleHomePageLinkLabel.TabIndex = 25; this.MetadataModuleHomePageLinkLabel.TabStop = true; this.MetadataModuleHomePageLinkLabel.Text = "linkLabel1"; @@ -866,10 +847,9 @@ private void InitializeComponent() // this.MetadataModuleKSPCompatibilityLabel.AutoSize = true; this.MetadataModuleKSPCompatibilityLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleKSPCompatibilityLabel.Location = new System.Drawing.Point(93, 276); - this.MetadataModuleKSPCompatibilityLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.MetadataModuleKSPCompatibilityLabel.Location = new System.Drawing.Point(93, 180); this.MetadataModuleKSPCompatibilityLabel.Name = "MetadataModuleKSPCompatibilityLabel"; - this.MetadataModuleKSPCompatibilityLabel.Size = new System.Drawing.Size(245, 46); + this.MetadataModuleKSPCompatibilityLabel.Size = new System.Drawing.Size(250, 30); this.MetadataModuleKSPCompatibilityLabel.TabIndex = 14; this.MetadataModuleKSPCompatibilityLabel.Text = "0.0.0"; // @@ -877,10 +857,9 @@ private void InitializeComponent() // this.MetadataModuleGitHubLinkLabel.AutoEllipsis = true; this.MetadataModuleGitHubLinkLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleGitHubLinkLabel.Location = new System.Drawing.Point(93, 184); - this.MetadataModuleGitHubLinkLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.MetadataModuleGitHubLinkLabel.Location = new System.Drawing.Point(93, 120); this.MetadataModuleGitHubLinkLabel.Name = "MetadataModuleGitHubLinkLabel"; - this.MetadataModuleGitHubLinkLabel.Size = new System.Drawing.Size(245, 46); + this.MetadataModuleGitHubLinkLabel.Size = new System.Drawing.Size(250, 30); this.MetadataModuleGitHubLinkLabel.TabIndex = 26; this.MetadataModuleGitHubLinkLabel.TabStop = true; this.MetadataModuleGitHubLinkLabel.Text = "linkLabel2"; @@ -890,11 +869,10 @@ private void InitializeComponent() // this.RelationshipTabPage.Controls.Add(this.ModuleRelationshipType); this.RelationshipTabPage.Controls.Add(this.DependsGraphTree); - this.RelationshipTabPage.Location = new System.Drawing.Point(4, 32); - this.RelationshipTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.RelationshipTabPage.Location = new System.Drawing.Point(4, 25); this.RelationshipTabPage.Name = "RelationshipTabPage"; - this.RelationshipTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.RelationshipTabPage.Size = new System.Drawing.Size(532, 853); + this.RelationshipTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.RelationshipTabPage.Size = new System.Drawing.Size(233, 514); this.RelationshipTabPage.TabIndex = 1; this.RelationshipTabPage.Text = "Relationships"; this.RelationshipTabPage.UseVisualStyleBackColor = true; @@ -911,10 +889,9 @@ private void InitializeComponent() "Suggests", "Supports", "Conflicts"}); - this.ModuleRelationshipType.Location = new System.Drawing.Point(9, 11); - this.ModuleRelationshipType.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ModuleRelationshipType.Location = new System.Drawing.Point(6, 7); this.ModuleRelationshipType.Name = "ModuleRelationshipType"; - this.ModuleRelationshipType.Size = new System.Drawing.Size(508, 28); + this.ModuleRelationshipType.Size = new System.Drawing.Size(221, 21); this.ModuleRelationshipType.TabIndex = 1; this.ModuleRelationshipType.SelectedIndexChanged += new System.EventHandler(this.ModuleRelationshipType_SelectedIndexChanged); // @@ -924,10 +901,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.DependsGraphTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.DependsGraphTree.Location = new System.Drawing.Point(4, 52); - this.DependsGraphTree.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.DependsGraphTree.Location = new System.Drawing.Point(3, 34); this.DependsGraphTree.Name = "DependsGraphTree"; - this.DependsGraphTree.Size = new System.Drawing.Size(518, 771); + this.DependsGraphTree.Size = new System.Drawing.Size(227, 472); this.DependsGraphTree.TabIndex = 0; this.DependsGraphTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.DependsGraphTree_NodeMouseDoubleClick); // @@ -936,11 +912,10 @@ private void InitializeComponent() this.ContentTabPage.Controls.Add(this.ContentsPreviewTree); this.ContentTabPage.Controls.Add(this.ContentsDownloadButton); this.ContentTabPage.Controls.Add(this.NotCachedLabel); - this.ContentTabPage.Location = new System.Drawing.Point(4, 32); - this.ContentTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ContentTabPage.Location = new System.Drawing.Point(4, 25); this.ContentTabPage.Name = "ContentTabPage"; - this.ContentTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.ContentTabPage.Size = new System.Drawing.Size(532, 853); + this.ContentTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.ContentTabPage.Size = new System.Drawing.Size(233, 514); this.ContentTabPage.TabIndex = 2; this.ContentTabPage.Text = "Contents"; this.ContentTabPage.UseVisualStyleBackColor = true; @@ -952,19 +927,17 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.ContentsPreviewTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ContentsPreviewTree.Enabled = false; - this.ContentsPreviewTree.Location = new System.Drawing.Point(0, 100); - this.ContentsPreviewTree.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ContentsPreviewTree.Location = new System.Drawing.Point(0, 65); this.ContentsPreviewTree.Name = "ContentsPreviewTree"; - this.ContentsPreviewTree.Size = new System.Drawing.Size(522, 728); + this.ContentsPreviewTree.Size = new System.Drawing.Size(230, 444); this.ContentsPreviewTree.TabIndex = 2; this.ContentsPreviewTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.ContentsPreviewTree_NodeMouseDoubleClick); // // ContentsDownloadButton // - this.ContentsDownloadButton.Location = new System.Drawing.Point(9, 55); - this.ContentsDownloadButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ContentsDownloadButton.Location = new System.Drawing.Point(6, 36); this.ContentsDownloadButton.Name = "ContentsDownloadButton"; - this.ContentsDownloadButton.Size = new System.Drawing.Size(154, 35); + this.ContentsDownloadButton.Size = new System.Drawing.Size(103, 23); this.ContentsDownloadButton.TabIndex = 1; this.ContentsDownloadButton.Text = "Download"; this.ContentsDownloadButton.UseVisualStyleBackColor = true; @@ -972,10 +945,9 @@ private void InitializeComponent() // // NotCachedLabel // - this.NotCachedLabel.Location = new System.Drawing.Point(4, 5); - this.NotCachedLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.NotCachedLabel.Location = new System.Drawing.Point(3, 3); this.NotCachedLabel.Name = "NotCachedLabel"; - this.NotCachedLabel.Size = new System.Drawing.Size(324, 46); + this.NotCachedLabel.Size = new System.Drawing.Size(216, 30); this.NotCachedLabel.TabIndex = 0; this.NotCachedLabel.Text = "This mod is not in the cache, click \'Download\' to preview contents"; // @@ -983,19 +955,17 @@ private void InitializeComponent() // this.StatusPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.StatusPanel.Controls.Add(this.StatusLabel); - this.StatusPanel.Location = new System.Drawing.Point(0, 1074); - this.StatusPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.StatusPanel.Location = new System.Drawing.Point(0, 698); this.StatusPanel.Name = "StatusPanel"; - this.StatusPanel.Size = new System.Drawing.Size(1196, 29); + this.StatusPanel.Size = new System.Drawing.Size(797, 19); this.StatusPanel.TabIndex = 8; // // StatusLabel // this.StatusLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.StatusLabel.Location = new System.Drawing.Point(0, 0); - this.StatusLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.StatusLabel.Name = "StatusLabel"; - this.StatusLabel.Size = new System.Drawing.Size(1050, 29); + this.StatusLabel.Size = new System.Drawing.Size(797, 19); this.StatusLabel.TabIndex = 0; this.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -1007,11 +977,10 @@ private void InitializeComponent() this.MainTabControl.Controls.Add(this.ChooseRecommendedModsTabPage); this.MainTabControl.Controls.Add(this.ChooseProvidedModsTabPage); this.MainTabControl.Dock = System.Windows.Forms.DockStyle.Fill; - this.MainTabControl.Location = new System.Drawing.Point(0, 35); - this.MainTabControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.MainTabControl.Location = new System.Drawing.Point(0, 27); this.MainTabControl.Name = "MainTabControl"; this.MainTabControl.SelectedIndex = 0; - this.MainTabControl.Size = new System.Drawing.Size(1544, 981); + this.MainTabControl.Size = new System.Drawing.Size(1029, 626); this.MainTabControl.TabIndex = 9; // // ManageModsTabPage @@ -1025,21 +994,19 @@ private void InitializeComponent() this.ManageModsTabPage.Controls.Add(this.FilterByDescriptionTextBox); this.ManageModsTabPage.Controls.Add(this.menuStrip2); this.ManageModsTabPage.Controls.Add(this.splitContainer1); - this.ManageModsTabPage.Location = new System.Drawing.Point(4, 29); - this.ManageModsTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ManageModsTabPage.Location = new System.Drawing.Point(4, 22); this.ManageModsTabPage.Name = "ManageModsTabPage"; - this.ManageModsTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.ManageModsTabPage.Size = new System.Drawing.Size(1536, 948); + this.ManageModsTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.ManageModsTabPage.Size = new System.Drawing.Size(1021, 600); this.ManageModsTabPage.TabIndex = 0; this.ManageModsTabPage.Text = "Manage mods"; // // FilterByAuthorTextBox // this.FilterByAuthorTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.FilterByAuthorTextBox.Location = new System.Drawing.Point(543, 74); - this.FilterByAuthorTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.FilterByAuthorTextBox.Location = new System.Drawing.Point(362, 48); this.FilterByAuthorTextBox.Name = "FilterByAuthorTextBox"; - this.FilterByAuthorTextBox.Size = new System.Drawing.Size(185, 26); + this.FilterByAuthorTextBox.Size = new System.Drawing.Size(124, 20); this.FilterByAuthorTextBox.TabIndex = 10; this.FilterByAuthorTextBox.TextChanged += new System.EventHandler(this.FilterByAuthorTextBox_TextChanged); // @@ -1047,10 +1014,9 @@ private void InitializeComponent() // this.FilterByAuthorLabel.AutoSize = true; this.FilterByAuthorLabel.BackColor = System.Drawing.Color.Transparent; - this.FilterByAuthorLabel.Location = new System.Drawing.Point(372, 77); - this.FilterByAuthorLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.FilterByAuthorLabel.Location = new System.Drawing.Point(248, 50); this.FilterByAuthorLabel.Name = "FilterByAuthorLabel"; - this.FilterByAuthorLabel.Size = new System.Drawing.Size(162, 20); + this.FilterByAuthorLabel.Size = new System.Drawing.Size(108, 13); this.FilterByAuthorLabel.TabIndex = 11; this.FilterByAuthorLabel.Text = "Filter by author name:"; // @@ -1058,20 +1024,18 @@ private void InitializeComponent() // this.FilterByNameLabel.AutoSize = true; this.FilterByNameLabel.BackColor = System.Drawing.Color.Transparent; - this.FilterByNameLabel.Location = new System.Drawing.Point(6, 77); - this.FilterByNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.FilterByNameLabel.Location = new System.Drawing.Point(4, 50); this.FilterByNameLabel.Name = "FilterByNameLabel"; - this.FilterByNameLabel.Size = new System.Drawing.Size(147, 20); + this.FilterByNameLabel.Size = new System.Drawing.Size(98, 13); this.FilterByNameLabel.TabIndex = 10; this.FilterByNameLabel.Text = "Filter by mod name:"; // // FilterByNameTextBox // this.FilterByNameTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.FilterByNameTextBox.Location = new System.Drawing.Point(160, 74); - this.FilterByNameTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.FilterByNameTextBox.Location = new System.Drawing.Point(107, 48); this.FilterByNameTextBox.Name = "FilterByNameTextBox"; - this.FilterByNameTextBox.Size = new System.Drawing.Size(185, 26); + this.FilterByNameTextBox.Size = new System.Drawing.Size(124, 20); this.FilterByNameTextBox.TabIndex = 9; this.FilterByNameTextBox.TextChanged += new System.EventHandler(this.FilterByNameTextBox_TextChanged); // @@ -1079,20 +1043,18 @@ private void InitializeComponent() // this.FilterByDescriptionLabel.AutoSize = true; this.FilterByDescriptionLabel.BackColor = System.Drawing.Color.Transparent; - this.FilterByDescriptionLabel.Location = new System.Drawing.Point(754, 77); - this.FilterByDescriptionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.FilterByDescriptionLabel.Location = new System.Drawing.Point(503, 50); this.FilterByDescriptionLabel.Name = "FilterByDescriptionLabel"; - this.FilterByDescriptionLabel.Size = new System.Drawing.Size(149, 20); + this.FilterByDescriptionLabel.Size = new System.Drawing.Size(100, 13); this.FilterByDescriptionLabel.TabIndex = 10; this.FilterByDescriptionLabel.Text = "Filter by description:"; // // FilterByDescriptionTextBox // this.FilterByDescriptionTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.FilterByDescriptionTextBox.Location = new System.Drawing.Point(912, 74); - this.FilterByDescriptionTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.FilterByDescriptionTextBox.Location = new System.Drawing.Point(608, 48); this.FilterByDescriptionTextBox.Name = "FilterByDescriptionTextBox"; - this.FilterByDescriptionTextBox.Size = new System.Drawing.Size(185, 26); + this.FilterByDescriptionTextBox.Size = new System.Drawing.Size(124, 20); this.FilterByDescriptionTextBox.TabIndex = 9; this.FilterByDescriptionTextBox.TextChanged += new System.EventHandler(this.FilterByDescriptionTextBox_TextChanged); // @@ -1101,11 +1063,10 @@ private void InitializeComponent() this.ChangesetTabPage.Controls.Add(this.CancelChangesButton); this.ChangesetTabPage.Controls.Add(this.ConfirmChangesButton); this.ChangesetTabPage.Controls.Add(this.ChangesListView); - this.ChangesetTabPage.Location = new System.Drawing.Point(4, 29); - this.ChangesetTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ChangesetTabPage.Location = new System.Drawing.Point(4, 22); this.ChangesetTabPage.Name = "ChangesetTabPage"; - this.ChangesetTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.ChangesetTabPage.Size = new System.Drawing.Size(1536, 1001); + this.ChangesetTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.ChangesetTabPage.Size = new System.Drawing.Size(1021, 612); this.ChangesetTabPage.TabIndex = 2; this.ChangesetTabPage.Text = "Changeset"; this.ChangesetTabPage.UseVisualStyleBackColor = true; @@ -1114,10 +1075,9 @@ private void InitializeComponent() // this.CancelChangesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.CancelChangesButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.CancelChangesButton.Location = new System.Drawing.Point(1288, 949); - this.CancelChangesButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.CancelChangesButton.Location = new System.Drawing.Point(859, 617); this.CancelChangesButton.Name = "CancelChangesButton"; - this.CancelChangesButton.Size = new System.Drawing.Size(112, 35); + this.CancelChangesButton.Size = new System.Drawing.Size(75, 23); this.CancelChangesButton.TabIndex = 6; this.CancelChangesButton.Text = "Clear"; this.CancelChangesButton.UseVisualStyleBackColor = true; @@ -1127,10 +1087,9 @@ private void InitializeComponent() // this.ConfirmChangesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.ConfirmChangesButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.ConfirmChangesButton.Location = new System.Drawing.Point(1410, 949); - this.ConfirmChangesButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ConfirmChangesButton.Location = new System.Drawing.Point(940, 617); this.ConfirmChangesButton.Name = "ConfirmChangesButton"; - this.ConfirmChangesButton.Size = new System.Drawing.Size(112, 35); + this.ConfirmChangesButton.Size = new System.Drawing.Size(75, 23); this.ConfirmChangesButton.TabIndex = 5; this.ConfirmChangesButton.Text = " Apply"; this.ConfirmChangesButton.UseVisualStyleBackColor = true; @@ -1147,10 +1106,9 @@ private void InitializeComponent() this.ChangeType, this.Reason}); this.ChangesListView.FullRowSelect = true; - this.ChangesListView.Location = new System.Drawing.Point(-2, 0); - this.ChangesListView.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ChangesListView.Location = new System.Drawing.Point(-1, 0); this.ChangesListView.Name = "ChangesListView"; - this.ChangesListView.Size = new System.Drawing.Size(1532, 939); + this.ChangesListView.Size = new System.Drawing.Size(1022, 611); this.ChangesListView.TabIndex = 4; this.ChangesListView.UseCompatibleStateImageBehavior = false; this.ChangesListView.View = System.Windows.Forms.View.Details; @@ -1177,11 +1135,10 @@ private void InitializeComponent() this.WaitTabPage.Controls.Add(this.LogTextBox); this.WaitTabPage.Controls.Add(this.DialogProgressBar); this.WaitTabPage.Controls.Add(this.MessageTextBox); - this.WaitTabPage.Location = new System.Drawing.Point(4, 29); - this.WaitTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.WaitTabPage.Location = new System.Drawing.Point(4, 22); this.WaitTabPage.Name = "WaitTabPage"; - this.WaitTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.WaitTabPage.Size = new System.Drawing.Size(1536, 1001); + this.WaitTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.WaitTabPage.Size = new System.Drawing.Size(1021, 612); this.WaitTabPage.TabIndex = 1; this.WaitTabPage.Text = "Status log"; // @@ -1189,10 +1146,9 @@ private void InitializeComponent() // this.CancelCurrentActionButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.CancelCurrentActionButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.CancelCurrentActionButton.Location = new System.Drawing.Point(1410, 951); - this.CancelCurrentActionButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.CancelCurrentActionButton.Location = new System.Drawing.Point(940, 618); this.CancelCurrentActionButton.Name = "CancelCurrentActionButton"; - this.CancelCurrentActionButton.Size = new System.Drawing.Size(112, 35); + this.CancelCurrentActionButton.Size = new System.Drawing.Size(75, 23); this.CancelCurrentActionButton.TabIndex = 9; this.CancelCurrentActionButton.Text = "Cancel"; this.CancelCurrentActionButton.UseVisualStyleBackColor = true; @@ -1204,23 +1160,21 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.LogTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.LogTextBox.Location = new System.Drawing.Point(14, 89); - this.LogTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.LogTextBox.Location = new System.Drawing.Point(9, 58); this.LogTextBox.Multiline = true; this.LogTextBox.Name = "LogTextBox"; this.LogTextBox.ReadOnly = true; this.LogTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.LogTextBox.Size = new System.Drawing.Size(1505, 851); + this.LogTextBox.Size = new System.Drawing.Size(1004, 554); this.LogTextBox.TabIndex = 8; // // DialogProgressBar // this.DialogProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.DialogProgressBar.Location = new System.Drawing.Point(14, 45); - this.DialogProgressBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.DialogProgressBar.Location = new System.Drawing.Point(9, 29); this.DialogProgressBar.Name = "DialogProgressBar"; - this.DialogProgressBar.Size = new System.Drawing.Size(1506, 35); + this.DialogProgressBar.Size = new System.Drawing.Size(1004, 23); this.DialogProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee; this.DialogProgressBar.TabIndex = 7; // @@ -1231,12 +1185,11 @@ private void InitializeComponent() this.MessageTextBox.BackColor = System.Drawing.SystemColors.Control; this.MessageTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; this.MessageTextBox.Enabled = false; - this.MessageTextBox.Location = new System.Drawing.Point(12, 9); - this.MessageTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.MessageTextBox.Location = new System.Drawing.Point(8, 6); this.MessageTextBox.Multiline = true; this.MessageTextBox.Name = "MessageTextBox"; this.MessageTextBox.ReadOnly = true; - this.MessageTextBox.Size = new System.Drawing.Size(1510, 26); + this.MessageTextBox.Size = new System.Drawing.Size(1007, 17); this.MessageTextBox.TabIndex = 6; this.MessageTextBox.Text = "Waiting for operation to complete"; this.MessageTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; @@ -1248,11 +1201,10 @@ private void InitializeComponent() this.ChooseRecommendedModsTabPage.Controls.Add(this.RecommendedModsToggleCheckbox); this.ChooseRecommendedModsTabPage.Controls.Add(this.RecommendedDialogLabel); this.ChooseRecommendedModsTabPage.Controls.Add(this.RecommendedModsListView); - this.ChooseRecommendedModsTabPage.Location = new System.Drawing.Point(4, 29); - this.ChooseRecommendedModsTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ChooseRecommendedModsTabPage.Location = new System.Drawing.Point(4, 22); this.ChooseRecommendedModsTabPage.Name = "ChooseRecommendedModsTabPage"; - this.ChooseRecommendedModsTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.ChooseRecommendedModsTabPage.Size = new System.Drawing.Size(1536, 1001); + this.ChooseRecommendedModsTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.ChooseRecommendedModsTabPage.Size = new System.Drawing.Size(1021, 612); this.ChooseRecommendedModsTabPage.TabIndex = 3; this.ChooseRecommendedModsTabPage.Text = "Choose recommended mods"; this.ChooseRecommendedModsTabPage.UseVisualStyleBackColor = true; @@ -1261,10 +1213,9 @@ private void InitializeComponent() // this.RecommendedModsCancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.RecommendedModsCancelButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RecommendedModsCancelButton.Location = new System.Drawing.Point(1288, 949); - this.RecommendedModsCancelButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.RecommendedModsCancelButton.Location = new System.Drawing.Point(859, 617); this.RecommendedModsCancelButton.Name = "RecommendedModsCancelButton"; - this.RecommendedModsCancelButton.Size = new System.Drawing.Size(112, 35); + this.RecommendedModsCancelButton.Size = new System.Drawing.Size(75, 23); this.RecommendedModsCancelButton.TabIndex = 8; this.RecommendedModsCancelButton.Text = "Cancel"; this.RecommendedModsCancelButton.UseVisualStyleBackColor = true; @@ -1274,10 +1225,9 @@ private void InitializeComponent() // this.RecommendedModsContinueButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.RecommendedModsContinueButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RecommendedModsContinueButton.Location = new System.Drawing.Point(1410, 949); - this.RecommendedModsContinueButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.RecommendedModsContinueButton.Location = new System.Drawing.Point(940, 617); this.RecommendedModsContinueButton.Name = "RecommendedModsContinueButton"; - this.RecommendedModsContinueButton.Size = new System.Drawing.Size(112, 35); + this.RecommendedModsContinueButton.Size = new System.Drawing.Size(75, 23); this.RecommendedModsContinueButton.TabIndex = 7; this.RecommendedModsContinueButton.Text = "Continue"; this.RecommendedModsContinueButton.UseVisualStyleBackColor = true; @@ -1288,10 +1238,9 @@ private void InitializeComponent() this.RecommendedModsToggleCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.RecommendedModsToggleCheckbox.AutoSize = true; this.RecommendedModsToggleCheckbox.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RecommendedModsToggleCheckbox.Location = new System.Drawing.Point(12, 956); - this.RecommendedModsToggleCheckbox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.RecommendedModsToggleCheckbox.Location = new System.Drawing.Point(8, 620); this.RecommendedModsToggleCheckbox.Name = "RecommendedModsToggleCheckbox"; - this.RecommendedModsToggleCheckbox.Size = new System.Drawing.Size(131, 24); + this.RecommendedModsToggleCheckbox.Size = new System.Drawing.Size(93, 17); this.RecommendedModsToggleCheckbox.TabIndex = 9; this.RecommendedModsToggleCheckbox.Text = "Toggle * Mods"; this.RecommendedModsToggleCheckbox.UseVisualStyleBackColor = true; @@ -1300,10 +1249,9 @@ private void InitializeComponent() // RecommendedDialogLabel // this.RecommendedDialogLabel.AutoSize = true; - this.RecommendedDialogLabel.Location = new System.Drawing.Point(4, 20); - this.RecommendedDialogLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.RecommendedDialogLabel.Location = new System.Drawing.Point(3, 13); this.RecommendedDialogLabel.Name = "RecommendedDialogLabel"; - this.RecommendedDialogLabel.Size = new System.Drawing.Size(627, 20); + this.RecommendedDialogLabel.Size = new System.Drawing.Size(422, 13); this.RecommendedDialogLabel.TabIndex = 6; this.RecommendedDialogLabel.Text = "The following modules have been recommended by one or more of the chosen modules:" + ""; @@ -1320,10 +1268,9 @@ private void InitializeComponent() this.columnHeader4, this.columnHeader5}); this.RecommendedModsListView.FullRowSelect = true; - this.RecommendedModsListView.Location = new System.Drawing.Point(9, 45); - this.RecommendedModsListView.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.RecommendedModsListView.Location = new System.Drawing.Point(6, 29); this.RecommendedModsListView.Name = "RecommendedModsListView"; - this.RecommendedModsListView.Size = new System.Drawing.Size(1510, 894); + this.RecommendedModsListView.Size = new System.Drawing.Size(1007, 582); this.RecommendedModsListView.TabIndex = 5; this.RecommendedModsListView.UseCompatibleStateImageBehavior = false; this.RecommendedModsListView.View = System.Windows.Forms.View.Details; @@ -1349,11 +1296,10 @@ private void InitializeComponent() this.ChooseProvidedModsTabPage.Controls.Add(this.ChooseProvidedModsContinueButton); this.ChooseProvidedModsTabPage.Controls.Add(this.ChooseProvidedModsListView); this.ChooseProvidedModsTabPage.Controls.Add(this.ChooseProvidedModsLabel); - this.ChooseProvidedModsTabPage.Location = new System.Drawing.Point(4, 29); - this.ChooseProvidedModsTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ChooseProvidedModsTabPage.Location = new System.Drawing.Point(4, 22); this.ChooseProvidedModsTabPage.Name = "ChooseProvidedModsTabPage"; - this.ChooseProvidedModsTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.ChooseProvidedModsTabPage.Size = new System.Drawing.Size(1536, 1001); + this.ChooseProvidedModsTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.ChooseProvidedModsTabPage.Size = new System.Drawing.Size(1021, 612); this.ChooseProvidedModsTabPage.TabIndex = 4; this.ChooseProvidedModsTabPage.Text = "Choose mods"; this.ChooseProvidedModsTabPage.UseVisualStyleBackColor = true; @@ -1362,10 +1308,9 @@ private void InitializeComponent() // this.ChooseProvidedModsCancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.ChooseProvidedModsCancelButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.ChooseProvidedModsCancelButton.Location = new System.Drawing.Point(1286, 948); - this.ChooseProvidedModsCancelButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ChooseProvidedModsCancelButton.Location = new System.Drawing.Point(857, 616); this.ChooseProvidedModsCancelButton.Name = "ChooseProvidedModsCancelButton"; - this.ChooseProvidedModsCancelButton.Size = new System.Drawing.Size(112, 35); + this.ChooseProvidedModsCancelButton.Size = new System.Drawing.Size(75, 23); this.ChooseProvidedModsCancelButton.TabIndex = 10; this.ChooseProvidedModsCancelButton.Text = "Cancel"; this.ChooseProvidedModsCancelButton.UseVisualStyleBackColor = true; @@ -1375,10 +1320,9 @@ private void InitializeComponent() // this.ChooseProvidedModsContinueButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.ChooseProvidedModsContinueButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.ChooseProvidedModsContinueButton.Location = new System.Drawing.Point(1407, 948); - this.ChooseProvidedModsContinueButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ChooseProvidedModsContinueButton.Location = new System.Drawing.Point(938, 616); this.ChooseProvidedModsContinueButton.Name = "ChooseProvidedModsContinueButton"; - this.ChooseProvidedModsContinueButton.Size = new System.Drawing.Size(112, 35); + this.ChooseProvidedModsContinueButton.Size = new System.Drawing.Size(75, 23); this.ChooseProvidedModsContinueButton.TabIndex = 9; this.ChooseProvidedModsContinueButton.Text = "Continue"; this.ChooseProvidedModsContinueButton.UseVisualStyleBackColor = true; @@ -1396,11 +1340,10 @@ private void InitializeComponent() this.columnHeader8}); this.ChooseProvidedModsListView.FullRowSelect = true; this.ChooseProvidedModsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.ChooseProvidedModsListView.Location = new System.Drawing.Point(9, 43); - this.ChooseProvidedModsListView.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ChooseProvidedModsListView.Location = new System.Drawing.Point(6, 28); this.ChooseProvidedModsListView.MultiSelect = false; this.ChooseProvidedModsListView.Name = "ChooseProvidedModsListView"; - this.ChooseProvidedModsListView.Size = new System.Drawing.Size(1510, 894); + this.ChooseProvidedModsListView.Size = new System.Drawing.Size(1007, 582); this.ChooseProvidedModsListView.TabIndex = 8; this.ChooseProvidedModsListView.UseCompatibleStateImageBehavior = false; this.ChooseProvidedModsListView.View = System.Windows.Forms.View.Details; @@ -1418,25 +1361,24 @@ private void InitializeComponent() // ChooseProvidedModsLabel // this.ChooseProvidedModsLabel.AutoSize = true; - this.ChooseProvidedModsLabel.Location = new System.Drawing.Point(9, 18); - this.ChooseProvidedModsLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.ChooseProvidedModsLabel.Location = new System.Drawing.Point(6, 12); this.ChooseProvidedModsLabel.Name = "ChooseProvidedModsLabel"; - this.ChooseProvidedModsLabel.Size = new System.Drawing.Size(568, 20); + this.ChooseProvidedModsLabel.Size = new System.Drawing.Size(383, 13); this.ChooseProvidedModsLabel.TabIndex = 7; this.ChooseProvidedModsLabel.Text = "Several mods provide the virtual module Foo, choose one of the following mods:"; // - // reportAnIssueToolStripMenuItem + // kSPInstanceSettingsToolStripMenuItem // - this.reportAnIssueToolStripMenuItem.Name = "reportAnIssueToolStripMenuItem"; - this.reportAnIssueToolStripMenuItem.Size = new System.Drawing.Size(230, 30); - this.reportAnIssueToolStripMenuItem.Text = "Report an issue..."; - this.reportAnIssueToolStripMenuItem.Click += new System.EventHandler(this.reportAnIssueToolStripMenuItem_Click); + this.kSPInstanceSettingsToolStripMenuItem.Name = "kSPInstanceSettingsToolStripMenuItem"; + this.kSPInstanceSettingsToolStripMenuItem.Size = new System.Drawing.Size(211, 24); + this.kSPInstanceSettingsToolStripMenuItem.Text = "KSP instance settings"; + this.kSPInstanceSettingsToolStripMenuItem.Click += new System.EventHandler(this.kSPInstanceSettingsToolStripMenuItem_Click); // // Main // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1544, 1038); + this.ClientSize = new System.Drawing.Size(1029, 675); this.Controls.Add(this.MainTabControl); this.Controls.Add(this.StatusPanel); this.Controls.Add(this.statusStrip1); @@ -1444,8 +1386,7 @@ private void InitializeComponent() this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.KeyPreview = true; this.MainMenuStrip = this.menuStrip1; - this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.MinimumSize = new System.Drawing.Size(1280, 700); + this.MinimumSize = new System.Drawing.Size(859, 470); this.Name = "Main"; this.Text = "CKAN-GUI"; this.menuStrip1.ResumeLayout(false); @@ -1571,7 +1512,6 @@ private void InitializeComponent() private ToolStripMenuItem pluginsToolStripMenuItem; public ToolStripMenuItem settingsToolStripMenuItem; private ToolStripMenuItem installFromckanToolStripMenuItem; - private TextBox FilterByAuthorTextBox; private Label FilterByAuthorLabel; private ToolStripMenuItem FilterAllButton; private ToolStripSeparator toolStripSeparator1; @@ -1597,5 +1537,8 @@ private void InitializeComponent() private ToolStripMenuItem NavBackwardToolButton; private ToolStripMenuItem NavForwardToolButton; private ToolStripMenuItem reportAnIssueToolStripMenuItem; + private ToolStripMenuItem kSPInstanceSettingsToolStripMenuItem; + private DataGridViewCheckBoxColumn Update; + private HintTextBox FilterByAuthorTextBox; } } diff --git a/GUI/Main.cs b/GUI/Main.cs index 53d3d0c789..3c232c32e2 100644 --- a/GUI/Main.cs +++ b/GUI/Main.cs @@ -1064,6 +1064,16 @@ private void openKspDirectoryToolStripMenuItem_Click(object sender, EventArgs e) Process.Start(Instance.manager.CurrentInstance.GameDir()); } + private void kSPInstanceSettingsToolStripMenuItem_Click(object sender, EventArgs e) + { + var instanceSettingsDialog = new KspInstanceSettingsDialog(Instance.manager.CurrentInstance); + instanceSettingsDialog.ShowDialog(); + + UpdateModsList(repo_updated: false); + + Filter((GUIModFilter)configuration.ActiveFilter); + } + private void DependsGraphTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { FilterByNameTextBox.Text = ""; diff --git a/Tests/Core/Types/GameComparator.cs b/Tests/Core/Types/GameComparator.cs index cf579e3af3..44e7ebb54c 100644 --- a/Tests/Core/Types/GameComparator.cs +++ b/Tests/Core/Types/GameComparator.cs @@ -69,6 +69,198 @@ public void GenerallySafeStrict(Type type, bool expected) Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria (gameVersion), gameMod)); } + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), true)] + [TestCase(typeof(CKAN.GrasGameComparator), true)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void CompatibleWithManyKspVersions(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + // We're going to tweak compatibly to mark the mod as being for 1.0.* + gameMod.ksp_version = KspVersion.Parse("1.0"); + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(gameVersion), gameMod)); + } + + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), false)] + [TestCase(typeof(CKAN.GrasGameComparator), false)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void IncompatibleWhenMarkedForManyKspVersions(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + // We're going to tweak compatibly to mark the mod as being for 1.1.* + gameMod.ksp_version = KspVersion.Parse("1.1"); + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(gameVersion), gameMod)); + } + + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), true)] + [TestCase(typeof(CKAN.GrasGameComparator), true)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void CompatibleBothBuildVersionsSpecified(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + gameMod.ksp_version = KspVersion.Parse("1.0.4.1234"); + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0.4.1234")), gameMod)); + } + + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), false)] + [TestCase(typeof(CKAN.GrasGameComparator), false)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void IncompatibleBothBuildVersionsSpecified(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + gameMod.ksp_version = KspVersion.Parse("1.0.4.1235"); + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0.4.1234")), gameMod)); + } + + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), true)] + [TestCase(typeof(CKAN.GrasGameComparator), true)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void CompatibleGameBuildVersionSpecified(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + gameMod.ksp_version = KspVersion.Parse("1.0.4"); + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0.4.1234")), gameMod)); + } + + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), true)] + [TestCase(typeof(CKAN.GrasGameComparator), true)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void IncompatibleModBuildVersionSpecifiedButGameIsNot(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + gameMod.ksp_version = KspVersion.Parse("1.0.4.1234"); + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0.4")), gameMod)); + } + + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), true)] + [TestCase(typeof(CKAN.GrasGameComparator), true)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void IncompatibleModBuildVersionSpecifiedButGameIsNot2(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + gameMod.ksp_version = KspVersion.Parse("1.0.4.0000"); + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0.4")), gameMod)); + } + + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), true)] + [TestCase(typeof(CKAN.GrasGameComparator), true)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void CompatibleBecauseGameVersionIsRange(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + gameMod.ksp_version = KspVersion.Parse("1.0.4"); + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0")), gameMod)); + } + + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), false)] + [TestCase(typeof(CKAN.GrasGameComparator), false)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void IncompatibleWhenGameVersionIsRange(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + gameMod.ksp_version = KspVersion.Parse("1.1"); + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0")), gameMod)); + } + + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), true)] + [TestCase(typeof(CKAN.GrasGameComparator), true)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void CompatibleWhenApperIsUnbounded(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + gameMod.ksp_version = null; + gameMod.ksp_version_min = KspVersion.Parse("1.0"); + gameMod.ksp_version_max = null; + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(gameVersion), gameMod)); + } + + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), false)] + [TestCase(typeof(CKAN.GrasGameComparator), false)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void IncompatibleWhenApperIsUnbounded(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + gameMod.ksp_version = null; + gameMod.ksp_version_min = KspVersion.Parse("1.1"); + gameMod.ksp_version_max = null; + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(gameVersion), gameMod)); + } + + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), true)] + [TestCase(typeof(CKAN.GrasGameComparator), true)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void CompatibleWhenLowerIsUnbounded(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + gameMod.ksp_version = null; + gameMod.ksp_version_min = null; + gameMod.ksp_version_max = KspVersion.Parse("1.1"); + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(gameVersion), gameMod)); + } + + [Test] + [TestCase(typeof(CKAN.StrictGameComparator), false)] + [TestCase(typeof(CKAN.GrasGameComparator), false)] + [TestCase(typeof(CKAN.YoyoGameComparator), true)] + public void IncompatibleWhenLowerIsUnbounded(Type type, bool expected) + { + var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + + gameMod.ksp_version = null; + gameMod.ksp_version_min = null; + gameMod.ksp_version_max = KspVersion.Parse("1.0"); + + // Now test! + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(gameVersion), gameMod)); + } + [Test] [TestCase(typeof(CKAN.StrictGameComparator), false)] [TestCase(typeof(CKAN.GrasGameComparator), false)] From cac30022e1c00c76ea06fd54932e776267c1b3b6 Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Mon, 12 Dec 2016 19:22:23 +0100 Subject: [PATCH 03/19] Redesigned dialog to choose compatible versions + it also displays major KSP versions --- Core/KSP.cs | 5 ++ GUI/CKAN-GUI.csproj | 10 +-- GUI/ChooseKSPInstance.cs | 2 +- ...> CompatibleKspVersionsDialog.Designer.cs} | 41 ++++++------ ...alog.cs => CompatibleKspVersionsDialog.cs} | 39 +++++++++-- ....resx => CompatibleKspVersionsDialog.resx} | 0 GUI/Main.Designer.cs | 66 +++++++++---------- GUI/Main.cs | 7 +- 8 files changed, 102 insertions(+), 68 deletions(-) rename GUI/{KspInstanceSettingsDialog.Designer.cs => CompatibleKspVersionsDialog.Designer.cs} (89%) rename GUI/{KspInstanceSettingsDialog.cs => CompatibleKspVersionsDialog.cs} (52%) rename GUI/{KspInstanceSettingsDialog.resx => CompatibleKspVersionsDialog.resx} (100%) diff --git a/Core/KSP.cs b/Core/KSP.cs index fdd7418df9..492abdc1b6 100644 --- a/Core/KSP.cs +++ b/Core/KSP.cs @@ -101,6 +101,11 @@ public void SetCompatibleVersions(List compatibleVersions) this.compatibleVersions = compatibleVersions; } + public List GetCompatibleVersions() + { + return new List(this.compatibleVersions); + } + #endregion #region Destructors and Disposal diff --git a/GUI/CKAN-GUI.csproj b/GUI/CKAN-GUI.csproj index 598287dc8f..fb5dc645cb 100644 --- a/GUI/CKAN-GUI.csproj +++ b/GUI/CKAN-GUI.csproj @@ -101,11 +101,11 @@ KSPCommandLineOptionsDialog.cs - + Form - - KspInstanceSettingsDialog.cs + + CompatibleKspVersionsDialog.cs Form @@ -196,8 +196,8 @@ KSPCommandLineOptionsDialog.cs - - KspInstanceSettingsDialog.cs + + CompatibleKspVersionsDialog.cs Main.cs diff --git a/GUI/ChooseKSPInstance.cs b/GUI/ChooseKSPInstance.cs index 3aa94bfe2a..56b56da7e8 100644 --- a/GUI/ChooseKSPInstance.cs +++ b/GUI/ChooseKSPInstance.cs @@ -124,7 +124,7 @@ private void Forget_Click(object sender, EventArgs e) private void InstallSettingsButton_Click (object sender, EventArgs e) { var instanceName = (string)KSPInstancesListView.SelectedItems[0].Tag; - var instanceSettingsDialog = new KspInstanceSettingsDialog(manager.Instances[instanceName]); + var instanceSettingsDialog = new CompatibleKspVersionsDialog(manager.Instances[instanceName]); instanceSettingsDialog.ShowDialog(); } diff --git a/GUI/KspInstanceSettingsDialog.Designer.cs b/GUI/CompatibleKspVersionsDialog.Designer.cs similarity index 89% rename from GUI/KspInstanceSettingsDialog.Designer.cs rename to GUI/CompatibleKspVersionsDialog.Designer.cs index d905a48a2c..016cc25321 100644 --- a/GUI/KspInstanceSettingsDialog.Designer.cs +++ b/GUI/CompatibleKspVersionsDialog.Designer.cs @@ -1,6 +1,6 @@ namespace CKAN { - partial class KspInstanceSettingsDialog + partial class CompatibleKspVersionsDialog { /// /// Required designer variable. @@ -47,17 +47,17 @@ private void InitializeComponent() // // label1 // - this.label1.Location = new System.Drawing.Point(12, 45); + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(11, 54); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(413, 35); + this.label1.Size = new System.Drawing.Size(306, 13); this.label1.TabIndex = 0; - this.label1.Text = "Assume that mods compatible with following KSP versions are also compatible with " + - "this installation:"; + this.label1.Text = "Additionally install mods compatible with following KSP versions:"; // // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(12, 27); + this.label2.Location = new System.Drawing.Point(11, 32); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(75, 13); this.label2.TabIndex = 1; @@ -65,8 +65,9 @@ private void InitializeComponent() // // label3 // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label3.ForeColor = System.Drawing.Color.Red; - this.label3.Location = new System.Drawing.Point(12, 80); + this.label3.Location = new System.Drawing.Point(9, 296); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(401, 32); this.label3.TabIndex = 2; @@ -76,7 +77,7 @@ private void InitializeComponent() // gameVersionLabel // this.gameVersionLabel.AutoSize = true; - this.gameVersionLabel.Location = new System.Drawing.Point(92, 27); + this.gameVersionLabel.Location = new System.Drawing.Point(92, 32); this.gameVersionLabel.Name = "gameVersionLabel"; this.gameVersionLabel.Size = new System.Drawing.Size(53, 13); this.gameVersionLabel.TabIndex = 3; @@ -87,8 +88,9 @@ private void InitializeComponent() this.selectedVersionsCheckedListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.selectedVersionsCheckedListBox.CheckOnClick = true; this.selectedVersionsCheckedListBox.FormattingEnabled = true; - this.selectedVersionsCheckedListBox.Location = new System.Drawing.Point(18, 115); + this.selectedVersionsCheckedListBox.Location = new System.Drawing.Point(12, 79); this.selectedVersionsCheckedListBox.Name = "selectedVersionsCheckedListBox"; this.selectedVersionsCheckedListBox.Size = new System.Drawing.Size(406, 124); this.selectedVersionsCheckedListBox.TabIndex = 4; @@ -96,7 +98,7 @@ private void InitializeComponent() // clearSelectionButton // this.clearSelectionButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.clearSelectionButton.Location = new System.Drawing.Point(18, 247); + this.clearSelectionButton.Location = new System.Drawing.Point(12, 211); this.clearSelectionButton.Name = "clearSelectionButton"; this.clearSelectionButton.Size = new System.Drawing.Size(92, 23); this.clearSelectionButton.TabIndex = 5; @@ -107,7 +109,7 @@ private void InitializeComponent() // addVersionToListButton // this.addVersionToListButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.addVersionToListButton.Location = new System.Drawing.Point(349, 245); + this.addVersionToListButton.Location = new System.Drawing.Point(343, 209); this.addVersionToListButton.Name = "addVersionToListButton"; this.addVersionToListButton.Size = new System.Drawing.Size(75, 23); this.addVersionToListButton.TabIndex = 6; @@ -119,7 +121,7 @@ private void InitializeComponent() // this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(112, 252); + this.label5.Location = new System.Drawing.Point(106, 216); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(93, 13); this.label5.TabIndex = 7; @@ -128,7 +130,7 @@ private void InitializeComponent() // addVersionToListTextBox // this.addVersionToListTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.addVersionToListTextBox.Location = new System.Drawing.Point(212, 247); + this.addVersionToListTextBox.Location = new System.Drawing.Point(206, 211); this.addVersionToListTextBox.Name = "addVersionToListTextBox"; this.addVersionToListTextBox.Size = new System.Drawing.Size(131, 20); this.addVersionToListTextBox.TabIndex = 8; @@ -136,7 +138,7 @@ private void InitializeComponent() // label6 // this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label6.Location = new System.Drawing.Point(15, 276); + this.label6.Location = new System.Drawing.Point(9, 240); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(422, 32); this.label6.TabIndex = 9; @@ -147,7 +149,7 @@ private void InitializeComponent() // this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(15, 309); + this.label7.Location = new System.Drawing.Point(9, 273); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(382, 13); this.label7.TabIndex = 10; @@ -156,7 +158,7 @@ private void InitializeComponent() // // saveButton // - this.saveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.saveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.saveButton.Location = new System.Drawing.Point(362, 331); this.saveButton.Name = "saveButton"; this.saveButton.Size = new System.Drawing.Size(75, 23); @@ -185,6 +187,7 @@ private void InitializeComponent() // // cancelButton // + this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancelButton.Location = new System.Drawing.Point(281, 331); this.cancelButton.Name = "cancelButton"; @@ -194,7 +197,7 @@ private void InitializeComponent() this.cancelButton.UseVisualStyleBackColor = true; this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); // - // KspInstanceSettingsDialog + // CompatibleKspVersionsDialog // this.AcceptButton = this.saveButton; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -217,8 +220,8 @@ private void InitializeComponent() this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.MaximizeBox = false; - this.Name = "KspInstanceSettingsDialog"; - this.Text = "Ksp Instance Settings"; + this.Name = "CompatibleKspVersionsDialog"; + this.Text = "Compatible Ksp Versions"; this.ResumeLayout(false); this.PerformLayout(); diff --git a/GUI/KspInstanceSettingsDialog.cs b/GUI/CompatibleKspVersionsDialog.cs similarity index 52% rename from GUI/KspInstanceSettingsDialog.cs rename to GUI/CompatibleKspVersionsDialog.cs index c52fea0e4c..b36890ed12 100644 --- a/GUI/KspInstanceSettingsDialog.cs +++ b/GUI/CompatibleKspVersionsDialog.cs @@ -7,24 +7,53 @@ namespace CKAN { - public partial class KspInstanceSettingsDialog : Form + public partial class CompatibleKspVersionsDialog : Form { private KSP ksp; - public KspInstanceSettingsDialog(KSP ksp) + public CompatibleKspVersionsDialog(KSP ksp) { this.ksp = ksp; InitializeComponent(); + List compatibleVersions = ksp.GetCompatibleVersions(); + gameVersionLabel.Text = ksp.Version().ToString(); gameLocationLabel.Text = ksp.GameDir(); - var knownVersions = ServiceLocator.Container.Resolve().getKnownVersions(); - knownVersions.Reverse(); + List knownVersions = new List(ServiceLocator.Container.Resolve().getKnownVersions()); + List majorVersionsList = createMajorVersionsList(knownVersions); + List compatibleVersionsLeftOthers = new List(compatibleVersions); + compatibleVersionsLeftOthers.RemoveAll((el)=>knownVersions.Contains(el) || majorVersionsList.Contains(el)); + + SortAndAddVersionsToList(compatibleVersionsLeftOthers, compatibleVersions); + SortAndAddVersionsToList(majorVersionsList, compatibleVersions); + SortAndAddVersionsToList(knownVersions, compatibleVersions); + } + + private static List createMajorVersionsList(List knownVersions) + { + Dictionary majorVersions = new Dictionary(); foreach (var version in knownVersions) + { + KspVersion fullKnownVersion = version.ToVersionRange().Lower.Value; + KspVersion toAdd = new KspVersion(fullKnownVersion.Major, fullKnownVersion.Minor); + if (!majorVersions.ContainsKey(toAdd)) + { + majorVersions.Add(toAdd, true); + } + } + return new List(majorVersions.Keys); + } + + private void SortAndAddVersionsToList(List versions, List compatibleVersions) + { + versions.Sort(); + versions.Reverse(); + foreach (var version in versions) { if (!version.Equals(ksp.Version())) { - selectedVersionsCheckedListBox.Items.Add(version, false); + selectedVersionsCheckedListBox.Items.Add(version, compatibleVersions.Contains(version)); } } } diff --git a/GUI/KspInstanceSettingsDialog.resx b/GUI/CompatibleKspVersionsDialog.resx similarity index 100% rename from GUI/KspInstanceSettingsDialog.resx rename to GUI/CompatibleKspVersionsDialog.resx diff --git a/GUI/Main.Designer.cs b/GUI/Main.Designer.cs index bd10441ccc..705e5caca1 100644 --- a/GUI/Main.Designer.cs +++ b/GUI/Main.Designer.cs @@ -43,6 +43,7 @@ private void InitializeComponent() this.cKANSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.pluginsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.kSPCommandlineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.kSPInstanceSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.reportAnIssueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -142,7 +143,6 @@ private void InitializeComponent() this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.ChooseProvidedModsLabel = new System.Windows.Forms.Label(); - this.kSPInstanceSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.menuStrip2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -249,24 +249,31 @@ private void InitializeComponent() // cKANSettingsToolStripMenuItem // this.cKANSettingsToolStripMenuItem.Name = "cKANSettingsToolStripMenuItem"; - this.cKANSettingsToolStripMenuItem.Size = new System.Drawing.Size(211, 24); + this.cKANSettingsToolStripMenuItem.Size = new System.Drawing.Size(233, 24); this.cKANSettingsToolStripMenuItem.Text = "CKAN settings"; this.cKANSettingsToolStripMenuItem.Click += new System.EventHandler(this.CKANSettingsToolStripMenuItem_Click); // // pluginsToolStripMenuItem // this.pluginsToolStripMenuItem.Name = "pluginsToolStripMenuItem"; - this.pluginsToolStripMenuItem.Size = new System.Drawing.Size(211, 24); + this.pluginsToolStripMenuItem.Size = new System.Drawing.Size(233, 24); this.pluginsToolStripMenuItem.Text = "CKAN plugins"; this.pluginsToolStripMenuItem.Click += new System.EventHandler(this.pluginsToolStripMenuItem_Click); // // kSPCommandlineToolStripMenuItem // this.kSPCommandlineToolStripMenuItem.Name = "kSPCommandlineToolStripMenuItem"; - this.kSPCommandlineToolStripMenuItem.Size = new System.Drawing.Size(211, 24); + this.kSPCommandlineToolStripMenuItem.Size = new System.Drawing.Size(233, 24); this.kSPCommandlineToolStripMenuItem.Text = "KSP command-line"; this.kSPCommandlineToolStripMenuItem.Click += new System.EventHandler(this.KSPCommandlineToolStripMenuItem_Click); // + // kSPInstanceSettingsToolStripMenuItem + // + this.kSPInstanceSettingsToolStripMenuItem.Name = "kSPInstanceSettingsToolStripMenuItem"; + this.kSPInstanceSettingsToolStripMenuItem.Size = new System.Drawing.Size(233, 24); + this.kSPInstanceSettingsToolStripMenuItem.Text = "Compatible KSP versions"; + this.kSPInstanceSettingsToolStripMenuItem.Click += new System.EventHandler(this.CompatibleKspVersionsToolStripMenuItem_Click); + // // helpToolStripMenuItem // this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -590,7 +597,7 @@ private void InitializeComponent() this.MetadataTabPage.Controls.Add(this.splitContainer2); this.MetadataTabPage.Location = new System.Drawing.Point(4, 25); this.MetadataTabPage.Name = "MetadataTabPage"; - this.MetadataTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.MetadataTabPage.Padding = new System.Windows.Forms.Padding(3); this.MetadataTabPage.Size = new System.Drawing.Size(354, 502); this.MetadataTabPage.TabIndex = 0; this.MetadataTabPage.Text = "Metadata"; @@ -612,7 +619,7 @@ private void InitializeComponent() // this.splitContainer2.Panel2.Controls.Add(this.MetaDataLowerLayoutPanel); this.splitContainer2.Size = new System.Drawing.Size(348, 496); - this.splitContainer2.SplitterDistance = 237; + this.splitContainer2.SplitterDistance = 236; this.splitContainer2.TabIndex = 0; // // MetaDataUpperLayoutPanel @@ -628,7 +635,7 @@ private void InitializeComponent() this.MetaDataUpperLayoutPanel.RowCount = 2; this.MetaDataUpperLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); this.MetaDataUpperLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F)); - this.MetaDataUpperLayoutPanel.Size = new System.Drawing.Size(346, 235); + this.MetaDataUpperLayoutPanel.Size = new System.Drawing.Size(346, 234); this.MetaDataUpperLayoutPanel.TabIndex = 0; // // MetadataModuleNameLabel @@ -638,7 +645,7 @@ private void InitializeComponent() this.MetadataModuleNameLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.MetadataModuleNameLabel.Location = new System.Drawing.Point(3, 0); this.MetadataModuleNameLabel.Name = "MetadataModuleNameLabel"; - this.MetadataModuleNameLabel.Size = new System.Drawing.Size(340, 47); + this.MetadataModuleNameLabel.Size = new System.Drawing.Size(340, 46); this.MetadataModuleNameLabel.TabIndex = 0; this.MetadataModuleNameLabel.Text = "Mod Name"; this.MetadataModuleNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -647,7 +654,7 @@ private void InitializeComponent() // this.MetadataModuleAbstractLabel.BorderStyle = System.Windows.Forms.BorderStyle.None; this.MetadataModuleAbstractLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleAbstractLabel.Location = new System.Drawing.Point(3, 50); + this.MetadataModuleAbstractLabel.Location = new System.Drawing.Point(3, 49); this.MetadataModuleAbstractLabel.Name = "MetadataModuleAbstractLabel"; this.MetadataModuleAbstractLabel.ReadOnly = true; this.MetadataModuleAbstractLabel.Size = new System.Drawing.Size(340, 182); @@ -689,7 +696,7 @@ private void InitializeComponent() this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 13F)); - this.MetaDataLowerLayoutPanel.Size = new System.Drawing.Size(346, 253); + this.MetaDataLowerLayoutPanel.Size = new System.Drawing.Size(346, 254); this.MetaDataLowerLayoutPanel.TabIndex = 0; // // IdentifierLabel @@ -871,8 +878,8 @@ private void InitializeComponent() this.RelationshipTabPage.Controls.Add(this.DependsGraphTree); this.RelationshipTabPage.Location = new System.Drawing.Point(4, 25); this.RelationshipTabPage.Name = "RelationshipTabPage"; - this.RelationshipTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); - this.RelationshipTabPage.Size = new System.Drawing.Size(233, 514); + this.RelationshipTabPage.Padding = new System.Windows.Forms.Padding(3); + this.RelationshipTabPage.Size = new System.Drawing.Size(354, 502); this.RelationshipTabPage.TabIndex = 1; this.RelationshipTabPage.Text = "Relationships"; this.RelationshipTabPage.UseVisualStyleBackColor = true; @@ -891,7 +898,7 @@ private void InitializeComponent() "Conflicts"}); this.ModuleRelationshipType.Location = new System.Drawing.Point(6, 7); this.ModuleRelationshipType.Name = "ModuleRelationshipType"; - this.ModuleRelationshipType.Size = new System.Drawing.Size(221, 21); + this.ModuleRelationshipType.Size = new System.Drawing.Size(342, 21); this.ModuleRelationshipType.TabIndex = 1; this.ModuleRelationshipType.SelectedIndexChanged += new System.EventHandler(this.ModuleRelationshipType_SelectedIndexChanged); // @@ -903,7 +910,7 @@ private void InitializeComponent() this.DependsGraphTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.DependsGraphTree.Location = new System.Drawing.Point(3, 34); this.DependsGraphTree.Name = "DependsGraphTree"; - this.DependsGraphTree.Size = new System.Drawing.Size(227, 472); + this.DependsGraphTree.Size = new System.Drawing.Size(348, 460); this.DependsGraphTree.TabIndex = 0; this.DependsGraphTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.DependsGraphTree_NodeMouseDoubleClick); // @@ -914,8 +921,8 @@ private void InitializeComponent() this.ContentTabPage.Controls.Add(this.NotCachedLabel); this.ContentTabPage.Location = new System.Drawing.Point(4, 25); this.ContentTabPage.Name = "ContentTabPage"; - this.ContentTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); - this.ContentTabPage.Size = new System.Drawing.Size(233, 514); + this.ContentTabPage.Padding = new System.Windows.Forms.Padding(3); + this.ContentTabPage.Size = new System.Drawing.Size(354, 502); this.ContentTabPage.TabIndex = 2; this.ContentTabPage.Text = "Contents"; this.ContentTabPage.UseVisualStyleBackColor = true; @@ -929,7 +936,7 @@ private void InitializeComponent() this.ContentsPreviewTree.Enabled = false; this.ContentsPreviewTree.Location = new System.Drawing.Point(0, 65); this.ContentsPreviewTree.Name = "ContentsPreviewTree"; - this.ContentsPreviewTree.Size = new System.Drawing.Size(230, 444); + this.ContentsPreviewTree.Size = new System.Drawing.Size(351, 432); this.ContentsPreviewTree.TabIndex = 2; this.ContentsPreviewTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.ContentsPreviewTree_NodeMouseDoubleClick); // @@ -996,7 +1003,7 @@ private void InitializeComponent() this.ManageModsTabPage.Controls.Add(this.splitContainer1); this.ManageModsTabPage.Location = new System.Drawing.Point(4, 22); this.ManageModsTabPage.Name = "ManageModsTabPage"; - this.ManageModsTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.ManageModsTabPage.Padding = new System.Windows.Forms.Padding(3); this.ManageModsTabPage.Size = new System.Drawing.Size(1021, 600); this.ManageModsTabPage.TabIndex = 0; this.ManageModsTabPage.Text = "Manage mods"; @@ -1065,8 +1072,8 @@ private void InitializeComponent() this.ChangesetTabPage.Controls.Add(this.ChangesListView); this.ChangesetTabPage.Location = new System.Drawing.Point(4, 22); this.ChangesetTabPage.Name = "ChangesetTabPage"; - this.ChangesetTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); - this.ChangesetTabPage.Size = new System.Drawing.Size(1021, 612); + this.ChangesetTabPage.Padding = new System.Windows.Forms.Padding(3); + this.ChangesetTabPage.Size = new System.Drawing.Size(1021, 600); this.ChangesetTabPage.TabIndex = 2; this.ChangesetTabPage.Text = "Changeset"; this.ChangesetTabPage.UseVisualStyleBackColor = true; @@ -1137,8 +1144,8 @@ private void InitializeComponent() this.WaitTabPage.Controls.Add(this.MessageTextBox); this.WaitTabPage.Location = new System.Drawing.Point(4, 22); this.WaitTabPage.Name = "WaitTabPage"; - this.WaitTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); - this.WaitTabPage.Size = new System.Drawing.Size(1021, 612); + this.WaitTabPage.Padding = new System.Windows.Forms.Padding(3); + this.WaitTabPage.Size = new System.Drawing.Size(1021, 600); this.WaitTabPage.TabIndex = 1; this.WaitTabPage.Text = "Status log"; // @@ -1203,8 +1210,8 @@ private void InitializeComponent() this.ChooseRecommendedModsTabPage.Controls.Add(this.RecommendedModsListView); this.ChooseRecommendedModsTabPage.Location = new System.Drawing.Point(4, 22); this.ChooseRecommendedModsTabPage.Name = "ChooseRecommendedModsTabPage"; - this.ChooseRecommendedModsTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); - this.ChooseRecommendedModsTabPage.Size = new System.Drawing.Size(1021, 612); + this.ChooseRecommendedModsTabPage.Padding = new System.Windows.Forms.Padding(3); + this.ChooseRecommendedModsTabPage.Size = new System.Drawing.Size(1021, 600); this.ChooseRecommendedModsTabPage.TabIndex = 3; this.ChooseRecommendedModsTabPage.Text = "Choose recommended mods"; this.ChooseRecommendedModsTabPage.UseVisualStyleBackColor = true; @@ -1298,8 +1305,8 @@ private void InitializeComponent() this.ChooseProvidedModsTabPage.Controls.Add(this.ChooseProvidedModsLabel); this.ChooseProvidedModsTabPage.Location = new System.Drawing.Point(4, 22); this.ChooseProvidedModsTabPage.Name = "ChooseProvidedModsTabPage"; - this.ChooseProvidedModsTabPage.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); - this.ChooseProvidedModsTabPage.Size = new System.Drawing.Size(1021, 612); + this.ChooseProvidedModsTabPage.Padding = new System.Windows.Forms.Padding(3); + this.ChooseProvidedModsTabPage.Size = new System.Drawing.Size(1021, 600); this.ChooseProvidedModsTabPage.TabIndex = 4; this.ChooseProvidedModsTabPage.Text = "Choose mods"; this.ChooseProvidedModsTabPage.UseVisualStyleBackColor = true; @@ -1367,13 +1374,6 @@ private void InitializeComponent() this.ChooseProvidedModsLabel.TabIndex = 7; this.ChooseProvidedModsLabel.Text = "Several mods provide the virtual module Foo, choose one of the following mods:"; // - // kSPInstanceSettingsToolStripMenuItem - // - this.kSPInstanceSettingsToolStripMenuItem.Name = "kSPInstanceSettingsToolStripMenuItem"; - this.kSPInstanceSettingsToolStripMenuItem.Size = new System.Drawing.Size(211, 24); - this.kSPInstanceSettingsToolStripMenuItem.Text = "KSP instance settings"; - this.kSPInstanceSettingsToolStripMenuItem.Click += new System.EventHandler(this.kSPInstanceSettingsToolStripMenuItem_Click); - // // Main // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/GUI/Main.cs b/GUI/Main.cs index 3c232c32e2..ce9e09d178 100644 --- a/GUI/Main.cs +++ b/GUI/Main.cs @@ -1064,14 +1064,11 @@ private void openKspDirectoryToolStripMenuItem_Click(object sender, EventArgs e) Process.Start(Instance.manager.CurrentInstance.GameDir()); } - private void kSPInstanceSettingsToolStripMenuItem_Click(object sender, EventArgs e) + private void CompatibleKspVersionsToolStripMenuItem_Click(object sender, EventArgs e) { - var instanceSettingsDialog = new KspInstanceSettingsDialog(Instance.manager.CurrentInstance); + var instanceSettingsDialog = new CompatibleKspVersionsDialog(Instance.manager.CurrentInstance); instanceSettingsDialog.ShowDialog(); - UpdateModsList(repo_updated: false); - - Filter((GUIModFilter)configuration.ActiveFilter); } private void DependsGraphTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) From a35bcd11ae7510a3be00c29e88b781409b4d1da0 Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Mon, 12 Dec 2016 19:28:51 +0100 Subject: [PATCH 04/19] Reverted changes made in ChooseKspInstance - the "settings" button is no longer displayed there --- GUI/ChooseKSPInstance.Designer.cs | 29 +++++++---------------------- GUI/ChooseKSPInstance.cs | 10 ++-------- 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/GUI/ChooseKSPInstance.Designer.cs b/GUI/ChooseKSPInstance.Designer.cs index 8479e6977d..96bab3bb7b 100644 --- a/GUI/ChooseKSPInstance.Designer.cs +++ b/GUI/ChooseKSPInstance.Designer.cs @@ -42,7 +42,6 @@ private void InitializeComponent() this.RenameButton = new System.Windows.Forms.Button(); this.SetAsDefaultCheckbox = new System.Windows.Forms.CheckBox(); this.ForgetButton = new System.Windows.Forms.Button(); - this.InstallSettingsButton = new System.Windows.Forms.Button (); this.SuspendLayout(); // // KSPInstancesListView @@ -62,7 +61,7 @@ private void InitializeComponent() this.KSPInstancesListView.Location = new System.Drawing.Point(12, 13); this.KSPInstancesListView.MultiSelect = false; this.KSPInstancesListView.Name = "KSPInstancesListView"; - this.KSPInstancesListView.Size = new System.Drawing.Size(510, 301); + this.KSPInstancesListView.Size = new System.Drawing.Size(462, 301); this.KSPInstancesListView.TabIndex = 0; this.KSPInstancesListView.UseCompatibleStateImageBehavior = false; this.KSPInstancesListView.View = System.Windows.Forms.View.Details; @@ -90,7 +89,7 @@ private void InitializeComponent() this.SelectButton.DialogResult = System.Windows.Forms.DialogResult.OK; this.SelectButton.Enabled = false; this.SelectButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.SelectButton.Location = new System.Drawing.Point(447, 320); + this.SelectButton.Location = new System.Drawing.Point(399, 320); this.SelectButton.Name = "SelectButton"; this.SelectButton.Size = new System.Drawing.Size(75, 23); this.SelectButton.TabIndex = 1; @@ -102,7 +101,7 @@ private void InitializeComponent() // this.AddNewButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.AddNewButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.AddNewButton.Location = new System.Drawing.Point(366, 320); + this.AddNewButton.Location = new System.Drawing.Point(318, 320); this.AddNewButton.Name = "AddNewButton"; this.AddNewButton.Size = new System.Drawing.Size(75, 23); this.AddNewButton.TabIndex = 2; @@ -114,7 +113,7 @@ private void InitializeComponent() // this.RenameButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.RenameButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RenameButton.Location = new System.Drawing.Point(285, 320); + this.RenameButton.Location = new System.Drawing.Point(237, 320); this.RenameButton.Name = "RenameButton"; this.RenameButton.Size = new System.Drawing.Size(75, 23); this.RenameButton.TabIndex = 3; @@ -136,33 +135,20 @@ private void InitializeComponent() // this.ForgetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.ForgetButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.ForgetButton.Location = new System.Drawing.Point(204, 320); + this.ForgetButton.Location = new System.Drawing.Point(156, 320); this.ForgetButton.Name = "ForgetButton"; this.ForgetButton.Size = new System.Drawing.Size(75, 23); this.ForgetButton.TabIndex = 5; this.ForgetButton.Text = "Forget"; this.ForgetButton.UseVisualStyleBackColor = true; this.ForgetButton.Click += new System.EventHandler(this.Forget_Click); - // - // InstallSettingsButton - // - this.InstallSettingsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.InstallSettingsButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.InstallSettingsButton.Location = new System.Drawing.Point(123, 320); - this.InstallSettingsButton.Name = "InstallSettingsButton"; - this.InstallSettingsButton.Size = new System.Drawing.Size(75, 23); - this.InstallSettingsButton.TabIndex = 6; - this.InstallSettingsButton.Text = "Settings"; - this.InstallSettingsButton.UseVisualStyleBackColor = true; - this.InstallSettingsButton.Click += new System.EventHandler(this.InstallSettingsButton_Click); - // + // // ChooseKSPInstance // this.AcceptButton = this.SelectButton; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(534, 355); - this.Controls.Add(this.InstallSettingsButton); + this.ClientSize = new System.Drawing.Size(486, 355); this.Controls.Add(this.ForgetButton); this.Controls.Add(this.SetAsDefaultCheckbox); this.Controls.Add(this.RenameButton); @@ -188,6 +174,5 @@ private void InitializeComponent() private System.Windows.Forms.Button RenameButton; private System.Windows.Forms.CheckBox SetAsDefaultCheckbox; private System.Windows.Forms.Button ForgetButton; - private System.Windows.Forms.Button InstallSettingsButton; } } \ No newline at end of file diff --git a/GUI/ChooseKSPInstance.cs b/GUI/ChooseKSPInstance.cs index 56b56da7e8..a0095ae867 100644 --- a/GUI/ChooseKSPInstance.cs +++ b/GUI/ChooseKSPInstance.cs @@ -121,16 +121,10 @@ private void Forget_Click(object sender, EventArgs e) } - private void InstallSettingsButton_Click (object sender, EventArgs e) - { - var instanceName = (string)KSPInstancesListView.SelectedItems[0].Tag; - var instanceSettingsDialog = new CompatibleKspVersionsDialog(manager.Instances[instanceName]); - instanceSettingsDialog.ShowDialog(); - } - private void SetButtonsEnabled(bool has_instance) { - ForgetButton.Enabled = RenameButton.Enabled = SelectButton.Enabled = SetAsDefaultCheckbox.Enabled = InstallSettingsButton.Enabled = has_instance; + ForgetButton.Enabled = RenameButton.Enabled = SelectButton.Enabled = SetAsDefaultCheckbox.Enabled = has_instance; } + } } From e184753a1916a5d1ee962e62a179a42a6280cbba Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Mon, 12 Dec 2016 20:13:46 +0100 Subject: [PATCH 05/19] Compatible versions are stored on disk + warning dialog is displayed during startup if KSP has bean updated in the meantime --- Core/CKAN-core.csproj | 1 + Core/CompatibleKspVersionsDto.cs | 19 +++++++++++ Core/KSP.cs | 37 +++++++++++++++++++++ GUI/CompatibleKspVersionsDialog.Designer.cs | 5 ++- GUI/CompatibleKspVersionsDialog.cs | 12 +++++++ GUI/Main.cs | 7 ++++ 6 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 Core/CompatibleKspVersionsDto.cs diff --git a/Core/CKAN-core.csproj b/Core/CKAN-core.csproj index 52d4909790..3d1d8d68d8 100644 --- a/Core/CKAN-core.csproj +++ b/Core/CKAN-core.csproj @@ -48,6 +48,7 @@ + diff --git a/Core/CompatibleKspVersionsDto.cs b/Core/CompatibleKspVersionsDto.cs new file mode 100644 index 0000000000..52e05e16a3 --- /dev/null +++ b/Core/CompatibleKspVersionsDto.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CKAN +{ + class CompatibleKspVersionsDto + { + public CompatibleKspVersionsDto() + { + this.compatibleKspVersions = new List(); + } + + public String versionOfKspWhenWritten { get; set; } + + public List compatibleKspVersions { get; set; } + } +} diff --git a/Core/KSP.cs b/Core/KSP.cs index 492abdc1b6..a9543014ac 100644 --- a/Core/KSP.cs +++ b/Core/KSP.cs @@ -10,6 +10,7 @@ using CKAN.GameVersionProviders; using CKAN.Versioning; using log4net; +using Newtonsoft.Json; [assembly: InternalsVisibleTo("CKAN.Tests")] @@ -30,6 +31,8 @@ public class KSP : IDisposable private readonly string gameDir; private KspVersion version; private List compatibleVersions = new List(); + public KspVersion versionOfKspWhenCompatibleVersionsWereStored { get; private set; } + public bool compatibleVersionsAreFromPreviousKsp { get { return compatibleVersions.Count > 0 && versionOfKspWhenCompatibleVersionsWereStored != Version(); } } public NetFileCache Cache { get; private set; } @@ -93,12 +96,46 @@ private void Init() foreach (DirectoryInfo subDirectory in directory.GetDirectories()) subDirectory.Delete(true); } + LoadCompatibleVersions(); + log.DebugFormat("Initialised {0}", CkanDir()); } public void SetCompatibleVersions(List compatibleVersions) { this.compatibleVersions = compatibleVersions; + SaveCompatibleVersions(); + } + + private void SaveCompatibleVersions() + { + CompatibleKspVersionsDto compatibleKspVersionsDto = new CompatibleKspVersionsDto(); + + compatibleKspVersionsDto.versionOfKspWhenWritten = Version().ToString(); + compatibleKspVersionsDto.compatibleKspVersions = compatibleVersions.Select(v => v.ToString()).ToList(); + + String json = JsonConvert.SerializeObject(compatibleKspVersionsDto); + File.WriteAllText(CompatibleKspVersionsFile(), json); + + this.versionOfKspWhenCompatibleVersionsWereStored = Version(); + } + + private void LoadCompatibleVersions() + { + String path = CompatibleKspVersionsFile(); + if (File.Exists(path)) + { + string json = File.ReadAllText(path); + CompatibleKspVersionsDto compatibleKspVersionsDto = JsonConvert.DeserializeObject(json); + + compatibleVersions = compatibleKspVersionsDto.compatibleKspVersions.Select(v => KspVersion.Parse(v)).ToList(); + this.versionOfKspWhenCompatibleVersionsWereStored = KspVersion.Parse(compatibleKspVersionsDto.versionOfKspWhenWritten); + } + } + + private string CompatibleKspVersionsFile() + { + return Path.Combine(CkanDir(), "compatible_ksp_versions.json"); } public List GetCompatibleVersions() diff --git a/GUI/CompatibleKspVersionsDialog.Designer.cs b/GUI/CompatibleKspVersionsDialog.Designer.cs index 016cc25321..fcc0221169 100644 --- a/GUI/CompatibleKspVersionsDialog.Designer.cs +++ b/GUI/CompatibleKspVersionsDialog.Designer.cs @@ -77,7 +77,7 @@ private void InitializeComponent() // gameVersionLabel // this.gameVersionLabel.AutoSize = true; - this.gameVersionLabel.Location = new System.Drawing.Point(92, 32); + this.gameVersionLabel.Location = new System.Drawing.Point(86, 32); this.gameVersionLabel.Name = "gameVersionLabel"; this.gameVersionLabel.Size = new System.Drawing.Size(53, 13); this.gameVersionLabel.TabIndex = 3; @@ -204,6 +204,7 @@ private void InitializeComponent() this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.cancelButton; this.ClientSize = new System.Drawing.Size(443, 364); + this.ControlBox = false; this.Controls.Add(this.cancelButton); this.Controls.Add(this.gameLocationLabel); this.Controls.Add(this.label8); @@ -221,7 +222,9 @@ private void InitializeComponent() this.Controls.Add(this.label1); this.MaximizeBox = false; this.Name = "CompatibleKspVersionsDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Compatible Ksp Versions"; + this.Shown += new System.EventHandler(this.CompatibleKspVersionsDialog_Shown); this.ResumeLayout(false); this.PerformLayout(); diff --git a/GUI/CompatibleKspVersionsDialog.cs b/GUI/CompatibleKspVersionsDialog.cs index b36890ed12..bbc037f490 100644 --- a/GUI/CompatibleKspVersionsDialog.cs +++ b/GUI/CompatibleKspVersionsDialog.cs @@ -13,6 +13,7 @@ public partial class CompatibleKspVersionsDialog : Form public CompatibleKspVersionsDialog(KSP ksp) { + this.ksp = ksp; InitializeComponent(); @@ -30,6 +31,17 @@ public CompatibleKspVersionsDialog(KSP ksp) SortAndAddVersionsToList(knownVersions, compatibleVersions); } + private void CompatibleKspVersionsDialog_Shown(object sender, EventArgs e) + { + if (ksp.compatibleVersionsAreFromPreviousKsp) + { + MessageBox.Show("KSP has been updated since you last reviewed your compatible KSP versions. Please make sure that settings are correct."); + cancelButton.Visible = false; + gameVersionLabel.Text = ksp.Version().ToString() + " (previous game version: " + ksp.versionOfKspWhenCompatibleVersionsWereStored + ")"; + gameVersionLabel.ForeColor = System.Drawing.Color.Red; + } + } + private static List createMajorVersionsList(List knownVersions) { Dictionary majorVersions = new Dictionary(); diff --git a/GUI/Main.cs b/GUI/Main.cs index ce9e09d178..24ffdf6a0f 100644 --- a/GUI/Main.cs +++ b/GUI/Main.cs @@ -435,6 +435,13 @@ public void CurrentInstanceUpdated() Path.Combine(CurrentInstance.GameDir(), "CKAN/GUIConfig.xml"), Repo.default_ckan_repo.ToString() ); + + if (CurrentInstance.compatibleVersionsAreFromPreviousKsp) + { + CompatibleKspVersionsDialog dialog = new CompatibleKspVersionsDialog(CurrentInstance); + dialog.ShowDialog(); + } + UpdateModsList(); ChangeSet = null; Conflicts = null; From 7d31e12d06e0f960b83651cb908136e1e2a00cdd Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Mon, 12 Dec 2016 21:34:05 +0100 Subject: [PATCH 06/19] Corrected StrictGameComparator, corrected tests, removed unnecessary code --- Core/Types/CkanModule.cs | 10 +- .../GameComparator/StrictGameComparator.cs | 7 +- Core/Versioning/KspVersionCriteria.cs | 5 + Tests/Core/Types/GameComparator.cs | 231 +++++------------- 4 files changed, 66 insertions(+), 187 deletions(-) diff --git a/Core/Types/CkanModule.cs b/Core/Types/CkanModule.cs index 3a333d9be5..528c4abb04 100644 --- a/Core/Types/CkanModule.cs +++ b/Core/Types/CkanModule.cs @@ -498,15 +498,7 @@ internal static bool UniConflicts(CkanModule mod1, CkanModule mod2) mod1.conflicts.Any( conflict => mod2.ProvidesList.Contains(conflict.name) && conflict.version_within_bounds(mod2.version)); - } - - /// - /// Returns true if our mod is compatible with the KSP version specified. - /// - //public bool IsCompatibleKSP(string version) - //{ - // return IsCompatibleKSP(KspVersion.Parse(version)); - //} + } /// /// Returns true if our mod is compatible with the KSP version specified. diff --git a/Core/Types/GameComparator/StrictGameComparator.cs b/Core/Types/GameComparator/StrictGameComparator.cs index 59b0e6fe1d..fd1d692233 100644 --- a/Core/Types/GameComparator/StrictGameComparator.cs +++ b/Core/Types/GameComparator/StrictGameComparator.cs @@ -44,11 +44,8 @@ public override bool SingleVersionsCompatible(KspVersion gameVersion, CkanModule else if (module.ksp_version_max != null) { var maxRange = module.ksp_version_max.ToVersionRange(); - // - //e.g module.ksp_version_max.ToVersionRange() changes 1.0 to [1.0.0.0, 1.1.0.0) so we are - //interested in Lower bound - // - moduleRange = new KspVersionRange(KspVersionBound.Unbounded, maxRange.Lower); + + moduleRange = new KspVersionRange(KspVersionBound.Unbounded, maxRange.Upper); } } else diff --git a/Core/Versioning/KspVersionCriteria.cs b/Core/Versioning/KspVersionCriteria.cs index 8dfe2fb8b1..d277ae0729 100644 --- a/Core/Versioning/KspVersionCriteria.cs +++ b/Core/Versioning/KspVersionCriteria.cs @@ -29,5 +29,10 @@ public List Versions { } } + + public override String ToString() + { + return "[Versions: " + versions.ToString() + "]"; + } } } diff --git a/Tests/Core/Types/GameComparator.cs b/Tests/Core/Types/GameComparator.cs index 44e7ebb54c..4a1fba6b5f 100644 --- a/Tests/Core/Types/GameComparator.cs +++ b/Tests/Core/Types/GameComparator.cs @@ -67,210 +67,95 @@ public void GenerallySafeStrict(Type type, bool expected) // Now test! Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria (gameVersion), gameMod)); - } - - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), true)] - [TestCase(typeof(CKAN.GrasGameComparator), true)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void CompatibleWithManyKspVersions(Type type, bool expected) - { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); - - // We're going to tweak compatibly to mark the mod as being for 1.0.* - gameMod.ksp_version = KspVersion.Parse("1.0"); - - // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(gameVersion), gameMod)); - } - - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), false)] - [TestCase(typeof(CKAN.GrasGameComparator), false)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void IncompatibleWhenMarkedForManyKspVersions(Type type, bool expected) - { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); - - // We're going to tweak compatibly to mark the mod as being for 1.1.* - gameMod.ksp_version = KspVersion.Parse("1.1"); - - // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(gameVersion), gameMod)); - } - - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), true)] - [TestCase(typeof(CKAN.GrasGameComparator), true)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void CompatibleBothBuildVersionsSpecified(Type type, bool expected) - { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); - - gameMod.ksp_version = KspVersion.Parse("1.0.4.1234"); - - // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0.4.1234")), gameMod)); - } + } [Test] [TestCase(typeof(CKAN.StrictGameComparator), false)] [TestCase(typeof(CKAN.GrasGameComparator), false)] [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void IncompatibleBothBuildVersionsSpecified(Type type, bool expected) - { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); - - gameMod.ksp_version = KspVersion.Parse("1.0.4.1235"); - - // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0.4.1234")), gameMod)); - } - - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), true)] - [TestCase(typeof(CKAN.GrasGameComparator), true)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void CompatibleGameBuildVersionSpecified(Type type, bool expected) - { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); - - gameMod.ksp_version = KspVersion.Parse("1.0.4"); - - // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0.4.1234")), gameMod)); - } - - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), true)] - [TestCase(typeof(CKAN.GrasGameComparator), true)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void IncompatibleModBuildVersionSpecifiedButGameIsNot(Type type, bool expected) - { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); - - gameMod.ksp_version = KspVersion.Parse("1.0.4.1234"); - - // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0.4")), gameMod)); - } - - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), true)] - [TestCase(typeof(CKAN.GrasGameComparator), true)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void IncompatibleModBuildVersionSpecifiedButGameIsNot2(Type type, bool expected) - { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); - - gameMod.ksp_version = KspVersion.Parse("1.0.4.0000"); - - // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0.4")), gameMod)); - } - - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), true)] - [TestCase(typeof(CKAN.GrasGameComparator), true)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void CompatibleBecauseGameVersionIsRange(Type type, bool expected) + public void Incompatible(Type type, bool expected) { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); - - gameMod.ksp_version = KspVersion.Parse("1.0.4"); + var comparator = (CKAN.IGameComparator) Activator.CreateInstance(type); - // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0")), gameMod)); + // The mod already starts off being incompatible, so just do the test. :) + Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria (gameVersion), gameMod)); } - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), false)] - [TestCase(typeof(CKAN.GrasGameComparator), false)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void IncompatibleWhenGameVersionIsRange(Type type, bool expected) + private static readonly object[] TestStrictGameComparatorCases = { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + //MOD comapat. //KSP //expected + new object[] { "1.0", "1.0.4", true }, + new object[] { "1.1", "1.0.4", false }, - gameMod.ksp_version = KspVersion.Parse("1.1"); + new object[] { "1.0.4.1234", "1.0.4.1234", true }, + new object[] { "1.0.4.1235", "1.0.4.1234", false }, + new object[] { "1.0.4", "1.0.4.1234", true }, + new object[] { "1.0.4.1234", "1.0.4", true }, - // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse("1.0")), gameMod)); - } + new object[] { "1.0.4.0000", "1.0.4", true }, + new object[] { "1.0", "1.0", true }, + new object[] { "1.1", "1.1", true }, + new object[] { "1.1", "1.0", false }, + new object[] { "1.0", "1.1", false }, + }; - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), true)] - [TestCase(typeof(CKAN.GrasGameComparator), true)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void CompatibleWhenApperIsUnbounded(Type type, bool expected) + [TestCaseSource("TestStrictGameComparatorCases")] + public void TestStrictGameComparator(String modVersion, String gameVersion, bool expectedResult) { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + var comparator = new CKAN.StrictGameComparator(); - gameMod.ksp_version = null; - gameMod.ksp_version_min = KspVersion.Parse("1.0"); - gameMod.ksp_version_max = null; + // We're going to tweak compatibly of the mod + gameMod.ksp_version = KspVersion.Parse(modVersion); // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(gameVersion), gameMod)); + Assert.AreEqual(expectedResult, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse(gameVersion)), gameMod)); } - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), false)] - [TestCase(typeof(CKAN.GrasGameComparator), false)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void IncompatibleWhenApperIsUnbounded(Type type, bool expected) + private static readonly object[] TestStrictGameComparatorMinMaxCases = { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + //Min comapat //Max comapat //KSP //expected + new object[] { "1.0.4", null, "1.0.3", false }, + new object[] { "1.0.4", null, "1.0.4", true }, + new object[] { "1.0.4", null, "1.0.5", true }, + new object[] { "1.0.4", null, "1.1", true }, - gameMod.ksp_version = null; - gameMod.ksp_version_min = KspVersion.Parse("1.1"); - gameMod.ksp_version_max = null; + new object[] { "1.0", null, "0.9", false }, + new object[] { "1.0", null, "1.0", true }, + new object[] { "1.0", null, "1.0.4", true }, + new object[] { "1.0", null, "1.1", true }, - // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(gameVersion), gameMod)); - } + new object[] { "1.1", null, "1.0.4", false }, + new object[] { "1.1", null, "1.1", true }, + new object[] { "1.1", null, "1.1.1", true }, + new object[] { "1.1", null, "1.2", true }, - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), true)] - [TestCase(typeof(CKAN.GrasGameComparator), true)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void CompatibleWhenLowerIsUnbounded(Type type, bool expected) - { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + new object[] { null, "1.0.4", "1.0.5", false }, + new object[] { null, "1.0.4", "1.0.4", true }, + new object[] { null, "1.0.4", "1.0.3", true }, + new object[] { null, "1.0.4", "1.0", true }, - gameMod.ksp_version = null; - gameMod.ksp_version_min = null; - gameMod.ksp_version_max = KspVersion.Parse("1.1"); + new object[] { null, "1.0", "0.9", true }, + new object[] { null, "1.0", "1.0", true }, + new object[] { null, "1.0", "1.0.4", true }, + new object[] { null, "1.0", "1.1", false }, - // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(gameVersion), gameMod)); - } + new object[] { null, "1.1", "1.0", true }, + new object[] { null, "1.1", "1.1", true }, + new object[] { null, "1.1", "1.1.1", true }, + new object[] { null, "1.1", "1.2", false }, + }; - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), false)] - [TestCase(typeof(CKAN.GrasGameComparator), false)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void IncompatibleWhenLowerIsUnbounded(Type type, bool expected) + [TestCaseSource("TestStrictGameComparatorMinMaxCases")] + public void TestStrictGameComparatorMinMax(String modMinVersion, String modMaxVersion, String gameVersion, bool expectedResult) { - var comparator = (CKAN.IGameComparator)Activator.CreateInstance(type); + var comparator = new CKAN.StrictGameComparator(); gameMod.ksp_version = null; - gameMod.ksp_version_min = null; - gameMod.ksp_version_max = KspVersion.Parse("1.0"); + gameMod.ksp_version_min = modMinVersion == null ? null : KspVersion.Parse(modMinVersion); + gameMod.ksp_version_max = modMaxVersion == null ? null : KspVersion.Parse(modMaxVersion); // Now test! - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria(gameVersion), gameMod)); - } - - [Test] - [TestCase(typeof(CKAN.StrictGameComparator), false)] - [TestCase(typeof(CKAN.GrasGameComparator), false)] - [TestCase(typeof(CKAN.YoyoGameComparator), true)] - public void Incompatible(Type type, bool expected) - { - var comparator = (CKAN.IGameComparator) Activator.CreateInstance(type); - - // The mod already starts off being incompatible, so just do the test. :) - Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria (gameVersion), gameMod)); + Assert.AreEqual(expectedResult, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse(gameVersion)), gameMod)); } } } From bb45796abd7bda191682b453330bbf3053c855da Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Tue, 13 Dec 2016 16:07:45 +0100 Subject: [PATCH 07/19] Corrected reference to autofac + removed unnecessary code --- Core/Versioning/KspVersionCriteria.cs | 6 ------ GUI/CKAN-GUI.csproj | 6 +++++- GUI/packages.config | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Core/Versioning/KspVersionCriteria.cs b/Core/Versioning/KspVersionCriteria.cs index d277ae0729..1fabea4022 100644 --- a/Core/Versioning/KspVersionCriteria.cs +++ b/Core/Versioning/KspVersionCriteria.cs @@ -18,15 +18,9 @@ public KspVersionCriteria(KspVersion v, List compatibleVersions) this.versions.AddRange(compatibleVersions); } - public override int GetHashCode () - { - return base.GetHashCode (); - } - public List Versions { get { return versions; - } } diff --git a/GUI/CKAN-GUI.csproj b/GUI/CKAN-GUI.csproj index fb5dc645cb..623b32c671 100644 --- a/GUI/CKAN-GUI.csproj +++ b/GUI/CKAN-GUI.csproj @@ -37,7 +37,9 @@ true - + + ..\packages\Autofac.3.5.2\lib\net40\Autofac.dll + packages\ini-parser.2.1.1\lib\INIFileParser.dll @@ -315,5 +317,7 @@ + + \ No newline at end of file diff --git a/GUI/packages.config b/GUI/packages.config index c7adfdabe3..df33cec1ea 100644 --- a/GUI/packages.config +++ b/GUI/packages.config @@ -1,5 +1,6 @@  + From 858a02cb34aee8cd715cdcdde2352946746e340c Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Tue, 13 Dec 2016 16:24:03 +0100 Subject: [PATCH 08/19] Correction for tests --- Core/Types/GameComparator/BaseGameComparator.cs | 4 ++++ Core/Versioning/KspVersionCriteria.cs | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/Types/GameComparator/BaseGameComparator.cs b/Core/Types/GameComparator/BaseGameComparator.cs index 8b4d405664..12e4766ac7 100644 --- a/Core/Types/GameComparator/BaseGameComparator.cs +++ b/Core/Types/GameComparator/BaseGameComparator.cs @@ -10,6 +10,10 @@ public BaseGameComparator () public virtual bool Compatible (KspVersionCriteria gameVersionCriteria, CkanModule module) { + if(gameVersionCriteria.Versions.Count == 0) + { + return true; + } foreach (KspVersion gameVersion in gameVersionCriteria.Versions) { if (SingleVersionsCompatible (gameVersion, module)) { return true; diff --git a/Core/Versioning/KspVersionCriteria.cs b/Core/Versioning/KspVersionCriteria.cs index 1fabea4022..875420bfce 100644 --- a/Core/Versioning/KspVersionCriteria.cs +++ b/Core/Versioning/KspVersionCriteria.cs @@ -14,7 +14,9 @@ public KspVersionCriteria (KspVersion v) public KspVersionCriteria(KspVersion v, List compatibleVersions) { - this.versions.Add(v); + if(v != null) { + this.versions.Add(v); + } this.versions.AddRange(compatibleVersions); } From 4ea4e8a7ca2a50db0641de00eebe5488eea15050 Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Tue, 13 Dec 2016 16:42:44 +0100 Subject: [PATCH 09/19] Argh! Removed dependency added by accident when playing with nuget --- GUI/CKAN-GUI.csproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/GUI/CKAN-GUI.csproj b/GUI/CKAN-GUI.csproj index 623b32c671..cf487e388c 100644 --- a/GUI/CKAN-GUI.csproj +++ b/GUI/CKAN-GUI.csproj @@ -317,7 +317,5 @@ - - \ No newline at end of file From d1a58c624f47bf42b00a5f1c65dd5ee61e057f2c Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Tue, 13 Dec 2016 20:57:44 +0100 Subject: [PATCH 10/19] Naming changes to adhere to C# rules --- Core/CompatibleKspVersionsDto.cs | 9 +- Core/GameVersionProviders/IKspBuildMap.cs | 2 +- Core/GameVersionProviders/KspBuildMap.cs | 15 +- Core/KSP.cs | 22 +-- .../GameComparator/StrictGameComparator.cs | 6 +- Core/Versioning/KspVersionCriteria.cs | 25 ++- GUI/ChooseKSPInstance.Designer.cs | 2 +- GUI/CompatibleKspVersionsDialog.Designer.cs | 166 +++++++++--------- GUI/CompatibleKspVersionsDialog.cs | 48 ++--- GUI/Main.cs | 2 +- 10 files changed, 155 insertions(+), 142 deletions(-) diff --git a/Core/CompatibleKspVersionsDto.cs b/Core/CompatibleKspVersionsDto.cs index 52e05e16a3..c1095e8928 100644 --- a/Core/CompatibleKspVersionsDto.cs +++ b/Core/CompatibleKspVersionsDto.cs @@ -5,15 +5,18 @@ namespace CKAN { + // + //This is DTO object to be serialized/deserialized as JSON + // class CompatibleKspVersionsDto { public CompatibleKspVersionsDto() { - this.compatibleKspVersions = new List(); + this.CompatibleKspVersions = new List(); } - public String versionOfKspWhenWritten { get; set; } + public String VersionOfKspWhenWritten { get; set; } - public List compatibleKspVersions { get; set; } + public List CompatibleKspVersions { get; set; } } } diff --git a/Core/GameVersionProviders/IKspBuildMap.cs b/Core/GameVersionProviders/IKspBuildMap.cs index 4f81651ee4..2aece6f31d 100644 --- a/Core/GameVersionProviders/IKspBuildMap.cs +++ b/Core/GameVersionProviders/IKspBuildMap.cs @@ -7,7 +7,7 @@ public interface IKspBuildMap { KspVersion this[string buildId] { get; } - List getKnownVersions(); + List KnownVersions { get; } void Refresh(); } diff --git a/Core/GameVersionProviders/KspBuildMap.cs b/Core/GameVersionProviders/KspBuildMap.cs index 6abbd8ed94..9857b7ae96 100644 --- a/Core/GameVersionProviders/KspBuildMap.cs +++ b/Core/GameVersionProviders/KspBuildMap.cs @@ -32,15 +32,18 @@ public KspVersion this[string buildId] } } - public List getKnownVersions() + public List KnownVersions { - EnsureBuildMap(); - List knownVersions = new List(); - foreach(var version in _jBuilds.Builds) + get { - knownVersions.Add(KspVersion.Parse(version.Value)); + EnsureBuildMap(); + List knownVersions = new List(); + foreach (var version in _jBuilds.Builds) + { + knownVersions.Add(KspVersion.Parse(version.Value)); + } + return knownVersions; } - return knownVersions; } public KspBuildMap(IWin32Registry registry) diff --git a/Core/KSP.cs b/Core/KSP.cs index a9543014ac..c78e0efa7a 100644 --- a/Core/KSP.cs +++ b/Core/KSP.cs @@ -30,9 +30,9 @@ public class KSP : IDisposable private readonly string gameDir; private KspVersion version; - private List compatibleVersions = new List(); - public KspVersion versionOfKspWhenCompatibleVersionsWereStored { get; private set; } - public bool compatibleVersionsAreFromPreviousKsp { get { return compatibleVersions.Count > 0 && versionOfKspWhenCompatibleVersionsWereStored != Version(); } } + private List _compatibleVersions = new List(); + public KspVersion VersionOfKspWhenCompatibleVersionsWereStored { get; private set; } + public bool CompatibleVersionsAreFromDifferentKsp { get { return _compatibleVersions.Count > 0 && VersionOfKspWhenCompatibleVersionsWereStored != Version(); } } public NetFileCache Cache { get; private set; } @@ -103,7 +103,7 @@ private void Init() public void SetCompatibleVersions(List compatibleVersions) { - this.compatibleVersions = compatibleVersions; + this._compatibleVersions = compatibleVersions; SaveCompatibleVersions(); } @@ -111,13 +111,13 @@ private void SaveCompatibleVersions() { CompatibleKspVersionsDto compatibleKspVersionsDto = new CompatibleKspVersionsDto(); - compatibleKspVersionsDto.versionOfKspWhenWritten = Version().ToString(); - compatibleKspVersionsDto.compatibleKspVersions = compatibleVersions.Select(v => v.ToString()).ToList(); + compatibleKspVersionsDto.VersionOfKspWhenWritten = Version().ToString(); + compatibleKspVersionsDto.CompatibleKspVersions = _compatibleVersions.Select(v => v.ToString()).ToList(); String json = JsonConvert.SerializeObject(compatibleKspVersionsDto); File.WriteAllText(CompatibleKspVersionsFile(), json); - this.versionOfKspWhenCompatibleVersionsWereStored = Version(); + this.VersionOfKspWhenCompatibleVersionsWereStored = Version(); } private void LoadCompatibleVersions() @@ -128,8 +128,8 @@ private void LoadCompatibleVersions() string json = File.ReadAllText(path); CompatibleKspVersionsDto compatibleKspVersionsDto = JsonConvert.DeserializeObject(json); - compatibleVersions = compatibleKspVersionsDto.compatibleKspVersions.Select(v => KspVersion.Parse(v)).ToList(); - this.versionOfKspWhenCompatibleVersionsWereStored = KspVersion.Parse(compatibleKspVersionsDto.versionOfKspWhenWritten); + _compatibleVersions = compatibleKspVersionsDto.CompatibleKspVersions.Select(v => KspVersion.Parse(v)).ToList(); + this.VersionOfKspWhenCompatibleVersionsWereStored = KspVersion.Parse(compatibleKspVersionsDto.VersionOfKspWhenWritten); } } @@ -140,7 +140,7 @@ private string CompatibleKspVersionsFile() public List GetCompatibleVersions() { - return new List(this.compatibleVersions); + return new List(this._compatibleVersions); } #endregion @@ -385,7 +385,7 @@ public KspVersion Version() public KspVersionCriteria VersionCriteria () { - return new KspVersionCriteria(version, compatibleVersions); + return new KspVersionCriteria(version, _compatibleVersions); } #endregion diff --git a/Core/Types/GameComparator/StrictGameComparator.cs b/Core/Types/GameComparator/StrictGameComparator.cs index fd1d692233..0d5950be2e 100644 --- a/Core/Types/GameComparator/StrictGameComparator.cs +++ b/Core/Types/GameComparator/StrictGameComparator.cs @@ -53,12 +53,12 @@ public override bool SingleVersionsCompatible(KspVersion gameVersion, CkanModule return true; } - if (!moduleRange.Upper.Value.IsAny && isBoundLower(moduleRange.Upper, gameVersionRange.Lower)) + if (!moduleRange.Upper.Value.IsAny && IsBoundLower(moduleRange.Upper, gameVersionRange.Lower)) { return false; } - if (!moduleRange.Lower.Value.IsAny && isBoundLower(gameVersionRange.Upper, moduleRange.Lower)) + if (!moduleRange.Lower.Value.IsAny && IsBoundLower(gameVersionRange.Upper, moduleRange.Lower)) { return false; } @@ -66,7 +66,7 @@ public override bool SingleVersionsCompatible(KspVersion gameVersion, CkanModule return true; } - private bool isBoundLower(KspVersionBound val1, KspVersionBound val2) + private bool IsBoundLower(KspVersionBound val1, KspVersionBound val2) { return val1.Value < val2.Value || (val1.Value == val2.Value && !val1.Inclusive); diff --git a/Core/Versioning/KspVersionCriteria.cs b/Core/Versioning/KspVersionCriteria.cs index 875420bfce..3e53487ebd 100644 --- a/Core/Versioning/KspVersionCriteria.cs +++ b/Core/Versioning/KspVersionCriteria.cs @@ -1,34 +1,41 @@ using System; using System.Collections.Generic; +using System.Linq; namespace CKAN.Versioning { public class KspVersionCriteria { - private List versions = new List (); + private List _versions = new List (); public KspVersionCriteria (KspVersion v) { - this.versions.Add (v); + if (v != null) + { + this._versions.Add(v); + } } public KspVersionCriteria(KspVersion v, List compatibleVersions) { - if(v != null) { - this.versions.Add(v); + if(v != null) + { + this._versions.Add(v); } - this.versions.AddRange(compatibleVersions); + this._versions.AddRange(compatibleVersions); + this._versions = this._versions.Distinct().ToList(); } - public List Versions { - get { - return versions; + public IList Versions { + get + { + return _versions.AsReadOnly(); } } public override String ToString() { - return "[Versions: " + versions.ToString() + "]"; + return "[Versions: " + _versions.ToString() + "]"; } } } diff --git a/GUI/ChooseKSPInstance.Designer.cs b/GUI/ChooseKSPInstance.Designer.cs index 96bab3bb7b..ecb92b6740 100644 --- a/GUI/ChooseKSPInstance.Designer.cs +++ b/GUI/ChooseKSPInstance.Designer.cs @@ -142,7 +142,7 @@ private void InitializeComponent() this.ForgetButton.Text = "Forget"; this.ForgetButton.UseVisualStyleBackColor = true; this.ForgetButton.Click += new System.EventHandler(this.Forget_Click); - // + // // ChooseKSPInstance // this.AcceptButton = this.SelectButton; diff --git a/GUI/CompatibleKspVersionsDialog.Designer.cs b/GUI/CompatibleKspVersionsDialog.Designer.cs index fcc0221169..191abb5115 100644 --- a/GUI/CompatibleKspVersionsDialog.Designer.cs +++ b/GUI/CompatibleKspVersionsDialog.Designer.cs @@ -31,18 +31,18 @@ private void InitializeComponent() this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); - this.gameVersionLabel = new System.Windows.Forms.Label(); - this.selectedVersionsCheckedListBox = new System.Windows.Forms.CheckedListBox(); - this.clearSelectionButton = new System.Windows.Forms.Button(); - this.addVersionToListButton = new System.Windows.Forms.Button(); + this.GameVersionLabel = new System.Windows.Forms.Label(); + this.SelectedVersionsCheckedListBox = new System.Windows.Forms.CheckedListBox(); + this.ClearSelectionButton = new System.Windows.Forms.Button(); + this.AddVersionToListButton = new System.Windows.Forms.Button(); this.label5 = new System.Windows.Forms.Label(); - this.addVersionToListTextBox = new System.Windows.Forms.TextBox(); + this.AddVersionToListTextBox = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); - this.saveButton = new System.Windows.Forms.Button(); + this.SaveButton = new System.Windows.Forms.Button(); this.label8 = new System.Windows.Forms.Label(); - this.gameLocationLabel = new System.Windows.Forms.Label(); - this.cancelButton = new System.Windows.Forms.Button(); + this.GameLocationLabel = new System.Windows.Forms.Label(); + this.CancelButton = new System.Windows.Forms.Button(); this.SuspendLayout(); // // label1 @@ -76,46 +76,46 @@ private void InitializeComponent() // // gameVersionLabel // - this.gameVersionLabel.AutoSize = true; - this.gameVersionLabel.Location = new System.Drawing.Point(86, 32); - this.gameVersionLabel.Name = "gameVersionLabel"; - this.gameVersionLabel.Size = new System.Drawing.Size(53, 13); - this.gameVersionLabel.TabIndex = 3; - this.gameVersionLabel.Text = ""; + this.GameVersionLabel.AutoSize = true; + this.GameVersionLabel.Location = new System.Drawing.Point(86, 32); + this.GameVersionLabel.Name = "gameVersionLabel"; + this.GameVersionLabel.Size = new System.Drawing.Size(53, 13); + this.GameVersionLabel.TabIndex = 3; + this.GameVersionLabel.Text = ""; // // selectedVersionsCheckedListBox // - this.selectedVersionsCheckedListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.SelectedVersionsCheckedListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.selectedVersionsCheckedListBox.CheckOnClick = true; - this.selectedVersionsCheckedListBox.FormattingEnabled = true; - this.selectedVersionsCheckedListBox.Location = new System.Drawing.Point(12, 79); - this.selectedVersionsCheckedListBox.Name = "selectedVersionsCheckedListBox"; - this.selectedVersionsCheckedListBox.Size = new System.Drawing.Size(406, 124); - this.selectedVersionsCheckedListBox.TabIndex = 4; + this.SelectedVersionsCheckedListBox.CheckOnClick = true; + this.SelectedVersionsCheckedListBox.FormattingEnabled = true; + this.SelectedVersionsCheckedListBox.Location = new System.Drawing.Point(12, 79); + this.SelectedVersionsCheckedListBox.Name = "selectedVersionsCheckedListBox"; + this.SelectedVersionsCheckedListBox.Size = new System.Drawing.Size(406, 124); + this.SelectedVersionsCheckedListBox.TabIndex = 4; // // clearSelectionButton // - this.clearSelectionButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.clearSelectionButton.Location = new System.Drawing.Point(12, 211); - this.clearSelectionButton.Name = "clearSelectionButton"; - this.clearSelectionButton.Size = new System.Drawing.Size(92, 23); - this.clearSelectionButton.TabIndex = 5; - this.clearSelectionButton.Text = "Clear selection"; - this.clearSelectionButton.UseVisualStyleBackColor = true; - this.clearSelectionButton.Click += new System.EventHandler(this.clearSelectionButton_Click); + this.ClearSelectionButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.ClearSelectionButton.Location = new System.Drawing.Point(12, 211); + this.ClearSelectionButton.Name = "clearSelectionButton"; + this.ClearSelectionButton.Size = new System.Drawing.Size(92, 23); + this.ClearSelectionButton.TabIndex = 5; + this.ClearSelectionButton.Text = "Clear selection"; + this.ClearSelectionButton.UseVisualStyleBackColor = true; + this.ClearSelectionButton.Click += new System.EventHandler(this.ClearSelectionButton_Click); // // addVersionToListButton // - this.addVersionToListButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.addVersionToListButton.Location = new System.Drawing.Point(343, 209); - this.addVersionToListButton.Name = "addVersionToListButton"; - this.addVersionToListButton.Size = new System.Drawing.Size(75, 23); - this.addVersionToListButton.TabIndex = 6; - this.addVersionToListButton.Text = "Add"; - this.addVersionToListButton.UseVisualStyleBackColor = true; - this.addVersionToListButton.Click += new System.EventHandler(this.addVersionToListButton_Click); + this.AddVersionToListButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.AddVersionToListButton.Location = new System.Drawing.Point(343, 209); + this.AddVersionToListButton.Name = "addVersionToListButton"; + this.AddVersionToListButton.Size = new System.Drawing.Size(75, 23); + this.AddVersionToListButton.TabIndex = 6; + this.AddVersionToListButton.Text = "Add"; + this.AddVersionToListButton.UseVisualStyleBackColor = true; + this.AddVersionToListButton.Click += new System.EventHandler(this.AddVersionToListButton_Click); // // label5 // @@ -129,11 +129,11 @@ private void InitializeComponent() // // addVersionToListTextBox // - this.addVersionToListTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.addVersionToListTextBox.Location = new System.Drawing.Point(206, 211); - this.addVersionToListTextBox.Name = "addVersionToListTextBox"; - this.addVersionToListTextBox.Size = new System.Drawing.Size(131, 20); - this.addVersionToListTextBox.TabIndex = 8; + this.AddVersionToListTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.AddVersionToListTextBox.Location = new System.Drawing.Point(206, 211); + this.AddVersionToListTextBox.Name = "addVersionToListTextBox"; + this.AddVersionToListTextBox.Size = new System.Drawing.Size(131, 20); + this.AddVersionToListTextBox.TabIndex = 8; // // label6 // @@ -158,14 +158,14 @@ private void InitializeComponent() // // saveButton // - this.saveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.saveButton.Location = new System.Drawing.Point(362, 331); - this.saveButton.Name = "saveButton"; - this.saveButton.Size = new System.Drawing.Size(75, 23); - this.saveButton.TabIndex = 11; - this.saveButton.Text = "Save"; - this.saveButton.UseVisualStyleBackColor = true; - this.saveButton.Click += new System.EventHandler(this.saveButton_Click); + this.SaveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.SaveButton.Location = new System.Drawing.Point(362, 331); + this.SaveButton.Name = "saveButton"; + this.SaveButton.Size = new System.Drawing.Size(75, 23); + this.SaveButton.TabIndex = 11; + this.SaveButton.Text = "Save"; + this.SaveButton.UseVisualStyleBackColor = true; + this.SaveButton.Click += new System.EventHandler(this.SaveButton_Click); // // label8 // @@ -178,45 +178,45 @@ private void InitializeComponent() // // gameLocationLabel // - this.gameLocationLabel.AutoSize = true; - this.gameLocationLabel.Location = new System.Drawing.Point(69, 11); - this.gameLocationLabel.Name = "gameLocationLabel"; - this.gameLocationLabel.Size = new System.Drawing.Size(56, 13); - this.gameLocationLabel.TabIndex = 13; - this.gameLocationLabel.Text = ""; + this.GameLocationLabel.AutoSize = true; + this.GameLocationLabel.Location = new System.Drawing.Point(69, 11); + this.GameLocationLabel.Name = "gameLocationLabel"; + this.GameLocationLabel.Size = new System.Drawing.Size(56, 13); + this.GameLocationLabel.TabIndex = 13; + this.GameLocationLabel.Text = ""; // // cancelButton // - this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.Location = new System.Drawing.Point(281, 331); - this.cancelButton.Name = "cancelButton"; - this.cancelButton.Size = new System.Drawing.Size(75, 23); - this.cancelButton.TabIndex = 14; - this.cancelButton.Text = "Cancel"; - this.cancelButton.UseVisualStyleBackColor = true; - this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + this.CancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.CancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.CancelButton.Location = new System.Drawing.Point(281, 331); + this.CancelButton.Name = "cancelButton"; + this.CancelButton.Size = new System.Drawing.Size(75, 23); + this.CancelButton.TabIndex = 14; + this.CancelButton.Text = "Cancel"; + this.CancelButton.UseVisualStyleBackColor = true; + this.CancelButton.Click += new System.EventHandler(this.CancelButton_Click); // // CompatibleKspVersionsDialog // - this.AcceptButton = this.saveButton; + this.AcceptButton = this.SaveButton; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.cancelButton; + this.CancelButton = this.CancelButton; this.ClientSize = new System.Drawing.Size(443, 364); this.ControlBox = false; - this.Controls.Add(this.cancelButton); - this.Controls.Add(this.gameLocationLabel); + this.Controls.Add(this.CancelButton); + this.Controls.Add(this.GameLocationLabel); this.Controls.Add(this.label8); - this.Controls.Add(this.saveButton); + this.Controls.Add(this.SaveButton); this.Controls.Add(this.label7); this.Controls.Add(this.label6); - this.Controls.Add(this.addVersionToListTextBox); + this.Controls.Add(this.AddVersionToListTextBox); this.Controls.Add(this.label5); - this.Controls.Add(this.addVersionToListButton); - this.Controls.Add(this.clearSelectionButton); - this.Controls.Add(this.selectedVersionsCheckedListBox); - this.Controls.Add(this.gameVersionLabel); + this.Controls.Add(this.AddVersionToListButton); + this.Controls.Add(this.ClearSelectionButton); + this.Controls.Add(this.SelectedVersionsCheckedListBox); + this.Controls.Add(this.GameVersionLabel); this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.Controls.Add(this.label1); @@ -235,17 +235,17 @@ private void InitializeComponent() private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label gameVersionLabel; - private System.Windows.Forms.CheckedListBox selectedVersionsCheckedListBox; - private System.Windows.Forms.Button clearSelectionButton; - private System.Windows.Forms.Button addVersionToListButton; + private System.Windows.Forms.Label GameVersionLabel; + private System.Windows.Forms.CheckedListBox SelectedVersionsCheckedListBox; + private System.Windows.Forms.Button ClearSelectionButton; + private System.Windows.Forms.Button AddVersionToListButton; private System.Windows.Forms.Label label5; - private System.Windows.Forms.TextBox addVersionToListTextBox; + private System.Windows.Forms.TextBox AddVersionToListTextBox; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label7; - private System.Windows.Forms.Button saveButton; + private System.Windows.Forms.Button SaveButton; private System.Windows.Forms.Label label8; - private System.Windows.Forms.Label gameLocationLabel; - private System.Windows.Forms.Button cancelButton; + private System.Windows.Forms.Label GameLocationLabel; + private System.Windows.Forms.Button CancelButton; } } \ No newline at end of file diff --git a/GUI/CompatibleKspVersionsDialog.cs b/GUI/CompatibleKspVersionsDialog.cs index bbc037f490..894d05185f 100644 --- a/GUI/CompatibleKspVersionsDialog.cs +++ b/GUI/CompatibleKspVersionsDialog.cs @@ -9,20 +9,20 @@ namespace CKAN { public partial class CompatibleKspVersionsDialog : Form { - private KSP ksp; + private KSP _ksp; public CompatibleKspVersionsDialog(KSP ksp) { - this.ksp = ksp; + this._ksp = ksp; InitializeComponent(); List compatibleVersions = ksp.GetCompatibleVersions(); - gameVersionLabel.Text = ksp.Version().ToString(); - gameLocationLabel.Text = ksp.GameDir(); - List knownVersions = new List(ServiceLocator.Container.Resolve().getKnownVersions()); - List majorVersionsList = createMajorVersionsList(knownVersions); + GameVersionLabel.Text = ksp.Version().ToString(); + GameLocationLabel.Text = ksp.GameDir(); + List knownVersions = new List(ServiceLocator.Container.Resolve().KnownVersions); + List majorVersionsList = CreateMajorVersionsList(knownVersions); List compatibleVersionsLeftOthers = new List(compatibleVersions); compatibleVersionsLeftOthers.RemoveAll((el)=>knownVersions.Contains(el) || majorVersionsList.Contains(el)); @@ -33,16 +33,16 @@ public CompatibleKspVersionsDialog(KSP ksp) private void CompatibleKspVersionsDialog_Shown(object sender, EventArgs e) { - if (ksp.compatibleVersionsAreFromPreviousKsp) + if (_ksp.CompatibleVersionsAreFromDifferentKsp) { MessageBox.Show("KSP has been updated since you last reviewed your compatible KSP versions. Please make sure that settings are correct."); - cancelButton.Visible = false; - gameVersionLabel.Text = ksp.Version().ToString() + " (previous game version: " + ksp.versionOfKspWhenCompatibleVersionsWereStored + ")"; - gameVersionLabel.ForeColor = System.Drawing.Color.Red; + CancelButton.Visible = false; + GameVersionLabel.Text = _ksp.Version().ToString() + " (previous game version: " + _ksp.VersionOfKspWhenCompatibleVersionsWereStored + ")"; + GameVersionLabel.ForeColor = System.Drawing.Color.Red; } } - private static List createMajorVersionsList(List knownVersions) + private static List CreateMajorVersionsList(List knownVersions) { Dictionary majorVersions = new Dictionary(); foreach (var version in knownVersions) @@ -63,23 +63,23 @@ private void SortAndAddVersionsToList(List versions, List selectedVersion = new List(); - foreach (KspVersion item in selectedVersionsCheckedListBox.CheckedItems) + foreach (KspVersion item in SelectedVersionsCheckedListBox.CheckedItems) { selectedVersion.Add(item); } - ksp.SetCompatibleVersions(selectedVersion); + _ksp.SetCompatibleVersions(selectedVersion); this.Close(); } diff --git a/GUI/Main.cs b/GUI/Main.cs index 24ffdf6a0f..de13461943 100644 --- a/GUI/Main.cs +++ b/GUI/Main.cs @@ -436,7 +436,7 @@ public void CurrentInstanceUpdated() Repo.default_ckan_repo.ToString() ); - if (CurrentInstance.compatibleVersionsAreFromPreviousKsp) + if (CurrentInstance.CompatibleVersionsAreFromDifferentKsp) { CompatibleKspVersionsDialog dialog = new CompatibleKspVersionsDialog(CurrentInstance); dialog.ShowDialog(); From 03176b4c1f6164b8660561b2524048380e2533b5 Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Tue, 13 Dec 2016 21:24:51 +0100 Subject: [PATCH 11/19] KSP class now accepts only distinct compatible versions --- Core/KSP.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/KSP.cs b/Core/KSP.cs index c78e0efa7a..8904e138a5 100644 --- a/Core/KSP.cs +++ b/Core/KSP.cs @@ -103,7 +103,7 @@ private void Init() public void SetCompatibleVersions(List compatibleVersions) { - this._compatibleVersions = compatibleVersions; + this._compatibleVersions = compatibleVersions.Distinct().ToList(); SaveCompatibleVersions(); } From 0763a898212e275bc6fff7aec3ad7e57da32a8ca Mon Sep 17 00:00:00 2001 From: Dwayne Bent Date: Tue, 13 Dec 2016 17:51:58 -0500 Subject: [PATCH 12/19] Add IntersectWith method to KspVersionRange --- Core/Versioning/KspVersionBound.cs | 46 ++++ Core/Versioning/KspVersionRange.cs | 17 ++ Tests/Core/Versioning/KspVersionRangeTests.cs | 212 ++++++++++++++++++ 3 files changed, 275 insertions(+) diff --git a/Core/Versioning/KspVersionBound.cs b/Core/Versioning/KspVersionBound.cs index 1240fee81f..c30899b54c 100644 --- a/Core/Versioning/KspVersionBound.cs +++ b/Core/Versioning/KspVersionBound.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; namespace CKAN.Versioning { @@ -72,4 +73,49 @@ public override int GetHashCode() return !Equals(left, right); } } + + public sealed partial class KspVersionBound + { + /// + /// Returns the lowest of a set of objects. Analagous to + /// but does not produce a stable sort because in the event of a + /// tie inclusive bounds are treated as both lower and higher than equivalent exclusive bounds. + /// + /// The set of objects to compare. + /// The lowest value in . + public static KspVersionBound Lowest(params KspVersionBound[] versionBounds) + { + if (versionBounds == null) + throw new ArgumentNullException("versionBounds"); + + if (!versionBounds.Any()) + throw new ArgumentException("Value cannot be empty.", "versionBounds"); + + if (versionBounds.Any(i => i == null)) + throw new ArgumentException("Value cannot contain null.", "versionBounds"); + + return versionBounds.OrderBy(i => i.Value).ThenBy(i => i.Inclusive).First(); + } + + /// + /// Returns the highest of a set of objects. Analagous to + /// but does not produce a stable sort because in the event of a + /// tie inclusive bounds are treated as both lower and higher than equivalent exclusive bounds. + /// + /// The set of objects to compare. + /// The highest value in . + public static KspVersionBound Highest(params KspVersionBound[] versionBounds) + { + if (versionBounds == null) + throw new ArgumentNullException("versionBounds"); + + if (!versionBounds.Any()) + throw new ArgumentException("Value cannot be empty.", "versionBounds"); + + if (versionBounds.Any(i => i == null)) + throw new ArgumentException("Value cannot contain null.", "versionBounds"); + + return versionBounds.OrderByDescending(i => i.Value).ThenBy(i => i.Inclusive).First(); + } + } } diff --git a/Core/Versioning/KspVersionRange.cs b/Core/Versioning/KspVersionRange.cs index e69609d393..0842c26bbe 100644 --- a/Core/Versioning/KspVersionRange.cs +++ b/Core/Versioning/KspVersionRange.cs @@ -32,6 +32,17 @@ public override string ToString() return _string; } + public KspVersionRange IntersectWith(KspVersionRange other) + { + if (ReferenceEquals(other, null)) + throw new ArgumentNullException("other"); + + var highestLow = KspVersionBound.Highest(Lower, other.Lower); + var lowestHigh = KspVersionBound.Lowest(Upper, other.Upper); + + return IsEmpty(highestLow, lowestHigh) ? null : new KspVersionRange(highestLow, lowestHigh); + } + public bool IsSupersetOf(KspVersionRange other) { if (ReferenceEquals(other, null)) @@ -48,6 +59,12 @@ public bool IsSupersetOf(KspVersionRange other) return lowerIsOkay && upperIsOkay; } + private static bool IsEmpty(KspVersionBound lower, KspVersionBound upper) + { + return upper.Value < lower.Value || + (lower.Value == upper.Value && (!lower.Inclusive || !upper.Inclusive)); + } + private static string DeriveString(KspVersionRange versionRange) { var sb = new StringBuilder(); diff --git a/Tests/Core/Versioning/KspVersionRangeTests.cs b/Tests/Core/Versioning/KspVersionRangeTests.cs index cce9b8de10..b1a78750e5 100644 --- a/Tests/Core/Versioning/KspVersionRangeTests.cs +++ b/Tests/Core/Versioning/KspVersionRangeTests.cs @@ -71,6 +71,208 @@ public sealed class KspVersionRangeTests } }; + private static readonly object[] IntersectWithCases = + { + new object[] + { + new KspVersionRange(new KspVersionBound(), new KspVersionBound()), + new KspVersionRange(new KspVersionBound(), new KspVersionBound()), + new KspVersionRange(new KspVersionBound(), new KspVersionBound()), + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 2, 3, 4), true), + new KspVersionBound(new KspVersion(1, 2, 3, 4), true) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 2, 3, 4), true), + new KspVersionBound(new KspVersion(1, 2, 3, 4), true) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 2, 3, 4), true), + new KspVersionBound(new KspVersion(1, 2, 3, 4), true) + ), + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 2, 3, 4), false), + new KspVersionBound(new KspVersion(1, 2, 3, 4), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 2, 3, 4), false), + new KspVersionBound(new KspVersion(1, 2, 3, 4), false) + ), + null + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 2, 3, 4), false), + new KspVersionBound(new KspVersion(1, 2, 3, 4), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 2, 3, 4), true), + new KspVersionBound(new KspVersion(1, 2, 3, 4), true) + ), + null + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 0, 0), true), + new KspVersionBound(new KspVersion(1, 1, 0, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound(new KspVersion(1, 0, 5, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound(new KspVersion(1, 0, 5, 0), false) + ), + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 1, 0, 0), true), + new KspVersionBound(new KspVersion(1, 2, 0, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound(new KspVersion(1, 0, 5, 0), false) + ), + null + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true), + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true), + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true), + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true) + ), + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 1235), true), + new KspVersionBound(new KspVersion(1, 0, 4, 1235), true) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true), + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true) + ), + null + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound(new KspVersion(1, 0, 5, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true), + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true), + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true) + ), + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true), + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound(new KspVersion(1, 0, 5, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true), + new KspVersionBound(new KspVersion(1, 0, 4, 1234), true) + ), + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound(new KspVersion(1, 0, 4, 0), true) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound(new KspVersion(1, 0, 5, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound(new KspVersion(1, 0, 4, 0), true) + ), + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 0, 0), true), + new KspVersionBound(new KspVersion(1, 1, 0, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 0, 0), true), + new KspVersionBound(new KspVersion(1, 1, 0, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 0, 0), true), + new KspVersionBound(new KspVersion(1, 1, 0, 0), false) + ), + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 1, 0, 0), true), + new KspVersionBound(new KspVersion(1, 2, 0, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 1, 0, 0), true), + new KspVersionBound(new KspVersion(1, 2, 0, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 1, 0, 0), true), + new KspVersionBound(new KspVersion(1, 2, 0, 0), false) + ), + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 1, 0, 0), true), + new KspVersionBound(new KspVersion(1, 2, 0, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 0, 0), true), + new KspVersionBound(new KspVersion(1, 1, 0, 0), false) + ), + null + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 0, 0), true), + new KspVersionBound(new KspVersion(1, 1, 0, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 1, 0, 0), true), + new KspVersionBound(new KspVersion(1, 2, 0, 0), false) + ), + null + }, + }; + private static readonly object[] IsSupersetOfCases = { new object[] @@ -226,6 +428,16 @@ public void ToStringWorksCorrectly(KspVersionRange vr, string expected) Assert.That(result, Is.EqualTo(expected)); } + [TestCaseSource("IntersectWithCases")] + public void IntersectWithWorksCorrectly(KspVersionRange left, KspVersionRange right, KspVersionRange expected) + { + // Act + var result = left.IntersectWith(right); + + // Assert + Assert.That(result, Is.EqualTo(expected)); + } + [TestCaseSource("IsSupersetOfCases")] public void IsSupersetOfWorksCorrectly(KspVersionRange left, KspVersionRange right, bool expected) { From c36ace0e7134af0fcd2f5041cf2fa2cd10eb5953 Mon Sep 17 00:00:00 2001 From: Dwayne Bent Date: Wed, 14 Dec 2016 14:34:25 -0500 Subject: [PATCH 13/19] Fix Highest/Lowest comparisons with unbounded bounds --- Core/Versioning/KspVersionBound.cs | 12 ++++- Tests/Core/Versioning/KspVersionRangeTests.cs | 47 ++++++++++++++++++- 2 files changed, 56 insertions(+), 3 deletions(-) diff --git a/Core/Versioning/KspVersionBound.cs b/Core/Versioning/KspVersionBound.cs index c30899b54c..05b01e812b 100644 --- a/Core/Versioning/KspVersionBound.cs +++ b/Core/Versioning/KspVersionBound.cs @@ -94,7 +94,11 @@ public static KspVersionBound Lowest(params KspVersionBound[] versionBounds) if (versionBounds.Any(i => i == null)) throw new ArgumentException("Value cannot contain null.", "versionBounds"); - return versionBounds.OrderBy(i => i.Value).ThenBy(i => i.Inclusive).First(); + return versionBounds + .OrderBy(i => i == Unbounded) + .ThenBy(i => i.Value) + .ThenBy(i => i.Inclusive) + .First(); } /// @@ -115,7 +119,11 @@ public static KspVersionBound Highest(params KspVersionBound[] versionBounds) if (versionBounds.Any(i => i == null)) throw new ArgumentException("Value cannot contain null.", "versionBounds"); - return versionBounds.OrderByDescending(i => i.Value).ThenBy(i => i.Inclusive).First(); + return versionBounds + .OrderBy(i => i == Unbounded) + .ThenByDescending(i => i.Value) + .ThenBy(i => i.Inclusive) + .First(); } } } diff --git a/Tests/Core/Versioning/KspVersionRangeTests.cs b/Tests/Core/Versioning/KspVersionRangeTests.cs index b1a78750e5..0b54e14367 100644 --- a/Tests/Core/Versioning/KspVersionRangeTests.cs +++ b/Tests/Core/Versioning/KspVersionRangeTests.cs @@ -271,6 +271,51 @@ public sealed class KspVersionRangeTests ), null }, + new object[] + { + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound() + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound(new KspVersion(1, 0, 5, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound(new KspVersion(1, 0, 5, 0), false) + ) + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(), + new KspVersionBound(new KspVersion(1, 0, 4, 0), true) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound(new KspVersion(1, 0, 5, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 4, 0), true), + new KspVersionBound(new KspVersion(1, 0, 4, 0), true) + ) + }, + new object[] + { + new KspVersionRange( + new KspVersionBound(), + new KspVersionBound(new KspVersion(1, 0, 4, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 3, 0), true), + new KspVersionBound(new KspVersion(1, 0, 4, 0), false) + ), + new KspVersionRange( + new KspVersionBound(new KspVersion(1, 0, 3, 0), true), + new KspVersionBound(new KspVersion(1, 0, 4, 0), false) + ) + } }; private static readonly object[] IsSupersetOfCases = @@ -376,7 +421,7 @@ public sealed class KspVersionRangeTests new KspVersionBound(new KspVersion(2, 0, 0, 0), true) ), true - } + }, }; [Test] From c40376d04b0a4bfeb275c0f0d00492e22e5f7e30 Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Wed, 14 Dec 2016 20:54:43 +0100 Subject: [PATCH 14/19] StrictGameComparator is using now KspVersionRange.IntersectWith + added more unit tests to GameComparator --- .../GameComparator/StrictGameComparator.cs | 18 +----------------- Tests/Core/Types/GameComparator.cs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/Core/Types/GameComparator/StrictGameComparator.cs b/Core/Types/GameComparator/StrictGameComparator.cs index 0d5950be2e..330af5af38 100644 --- a/Core/Types/GameComparator/StrictGameComparator.cs +++ b/Core/Types/GameComparator/StrictGameComparator.cs @@ -52,24 +52,8 @@ public override bool SingleVersionsCompatible(KspVersion gameVersion, CkanModule { return true; } - - if (!moduleRange.Upper.Value.IsAny && IsBoundLower(moduleRange.Upper, gameVersionRange.Lower)) - { - return false; - } - - if (!moduleRange.Lower.Value.IsAny && IsBoundLower(gameVersionRange.Upper, moduleRange.Lower)) - { - return false; - } - - return true; - } - private bool IsBoundLower(KspVersionBound val1, KspVersionBound val2) - { - return val1.Value < val2.Value || (val1.Value == val2.Value && !val1.Inclusive); - + return gameVersionRange.IntersectWith(moduleRange) != null; } } } diff --git a/Tests/Core/Types/GameComparator.cs b/Tests/Core/Types/GameComparator.cs index 4a1fba6b5f..dde81b6d9b 100644 --- a/Tests/Core/Types/GameComparator.cs +++ b/Tests/Core/Types/GameComparator.cs @@ -97,6 +97,24 @@ public void Incompatible(Type type, bool expected) new object[] { "1.1", "1.1", true }, new object[] { "1.1", "1.0", false }, new object[] { "1.0", "1.1", false }, + + new object[] { "1.0.4", "1", true }, + new object[] { "1.0.4", "1.0", true }, + new object[] { "1.0.4", "1.0.4", true }, + new object[] { "1.0.4", "1.0.4.1234", true }, + new object[] { "1.0.4", "1.0.5", false }, + new object[] { "1.0.4", "1.0.3", false }, + new object[] { "1.0.4", "1.1", false }, + new object[] { "1.0.4", "0.9", false }, + + new object[] { "1", "1", true }, + new object[] { "1", "1.0", true }, + new object[] { "1", "1.0.4", true }, + new object[] { "1", "1.0.4.1234", true }, + new object[] { "1", "2", false }, + new object[] { "1", "2.1", false }, + new object[] { "1", "0", false }, + new object[] { "1", "0.9", false }, }; [TestCaseSource("TestStrictGameComparatorCases")] From a28e013a154eacdc02d77fb3bc4699592e86abf2 Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Thu, 15 Dec 2016 16:59:08 +0100 Subject: [PATCH 15/19] Reverted Main.Designer.cs to last valid state --- GUI/Main.Designer.cs | 915 +++++++++++++++++++++++-------------------- 1 file changed, 486 insertions(+), 429 deletions(-) diff --git a/GUI/Main.Designer.cs b/GUI/Main.Designer.cs index 705e5caca1..da4e50af1a 100644 --- a/GUI/Main.Designer.cs +++ b/GUI/Main.Designer.cs @@ -43,9 +43,7 @@ private void InitializeComponent() this.cKANSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.pluginsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.kSPCommandlineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.kSPInstanceSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.reportAnIssueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.menuStrip2 = new System.Windows.Forms.MenuStrip(); @@ -67,7 +65,7 @@ private void InitializeComponent() this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ModList = new CKAN.MainModListGUI(); this.Installed = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.Update = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.UpdateCol = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.ModName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Author = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.InstalledVersion = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -109,12 +107,12 @@ private void InitializeComponent() this.StatusLabel = new System.Windows.Forms.Label(); this.MainTabControl = new CKAN.MainTabControl(); this.ManageModsTabPage = new System.Windows.Forms.TabPage(); - this.FilterByAuthorTextBox = new CKAN.HintTextBox(); + this.FilterByAuthorTextBox = new HintTextBox(); this.FilterByAuthorLabel = new System.Windows.Forms.Label(); this.FilterByNameLabel = new System.Windows.Forms.Label(); - this.FilterByNameTextBox = new CKAN.HintTextBox(); + this.FilterByNameTextBox = new HintTextBox(); this.FilterByDescriptionLabel = new System.Windows.Forms.Label(); - this.FilterByDescriptionTextBox = new CKAN.HintTextBox(); + this.FilterByDescriptionTextBox = new HintTextBox(); this.ChangesetTabPage = new System.Windows.Forms.TabPage(); this.CancelChangesButton = new System.Windows.Forms.Button(); this.ConfirmChangesButton = new System.Windows.Forms.Button(); @@ -143,6 +141,7 @@ private void InitializeComponent() this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.ChooseProvidedModsLabel = new System.Windows.Forms.Label(); + this.reportAnIssueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.menuStrip2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -178,7 +177,8 @@ private void InitializeComponent() this.helpToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(1029, 27); + this.menuStrip1.Padding = new System.Windows.Forms.Padding(9, 3, 0, 3); + this.menuStrip1.Size = new System.Drawing.Size(1544, 35); this.menuStrip1.TabIndex = 0; this.menuStrip1.Text = "menuStrip1"; // @@ -192,46 +192,46 @@ private void InitializeComponent() this.toolStripSeparator1, this.ExitToolButton}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(41, 23); + this.fileToolStripMenuItem.Size = new System.Drawing.Size(50, 29); this.fileToolStripMenuItem.Text = "File"; // // selectKSPInstallMenuItem // this.selectKSPInstallMenuItem.Name = "selectKSPInstallMenuItem"; - this.selectKSPInstallMenuItem.Size = new System.Drawing.Size(222, 24); + this.selectKSPInstallMenuItem.Size = new System.Drawing.Size(281, 30); this.selectKSPInstallMenuItem.Text = "Select KSP Install..."; this.selectKSPInstallMenuItem.Click += new System.EventHandler(this.selectKSPInstallMenuItem_Click); // // openKspDirectoryToolStripMenuItem // this.openKspDirectoryToolStripMenuItem.Name = "openKspDirectoryToolStripMenuItem"; - this.openKspDirectoryToolStripMenuItem.Size = new System.Drawing.Size(222, 24); + this.openKspDirectoryToolStripMenuItem.Size = new System.Drawing.Size(281, 30); this.openKspDirectoryToolStripMenuItem.Text = "Open KSP Directory"; this.openKspDirectoryToolStripMenuItem.Click += new System.EventHandler(this.openKspDirectoryToolStripMenuItem_Click); // // installFromckanToolStripMenuItem // this.installFromckanToolStripMenuItem.Name = "installFromckanToolStripMenuItem"; - this.installFromckanToolStripMenuItem.Size = new System.Drawing.Size(222, 24); + this.installFromckanToolStripMenuItem.Size = new System.Drawing.Size(281, 30); this.installFromckanToolStripMenuItem.Text = "Install from .ckan..."; this.installFromckanToolStripMenuItem.Click += new System.EventHandler(this.installFromckanToolStripMenuItem_Click); // // exportModListToolStripMenuItem // this.exportModListToolStripMenuItem.Name = "exportModListToolStripMenuItem"; - this.exportModListToolStripMenuItem.Size = new System.Drawing.Size(222, 24); + this.exportModListToolStripMenuItem.Size = new System.Drawing.Size(281, 30); this.exportModListToolStripMenuItem.Text = "&Export installed mods..."; this.exportModListToolStripMenuItem.Click += new System.EventHandler(this.exportModListToolStripMenuItem_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(219, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(278, 6); // // ExitToolButton // this.ExitToolButton.Name = "ExitToolButton"; - this.ExitToolButton.Size = new System.Drawing.Size(222, 24); + this.ExitToolButton.Size = new System.Drawing.Size(281, 30); this.ExitToolButton.Text = "Exit"; this.ExitToolButton.Click += new System.EventHandler(this.ExitToolButton_Click); // @@ -240,75 +240,61 @@ private void InitializeComponent() this.settingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cKANSettingsToolStripMenuItem, this.pluginsToolStripMenuItem, - this.kSPCommandlineToolStripMenuItem, - this.kSPInstanceSettingsToolStripMenuItem}); + this.kSPCommandlineToolStripMenuItem}); this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; - this.settingsToolStripMenuItem.Size = new System.Drawing.Size(70, 23); + this.settingsToolStripMenuItem.Size = new System.Drawing.Size(88, 29); this.settingsToolStripMenuItem.Text = "Settings"; // // cKANSettingsToolStripMenuItem // this.cKANSettingsToolStripMenuItem.Name = "cKANSettingsToolStripMenuItem"; - this.cKANSettingsToolStripMenuItem.Size = new System.Drawing.Size(233, 24); + this.cKANSettingsToolStripMenuItem.Size = new System.Drawing.Size(247, 30); this.cKANSettingsToolStripMenuItem.Text = "CKAN settings"; this.cKANSettingsToolStripMenuItem.Click += new System.EventHandler(this.CKANSettingsToolStripMenuItem_Click); - // + // // pluginsToolStripMenuItem - // + // this.pluginsToolStripMenuItem.Name = "pluginsToolStripMenuItem"; - this.pluginsToolStripMenuItem.Size = new System.Drawing.Size(233, 24); + this.pluginsToolStripMenuItem.Size = new System.Drawing.Size(247, 30); this.pluginsToolStripMenuItem.Text = "CKAN plugins"; this.pluginsToolStripMenuItem.Click += new System.EventHandler(this.pluginsToolStripMenuItem_Click); - // + // // kSPCommandlineToolStripMenuItem - // + // this.kSPCommandlineToolStripMenuItem.Name = "kSPCommandlineToolStripMenuItem"; - this.kSPCommandlineToolStripMenuItem.Size = new System.Drawing.Size(233, 24); + this.kSPCommandlineToolStripMenuItem.Size = new System.Drawing.Size(247, 30); this.kSPCommandlineToolStripMenuItem.Text = "KSP command-line"; this.kSPCommandlineToolStripMenuItem.Click += new System.EventHandler(this.KSPCommandlineToolStripMenuItem_Click); - // - // kSPInstanceSettingsToolStripMenuItem - // - this.kSPInstanceSettingsToolStripMenuItem.Name = "kSPInstanceSettingsToolStripMenuItem"; - this.kSPInstanceSettingsToolStripMenuItem.Size = new System.Drawing.Size(233, 24); - this.kSPInstanceSettingsToolStripMenuItem.Text = "Compatible KSP versions"; - this.kSPInstanceSettingsToolStripMenuItem.Click += new System.EventHandler(this.CompatibleKspVersionsToolStripMenuItem_Click); - // + // // helpToolStripMenuItem - // + // this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.reportAnIssueToolStripMenuItem, this.aboutToolStripMenuItem}); this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; - this.helpToolStripMenuItem.Size = new System.Drawing.Size(49, 23); + this.helpToolStripMenuItem.Size = new System.Drawing.Size(61, 29); this.helpToolStripMenuItem.Text = "Help"; - // - // reportAnIssueToolStripMenuItem - // - this.reportAnIssueToolStripMenuItem.Name = "reportAnIssueToolStripMenuItem"; - this.reportAnIssueToolStripMenuItem.Size = new System.Drawing.Size(185, 24); - this.reportAnIssueToolStripMenuItem.Text = "Report an issue..."; - this.reportAnIssueToolStripMenuItem.Click += new System.EventHandler(this.reportAnIssueToolStripMenuItem_Click); - // + // // aboutToolStripMenuItem - // + // this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; - this.aboutToolStripMenuItem.Size = new System.Drawing.Size(185, 24); + this.aboutToolStripMenuItem.Size = new System.Drawing.Size(230, 30); this.aboutToolStripMenuItem.Text = "About"; this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); - // + // // statusStrip1 - // + // this.statusStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); - this.statusStrip1.Location = new System.Drawing.Point(0, 653); + this.statusStrip1.Location = new System.Drawing.Point(0, 1016); this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Size = new System.Drawing.Size(1029, 22); + this.statusStrip1.Padding = new System.Windows.Forms.Padding(2, 0, 21, 0); + this.statusStrip1.Size = new System.Drawing.Size(1544, 22); this.statusStrip1.TabIndex = 1; this.statusStrip1.Text = "statusStrip1"; - // + // // menuStrip2 - // - this.menuStrip2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + // + this.menuStrip2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.menuStrip2.AutoSize = false; this.menuStrip2.BackColor = System.Drawing.SystemColors.Control; @@ -322,50 +308,51 @@ private void InitializeComponent() this.FilterToolButton, this.NavBackwardToolButton, this.NavForwardToolButton}); - this.menuStrip2.Location = new System.Drawing.Point(0, 3); + this.menuStrip2.Location = new System.Drawing.Point(0, 5); this.menuStrip2.Name = "menuStrip2"; - this.menuStrip2.Size = new System.Drawing.Size(3917, 40); + this.menuStrip2.Padding = new System.Windows.Forms.Padding(9, 3, 0, 3); + this.menuStrip2.Size = new System.Drawing.Size(5876, 62); this.menuStrip2.TabIndex = 2; this.menuStrip2.Text = "menuStrip2"; - // + // // launchKSPToolStripMenuItem - // + // this.launchKSPToolStripMenuItem.Image = global::CKAN.Properties.Resources.ksp; this.launchKSPToolStripMenuItem.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.launchKSPToolStripMenuItem.Name = "launchKSPToolStripMenuItem"; - this.launchKSPToolStripMenuItem.Size = new System.Drawing.Size(124, 36); + this.launchKSPToolStripMenuItem.Size = new System.Drawing.Size(146, 56); this.launchKSPToolStripMenuItem.Text = "Launch KSP"; this.launchKSPToolStripMenuItem.Click += new System.EventHandler(this.launchKSPToolStripMenuItem_Click); - // + // // RefreshToolButton - // + // this.RefreshToolButton.Image = global::CKAN.Properties.Resources.refresh; this.RefreshToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.RefreshToolButton.Name = "RefreshToolButton"; - this.RefreshToolButton.Size = new System.Drawing.Size(98, 36); + this.RefreshToolButton.Size = new System.Drawing.Size(114, 56); this.RefreshToolButton.Text = "Refresh"; this.RefreshToolButton.Click += new System.EventHandler(this.RefreshToolButton_Click); - // + // // UpdateAllToolButton - // + // this.UpdateAllToolButton.Image = global::CKAN.Properties.Resources.update; this.UpdateAllToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.UpdateAllToolButton.Name = "UpdateAllToolButton"; - this.UpdateAllToolButton.Size = new System.Drawing.Size(187, 36); + this.UpdateAllToolButton.Size = new System.Drawing.Size(232, 56); this.UpdateAllToolButton.Text = "Add available updates"; this.UpdateAllToolButton.Click += new System.EventHandler(this.MarkAllUpdatesToolButton_Click); - // + // // ApplyToolButton - // + // this.ApplyToolButton.Image = global::CKAN.Properties.Resources.apply; this.ApplyToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.ApplyToolButton.Name = "ApplyToolButton"; - this.ApplyToolButton.Size = new System.Drawing.Size(142, 36); + this.ApplyToolButton.Size = new System.Drawing.Size(173, 56); this.ApplyToolButton.Text = "Apply changes"; this.ApplyToolButton.Click += new System.EventHandler(this.ApplyToolButton_Click); - // + // // FilterToolButton - // + // this.FilterToolButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FilterCompatibleButton, this.FilterInstalledButton, @@ -378,105 +365,107 @@ private void InitializeComponent() this.FilterToolButton.Image = global::CKAN.Properties.Resources.search; this.FilterToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.FilterToolButton.Name = "FilterToolButton"; - this.FilterToolButton.Size = new System.Drawing.Size(165, 36); + this.FilterToolButton.Size = new System.Drawing.Size(201, 56); this.FilterToolButton.Text = "Filter (Compatible)"; - // + // // FilterCompatibleButton - // + // this.FilterCompatibleButton.Name = "FilterCompatibleButton"; - this.FilterCompatibleButton.Size = new System.Drawing.Size(244, 24); + this.FilterCompatibleButton.Size = new System.Drawing.Size(307, 30); this.FilterCompatibleButton.Text = "Compatible"; this.FilterCompatibleButton.Click += new System.EventHandler(this.FilterCompatibleButton_Click); - // + // // FilterInstalledButton - // + // this.FilterInstalledButton.Name = "FilterInstalledButton"; - this.FilterInstalledButton.Size = new System.Drawing.Size(244, 24); + this.FilterInstalledButton.Size = new System.Drawing.Size(307, 30); this.FilterInstalledButton.Text = "Installed"; this.FilterInstalledButton.Click += new System.EventHandler(this.FilterInstalledButton_Click); - // + // // FilterInstalledUpdateButton - // + // this.FilterInstalledUpdateButton.Name = "FilterInstalledUpdateButton"; - this.FilterInstalledUpdateButton.Size = new System.Drawing.Size(244, 24); + this.FilterInstalledUpdateButton.Size = new System.Drawing.Size(307, 30); this.FilterInstalledUpdateButton.Text = "Installed (update available)"; this.FilterInstalledUpdateButton.Click += new System.EventHandler(this.FilterInstalledUpdateButton_Click); - // + // // cachedToolStripMenuItem - // + // this.cachedToolStripMenuItem.Name = "cachedToolStripMenuItem"; - this.cachedToolStripMenuItem.Size = new System.Drawing.Size(244, 24); + this.cachedToolStripMenuItem.Size = new System.Drawing.Size(307, 30); this.cachedToolStripMenuItem.Text = "Cached"; this.cachedToolStripMenuItem.Click += new System.EventHandler(this.cachedToolStripMenuItem_Click); - // + // // FilterNewButton - // + // this.FilterNewButton.Name = "FilterNewButton"; - this.FilterNewButton.Size = new System.Drawing.Size(244, 24); + this.FilterNewButton.Size = new System.Drawing.Size(307, 30); this.FilterNewButton.Text = "New in repository"; this.FilterNewButton.Click += new System.EventHandler(this.FilterNewButton_Click); - // + // // FilterNotInstalledButton - // + // this.FilterNotInstalledButton.Name = "FilterNotInstalledButton"; - this.FilterNotInstalledButton.Size = new System.Drawing.Size(244, 24); + this.FilterNotInstalledButton.Size = new System.Drawing.Size(307, 30); this.FilterNotInstalledButton.Text = "Not installed"; this.FilterNotInstalledButton.Click += new System.EventHandler(this.FilterNotInstalledButton_Click); - // + // // FilterIncompatibleButton - // + // this.FilterIncompatibleButton.Name = "FilterIncompatibleButton"; - this.FilterIncompatibleButton.Size = new System.Drawing.Size(244, 24); + this.FilterIncompatibleButton.Size = new System.Drawing.Size(307, 30); this.FilterIncompatibleButton.Text = "Incompatible"; this.FilterIncompatibleButton.Click += new System.EventHandler(this.FilterIncompatibleButton_Click); - // + // // FilterAllButton - // + // this.FilterAllButton.Name = "FilterAllButton"; - this.FilterAllButton.Size = new System.Drawing.Size(244, 24); + this.FilterAllButton.Size = new System.Drawing.Size(307, 30); this.FilterAllButton.Text = "All"; this.FilterAllButton.Click += new System.EventHandler(this.FilterAllButton_Click); - // + // // NavBackwardToolButton - // + // this.NavBackwardToolButton.Image = global::CKAN.Properties.Resources.backward; this.NavBackwardToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.NavBackwardToolButton.Name = "NavBackwardToolButton"; - this.NavBackwardToolButton.Size = new System.Drawing.Size(44, 36); + this.NavBackwardToolButton.Size = new System.Drawing.Size(44, 56); this.NavBackwardToolButton.ToolTipText = "Previous selected mod..."; this.NavBackwardToolButton.Click += new System.EventHandler(this.NavBackwardToolButton_Click); - // + // // NavForwardToolButton - // + // this.NavForwardToolButton.Image = global::CKAN.Properties.Resources.forward; this.NavForwardToolButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.NavForwardToolButton.Name = "NavForwardToolButton"; - this.NavForwardToolButton.Size = new System.Drawing.Size(44, 36); + this.NavForwardToolButton.Size = new System.Drawing.Size(44, 56); this.NavForwardToolButton.ToolTipText = "Next selected mod..."; this.NavForwardToolButton.Click += new System.EventHandler(this.NavForwardToolButton_Click); - // + // // splitContainer1 - // - this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + // + this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; - this.splitContainer1.Location = new System.Drawing.Point(0, 72); + this.splitContainer1.Location = new System.Drawing.Point(0, 111); + this.splitContainer1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.splitContainer1.Name = "splitContainer1"; - // + // // splitContainer1.Panel1 - // + // this.splitContainer1.Panel1.Controls.Add(this.ModList); - // + // // splitContainer1.Panel2 - // + // this.splitContainer1.Panel2.Controls.Add(this.ModInfoTabControl); - this.splitContainer1.Size = new System.Drawing.Size(1015, 531); - this.splitContainer1.SplitterDistance = 649; + this.splitContainer1.Size = new System.Drawing.Size(1522, 836); + this.splitContainer1.SplitterDistance = 1156; + this.splitContainer1.SplitterWidth = 6; this.splitContainer1.TabIndex = 7; - // + // // ModList - // + // this.ModList.AllowUserToAddRows = false; this.ModList.AllowUserToDeleteRows = false; this.ModList.AllowUserToResizeRows = false; @@ -486,7 +475,7 @@ private void InitializeComponent() this.ModList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.ModList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Installed, - this.Update, + this.UpdateCol, this.ModName, this.Author, this.InstalledVersion, @@ -496,11 +485,12 @@ private void InitializeComponent() this.Description}); this.ModList.Dock = System.Windows.Forms.DockStyle.Fill; this.ModList.Location = new System.Drawing.Point(0, 0); + this.ModList.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ModList.MultiSelect = false; this.ModList.Name = "ModList"; this.ModList.RowHeadersVisible = false; this.ModList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.ModList.Size = new System.Drawing.Size(649, 531); + this.ModList.Size = new System.Drawing.Size(1156, 836); this.ModList.TabIndex = 3; this.ModList.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.ModList_CellContentClick); this.ModList.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.ModList_CellMouseDoubleClick); @@ -508,122 +498,126 @@ private void InitializeComponent() this.ModList.SelectionChanged += new System.EventHandler(this.ModList_SelectedIndexChanged); this.ModList.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ModList_KeyDown); this.ModList.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ModList_KeyPress); - // + // // Installed - // + // this.Installed.HeaderText = "Installed"; this.Installed.Name = "Installed"; this.Installed.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; this.Installed.Width = 50; - // - // Update - // - this.Update.HeaderText = "Update"; - this.Update.Name = "Update"; - this.Update.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; - this.Update.Width = 46; - // + // + // UpdateCol + // + this.UpdateCol.HeaderText = "Update"; + this.UpdateCol.Name = "Update"; + this.UpdateCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; + this.UpdateCol.Width = 46; + // // ModName - // + // this.ModName.HeaderText = "Name"; this.ModName.Name = "ModName"; this.ModName.ReadOnly = true; this.ModName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; this.ModName.Width = 250; - // + // // Author - // + // this.Author.HeaderText = "Author"; this.Author.Name = "Author"; this.Author.ReadOnly = true; this.Author.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; this.Author.Width = 120; - // + // // InstalledVersion - // + // this.InstalledVersion.HeaderText = "Installed version"; this.InstalledVersion.Name = "InstalledVersion"; this.InstalledVersion.ReadOnly = true; this.InstalledVersion.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; this.InstalledVersion.Width = 70; - // + // // LatestVersion - // + // this.LatestVersion.HeaderText = "Latest version"; this.LatestVersion.Name = "LatestVersion"; this.LatestVersion.ReadOnly = true; this.LatestVersion.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; this.LatestVersion.Width = 70; - // + // // KSPCompatibility - // + // this.KSPCompatibility.HeaderText = "Max KSP version"; this.KSPCompatibility.Name = "KSPCompatibility"; this.KSPCompatibility.ReadOnly = true; this.KSPCompatibility.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; this.KSPCompatibility.Width = 78; - // + // // SizeCol - // + // this.SizeCol.HeaderText = "Download (KB)"; this.SizeCol.Name = "SizeCol"; this.SizeCol.ReadOnly = true; this.SizeCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; - // + // // Description - // + // this.Description.HeaderText = "Description"; this.Description.Name = "Description"; this.Description.ReadOnly = true; this.Description.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic; this.Description.Width = 821; - // + // // ModInfoTabControl - // + // this.ModInfoTabControl.Appearance = System.Windows.Forms.TabAppearance.FlatButtons; this.ModInfoTabControl.Controls.Add(this.MetadataTabPage); this.ModInfoTabControl.Controls.Add(this.RelationshipTabPage); this.ModInfoTabControl.Controls.Add(this.ContentTabPage); this.ModInfoTabControl.Dock = System.Windows.Forms.DockStyle.Fill; this.ModInfoTabControl.Location = new System.Drawing.Point(0, 0); + this.ModInfoTabControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ModInfoTabControl.Name = "ModInfoTabControl"; this.ModInfoTabControl.SelectedIndex = 0; - this.ModInfoTabControl.Size = new System.Drawing.Size(362, 531); + this.ModInfoTabControl.Size = new System.Drawing.Size(360, 836); this.ModInfoTabControl.TabIndex = 0; this.ModInfoTabControl.SelectedIndexChanged += new System.EventHandler(this.ModInfoIndexChanged); - // + // // MetadataTabPage - // + // this.MetadataTabPage.Controls.Add(this.splitContainer2); - this.MetadataTabPage.Location = new System.Drawing.Point(4, 25); + this.MetadataTabPage.Location = new System.Drawing.Point(4, 32); + this.MetadataTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.MetadataTabPage.Name = "MetadataTabPage"; - this.MetadataTabPage.Padding = new System.Windows.Forms.Padding(3); - this.MetadataTabPage.Size = new System.Drawing.Size(354, 502); + this.MetadataTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.MetadataTabPage.Size = new System.Drawing.Size(352, 800); this.MetadataTabPage.TabIndex = 0; this.MetadataTabPage.Text = "Metadata"; this.MetadataTabPage.UseVisualStyleBackColor = true; - // + // // splitContainer2 - // + // this.splitContainer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer2.Location = new System.Drawing.Point(3, 3); + this.splitContainer2.Location = new System.Drawing.Point(4, 5); + this.splitContainer2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.splitContainer2.Name = "splitContainer2"; this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; - // + // // splitContainer2.Panel1 - // + // this.splitContainer2.Panel1.Controls.Add(this.MetaDataUpperLayoutPanel); - // + // // splitContainer2.Panel2 - // + // this.splitContainer2.Panel2.Controls.Add(this.MetaDataLowerLayoutPanel); - this.splitContainer2.Size = new System.Drawing.Size(348, 496); - this.splitContainer2.SplitterDistance = 236; + this.splitContainer2.Size = new System.Drawing.Size(344, 790); + this.splitContainer2.SplitterDistance = 379; + this.splitContainer2.SplitterWidth = 6; this.splitContainer2.TabIndex = 0; - // + // // MetaDataUpperLayoutPanel - // + // this.MetaDataUpperLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.MetaDataUpperLayoutPanel.ColumnCount = 1; this.MetaDataUpperLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); @@ -631,38 +625,41 @@ private void InitializeComponent() this.MetaDataUpperLayoutPanel.Controls.Add(this.MetadataModuleAbstractLabel, 0, 1); this.MetaDataUpperLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.MetaDataUpperLayoutPanel.Location = new System.Drawing.Point(0, 0); + this.MetaDataUpperLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.MetaDataUpperLayoutPanel.Name = "MetaDataUpperLayoutPanel"; this.MetaDataUpperLayoutPanel.RowCount = 2; this.MetaDataUpperLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); this.MetaDataUpperLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F)); - this.MetaDataUpperLayoutPanel.Size = new System.Drawing.Size(346, 234); + this.MetaDataUpperLayoutPanel.Size = new System.Drawing.Size(342, 377); this.MetaDataUpperLayoutPanel.TabIndex = 0; - // + // // MetadataModuleNameLabel - // + // this.MetadataModuleNameLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.MetadataModuleNameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.MetadataModuleNameLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.MetadataModuleNameLabel.Location = new System.Drawing.Point(3, 0); + this.MetadataModuleNameLabel.Location = new System.Drawing.Point(4, 0); + this.MetadataModuleNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.MetadataModuleNameLabel.Name = "MetadataModuleNameLabel"; - this.MetadataModuleNameLabel.Size = new System.Drawing.Size(340, 46); + this.MetadataModuleNameLabel.Size = new System.Drawing.Size(334, 75); this.MetadataModuleNameLabel.TabIndex = 0; this.MetadataModuleNameLabel.Text = "Mod Name"; this.MetadataModuleNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // + // // MetadataModuleAbstractLabel - // + // this.MetadataModuleAbstractLabel.BorderStyle = System.Windows.Forms.BorderStyle.None; this.MetadataModuleAbstractLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleAbstractLabel.Location = new System.Drawing.Point(3, 49); + this.MetadataModuleAbstractLabel.Location = new System.Drawing.Point(4, 80); + this.MetadataModuleAbstractLabel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.MetadataModuleAbstractLabel.Name = "MetadataModuleAbstractLabel"; this.MetadataModuleAbstractLabel.ReadOnly = true; - this.MetadataModuleAbstractLabel.Size = new System.Drawing.Size(340, 182); + this.MetadataModuleAbstractLabel.Size = new System.Drawing.Size(334, 292); this.MetadataModuleAbstractLabel.TabIndex = 27; this.MetadataModuleAbstractLabel.Text = ""; - // + // // MetaDataLowerLayoutPanel - // + // this.MetaDataLowerLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.MetaDataLowerLayoutPanel.ColumnCount = 2; this.MetaDataLowerLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 26.16279F)); @@ -685,208 +682,226 @@ private void InitializeComponent() this.MetaDataLowerLayoutPanel.Controls.Add(this.MetadataModuleGitHubLinkLabel, 1, 4); this.MetaDataLowerLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.MetaDataLowerLayoutPanel.Location = new System.Drawing.Point(0, 0); + this.MetaDataLowerLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.MetaDataLowerLayoutPanel.Name = "MetaDataLowerLayoutPanel"; this.MetaDataLowerLayoutPanel.RowCount = 9; - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F)); + this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 31F)); this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 13F)); - this.MetaDataLowerLayoutPanel.Size = new System.Drawing.Size(346, 254); + this.MetaDataLowerLayoutPanel.Size = new System.Drawing.Size(342, 403); this.MetaDataLowerLayoutPanel.TabIndex = 0; - // + // // IdentifierLabel - // + // this.IdentifierLabel.AutoSize = true; this.IdentifierLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.IdentifierLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.IdentifierLabel.Location = new System.Drawing.Point(3, 210); + this.IdentifierLabel.Location = new System.Drawing.Point(4, 322); + this.IdentifierLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.IdentifierLabel.Name = "IdentifierLabel"; - this.IdentifierLabel.Size = new System.Drawing.Size(84, 20); + this.IdentifierLabel.Size = new System.Drawing.Size(81, 31); this.IdentifierLabel.TabIndex = 28; this.IdentifierLabel.Text = "Identifier"; - // + // // MetadataIdentifierLabel - // + // this.MetadataIdentifierLabel.AutoSize = true; this.MetadataIdentifierLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.MetadataIdentifierLabel.ForeColor = System.Drawing.Color.Black; - this.MetadataIdentifierLabel.Location = new System.Drawing.Point(93, 210); + this.MetadataIdentifierLabel.Location = new System.Drawing.Point(93, 322); + this.MetadataIdentifierLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.MetadataIdentifierLabel.Name = "MetadataIdentifierLabel"; - this.MetadataIdentifierLabel.Size = new System.Drawing.Size(250, 20); + this.MetadataIdentifierLabel.Size = new System.Drawing.Size(245, 31); this.MetadataIdentifierLabel.TabIndex = 27; this.MetadataIdentifierLabel.Text = "-"; - // + // // KSPCompatibilityLabel - // + // this.KSPCompatibilityLabel.AutoSize = true; this.KSPCompatibilityLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.KSPCompatibilityLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.KSPCompatibilityLabel.Location = new System.Drawing.Point(3, 180); + this.KSPCompatibilityLabel.Location = new System.Drawing.Point(4, 276); + this.KSPCompatibilityLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.KSPCompatibilityLabel.Name = "KSPCompatibilityLabel"; - this.KSPCompatibilityLabel.Size = new System.Drawing.Size(84, 30); + this.KSPCompatibilityLabel.Size = new System.Drawing.Size(81, 46); this.KSPCompatibilityLabel.TabIndex = 13; this.KSPCompatibilityLabel.Text = "Max KSP ver.:"; - // + // // ReleaseLabel - // + // this.ReleaseLabel.AutoSize = true; this.ReleaseLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.ReleaseLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.ReleaseLabel.Location = new System.Drawing.Point(3, 150); + this.ReleaseLabel.Location = new System.Drawing.Point(4, 230); + this.ReleaseLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.ReleaseLabel.Name = "ReleaseLabel"; - this.ReleaseLabel.Size = new System.Drawing.Size(84, 30); + this.ReleaseLabel.Size = new System.Drawing.Size(81, 46); this.ReleaseLabel.TabIndex = 12; this.ReleaseLabel.Text = "Release status:"; - // + // // GitHubLabel - // + // this.GitHubLabel.AutoSize = true; this.GitHubLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.GitHubLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.GitHubLabel.Location = new System.Drawing.Point(3, 120); + this.GitHubLabel.Location = new System.Drawing.Point(4, 184); + this.GitHubLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.GitHubLabel.Name = "GitHubLabel"; - this.GitHubLabel.Size = new System.Drawing.Size(84, 30); + this.GitHubLabel.Size = new System.Drawing.Size(81, 46); this.GitHubLabel.TabIndex = 10; this.GitHubLabel.Text = "Source Code:"; - // + // // HomePageLabel - // + // this.HomePageLabel.AutoSize = true; this.HomePageLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.HomePageLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.HomePageLabel.Location = new System.Drawing.Point(3, 90); + this.HomePageLabel.Location = new System.Drawing.Point(4, 138); + this.HomePageLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.HomePageLabel.Name = "HomePageLabel"; - this.HomePageLabel.Size = new System.Drawing.Size(84, 30); + this.HomePageLabel.Size = new System.Drawing.Size(81, 46); this.HomePageLabel.TabIndex = 7; this.HomePageLabel.Text = "Homepage:"; - // + // // AuthorLabel - // + // this.AuthorLabel.AutoSize = true; this.AuthorLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.AuthorLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.AuthorLabel.Location = new System.Drawing.Point(3, 60); + this.AuthorLabel.Location = new System.Drawing.Point(4, 92); + this.AuthorLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.AuthorLabel.Name = "AuthorLabel"; - this.AuthorLabel.Size = new System.Drawing.Size(84, 30); + this.AuthorLabel.Size = new System.Drawing.Size(81, 46); this.AuthorLabel.TabIndex = 5; this.AuthorLabel.Text = "Author:"; - // + // // LicenseLabel - // + // this.LicenseLabel.AutoSize = true; this.LicenseLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.LicenseLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.LicenseLabel.Location = new System.Drawing.Point(3, 30); + this.LicenseLabel.Location = new System.Drawing.Point(4, 46); + this.LicenseLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.LicenseLabel.Name = "LicenseLabel"; - this.LicenseLabel.Size = new System.Drawing.Size(84, 30); + this.LicenseLabel.Size = new System.Drawing.Size(81, 46); this.LicenseLabel.TabIndex = 3; this.LicenseLabel.Text = "License:"; - // + // // MetadataModuleVersionLabel - // + // this.MetadataModuleVersionLabel.AutoSize = true; this.MetadataModuleVersionLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.MetadataModuleVersionLabel.Location = new System.Drawing.Point(93, 0); + this.MetadataModuleVersionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.MetadataModuleVersionLabel.Name = "MetadataModuleVersionLabel"; - this.MetadataModuleVersionLabel.Size = new System.Drawing.Size(250, 30); + this.MetadataModuleVersionLabel.Size = new System.Drawing.Size(245, 46); this.MetadataModuleVersionLabel.TabIndex = 2; this.MetadataModuleVersionLabel.Text = "0.0.0"; - // + // // MetadataModuleLicenseLabel - // + // this.MetadataModuleLicenseLabel.AutoSize = true; this.MetadataModuleLicenseLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleLicenseLabel.Location = new System.Drawing.Point(93, 30); + this.MetadataModuleLicenseLabel.Location = new System.Drawing.Point(93, 46); + this.MetadataModuleLicenseLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.MetadataModuleLicenseLabel.Name = "MetadataModuleLicenseLabel"; - this.MetadataModuleLicenseLabel.Size = new System.Drawing.Size(250, 30); + this.MetadataModuleLicenseLabel.Size = new System.Drawing.Size(245, 46); this.MetadataModuleLicenseLabel.TabIndex = 4; this.MetadataModuleLicenseLabel.Text = "None"; - // + // // MetadataModuleAuthorLabel - // + // this.MetadataModuleAuthorLabel.AutoSize = true; this.MetadataModuleAuthorLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleAuthorLabel.Location = new System.Drawing.Point(93, 60); + this.MetadataModuleAuthorLabel.Location = new System.Drawing.Point(93, 92); + this.MetadataModuleAuthorLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.MetadataModuleAuthorLabel.Name = "MetadataModuleAuthorLabel"; - this.MetadataModuleAuthorLabel.Size = new System.Drawing.Size(250, 30); + this.MetadataModuleAuthorLabel.Size = new System.Drawing.Size(245, 46); this.MetadataModuleAuthorLabel.TabIndex = 6; this.MetadataModuleAuthorLabel.Text = "Nobody"; - // + // // VersionLabel - // + // this.VersionLabel.AutoSize = true; this.VersionLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.VersionLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.VersionLabel.Location = new System.Drawing.Point(3, 0); + this.VersionLabel.Location = new System.Drawing.Point(4, 0); + this.VersionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.VersionLabel.Name = "VersionLabel"; - this.VersionLabel.Size = new System.Drawing.Size(84, 30); + this.VersionLabel.Size = new System.Drawing.Size(81, 46); this.VersionLabel.TabIndex = 1; this.VersionLabel.Text = "Version:"; - // + // // MetadataModuleReleaseStatusLabel - // + // this.MetadataModuleReleaseStatusLabel.AutoSize = true; this.MetadataModuleReleaseStatusLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleReleaseStatusLabel.Location = new System.Drawing.Point(93, 150); + this.MetadataModuleReleaseStatusLabel.Location = new System.Drawing.Point(93, 230); + this.MetadataModuleReleaseStatusLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.MetadataModuleReleaseStatusLabel.Name = "MetadataModuleReleaseStatusLabel"; - this.MetadataModuleReleaseStatusLabel.Size = new System.Drawing.Size(250, 30); + this.MetadataModuleReleaseStatusLabel.Size = new System.Drawing.Size(245, 46); this.MetadataModuleReleaseStatusLabel.TabIndex = 11; this.MetadataModuleReleaseStatusLabel.Text = "Stable"; - // + // // MetadataModuleHomePageLinkLabel - // + // this.MetadataModuleHomePageLinkLabel.AutoEllipsis = true; this.MetadataModuleHomePageLinkLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleHomePageLinkLabel.Location = new System.Drawing.Point(93, 90); + this.MetadataModuleHomePageLinkLabel.Location = new System.Drawing.Point(93, 138); + this.MetadataModuleHomePageLinkLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.MetadataModuleHomePageLinkLabel.Name = "MetadataModuleHomePageLinkLabel"; - this.MetadataModuleHomePageLinkLabel.Size = new System.Drawing.Size(250, 30); + this.MetadataModuleHomePageLinkLabel.Size = new System.Drawing.Size(245, 46); this.MetadataModuleHomePageLinkLabel.TabIndex = 25; this.MetadataModuleHomePageLinkLabel.TabStop = true; this.MetadataModuleHomePageLinkLabel.Text = "linkLabel1"; this.MetadataModuleHomePageLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabel_LinkClicked); - // + // // MetadataModuleKSPCompatibilityLabel - // + // this.MetadataModuleKSPCompatibilityLabel.AutoSize = true; this.MetadataModuleKSPCompatibilityLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleKSPCompatibilityLabel.Location = new System.Drawing.Point(93, 180); + this.MetadataModuleKSPCompatibilityLabel.Location = new System.Drawing.Point(93, 276); + this.MetadataModuleKSPCompatibilityLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.MetadataModuleKSPCompatibilityLabel.Name = "MetadataModuleKSPCompatibilityLabel"; - this.MetadataModuleKSPCompatibilityLabel.Size = new System.Drawing.Size(250, 30); + this.MetadataModuleKSPCompatibilityLabel.Size = new System.Drawing.Size(245, 46); this.MetadataModuleKSPCompatibilityLabel.TabIndex = 14; this.MetadataModuleKSPCompatibilityLabel.Text = "0.0.0"; - // + // // MetadataModuleGitHubLinkLabel - // + // this.MetadataModuleGitHubLinkLabel.AutoEllipsis = true; this.MetadataModuleGitHubLinkLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.MetadataModuleGitHubLinkLabel.Location = new System.Drawing.Point(93, 120); + this.MetadataModuleGitHubLinkLabel.Location = new System.Drawing.Point(93, 184); + this.MetadataModuleGitHubLinkLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.MetadataModuleGitHubLinkLabel.Name = "MetadataModuleGitHubLinkLabel"; - this.MetadataModuleGitHubLinkLabel.Size = new System.Drawing.Size(250, 30); + this.MetadataModuleGitHubLinkLabel.Size = new System.Drawing.Size(245, 46); this.MetadataModuleGitHubLinkLabel.TabIndex = 26; this.MetadataModuleGitHubLinkLabel.TabStop = true; this.MetadataModuleGitHubLinkLabel.Text = "linkLabel2"; this.MetadataModuleGitHubLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabel_LinkClicked); - // + // // RelationshipTabPage - // + // this.RelationshipTabPage.Controls.Add(this.ModuleRelationshipType); this.RelationshipTabPage.Controls.Add(this.DependsGraphTree); - this.RelationshipTabPage.Location = new System.Drawing.Point(4, 25); + this.RelationshipTabPage.Location = new System.Drawing.Point(4, 32); + this.RelationshipTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.RelationshipTabPage.Name = "RelationshipTabPage"; - this.RelationshipTabPage.Padding = new System.Windows.Forms.Padding(3); - this.RelationshipTabPage.Size = new System.Drawing.Size(354, 502); + this.RelationshipTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.RelationshipTabPage.Size = new System.Drawing.Size(532, 853); this.RelationshipTabPage.TabIndex = 1; this.RelationshipTabPage.Text = "Relationships"; this.RelationshipTabPage.UseVisualStyleBackColor = true; - // + // // ModuleRelationshipType - // - this.ModuleRelationshipType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + // + this.ModuleRelationshipType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ModuleRelationshipType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.ModuleRelationshipType.FormattingEnabled = true; @@ -896,102 +911,111 @@ private void InitializeComponent() "Suggests", "Supports", "Conflicts"}); - this.ModuleRelationshipType.Location = new System.Drawing.Point(6, 7); + this.ModuleRelationshipType.Location = new System.Drawing.Point(9, 11); + this.ModuleRelationshipType.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ModuleRelationshipType.Name = "ModuleRelationshipType"; - this.ModuleRelationshipType.Size = new System.Drawing.Size(342, 21); + this.ModuleRelationshipType.Size = new System.Drawing.Size(508, 28); this.ModuleRelationshipType.TabIndex = 1; this.ModuleRelationshipType.SelectedIndexChanged += new System.EventHandler(this.ModuleRelationshipType_SelectedIndexChanged); - // + // // DependsGraphTree - // - this.DependsGraphTree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + // + this.DependsGraphTree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.DependsGraphTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.DependsGraphTree.Location = new System.Drawing.Point(3, 34); + this.DependsGraphTree.Location = new System.Drawing.Point(4, 52); + this.DependsGraphTree.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.DependsGraphTree.Name = "DependsGraphTree"; - this.DependsGraphTree.Size = new System.Drawing.Size(348, 460); + this.DependsGraphTree.Size = new System.Drawing.Size(518, 771); this.DependsGraphTree.TabIndex = 0; this.DependsGraphTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.DependsGraphTree_NodeMouseDoubleClick); - // + // // ContentTabPage - // + // this.ContentTabPage.Controls.Add(this.ContentsPreviewTree); this.ContentTabPage.Controls.Add(this.ContentsDownloadButton); this.ContentTabPage.Controls.Add(this.NotCachedLabel); - this.ContentTabPage.Location = new System.Drawing.Point(4, 25); + this.ContentTabPage.Location = new System.Drawing.Point(4, 32); + this.ContentTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ContentTabPage.Name = "ContentTabPage"; - this.ContentTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ContentTabPage.Size = new System.Drawing.Size(354, 502); + this.ContentTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ContentTabPage.Size = new System.Drawing.Size(532, 853); this.ContentTabPage.TabIndex = 2; this.ContentTabPage.Text = "Contents"; this.ContentTabPage.UseVisualStyleBackColor = true; - // + // // ContentsPreviewTree - // - this.ContentsPreviewTree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + // + this.ContentsPreviewTree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ContentsPreviewTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ContentsPreviewTree.Enabled = false; - this.ContentsPreviewTree.Location = new System.Drawing.Point(0, 65); + this.ContentsPreviewTree.Location = new System.Drawing.Point(0, 100); + this.ContentsPreviewTree.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ContentsPreviewTree.Name = "ContentsPreviewTree"; - this.ContentsPreviewTree.Size = new System.Drawing.Size(351, 432); + this.ContentsPreviewTree.Size = new System.Drawing.Size(522, 728); this.ContentsPreviewTree.TabIndex = 2; this.ContentsPreviewTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.ContentsPreviewTree_NodeMouseDoubleClick); - // + // // ContentsDownloadButton - // - this.ContentsDownloadButton.Location = new System.Drawing.Point(6, 36); + // + this.ContentsDownloadButton.Location = new System.Drawing.Point(9, 55); + this.ContentsDownloadButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ContentsDownloadButton.Name = "ContentsDownloadButton"; - this.ContentsDownloadButton.Size = new System.Drawing.Size(103, 23); + this.ContentsDownloadButton.Size = new System.Drawing.Size(154, 35); this.ContentsDownloadButton.TabIndex = 1; this.ContentsDownloadButton.Text = "Download"; this.ContentsDownloadButton.UseVisualStyleBackColor = true; this.ContentsDownloadButton.Click += new System.EventHandler(this.ContentsDownloadButton_Click); - // + // // NotCachedLabel - // - this.NotCachedLabel.Location = new System.Drawing.Point(3, 3); + // + this.NotCachedLabel.Location = new System.Drawing.Point(4, 5); + this.NotCachedLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.NotCachedLabel.Name = "NotCachedLabel"; - this.NotCachedLabel.Size = new System.Drawing.Size(216, 30); + this.NotCachedLabel.Size = new System.Drawing.Size(324, 46); this.NotCachedLabel.TabIndex = 0; this.NotCachedLabel.Text = "This mod is not in the cache, click \'Download\' to preview contents"; - // + // // StatusPanel - // + // this.StatusPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.StatusPanel.Controls.Add(this.StatusLabel); - this.StatusPanel.Location = new System.Drawing.Point(0, 698); + this.StatusPanel.Location = new System.Drawing.Point(0, 1074); + this.StatusPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.StatusPanel.Name = "StatusPanel"; - this.StatusPanel.Size = new System.Drawing.Size(797, 19); + this.StatusPanel.Size = new System.Drawing.Size(1196, 29); this.StatusPanel.TabIndex = 8; - // + // // StatusLabel - // + // this.StatusLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.StatusLabel.Location = new System.Drawing.Point(0, 0); + this.StatusLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.StatusLabel.Name = "StatusLabel"; - this.StatusLabel.Size = new System.Drawing.Size(797, 19); + this.StatusLabel.Size = new System.Drawing.Size(1050, 29); this.StatusLabel.TabIndex = 0; this.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // + // // MainTabControl - // + // this.MainTabControl.Controls.Add(this.ManageModsTabPage); this.MainTabControl.Controls.Add(this.ChangesetTabPage); this.MainTabControl.Controls.Add(this.WaitTabPage); this.MainTabControl.Controls.Add(this.ChooseRecommendedModsTabPage); this.MainTabControl.Controls.Add(this.ChooseProvidedModsTabPage); this.MainTabControl.Dock = System.Windows.Forms.DockStyle.Fill; - this.MainTabControl.Location = new System.Drawing.Point(0, 27); + this.MainTabControl.Location = new System.Drawing.Point(0, 35); + this.MainTabControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.MainTabControl.Name = "MainTabControl"; this.MainTabControl.SelectedIndex = 0; - this.MainTabControl.Size = new System.Drawing.Size(1029, 626); + this.MainTabControl.Size = new System.Drawing.Size(1544, 981); this.MainTabControl.TabIndex = 9; - // + // // ManageModsTabPage - // + // this.ManageModsTabPage.BackColor = System.Drawing.SystemColors.Control; this.ManageModsTabPage.Controls.Add(this.FilterByAuthorTextBox); this.ManageModsTabPage.Controls.Add(this.FilterByAuthorLabel); @@ -1001,111 +1025,121 @@ private void InitializeComponent() this.ManageModsTabPage.Controls.Add(this.FilterByDescriptionTextBox); this.ManageModsTabPage.Controls.Add(this.menuStrip2); this.ManageModsTabPage.Controls.Add(this.splitContainer1); - this.ManageModsTabPage.Location = new System.Drawing.Point(4, 22); + this.ManageModsTabPage.Location = new System.Drawing.Point(4, 29); + this.ManageModsTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ManageModsTabPage.Name = "ManageModsTabPage"; - this.ManageModsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ManageModsTabPage.Size = new System.Drawing.Size(1021, 600); + this.ManageModsTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ManageModsTabPage.Size = new System.Drawing.Size(1536, 948); this.ManageModsTabPage.TabIndex = 0; this.ManageModsTabPage.Text = "Manage mods"; - // + // // FilterByAuthorTextBox - // + // this.FilterByAuthorTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.FilterByAuthorTextBox.Location = new System.Drawing.Point(362, 48); + this.FilterByAuthorTextBox.Location = new System.Drawing.Point(543, 74); + this.FilterByAuthorTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.FilterByAuthorTextBox.Name = "FilterByAuthorTextBox"; - this.FilterByAuthorTextBox.Size = new System.Drawing.Size(124, 20); + this.FilterByAuthorTextBox.Size = new System.Drawing.Size(185, 26); this.FilterByAuthorTextBox.TabIndex = 10; this.FilterByAuthorTextBox.TextChanged += new System.EventHandler(this.FilterByAuthorTextBox_TextChanged); - // + // // FilterByAuthorLabel - // + // this.FilterByAuthorLabel.AutoSize = true; this.FilterByAuthorLabel.BackColor = System.Drawing.Color.Transparent; - this.FilterByAuthorLabel.Location = new System.Drawing.Point(248, 50); + this.FilterByAuthorLabel.Location = new System.Drawing.Point(372, 77); + this.FilterByAuthorLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.FilterByAuthorLabel.Name = "FilterByAuthorLabel"; - this.FilterByAuthorLabel.Size = new System.Drawing.Size(108, 13); + this.FilterByAuthorLabel.Size = new System.Drawing.Size(162, 20); this.FilterByAuthorLabel.TabIndex = 11; this.FilterByAuthorLabel.Text = "Filter by author name:"; - // + // // FilterByNameLabel - // + // this.FilterByNameLabel.AutoSize = true; this.FilterByNameLabel.BackColor = System.Drawing.Color.Transparent; - this.FilterByNameLabel.Location = new System.Drawing.Point(4, 50); + this.FilterByNameLabel.Location = new System.Drawing.Point(6, 77); + this.FilterByNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.FilterByNameLabel.Name = "FilterByNameLabel"; - this.FilterByNameLabel.Size = new System.Drawing.Size(98, 13); + this.FilterByNameLabel.Size = new System.Drawing.Size(147, 20); this.FilterByNameLabel.TabIndex = 10; this.FilterByNameLabel.Text = "Filter by mod name:"; - // + // // FilterByNameTextBox - // + // this.FilterByNameTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.FilterByNameTextBox.Location = new System.Drawing.Point(107, 48); + this.FilterByNameTextBox.Location = new System.Drawing.Point(160, 74); + this.FilterByNameTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.FilterByNameTextBox.Name = "FilterByNameTextBox"; - this.FilterByNameTextBox.Size = new System.Drawing.Size(124, 20); + this.FilterByNameTextBox.Size = new System.Drawing.Size(185, 26); this.FilterByNameTextBox.TabIndex = 9; this.FilterByNameTextBox.TextChanged += new System.EventHandler(this.FilterByNameTextBox_TextChanged); - // + // // FilterByDescriptionLabel - // + // this.FilterByDescriptionLabel.AutoSize = true; this.FilterByDescriptionLabel.BackColor = System.Drawing.Color.Transparent; - this.FilterByDescriptionLabel.Location = new System.Drawing.Point(503, 50); + this.FilterByDescriptionLabel.Location = new System.Drawing.Point(754, 77); + this.FilterByDescriptionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.FilterByDescriptionLabel.Name = "FilterByDescriptionLabel"; - this.FilterByDescriptionLabel.Size = new System.Drawing.Size(100, 13); + this.FilterByDescriptionLabel.Size = new System.Drawing.Size(149, 20); this.FilterByDescriptionLabel.TabIndex = 10; this.FilterByDescriptionLabel.Text = "Filter by description:"; - // + // // FilterByDescriptionTextBox - // + // this.FilterByDescriptionTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.FilterByDescriptionTextBox.Location = new System.Drawing.Point(608, 48); + this.FilterByDescriptionTextBox.Location = new System.Drawing.Point(912, 74); + this.FilterByDescriptionTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.FilterByDescriptionTextBox.Name = "FilterByDescriptionTextBox"; - this.FilterByDescriptionTextBox.Size = new System.Drawing.Size(124, 20); + this.FilterByDescriptionTextBox.Size = new System.Drawing.Size(185, 26); this.FilterByDescriptionTextBox.TabIndex = 9; this.FilterByDescriptionTextBox.TextChanged += new System.EventHandler(this.FilterByDescriptionTextBox_TextChanged); - // + // // ChangesetTabPage - // + // this.ChangesetTabPage.Controls.Add(this.CancelChangesButton); this.ChangesetTabPage.Controls.Add(this.ConfirmChangesButton); this.ChangesetTabPage.Controls.Add(this.ChangesListView); - this.ChangesetTabPage.Location = new System.Drawing.Point(4, 22); + this.ChangesetTabPage.Location = new System.Drawing.Point(4, 29); + this.ChangesetTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ChangesetTabPage.Name = "ChangesetTabPage"; - this.ChangesetTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ChangesetTabPage.Size = new System.Drawing.Size(1021, 600); + this.ChangesetTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ChangesetTabPage.Size = new System.Drawing.Size(1536, 1001); this.ChangesetTabPage.TabIndex = 2; this.ChangesetTabPage.Text = "Changeset"; this.ChangesetTabPage.UseVisualStyleBackColor = true; - // + // // CancelChangesButton - // + // this.CancelChangesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.CancelChangesButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.CancelChangesButton.Location = new System.Drawing.Point(859, 617); + this.CancelChangesButton.Location = new System.Drawing.Point(1288, 949); + this.CancelChangesButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.CancelChangesButton.Name = "CancelChangesButton"; - this.CancelChangesButton.Size = new System.Drawing.Size(75, 23); + this.CancelChangesButton.Size = new System.Drawing.Size(112, 35); this.CancelChangesButton.TabIndex = 6; this.CancelChangesButton.Text = "Clear"; this.CancelChangesButton.UseVisualStyleBackColor = true; this.CancelChangesButton.Click += new System.EventHandler(this.CancelChangesButton_Click); - // + // // ConfirmChangesButton - // + // this.ConfirmChangesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.ConfirmChangesButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.ConfirmChangesButton.Location = new System.Drawing.Point(940, 617); + this.ConfirmChangesButton.Location = new System.Drawing.Point(1410, 949); + this.ConfirmChangesButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ConfirmChangesButton.Name = "ConfirmChangesButton"; - this.ConfirmChangesButton.Size = new System.Drawing.Size(75, 23); + this.ConfirmChangesButton.Size = new System.Drawing.Size(112, 35); this.ConfirmChangesButton.TabIndex = 5; this.ConfirmChangesButton.Text = " Apply"; this.ConfirmChangesButton.UseVisualStyleBackColor = true; this.ConfirmChangesButton.Click += new System.EventHandler(this.ConfirmChangesButton_Click); - // + // // ChangesListView - // - this.ChangesListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + // + this.ChangesListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ChangesListView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ChangesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { @@ -1113,160 +1147,171 @@ private void InitializeComponent() this.ChangeType, this.Reason}); this.ChangesListView.FullRowSelect = true; - this.ChangesListView.Location = new System.Drawing.Point(-1, 0); + this.ChangesListView.Location = new System.Drawing.Point(-2, 0); + this.ChangesListView.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ChangesListView.Name = "ChangesListView"; - this.ChangesListView.Size = new System.Drawing.Size(1022, 611); + this.ChangesListView.Size = new System.Drawing.Size(1532, 939); this.ChangesListView.TabIndex = 4; this.ChangesListView.UseCompatibleStateImageBehavior = false; this.ChangesListView.View = System.Windows.Forms.View.Details; - // + // // Mod - // + // this.Mod.Text = "Mod"; this.Mod.Width = 332; - // + // // ChangeType - // + // this.ChangeType.Text = "Change"; this.ChangeType.Width = 111; - // + // // Reason - // + // this.Reason.Text = "Reason for action"; this.Reason.Width = 606; - // + // // WaitTabPage - // + // this.WaitTabPage.BackColor = System.Drawing.SystemColors.Control; this.WaitTabPage.Controls.Add(this.CancelCurrentActionButton); this.WaitTabPage.Controls.Add(this.LogTextBox); this.WaitTabPage.Controls.Add(this.DialogProgressBar); this.WaitTabPage.Controls.Add(this.MessageTextBox); - this.WaitTabPage.Location = new System.Drawing.Point(4, 22); + this.WaitTabPage.Location = new System.Drawing.Point(4, 29); + this.WaitTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.WaitTabPage.Name = "WaitTabPage"; - this.WaitTabPage.Padding = new System.Windows.Forms.Padding(3); - this.WaitTabPage.Size = new System.Drawing.Size(1021, 600); + this.WaitTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.WaitTabPage.Size = new System.Drawing.Size(1536, 1001); this.WaitTabPage.TabIndex = 1; this.WaitTabPage.Text = "Status log"; - // + // // CancelCurrentActionButton - // + // this.CancelCurrentActionButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.CancelCurrentActionButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.CancelCurrentActionButton.Location = new System.Drawing.Point(940, 618); + this.CancelCurrentActionButton.Location = new System.Drawing.Point(1410, 951); + this.CancelCurrentActionButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.CancelCurrentActionButton.Name = "CancelCurrentActionButton"; - this.CancelCurrentActionButton.Size = new System.Drawing.Size(75, 23); + this.CancelCurrentActionButton.Size = new System.Drawing.Size(112, 35); this.CancelCurrentActionButton.TabIndex = 9; this.CancelCurrentActionButton.Text = "Cancel"; this.CancelCurrentActionButton.UseVisualStyleBackColor = true; this.CancelCurrentActionButton.Click += new System.EventHandler(this.CancelCurrentActionButton_Click); - // + // // LogTextBox - // - this.LogTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + // + this.LogTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.LogTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.LogTextBox.Location = new System.Drawing.Point(9, 58); + this.LogTextBox.Location = new System.Drawing.Point(14, 89); + this.LogTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.LogTextBox.Multiline = true; this.LogTextBox.Name = "LogTextBox"; this.LogTextBox.ReadOnly = true; this.LogTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.LogTextBox.Size = new System.Drawing.Size(1004, 554); + this.LogTextBox.Size = new System.Drawing.Size(1505, 851); this.LogTextBox.TabIndex = 8; - // + // // DialogProgressBar - // - this.DialogProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + // + this.DialogProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.DialogProgressBar.Location = new System.Drawing.Point(9, 29); + this.DialogProgressBar.Location = new System.Drawing.Point(14, 45); + this.DialogProgressBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.DialogProgressBar.Name = "DialogProgressBar"; - this.DialogProgressBar.Size = new System.Drawing.Size(1004, 23); + this.DialogProgressBar.Size = new System.Drawing.Size(1506, 35); this.DialogProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee; this.DialogProgressBar.TabIndex = 7; - // + // // MessageTextBox - // - this.MessageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + // + this.MessageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.MessageTextBox.BackColor = System.Drawing.SystemColors.Control; this.MessageTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; this.MessageTextBox.Enabled = false; - this.MessageTextBox.Location = new System.Drawing.Point(8, 6); + this.MessageTextBox.Location = new System.Drawing.Point(12, 9); + this.MessageTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.MessageTextBox.Multiline = true; this.MessageTextBox.Name = "MessageTextBox"; this.MessageTextBox.ReadOnly = true; - this.MessageTextBox.Size = new System.Drawing.Size(1007, 17); + this.MessageTextBox.Size = new System.Drawing.Size(1510, 26); this.MessageTextBox.TabIndex = 6; this.MessageTextBox.Text = "Waiting for operation to complete"; this.MessageTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // + // // ChooseRecommendedModsTabPage - // + // this.ChooseRecommendedModsTabPage.Controls.Add(this.RecommendedModsCancelButton); this.ChooseRecommendedModsTabPage.Controls.Add(this.RecommendedModsContinueButton); this.ChooseRecommendedModsTabPage.Controls.Add(this.RecommendedModsToggleCheckbox); this.ChooseRecommendedModsTabPage.Controls.Add(this.RecommendedDialogLabel); this.ChooseRecommendedModsTabPage.Controls.Add(this.RecommendedModsListView); - this.ChooseRecommendedModsTabPage.Location = new System.Drawing.Point(4, 22); + this.ChooseRecommendedModsTabPage.Location = new System.Drawing.Point(4, 29); + this.ChooseRecommendedModsTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ChooseRecommendedModsTabPage.Name = "ChooseRecommendedModsTabPage"; - this.ChooseRecommendedModsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ChooseRecommendedModsTabPage.Size = new System.Drawing.Size(1021, 600); + this.ChooseRecommendedModsTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ChooseRecommendedModsTabPage.Size = new System.Drawing.Size(1536, 1001); this.ChooseRecommendedModsTabPage.TabIndex = 3; this.ChooseRecommendedModsTabPage.Text = "Choose recommended mods"; this.ChooseRecommendedModsTabPage.UseVisualStyleBackColor = true; - // + // // RecommendedModsCancelButton - // + // this.RecommendedModsCancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.RecommendedModsCancelButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RecommendedModsCancelButton.Location = new System.Drawing.Point(859, 617); + this.RecommendedModsCancelButton.Location = new System.Drawing.Point(1288, 949); + this.RecommendedModsCancelButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.RecommendedModsCancelButton.Name = "RecommendedModsCancelButton"; - this.RecommendedModsCancelButton.Size = new System.Drawing.Size(75, 23); + this.RecommendedModsCancelButton.Size = new System.Drawing.Size(112, 35); this.RecommendedModsCancelButton.TabIndex = 8; this.RecommendedModsCancelButton.Text = "Cancel"; this.RecommendedModsCancelButton.UseVisualStyleBackColor = true; this.RecommendedModsCancelButton.Click += new System.EventHandler(this.RecommendedModsCancelButton_Click); - // + // // RecommendedModsContinueButton - // + // this.RecommendedModsContinueButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.RecommendedModsContinueButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RecommendedModsContinueButton.Location = new System.Drawing.Point(940, 617); + this.RecommendedModsContinueButton.Location = new System.Drawing.Point(1410, 949); + this.RecommendedModsContinueButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.RecommendedModsContinueButton.Name = "RecommendedModsContinueButton"; - this.RecommendedModsContinueButton.Size = new System.Drawing.Size(75, 23); + this.RecommendedModsContinueButton.Size = new System.Drawing.Size(112, 35); this.RecommendedModsContinueButton.TabIndex = 7; this.RecommendedModsContinueButton.Text = "Continue"; this.RecommendedModsContinueButton.UseVisualStyleBackColor = true; this.RecommendedModsContinueButton.Click += new System.EventHandler(this.RecommendedModsContinueButton_Click); - // + // // RecommendedModsToggleCheckbox - // + // this.RecommendedModsToggleCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.RecommendedModsToggleCheckbox.AutoSize = true; this.RecommendedModsToggleCheckbox.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RecommendedModsToggleCheckbox.Location = new System.Drawing.Point(8, 620); + this.RecommendedModsToggleCheckbox.Location = new System.Drawing.Point(12, 956); + this.RecommendedModsToggleCheckbox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.RecommendedModsToggleCheckbox.Name = "RecommendedModsToggleCheckbox"; - this.RecommendedModsToggleCheckbox.Size = new System.Drawing.Size(93, 17); + this.RecommendedModsToggleCheckbox.Size = new System.Drawing.Size(131, 24); this.RecommendedModsToggleCheckbox.TabIndex = 9; this.RecommendedModsToggleCheckbox.Text = "Toggle * Mods"; this.RecommendedModsToggleCheckbox.UseVisualStyleBackColor = true; this.RecommendedModsToggleCheckbox.CheckedChanged += new System.EventHandler(this.RecommendedModsToggleCheckbox_CheckedChanged); - // + // // RecommendedDialogLabel - // + // this.RecommendedDialogLabel.AutoSize = true; - this.RecommendedDialogLabel.Location = new System.Drawing.Point(3, 13); + this.RecommendedDialogLabel.Location = new System.Drawing.Point(4, 20); + this.RecommendedDialogLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.RecommendedDialogLabel.Name = "RecommendedDialogLabel"; - this.RecommendedDialogLabel.Size = new System.Drawing.Size(422, 13); + this.RecommendedDialogLabel.Size = new System.Drawing.Size(627, 20); this.RecommendedDialogLabel.TabIndex = 6; this.RecommendedDialogLabel.Text = "The following modules have been recommended by one or more of the chosen modules:" + ""; - // + // // RecommendedModsListView - // - this.RecommendedModsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + // + this.RecommendedModsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.RecommendedModsListView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.RecommendedModsListView.CheckBoxes = true; @@ -1275,70 +1320,74 @@ private void InitializeComponent() this.columnHeader4, this.columnHeader5}); this.RecommendedModsListView.FullRowSelect = true; - this.RecommendedModsListView.Location = new System.Drawing.Point(6, 29); + this.RecommendedModsListView.Location = new System.Drawing.Point(9, 45); + this.RecommendedModsListView.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.RecommendedModsListView.Name = "RecommendedModsListView"; - this.RecommendedModsListView.Size = new System.Drawing.Size(1007, 582); + this.RecommendedModsListView.Size = new System.Drawing.Size(1510, 894); this.RecommendedModsListView.TabIndex = 5; this.RecommendedModsListView.UseCompatibleStateImageBehavior = false; this.RecommendedModsListView.View = System.Windows.Forms.View.Details; - // + // // columnHeader3 - // + // this.columnHeader3.Text = "Mod"; this.columnHeader3.Width = 332; - // + // // columnHeader4 - // + // this.columnHeader4.Text = "Recommended by"; this.columnHeader4.Width = 180; - // + // // columnHeader5 - // + // this.columnHeader5.Text = "Mod description"; this.columnHeader5.Width = 606; - // + // // ChooseProvidedModsTabPage - // + // this.ChooseProvidedModsTabPage.Controls.Add(this.ChooseProvidedModsCancelButton); this.ChooseProvidedModsTabPage.Controls.Add(this.ChooseProvidedModsContinueButton); this.ChooseProvidedModsTabPage.Controls.Add(this.ChooseProvidedModsListView); this.ChooseProvidedModsTabPage.Controls.Add(this.ChooseProvidedModsLabel); - this.ChooseProvidedModsTabPage.Location = new System.Drawing.Point(4, 22); + this.ChooseProvidedModsTabPage.Location = new System.Drawing.Point(4, 29); + this.ChooseProvidedModsTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ChooseProvidedModsTabPage.Name = "ChooseProvidedModsTabPage"; - this.ChooseProvidedModsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ChooseProvidedModsTabPage.Size = new System.Drawing.Size(1021, 600); + this.ChooseProvidedModsTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ChooseProvidedModsTabPage.Size = new System.Drawing.Size(1536, 1001); this.ChooseProvidedModsTabPage.TabIndex = 4; this.ChooseProvidedModsTabPage.Text = "Choose mods"; this.ChooseProvidedModsTabPage.UseVisualStyleBackColor = true; - // + // // ChooseProvidedModsCancelButton - // + // this.ChooseProvidedModsCancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.ChooseProvidedModsCancelButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.ChooseProvidedModsCancelButton.Location = new System.Drawing.Point(857, 616); + this.ChooseProvidedModsCancelButton.Location = new System.Drawing.Point(1286, 948); + this.ChooseProvidedModsCancelButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ChooseProvidedModsCancelButton.Name = "ChooseProvidedModsCancelButton"; - this.ChooseProvidedModsCancelButton.Size = new System.Drawing.Size(75, 23); + this.ChooseProvidedModsCancelButton.Size = new System.Drawing.Size(112, 35); this.ChooseProvidedModsCancelButton.TabIndex = 10; this.ChooseProvidedModsCancelButton.Text = "Cancel"; this.ChooseProvidedModsCancelButton.UseVisualStyleBackColor = true; this.ChooseProvidedModsCancelButton.Click += new System.EventHandler(this.ChooseProvidedModsCancelButton_Click); - // + // // ChooseProvidedModsContinueButton - // + // this.ChooseProvidedModsContinueButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.ChooseProvidedModsContinueButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.ChooseProvidedModsContinueButton.Location = new System.Drawing.Point(938, 616); + this.ChooseProvidedModsContinueButton.Location = new System.Drawing.Point(1407, 948); + this.ChooseProvidedModsContinueButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ChooseProvidedModsContinueButton.Name = "ChooseProvidedModsContinueButton"; - this.ChooseProvidedModsContinueButton.Size = new System.Drawing.Size(75, 23); + this.ChooseProvidedModsContinueButton.Size = new System.Drawing.Size(112, 35); this.ChooseProvidedModsContinueButton.TabIndex = 9; this.ChooseProvidedModsContinueButton.Text = "Continue"; this.ChooseProvidedModsContinueButton.UseVisualStyleBackColor = true; this.ChooseProvidedModsContinueButton.Click += new System.EventHandler(this.ChooseProvidedModsContinueButton_Click); - // + // // ChooseProvidedModsListView - // - this.ChooseProvidedModsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + // + this.ChooseProvidedModsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ChooseProvidedModsListView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ChooseProvidedModsListView.CheckBoxes = true; @@ -1347,38 +1396,47 @@ private void InitializeComponent() this.columnHeader8}); this.ChooseProvidedModsListView.FullRowSelect = true; this.ChooseProvidedModsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.ChooseProvidedModsListView.Location = new System.Drawing.Point(6, 28); + this.ChooseProvidedModsListView.Location = new System.Drawing.Point(9, 43); + this.ChooseProvidedModsListView.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ChooseProvidedModsListView.MultiSelect = false; this.ChooseProvidedModsListView.Name = "ChooseProvidedModsListView"; - this.ChooseProvidedModsListView.Size = new System.Drawing.Size(1007, 582); + this.ChooseProvidedModsListView.Size = new System.Drawing.Size(1510, 894); this.ChooseProvidedModsListView.TabIndex = 8; this.ChooseProvidedModsListView.UseCompatibleStateImageBehavior = false; this.ChooseProvidedModsListView.View = System.Windows.Forms.View.Details; - // + // // columnHeader6 - // + // this.columnHeader6.Text = "Mod"; this.columnHeader6.Width = 332; - // + // // columnHeader8 - // + // this.columnHeader8.Text = "Mod description"; this.columnHeader8.Width = 606; - // + // // ChooseProvidedModsLabel - // + // this.ChooseProvidedModsLabel.AutoSize = true; - this.ChooseProvidedModsLabel.Location = new System.Drawing.Point(6, 12); + this.ChooseProvidedModsLabel.Location = new System.Drawing.Point(9, 18); + this.ChooseProvidedModsLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.ChooseProvidedModsLabel.Name = "ChooseProvidedModsLabel"; - this.ChooseProvidedModsLabel.Size = new System.Drawing.Size(383, 13); + this.ChooseProvidedModsLabel.Size = new System.Drawing.Size(568, 20); this.ChooseProvidedModsLabel.TabIndex = 7; this.ChooseProvidedModsLabel.Text = "Several mods provide the virtual module Foo, choose one of the following mods:"; + // + // reportAnIssueToolStripMenuItem + // + this.reportAnIssueToolStripMenuItem.Name = "reportAnIssueToolStripMenuItem"; + this.reportAnIssueToolStripMenuItem.Size = new System.Drawing.Size(230, 30); + this.reportAnIssueToolStripMenuItem.Text = "Report an issue..."; + this.reportAnIssueToolStripMenuItem.Click += new System.EventHandler(this.reportAnIssueToolStripMenuItem_Click); // // Main // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1029, 675); + this.ClientSize = new System.Drawing.Size(1544, 1038); this.Controls.Add(this.MainTabControl); this.Controls.Add(this.StatusPanel); this.Controls.Add(this.statusStrip1); @@ -1386,7 +1444,8 @@ private void InitializeComponent() this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.KeyPreview = true; this.MainMenuStrip = this.menuStrip1; - this.MinimumSize = new System.Drawing.Size(859, 470); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.MinimumSize = new System.Drawing.Size(1280, 700); this.Name = "Main"; this.Text = "CKAN-GUI"; this.menuStrip1.ResumeLayout(false); @@ -1512,6 +1571,7 @@ private void InitializeComponent() private ToolStripMenuItem pluginsToolStripMenuItem; public ToolStripMenuItem settingsToolStripMenuItem; private ToolStripMenuItem installFromckanToolStripMenuItem; + private TextBox FilterByAuthorTextBox; private Label FilterByAuthorLabel; private ToolStripMenuItem FilterAllButton; private ToolStripSeparator toolStripSeparator1; @@ -1537,8 +1597,5 @@ private void InitializeComponent() private ToolStripMenuItem NavBackwardToolButton; private ToolStripMenuItem NavForwardToolButton; private ToolStripMenuItem reportAnIssueToolStripMenuItem; - private ToolStripMenuItem kSPInstanceSettingsToolStripMenuItem; - private DataGridViewCheckBoxColumn Update; - private HintTextBox FilterByAuthorTextBox; } } From 17926c55432a0bebdcb2ef80b82339ebd3ca386c Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Thu, 15 Dec 2016 17:13:14 +0100 Subject: [PATCH 16/19] Added by hand menu item to Main.Designer.cs --- GUI/Main.Designer.cs | 55 ++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/GUI/Main.Designer.cs b/GUI/Main.Designer.cs index da4e50af1a..e5ab1f582c 100644 --- a/GUI/Main.Designer.cs +++ b/GUI/Main.Designer.cs @@ -141,6 +141,7 @@ private void InitializeComponent() this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.ChooseProvidedModsLabel = new System.Windows.Forms.Label(); + this.compatibleKSPVersionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.reportAnIssueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.menuStrip2.SuspendLayout(); @@ -167,9 +168,9 @@ private void InitializeComponent() this.ChooseRecommendedModsTabPage.SuspendLayout(); this.ChooseProvidedModsTabPage.SuspendLayout(); this.SuspendLayout(); - // + // // menuStrip1 - // + // this.menuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem, @@ -181,9 +182,9 @@ private void InitializeComponent() this.menuStrip1.Size = new System.Drawing.Size(1544, 35); this.menuStrip1.TabIndex = 0; this.menuStrip1.Text = "menuStrip1"; - // + // // fileToolStripMenuItem - // + // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.selectKSPInstallMenuItem, this.openKspDirectoryToolStripMenuItem, @@ -194,59 +195,60 @@ private void InitializeComponent() this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Size = new System.Drawing.Size(50, 29); this.fileToolStripMenuItem.Text = "File"; - // + // // selectKSPInstallMenuItem - // + // this.selectKSPInstallMenuItem.Name = "selectKSPInstallMenuItem"; this.selectKSPInstallMenuItem.Size = new System.Drawing.Size(281, 30); this.selectKSPInstallMenuItem.Text = "Select KSP Install..."; this.selectKSPInstallMenuItem.Click += new System.EventHandler(this.selectKSPInstallMenuItem_Click); - // + // // openKspDirectoryToolStripMenuItem - // + // this.openKspDirectoryToolStripMenuItem.Name = "openKspDirectoryToolStripMenuItem"; this.openKspDirectoryToolStripMenuItem.Size = new System.Drawing.Size(281, 30); this.openKspDirectoryToolStripMenuItem.Text = "Open KSP Directory"; this.openKspDirectoryToolStripMenuItem.Click += new System.EventHandler(this.openKspDirectoryToolStripMenuItem_Click); - // + // // installFromckanToolStripMenuItem - // + // this.installFromckanToolStripMenuItem.Name = "installFromckanToolStripMenuItem"; this.installFromckanToolStripMenuItem.Size = new System.Drawing.Size(281, 30); this.installFromckanToolStripMenuItem.Text = "Install from .ckan..."; this.installFromckanToolStripMenuItem.Click += new System.EventHandler(this.installFromckanToolStripMenuItem_Click); - // + // // exportModListToolStripMenuItem - // + // this.exportModListToolStripMenuItem.Name = "exportModListToolStripMenuItem"; this.exportModListToolStripMenuItem.Size = new System.Drawing.Size(281, 30); this.exportModListToolStripMenuItem.Text = "&Export installed mods..."; this.exportModListToolStripMenuItem.Click += new System.EventHandler(this.exportModListToolStripMenuItem_Click); - // + // // toolStripSeparator1 - // + // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(278, 6); - // + // // ExitToolButton - // + // this.ExitToolButton.Name = "ExitToolButton"; this.ExitToolButton.Size = new System.Drawing.Size(281, 30); this.ExitToolButton.Text = "Exit"; this.ExitToolButton.Click += new System.EventHandler(this.ExitToolButton_Click); - // + // // settingsToolStripMenuItem - // + // this.settingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cKANSettingsToolStripMenuItem, this.pluginsToolStripMenuItem, - this.kSPCommandlineToolStripMenuItem}); + this.kSPCommandlineToolStripMenuItem, + this.compatibleKSPVersionsToolStripMenuItem}); this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; this.settingsToolStripMenuItem.Size = new System.Drawing.Size(88, 29); this.settingsToolStripMenuItem.Text = "Settings"; - // + // // cKANSettingsToolStripMenuItem - // + // this.cKANSettingsToolStripMenuItem.Name = "cKANSettingsToolStripMenuItem"; this.cKANSettingsToolStripMenuItem.Size = new System.Drawing.Size(247, 30); this.cKANSettingsToolStripMenuItem.Text = "CKAN settings"; @@ -1431,9 +1433,15 @@ private void InitializeComponent() this.reportAnIssueToolStripMenuItem.Size = new System.Drawing.Size(230, 30); this.reportAnIssueToolStripMenuItem.Text = "Report an issue..."; this.reportAnIssueToolStripMenuItem.Click += new System.EventHandler(this.reportAnIssueToolStripMenuItem_Click); - // + // + // compatibleKSPVersionsToolStripMenuItem + // + this.compatibleKSPVersionsToolStripMenuItem.Name = "compatibleKSPVersionsToolStripMenuItem"; + this.compatibleKSPVersionsToolStripMenuItem.Size = new System.Drawing.Size(233, 24); + this.compatibleKSPVersionsToolStripMenuItem.Text = "Compatible KSP versions"; + // // Main - // + // this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1544, 1038); @@ -1597,5 +1605,6 @@ private void InitializeComponent() private ToolStripMenuItem NavBackwardToolButton; private ToolStripMenuItem NavForwardToolButton; private ToolStripMenuItem reportAnIssueToolStripMenuItem; + private ToolStripMenuItem compatibleKSPVersionsToolStripMenuItem; } } From 3aba61f4db1f373b686b02164a1f5cb0cf300b3b Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Thu, 15 Dec 2016 17:23:21 +0100 Subject: [PATCH 17/19] Got rid of compilation warnings --- GUI/CompatibleKspVersionsDialog.Designer.cs | 26 ++++++++++----------- GUI/CompatibleKspVersionsDialog.cs | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/GUI/CompatibleKspVersionsDialog.Designer.cs b/GUI/CompatibleKspVersionsDialog.Designer.cs index 191abb5115..a92b500381 100644 --- a/GUI/CompatibleKspVersionsDialog.Designer.cs +++ b/GUI/CompatibleKspVersionsDialog.Designer.cs @@ -42,7 +42,7 @@ private void InitializeComponent() this.SaveButton = new System.Windows.Forms.Button(); this.label8 = new System.Windows.Forms.Label(); this.GameLocationLabel = new System.Windows.Forms.Label(); - this.CancelButton = new System.Windows.Forms.Button(); + this.CancelChooseCompatibleVersionsButton = new System.Windows.Forms.Button(); this.SuspendLayout(); // // label1 @@ -187,25 +187,25 @@ private void InitializeComponent() // // cancelButton // - this.CancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.CancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.CancelButton.Location = new System.Drawing.Point(281, 331); - this.CancelButton.Name = "cancelButton"; - this.CancelButton.Size = new System.Drawing.Size(75, 23); - this.CancelButton.TabIndex = 14; - this.CancelButton.Text = "Cancel"; - this.CancelButton.UseVisualStyleBackColor = true; - this.CancelButton.Click += new System.EventHandler(this.CancelButton_Click); + this.CancelChooseCompatibleVersionsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.CancelChooseCompatibleVersionsButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.CancelChooseCompatibleVersionsButton.Location = new System.Drawing.Point(281, 331); + this.CancelChooseCompatibleVersionsButton.Name = "cancelButton"; + this.CancelChooseCompatibleVersionsButton.Size = new System.Drawing.Size(75, 23); + this.CancelChooseCompatibleVersionsButton.TabIndex = 14; + this.CancelChooseCompatibleVersionsButton.Text = "Cancel"; + this.CancelChooseCompatibleVersionsButton.UseVisualStyleBackColor = true; + this.CancelChooseCompatibleVersionsButton.Click += new System.EventHandler(this.CancelButton_Click); // // CompatibleKspVersionsDialog // this.AcceptButton = this.SaveButton; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.CancelButton; + this.CancelButton = this.CancelChooseCompatibleVersionsButton; this.ClientSize = new System.Drawing.Size(443, 364); this.ControlBox = false; - this.Controls.Add(this.CancelButton); + this.Controls.Add(this.CancelChooseCompatibleVersionsButton); this.Controls.Add(this.GameLocationLabel); this.Controls.Add(this.label8); this.Controls.Add(this.SaveButton); @@ -246,6 +246,6 @@ private void InitializeComponent() private System.Windows.Forms.Button SaveButton; private System.Windows.Forms.Label label8; private System.Windows.Forms.Label GameLocationLabel; - private System.Windows.Forms.Button CancelButton; + private System.Windows.Forms.Button CancelChooseCompatibleVersionsButton; } } \ No newline at end of file diff --git a/GUI/CompatibleKspVersionsDialog.cs b/GUI/CompatibleKspVersionsDialog.cs index 894d05185f..6cdc2c3cd6 100644 --- a/GUI/CompatibleKspVersionsDialog.cs +++ b/GUI/CompatibleKspVersionsDialog.cs @@ -36,7 +36,7 @@ private void CompatibleKspVersionsDialog_Shown(object sender, EventArgs e) if (_ksp.CompatibleVersionsAreFromDifferentKsp) { MessageBox.Show("KSP has been updated since you last reviewed your compatible KSP versions. Please make sure that settings are correct."); - CancelButton.Visible = false; + CancelChooseCompatibleVersionsButton.Visible = false; GameVersionLabel.Text = _ksp.Version().ToString() + " (previous game version: " + _ksp.VersionOfKspWhenCompatibleVersionsWereStored + ")"; GameVersionLabel.ForeColor = System.Drawing.Color.Red; } @@ -81,7 +81,7 @@ private void AddVersionToListButton_Click(object sender, System.EventArgs e) var version = KspVersion.Parse(AddVersionToListTextBox.Text); SelectedVersionsCheckedListBox.Items.Insert(0, version); } - catch(FormatException ex) + catch(FormatException) { MessageBox.Show("Version has invalid format", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } From b8ac28198847ab9faabe9ce904bc4236bdc6381f Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Thu, 15 Dec 2016 17:33:43 +0100 Subject: [PATCH 18/19] Got rid of compilation warnings in tests --- Tests/Core/Types/GameComparator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/Core/Types/GameComparator.cs b/Tests/Core/Types/GameComparator.cs index dde81b6d9b..41b954f3eb 100644 --- a/Tests/Core/Types/GameComparator.cs +++ b/Tests/Core/Types/GameComparator.cs @@ -81,7 +81,7 @@ public void Incompatible(Type type, bool expected) Assert.AreEqual(expected, comparator.Compatible(new KspVersionCriteria (gameVersion), gameMod)); } - private static readonly object[] TestStrictGameComparatorCases = + public static readonly object[] TestStrictGameComparatorCases = { //MOD comapat. //KSP //expected new object[] { "1.0", "1.0.4", true }, @@ -129,7 +129,7 @@ public void TestStrictGameComparator(String modVersion, String gameVersion, bool Assert.AreEqual(expectedResult, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse(gameVersion)), gameMod)); } - private static readonly object[] TestStrictGameComparatorMinMaxCases = + public static readonly object[] TestStrictGameComparatorMinMaxCases = { //Min comapat //Max comapat //KSP //expected new object[] { "1.0.4", null, "1.0.3", false }, From bb29084030676018d565c6f8401248d91fc284b8 Mon Sep 17 00:00:00 2001 From: gkuligowski Date: Fri, 16 Dec 2016 21:00:51 +0100 Subject: [PATCH 19/19] Added missing event handler to "Compatible KSP versions" menu item --- GUI/Main.Designer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/GUI/Main.Designer.cs b/GUI/Main.Designer.cs index e5ab1f582c..fce85ecd11 100644 --- a/GUI/Main.Designer.cs +++ b/GUI/Main.Designer.cs @@ -1439,6 +1439,7 @@ private void InitializeComponent() this.compatibleKSPVersionsToolStripMenuItem.Name = "compatibleKSPVersionsToolStripMenuItem"; this.compatibleKSPVersionsToolStripMenuItem.Size = new System.Drawing.Size(233, 24); this.compatibleKSPVersionsToolStripMenuItem.Text = "Compatible KSP versions"; + this.compatibleKSPVersionsToolStripMenuItem.Click += new System.EventHandler(this.CompatibleKspVersionsToolStripMenuItem_Click); // // Main //