public CryptoDelivery_Data.Options GetArbitrageStatus(CryptoDelivery_Data.Options _op) { _op.EnabledArbitrageBtc = EnableAbitrageBTC; _op.EnabledArbitrageLtc = EnableAbitrageLTC; _op.ArbitrageProfitBtc = ProfitBTC; _op.ArbitrageProfitLtc = ProfitLTC; _op.alertsEnabled = cb_enableAlert.Checked; _op.alertWhenLessThan = numericUpDown1.Value/100; return _op; }
public void GetCurrentCurrencies(CryptoDelivery_Data.Options op) { try { DisplayFormat = op.ValueFormat; options = op; #region Getting values ThreadsFinisherCounter = 0; var lilionThread = new Thread(new ThreadStart(PerformLilionOnDifferentThread)); var mtgoxThread = new Thread(new ThreadStart(PerformMtgoxOnDifferentThread)); var bitcurexThread = new Thread(new ThreadStart(PerformBitcurexOnDifferentThread)); var bitstampThread = new Thread(new ThreadStart(PerformBitstampOnDifferentThread)); var krakenThread = new Thread(new ThreadStart(PerformKrakenOnDifferentThread)); var btceThread = new Thread(new ThreadStart(PerformBtceOnDifferentThread)); var btccThread = new Thread(new ThreadStart(PerformBtcnOnDifferentThread)); btceThread.Start(); bitstampThread.Start(); krakenThread.Start(); bitcurexThread.Start(); mtgoxThread.Start(); lilionThread.Start(); btccThread.Start(); while (ThreadsFinisherCounter<7) {} #endregion #region Arbitrage if (op.EnabledArbitrageBtc == true || op.alertsEnabled==true) { ComputeDifferencesBTC(op,op.ArbitrageProfitBtc); } if (op.EnabledArbitrageLtc == true) { ComputeDifferencesLTC(op.ArbitrageProfitLtc); } #endregion } catch (Exception e) { Log.Error(e); } }
private void SetValues(CryptoDelivery_Data.Options options) { cb_arbitrage_Btc.Checked = EnableAbitrageBTC = options.EnabledArbitrageBtc; cb_arbitrage_Ltc.Checked = EnableAbitrageLTC= options.EnabledArbitrageLtc; numericUpDown_BTC.Value = ProfitBTC= options.ArbitrageProfitBtc; numericUpDown_LTC.Value = ProfitLTC= options.ArbitrageProfitLtc; numericUpDown1.Value = options.alertWhenLessThan*100; cb_enableAlert.Checked = options.alertsEnabled; }
public ArbitrageWindow(CryptoDelivery_Data.Options options) { InitializeComponent(); SetValues(options); }
public OptionsWindow(CryptoDelivery_Data.Options op) { InitializeComponent(); _options = op; SetOptions(); }