diff --git a/Avalonia.EliteBGS/Objective.cs b/Avalonia.EliteBGS/Objective.cs index 755ce7f..c34de15 100644 --- a/Avalonia.EliteBGS/Objective.cs +++ b/Avalonia.EliteBGS/Objective.cs @@ -25,60 +25,60 @@ public class UITransaction : INotifyPropertyChanged { public bool IsExpanded { get; set; } = true; - public Visibility IsCombatZone { + public bool IsCombatZone { get { - return (Transaction != null && Transaction.GetType() == typeof(CombatZone)) ? Visibility.Visible : Visibility.Hidden; + return (Transaction != null && Transaction.GetType() == typeof(CombatZone)); } } - public Visibility IsSellCargo { + public bool IsSellCargo { get { - return (Transaction != null && Transaction.GetType() == typeof(SellCargo)) ? Visibility.Visible : Visibility.Hidden; + return (Transaction != null && Transaction.GetType() == typeof(SellCargo)); } } - public Visibility IsGroundCombatZone { + public bool IsGroundCombatZone { get { CombatZone combat = Transaction as CombatZone; if (combat == null) { - return Visibility.Hidden; + return false; } if (string.Compare(combat.Type, CombatZones.GroundCombatZone) == 0) { - return Visibility.Visible; + return true; } - return Visibility.Hidden; + return false; } } - public Visibility IsShipCombatZone { + public bool IsShipCombatZone { get { CombatZone combat = Transaction as CombatZone; if (combat == null) { - return Visibility.Hidden; + return false; } if (string.Compare(combat.Type, CombatZones.ShipCombatZone) == 0) { - return Visibility.Visible; + return true; } - return Visibility.Hidden; + return false; } } - public Visibility IsAXCombatZone { + public bool IsAXCombatZone { get { CombatZone combat = Transaction as CombatZone; if (combat == null) { - return Visibility.Hidden; + return false; } if (string.Compare(combat.Type, CombatZones.AXCombatZone) == 0) { - return Visibility.Visible; + return true; } - return Visibility.Hidden; + return false; } } @@ -250,12 +250,12 @@ public class Objective : IComparable { get { return UITransactions.Select(x => x.Transaction).ToList(); } } - public Visibility HasSystem { - get { return string.IsNullOrEmpty(System) ? Visibility.Hidden : Visibility.Visible; } + public bool HasSystem { + get { return string.IsNullOrEmpty(System); } } - public Visibility HasFaction { - get { return string.IsNullOrEmpty(Faction) ? Visibility.Hidden : Visibility.Visible; } + public bool HasFaction { + get { return string.IsNullOrEmpty(Faction); } } public string Name {