diff UIControl/Interfaces/IEditEquipmentUI.cs @ 66:100626381159

Re #60: Add UI to add/remove/edit weapons in GTK * Rip apart UI controls and put all the common code in a base class * Add additional interfaces for common UI behaviour between equipment widgets Not tested, but should provide a base for Replace widget
author IBBoard <dev@ibboard.co.uk>
date Sat, 04 Sep 2010 20:11:05 +0000
parents e3fe48c4d794
children 4b82515586ac
line wrap: on
line diff
--- a/UIControl/Interfaces/IEditEquipmentUI.cs	Sat Sep 04 10:25:39 2010 +0000
+++ b/UIControl/Interfaces/IEditEquipmentUI.cs	Sat Sep 04 20:11:05 2010 +0000
@@ -8,103 +8,9 @@
 	/// <summary>
 	/// The interface that UI components should implement to represent "Edit Equipment" dialogs or system equivalents (e.g. console areas or HTML fragments)
 	/// </summary>
-	public interface IEditEquipmentUI : IDisposable
-	{		
-		/// <summary>
-		/// Occurs when the unit equipment amount type changes (e.g. percentage to numeric)
-		/// </summary>
-		event MethodInvoker UnitEquipmentAmountTypeChanged;
-		
-		/// <summary>
-		/// Occurs when the unit equipment amount changes
-		/// </summary>
-		event MethodInvoker UnitEquipmentAmountChanged;
-				
-		/// <summary>
-		/// Sets the limits for the currently selected equipment item
-		/// </summary>
-		/// <param name='isRatioLimit'>
-		/// <code>True</code> if the current limit is a ratio limit, else <code>false</code> for absolute limits
-		/// </param>
-		/// <param name='minPercent'>
-		/// The minimum limit as a percentage
-		/// </param>
-		/// <param name='maxPercent'>
-		/// The maximum limit as a percentage
-		/// </param>
-		/// <param name='minNumber'>
-		/// The minimum number as an absolute figure
-		/// </param>
-		/// <param name='maxNumber'>
-		/// The maximum number as an absolute figure
-		/// </param>
-		void SetUnitEquipmentLimits(bool isRatioLimit, double minPercent, double maxPercent, int minNumber, int maxNumber);
-		
-		/// <summary>
-		/// Sets whether the unit equipment limit UI components should be enabled and able to accept input. This will 
-		/// generally pass the values on to the <see cref="SetNumericAmountEnabledState(bool)"/> and
-		/// <see cref="SetPercentageAmountEnabledState(bool)"/> methods and is included for convenience
-		/// </summary>
-		/// <param name='isEnabled'>
-		/// <code>True</code> if the UI components should accept input, else <code>false</code>
-		/// </param>
-		void SetUnitEquipmentLimitsEnabled(bool isEnabled);
-		
-		/// <summary>
-		/// Shows the control and awaits a user action (close or okay)
-		/// </summary>
-		/// <returns>
-		/// <code>true</code> if the control was closed with "Okay", else <code>false</code>
-		/// </returns>
-		bool ShowControl();
-				
-		/// <summary>
-		/// Gets a value indicating whether the equipment amount is a ratio or an absolute number.
-		/// </summary>
-		/// <value>
-		/// <c>true</c> if the selected amount is a ratio type (percentage or "all"); otherwise, <c>false</c>.
-		/// </value>
-		bool IsRatioEquipmentAmount { get; }
-		
-		/// <summary>
-		/// Gets and sets the numeric amount for the current equipment amount. This number is meaningless if <see cref="IsRatioEquipmentAmount"/> is <code>true</code>
-		/// </summary>
-		/// <value>
-		/// The absolue number of items taken.
-		/// </value>
-		int EquipmentNumericAmount { get; set; }
-
-		/// <summary>
-		/// Gets and sets the percentage amount for the current equipment amount. This number is meaningless if <see cref="IsRatioEquipmentAmount"/> is <code>false</code>
-		/// </summary>
-		/// <value>
-		/// The number of items taken as a percentage of the unit size.
-		/// </value>
-		double EquipmentPercentageAmount { get; set; }
-	
-		/// <summary>
-		/// Sets the state of the Okay button.
-		/// </summary>
-		/// <param name='enabled'>
-		/// <code>true</code> to enable the button, else <code>false</code>
-		/// </param>
-		void SetOkayEnabledState(bool enabled);
-		
-		/// <summary>
-		/// Sets the state of the numeric equipment amount control.
-		/// </summary>
-		/// <param name='enabled'>
-		/// <code>true</code> to enable the control, else <code>false</code>
-		/// </param>
-		void SetNumericAmountEnabledState(bool enabled);
-		
-		/// <summary>
-		/// Sets the state of the percentage equipment amount control.
-		/// </summary>
-		/// <param name='enabled'>
-		/// <code>true</code> to enable the control, else <code>false</code>
-		/// </param>
-		void SetPercentageAmountEnabledState(bool enabled);
+	public interface IEditEquipmentUI : IBaseEquipmentUI
+	{
+		//Marker interface
 	}
 }