/// <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(); }
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(); } }
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(); } }