private void isSerwis(object sender, ConditionalEventArgs e) { if (colMaskaSerwisu.Count > 0) { ot = opType.S; e.Result = true; } }
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; }
private void isTypK_Serwis(object sender, ConditionalEventArgs e) { if (selTypyKlientow.Count > 0 && colMaskaSerwisu.Count > 0) { ot = opType.TKandS; e.Result = true; } }
private void isTypK(object sender, ConditionalEventArgs e) { if (selTypyKlientow.Count > 0) { ot = opType.TK; e.Result = true; } }
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(); } }
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; } }
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; } }
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; }
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(); } }
public attackData(Vector2 attackPosition) { this.type = opType.attack; this.attackPostion = new Vector2(attackPostion.x, attackPostion.y); }
static Parser<opType> Operator(string op, opType type) { return Parse.String(op).Token().Return(type); }
SkillData(SkillID id) { this.type = opType.skill; this.skill_id = id; }
public moveData(Vector2 destination) { this.type = opType.move; this.destination = new Vector2(destination.x, destination.y); }
static Parser <opType> Operator(string op, opType type) { return(Parse.String(op).Token().Return(type)); }
private void Preset_ot_ExecuteCode(object sender, EventArgs e) { ot = opType.None; }
public OrderOp(opType ot, int o) { operation = ot; order = o; }
public string operation; // the actual operations public opTypeMapping(opType o, string op) { this.ot = o; this.operation = op; }