remove some WPF specific stuff

This commit is contained in:
Florian Stinglmayr 2024-11-07 15:06:26 +01:00
parent e8f5689123
commit ee14dedeee

View File

@ -25,60 +25,60 @@ public class UITransaction : INotifyPropertyChanged {
public bool IsExpanded { get; set; } = true; public bool IsExpanded { get; set; } = true;
public Visibility IsCombatZone { public bool IsCombatZone {
get { 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 { 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 { get {
CombatZone combat = Transaction as CombatZone; CombatZone combat = Transaction as CombatZone;
if (combat == null) { if (combat == null) {
return Visibility.Hidden; return false;
} }
if (string.Compare(combat.Type, CombatZones.GroundCombatZone) == 0) { 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 { get {
CombatZone combat = Transaction as CombatZone; CombatZone combat = Transaction as CombatZone;
if (combat == null) { if (combat == null) {
return Visibility.Hidden; return false;
} }
if (string.Compare(combat.Type, CombatZones.ShipCombatZone) == 0) { 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 { get {
CombatZone combat = Transaction as CombatZone; CombatZone combat = Transaction as CombatZone;
if (combat == null) { if (combat == null) {
return Visibility.Hidden; return false;
} }
if (string.Compare(combat.Type, CombatZones.AXCombatZone) == 0) { 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<Objective> {
get { return UITransactions.Select(x => x.Transaction).ToList<Transaction>(); } get { return UITransactions.Select(x => x.Transaction).ToList<Transaction>(); }
} }
public Visibility HasSystem { public bool HasSystem {
get { return string.IsNullOrEmpty(System) ? Visibility.Hidden : Visibility.Visible; } get { return string.IsNullOrEmpty(System); }
} }
public Visibility HasFaction { public bool HasFaction {
get { return string.IsNullOrEmpty(Faction) ? Visibility.Hidden : Visibility.Visible; } get { return string.IsNullOrEmpty(Faction); }
} }
public string Name { public string Name {