private void barButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { SplashScreenManager.ShowDefaultWaitForm("Loading crypto icons..."); CurrencyLogoProvider.BuildIconsDataBase(BittrexExchange.Default.Tickers.Select(t => new string[] { t.MarketCurrency, t.LogoUrl }), true); SplashScreenManager.CloseDefaultWaitForm(); XtraMessageBox.Show("Please restart application. :)"); }
void OnTickerChanged(Ticker prev) { if (prev != null) { prev.IsOpened = false; prev.OrderBook.SubscribeUpdateEntries(false); ClearText(); ClearGrid(); ClearChart(); UnsubscribeEvents(prev); prev.StopListenTickerStream(); } UpdateTickerInfoBar(); this.myTradesCollectionControl1.Ticker = Ticker; this.activeTrailingCollectionControl1.Ticker = Ticker; this.buySettingsControl.Ticker = Ticker; if (Ticker == null) { return; } Ticker.OrderBook.SubscribeUpdateEntries(true); Icon = CurrencyLogoProvider.GetFormIcon(Ticker.MarketCurrency); this.rpMain.Text = Ticker.Name; Ticker.IsOpened = true; UpdateText(); UpdateGrid(); UpdateChart(); UpdateDockPanels(); UpdateBuySellSettings(); SubscribeEvents(); Ticker.UpdateBalance(Ticker.MarketCurrency); Ticker.StartListenTickerStream(); }
void UpdateTickerInfoBar() { if (Ticker == null) { return; } this.siCurrencyIcon.Caption = ""; this.siCurrencyIcon.Glyph = CurrencyLogoProvider.GetLogo32Image(Ticker.MarketCurrency); this.siExchangeIcon.Caption = "<b><size=+3>" + Ticker.Exchange.Name + "</size></b>"; UpdateTickerInfoBarCore(); }
protected override void OnShown(EventArgs e) { base.OnShown(e); //try { // if(System.IO.File.Exists("TickerFormWorkspaceDefault.xml")) { // if(this.workspaceManager1.LoadWorkspace("TickerFormDefault", "TickerFormWorkspaceDefault.xml")) { // //this.workspaceManager1.ApplyWorkspace("TickerFormDefault"); // //UpdateDockPanels(); // } // } //} //catch(Exception ee) { // Telemetry.Default.TrackException(ee); //} if (Ticker == null) { return; } Icon = CurrencyLogoProvider.GetFormIcon(Ticker.MarketCurrency); this.rpMain.Text = Ticker.Name; ThreadManager manager = new ThreadManager(); manager.OwnerControl = this.gcTrades; Ticker.AccountShortTradeHistory.ThreadManager = manager; Ticker.ShortTradeHistory.ThreadManager = manager; Ticker.OrderBook.SubscribeUpdateEntries(true); Ticker.IsOpened = true; UpdateText(); UpdateGrid(); UpdateChart(); UpdateDockPanels(); UpdateBuySellSettings(); UpdateBalances(); UpdateTrades(); UpdateAccountTrades(); Ticker.StartListenTickerStream(); SubscribeEvents(); }
private void gridView1_GetThumbnailImage(object sender, DevExpress.XtraGrid.Views.Grid.GridViewThumbnailImageEventArgs e) { Ticker t = (Ticker)Exchange.Tickers[e.DataSourceIndex]; e.ThumbnailImage = new Bitmap(CurrencyLogoProvider.GetLogoImage(t.MarketCurrency), new Size(128, 128)); }