Example #1
0
 public bool Hook(Proposition prop)
 {
     if (And(prop))
         return true;
     if (!Value && prop.Value)
         return true;
     return !Value && !prop.Value;
 }
Example #2
0
 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);
        }
Example #4
0
 public bool Xor(Proposition prop)
 {
     return(NotEqual(prop) && (prop.Value || Value));
 }
Example #5
0
 public bool Iff(Proposition prop)
 {
     return(Equals(prop));
 }
Example #6
0
 public bool NotEqual(Proposition prop)
 {
     return(Value != prop.Value);
 }
Example #7
0
 public bool Or(Proposition prop)
 {
     return(Value || prop.Value);
 }
Example #8
0
 public bool And(Proposition prop)
 {
     return(this.Value && prop.Value);
 }
Example #9
0
 public bool Equals(Proposition prop)
 {
     return(Value == prop.Value);
 }
Example #10
0
 public bool Xor(Proposition prop)
 {
     return NotEqual(prop) && (prop.Value || Value);
 }
Example #11
0
 public bool Or(Proposition prop)
 {
     return Value || prop.Value;
 }
Example #12
0
 public bool NotEqual(Proposition prop)
 {
     return Value != prop.Value;
 }
Example #13
0
 public bool Iff(Proposition prop)
 {
     return Equals(prop);
 }
Example #14
0
 public bool Equals(Proposition prop)
 {
     return Value == prop.Value;
 }
Example #15
0
 public bool And(Proposition prop)
 {
     return this.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);
 }