private void PostInit() { var accessKey = Program.Accesskey; var secretEky = Program.Secretkey; ApiData = new ApiData(accessKey, secretEky); React = new React(accessKey, secretEky); AlgorithmList = BotSetting.AlgorithmList; CandleTypeList = BotSetting.CandleTypeList; CoinList = BotSetting.CoinList; algorithmBindingSource.DataSource = AlgorithmList; candleTypeBindingSource.DataSource = CandleTypeList; coinBindingSource.DataSource = CoinList; Algorithm = AlgorithmList.Where(x => x.Id == Settings.Default.algorithm).FirstOrDefault(); CandleType = CandleTypeList.Where(x => x.Minute == Settings.Default.candleType).FirstOrDefault(); Coin = CoinList.Where(x => x.Ticker.Equals(Settings.Default.coin)).FirstOrDefault(); FeeRate = Settings.Default.feeRate; TradeRate = Settings.Default.tradeRate; Interval = Convert.ToInt32(Settings.Default.interval); TriggerRate = Settings.Default.triggerRate; CandleCount = Convert.ToInt32(Settings.Default.candleCount); }
private void PreInit() { AlgorithmList = BotSetting.AlgorithmList; CandleTypeList = BotSetting.CandleTypeList; CoinList = BotSetting.CoinList; Algorithm = AlgorithmList.Where(x => x.Id == Settings.Default.algorithm).FirstOrDefault(); CandleType = BotSetting.CandleTypeList.Where(x => x.Minute == Settings.Default.candleType).FirstOrDefault(); Coin = BotSetting.CoinList.Where(x => x.Ticker.Equals(Settings.Default.coin)).FirstOrDefault(); }
public CryptionModel(string password, CryptographicAlgorithmImpl algorithm) { if (string.IsNullOrEmpty(password)) { IsEnabled = false; } else { IsEnabled = true; Password = password; ConfirmationPassword = password; } Algorithm = algorithm ?? AlgorithmList.FirstOrDefault(); }
private void PostInit() { var accessKey = Program.Accesskey; var secretEky = Program.Secretkey; ApiData = new ApiData(accessKey, secretEky); React = new React(accessKey, secretEky); AlgorithmList = BotSetting.AlgorithmList; CandleTypeList = BotSetting.CandleTypeList; CoinList = BotSetting.CoinList; Algorithm = AlgorithmList.Where(x => x.Id == Settings.Default.algorithm).FirstOrDefault(); CandleType = BotSetting.CandleTypeList.Where(x => x.Minute == Settings.Default.candleType).FirstOrDefault(); Coin = BotSetting.CoinList.Where(x => x.Ticker.Equals(Settings.Default.coin)).FirstOrDefault(); algorithmBindingSource.DataSource = AlgorithmList; candleTypeBindingSource.DataSource = CandleTypeList; coinBindingSource.DataSource = CoinList; //cmbAlgorithm.DataSource = new BindingSource(BotSetting.AlgorithmList, null); //cmbAlgorithm.ValueMember = "Id"; //cmbAlgorithm.DisplayMember = "Name"; //cmbAlgorithm.SelectedValue = Settings.Default.algorithm; //cmbCandle.DataSource = new BindingSource(BotSetting.CandleTypeList, null); //cmbCandle.ValueMember = "Minute"; //cmbCandle.DisplayMember = "Name"; //cmbCandle.SelectedValue = Settings.Default.candleType; //cmbCoin.DataSource = new BindingSource(BotSetting.CoinList, null); //cmbCoin.ValueMember = "Ticker"; //cmbCoin.DisplayMember = "CoinName"; //cmbCoin.SelectedValue = Settings.Default.coin; }
public SteganographicModel(SteganographicAlgorithmImpl algorithm) { Algorithm = algorithm ?? AlgorithmList.FirstOrDefault(); }