Example #1
0
 private void isSerwis(object sender, ConditionalEventArgs e)
 {
     if (colMaskaSerwisu.Count > 0)
     {
         ot       = opType.S;
         e.Result = true;
     }
 }
Example #2
0
 public void setOpData(int r_id, opType type, int target, Vector2 from, Vector2 to)
 {
     room_id       = r_id;
     this.type     = (int)type;
     this.target   = target;
     this.from_pos = from;
     this.to_pos   = to;
 }
Example #3
0
 private void isTypK_Serwis(object sender, ConditionalEventArgs e)
 {
     if (selTypyKlientow.Count > 0 && colMaskaSerwisu.Count > 0)
     {
         ot       = opType.TKandS;
         e.Result = true;
     }
 }
Example #4
0
 private void isTypK(object sender, ConditionalEventArgs e)
 {
     if (selTypyKlientow.Count > 0)
     {
         ot       = opType.TK;
         e.Result = true;
     }
 }
Example #5
0
        private void isTypK_Serwis(object sender, ConditionalEventArgs e)
        {

            if (selTypyKlientow.Count > 0 && colMaskaSerwisu.Count > 0)
            {
                ot = opType.TKandS;
                e.Result = true;
            }
        }
Example #6
0
 static double binaryApply(opType op, double a, double b)
 {
     switch (op)
     {
         case opType.add:
             return a + b;
         case opType.sub:
             return a - b;
         case opType.div:
             return a / b;
         case opType.mul:
             return a * b;
         case opType.pow:
             return Math.Pow(a, b);
         default: throw new ParseException();
     }
 }
Example #7
0
        private void cmbOperationType_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (cmbOperationType.SelectedItem.ToString())
            {
            case "Plus":
                operationType = opType.Plus;
                break;

            case "Minus":
                operationType = opType.Minus;
                break;

            case "Xor":
                operationType = opType.Exor;
                break;
            }
        }
Example #8
0
        private void cmbOperation_SelectedIndexChanged(object sender, EventArgs e)
        {
            tbCombination.Text = "(Current band) " + cmbOperation.SelectedItem.ToString() + " (band#0 from selected image)";
            switch (cmbOperation.SelectedItem.ToString())
            {
            case "Plus":
                operationType = opType.Plus;
                break;

            case "Minus":
                operationType = opType.Minus;
                break;

            case "Xor":
                operationType = opType.Exor;
                break;
            }
        }
Example #9
0
 public static decimal DoMath(decimal val1, decimal val2, opType type)
 {
     decimal rv = 0;
     switch(type) {
         case opType.addition:
             rv = DoMath_Addition(val1, val2);
             break;
         case opType.subtraction:
             rv = DoMath_Subtraction(val1, val2);
             break;
         case opType.multiplication:
             rv = DoMath_Multiplication(val1, val2);
             break;
         case opType.division:
             rv = DoMath_Division(val1, val2);
             break;
     }
     return rv;
 }
Example #10
0
        static Calculation binaryApply(opType op, Calculation a, Calculation b)
        {
            //↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
            IResultOutput resultOutput = new DefaultResultOutput();

            //↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
            switch (op)
            {
            case opType.sum:
                return(new Calculation(a, b, new SumOperation(resultOutput).Execute));

            case opType.sub:
                return(new Calculation(a, b, new SubtractionOperation(resultOutput).Execute));

            case opType.div:
                return(new Calculation(a, b, new DivisionOperation(resultOutput).Execute));

            case opType.mul:
                return(new Calculation(a, b, new MultiplicationOperation(resultOutput).Execute));

            default: throw new ParseException();
            }
        }
Example #11
0
 public attackData(Vector2 attackPosition)
 {
     this.type          = opType.attack;
     this.attackPostion = new Vector2(attackPostion.x, attackPostion.y);
 }
Example #12
0
 static Parser<opType> Operator(string op, opType type)
 {
     return Parse.String(op).Token().Return(type);
 }
Example #13
0
 SkillData(SkillID id)
 {
     this.type     = opType.skill;
     this.skill_id = id;
 }
Example #14
0
 public moveData(Vector2 destination)
 {
     this.type        = opType.move;
     this.destination = new Vector2(destination.x, destination.y);
 }
Example #15
0
 static Parser <opType> Operator(string op, opType type)
 {
     return(Parse.String(op).Token().Return(type));
 }
Example #16
0
 private void isTypK(object sender, ConditionalEventArgs e)
 {
     if (selTypyKlientow.Count > 0)
     {
         ot = opType.TK;
         e.Result = true;
     }
 }
Example #17
0
 private void isSerwis(object sender, ConditionalEventArgs e)
 {
     if (colMaskaSerwisu.Count > 0)
     {
         ot = opType.S;
         e.Result = true;
     }
 }
Example #18
0
 private void Preset_ot_ExecuteCode(object sender, EventArgs e)
 {
     ot = opType.None;
 }
Example #19
0
 private void Preset_ot_ExecuteCode(object sender, EventArgs e)
 {
     ot = opType.None;
 }
Example #20
0
 public OrderOp(opType ot, int o)
 {
     operation = ot;
     order     = o;
 }
Example #21
0
            public string operation; // the actual operations

            public opTypeMapping(opType o, string op)
            {
                this.ot = o; this.operation = op;
            }