/// <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 UTbxAmountPrimaryReset(bool update = false) { if (!SManager.AssetPrimary.IsValid()) { return; } Kraken.Asset asset = SManager.AssetPrimary.Asset.Value; Asset info = Manager.Kraken.AssetInfo(asset); int decimals = info.GetDisplayDecimals(2); decimal amount = Math.Round(SManager.AssetPrimary.Amount, decimals); UTbxAmountPrimary.Text = amount.ToString("N" + decimals).Replace(",", ""); if (update) { UTbxAmountPrimary.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(); } }