コード例 #1
0
ファイル: DropDowns.cs プロジェクト: asmodat/Get-Crypto-Alpha
        private void InitializeWithdraw()
        {
            if (SManager == null)
            {
                return;
            }

            InfoExchange info = SManager.AssetBuy;

            if (!info.IsValid())
            {
                return;
            }

            Fundings[] fundings = Manager.Fundings.Get(Fundings.AccountType.Withdraw, info.Asset.Value);
            Fundings[] results  = UDdlWithdraw.AddItems(fundings);

            if (!results.ContainsType(SManager.FundingWithdraw.Fundings))
            {
                SManager.FundingWithdraw.Fundings = null;
            }

            if (SManager.FundingWithdraw.Fundings == null && UDdlWithdraw.Items.Count > 0)
            {
                UDdlWithdraw.SelectedIndex        = 0;
                SManager.FundingWithdraw.Fundings = results[UDdlWithdraw.SelectedIndex];
            }

            if (SManager.FundingWithdraw.Fundings != null)
            {
                UDdlWithdraw.SelectValue(SManager.FundingWithdraw.Fundings.Name);
            }
        }
コード例 #2
0
        private void InitializeWithdrawFundinng()
        {
            if (SManager == null || SManager.FundingDeposit == null || SManager.FundingWithdraw == null)
            {
                return;
            }

            InfoExchange info = SManager.AssetBuy;

            if (!info.IsValid())
            {
                return;
            }

            Fundings fundings = Manager.Fundings.Get(Fundings.AccountType.Withdraw, info.Asset.Value, UDdlWithdraw.Text);

            if (fundings != null)
            {
                SManager.FundingWithdraw.Fundings = fundings.Copy();
                UTbxWithdraw.Text = null;
            }
            else
            {
                SManager.FundingWithdraw.Fundings = null;
                return;
            }


            if (!SManager.FundingWithdraw.Fundings.AddressRequired)
            {
                UTbxWithdraw.Text     = "Address not required";
                UTbxWithdraw.ReadOnly = true;
            }
            else
            {
                UTbxWithdraw.Text     = SManager.FundingWithdraw.Address;
                UTbxWithdraw.ReadOnly = false;
            }
        }