public bool Hook(Proposition prop) { if (And(prop)) return true; if (!Value && prop.Value) return true; return !Value && !prop.Value; }
public bool Hook(Proposition prop) { if (And(prop)) { return(true); } if (!Value && prop.Value) { return(true); } return(!Value && !prop.Value); }
private void SaveResultButton_OnClick(object sender, RoutedEventArgs e) { var op = String.Empty; switch (Sign.SelectedIndex) { case 0: op = "and"; break; case 1: op = "or"; break; case 2: op = "implies"; break; case 3: op = "is implied by"; break; case 4: op = "is true if and only if"; break; case 5: op = "is exclusively true vs"; break; } var def = String.Format("{0} {1} {2}", _propositions[FirstPropList.SelectedIndex].Definition, op, _propositions[SecondPropList.SelectedIndex].Definition); CalculateButton_OnClick(null, null); var prop = new Proposition { Definition = def, Value = _result }; _propositions.Add(prop); }
public bool Xor(Proposition prop) { return(NotEqual(prop) && (prop.Value || Value)); }
public bool Iff(Proposition prop) { return(Equals(prop)); }
public bool NotEqual(Proposition prop) { return(Value != prop.Value); }
public bool Or(Proposition prop) { return(Value || prop.Value); }
public bool And(Proposition prop) { return(this.Value && prop.Value); }
public bool Equals(Proposition prop) { return(Value == prop.Value); }
public bool Xor(Proposition prop) { return NotEqual(prop) && (prop.Value || Value); }
public bool Or(Proposition prop) { return Value || prop.Value; }
public bool NotEqual(Proposition prop) { return Value != prop.Value; }
public bool Iff(Proposition prop) { return Equals(prop); }
public bool Equals(Proposition prop) { return Value == prop.Value; }
public bool And(Proposition prop) { return this.Value && prop.Value; }