public void RequestCreateOrder(Object lOrderParam) { orderParam = (CreateOrderClass)lOrderParam; WebMetodAnser webMetodAnser = GetWebMetodData(eWebMetods.CreateOrder); try { parentCP.Invoke(new Action<WebMetodAnser>((s) => parentCP.UpdateCreatelOrder(s)), webMetodAnser); } catch { } Application.ExitThread(); }
private void SendParcelOrder() { if (advancedByOrders.Count == 0) { timerParcelBuy.Enabled = false; return; } OrderForParcelClass parcelOrder = advancedByOrders[0]; CreateOrderClass orderParam = new CreateOrderClass(); orderParam.MarketID = parcelOrder.MarketID; orderParam.OrderType = eOrderType.Buy; orderParam.Price = parcelOrder.Price.Replace(",", "."); orderParam.Quantity = parcelOrder.Quantity.Replace(",", "."); CreateSpamTrade = true; RequestCreateOrder(orderParam); advancedByOrders.Remove(parcelOrder); }
private void RequestCreateOrder(CreateOrderClass orderParam) { if (orderParam.MarketID == null || orderParam.Price == null || orderParam.Quantity == null){ return; } Thread requestThread = new Thread(new ParameterizedThreadStart(webServiceClass.RequestCreateOrder)); requestThread.Name = "Create new order"; requestThread.Start(orderParam); }
private void Sell_Click(object sender, EventArgs e) { CreateOrderClass orderParam = new CreateOrderClass(); orderParam.MarketID = marketID; orderParam.OrderType = eOrderType.Sell; orderParam.Price = numericSellPrice.Value.ToString().Replace(",", "."); orderParam.Quantity = numericSellAmount.Value.ToString().Replace(",", "."); RequestCreateOrder(orderParam); }
private void buttonBuy_Click(object sender, EventArgs e) { CreateOrderClass orderParam = new CreateOrderClass(); orderParam.MarketID = marketID; orderParam.OrderType = eOrderType.Buy; orderParam.Price = numericBuyPrice.Value.ToString().Replace(",", "."); orderParam.Quantity = numericBuyAmount.Value.ToString().Replace(",", "."); CreateSpamTrade = false; RequestCreateOrder(orderParam); }