Exemplo n.º 1
0
        /// <summary>
        /// Action when assest is bought
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BUY_CLICK(object sender, MouseButtonEventArgs e)
        {
            try
            {
                double   value        = Convert.ToDouble(TextBox_Investment.Text);
                string   traidingPair = ComboBox_TradingPair.SelectedValue.ToString();
                DateTime serverTime   = _core.GetServerTime();

                Task.Run(() =>
                {
                    _core.AddAsset(traidingPair, serverTime, value);
                });

                CustomMessageBox.Show("Asset was successfully bought");
            }
            catch (Exception ex)
            {
                CustomMessageBox.Show(ex.Message);
            }
        }