Exemplo n.º 1
0
        private void listExchange_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (((ListBox)e.Source).SelectedItem != null)
            {
                Exchanges ex = (Exchanges)Enum.Parse(typeof(Exchanges), (string)((ImageTextItem)((ListBox)e.Source).SelectedItem).text.Content);
                if (ex == Exchanges.Binance)
                {
                    selectedExchange = ex;
                    exchange         = binance;
                }

                List <ImageTextItem> list = null;

                if (list == null || list.Count == 0)
                {
                    list = exchange.GetPairList();
                }

                listPairing.ItemsSource = null;
                listPairing.ItemsSource = list;

                gridPairing.Visibility = Visibility.Visible;
                initSelectionCondition();
            }
        }
Exemplo n.º 2
0
        public AlertLayout(Exchanges Exchange, Coins Coin, Coins Pair)
        {
            childList = new List <AlertCard>();
            InitializeComponent();

            this.Exchange = Exchange;
            this.Coin     = Coin;
            this.Pair     = Pair;

            Header.alert    = this;
            Header.Exchange = Exchange;
            Header.Symbol   = Coin.ToString() + Pair.ToString();

            if (Exchange == Exchanges.Binance)
            {
                Binance b = Binance.Instance;
                exchangeIF = b;
            }

            /*AlertCard card = new AlertCard();
             * card.KlineWidth = KLineWidth.m5;
             * card.Indicator = Indicators.RSI;
             * card.Coin = Coins.ETH;
             * card.Pair = Coins.BTC;
             * this.addTo(card);*/
        }