コード例 #1
0
 /// <summary>
 /// Updates all update panels
 /// </summary>
 public void UpdateAllPanells()
 {
     URbtnAssetPrimaryBuy.Update();
     URbtnAssetPrimarySell.Update();
     URbtnAssetSecondaryBuy.Update();
     URbtnAssetSecondarySell.Update();
     ULBtnAssetPrimaryGlyph.Update();
     ULBtnAssetSecondaryGlyph.Update();
     UDdlCurrencyPrimary.Update();
     UDdlCurrencySecondary.Update();
     UTbxAmountPrimary.Update();
     UTbxAmountSecondary.Update();
 }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            UTbxAmountSecondary.ChangeClear();
            UTbxAmountSecondary.ChangeClear();

            if (!IsPostBack)
            {
                if (SManager.AssetPrimary.Buy == SManager.AssetSecondary.Buy)
                {
                    SManager.AssetPrimary.Buy = true;
                }

                this.UpdateAll();
            }

            this.InitializeTextBoxes();
        }
コード例 #3
0
        protected void UTbxAmountSecondaryReset(bool update = false)
        {
            if (!SManager.AssetSecondary.IsValid())
            {
                return;
            }

            Kraken.Asset asset    = SManager.AssetSecondary.Asset.Value;
            Asset        info     = Manager.Kraken.AssetInfo(asset);
            int          decimals = info.GetDisplayDecimals(2);

            decimal amount = Math.Round(SManager.AssetSecondary.Amount, decimals);

            UTbxAmountSecondary.Text = amount.ToString("N" + decimals).Replace(",", "");

            if (update)
            {
                UTbxAmountSecondary.Update();
            }
        }
コード例 #4
0
        private void InitializeTextBoxesColors()
        {
            if (SManager == null || !SManager.AssetPrimary.IsValid() || !SManager.AssetSecondary.IsValid())
            {
                return;
            }


            if (SManager.AssetPrimary.IsFixed)
            {
                if (SManager.AssetSecondary.Buy)
                {
                    UTbxAmountSecondary.ForeColor = System.Drawing.Color.DarkGreen;
                }
                else if (SManager.AssetSecondary.Sell)
                {
                    UTbxAmountSecondary.ForeColor = System.Drawing.Color.DarkRed;
                }

                UTbxAmountSecondary.Update();
            }

            if (SManager.AssetSecondary.IsFixed)
            {
                if (SManager.AssetPrimary.Buy)
                {
                    UTbxAmountPrimary.ForeColor = System.Drawing.Color.DarkGreen;
                }
                else if (SManager.AssetPrimary.Sell)
                {
                    UTbxAmountPrimary.ForeColor = System.Drawing.Color.DarkRed;
                }

                UTbxAmountPrimary.Update();
            }
        }