Beispiel #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            var newAccount = new XCommasAccount();
            var settings   = new AddAccountDialog("Add 3Commas Account", "Add", "Permissions Needed: BotsRead, BotsWrite, AccountsRead", newAccount);
            var dr         = settings.ShowDialog();

            if (dr == DialogResult.OK)
            {
                Accounts.Add(newAccount);
            }
        }
        public AddAccountDialog(string title, string buttonAction, string permissionsNeeded, XCommasAccount account)
        {
            _account = account;
            InitializeComponent();

            Text                      = title;
            btnApply.Text             = buttonAction;
            lblPermissionsNeeded.Text = permissionsNeeded;

            txtDescription.Text   = _account.Name;
            txtBinanceApiKey.Text = _account.ApiKey;
            txtBinanceSecret.Text = _account.Secret;
        }