public void newTick(Tick tick) { if (this.InvokeRequired) { this.Invoke(new TickDelegate(newTick), new object[] { tick }); } else { if ((tick == null) || (tick.sym != work.symbol)) { return; } if (touched) { return; } decimal changedval = obuybut.Checked ? (limitbut.Checked ? tick.ask : tick.bid) : (limitbut.Checked ? tick.bid : tick.ask); if (changedval != 0) { if (this.oprice.InvokeRequired) { SetTickCallBack d = new SetTickCallBack(newTick); this.Invoke(d, new object[] { tick }); } else { oprice.Value = (decimal)changedval; } } } }
public void newTick(Tick tick) { if (this.InvokeRequired) this.Invoke(new TickDelegate(newTick), new object[] { tick }); else { if ((tick == null) || (tick.sym != work.symbol)) return; if (touched) return; decimal changedval = obuybut.Checked ? (limitbut.Checked ? tick.ask : tick.bid) : (limitbut.Checked ? tick.bid : tick.ask); if (changedval != 0) { if (this.oprice.InvokeRequired) { SetTickCallBack d = new SetTickCallBack(newTick); this.Invoke(d, new object[] { tick }); } else oprice.Value = (decimal)changedval; } } }