Example #1
0
        void OnCopy(object sender, EventArgs e)
        {
            var selectedItem = m_symbols.SelectedItem;

            if (selectedItem == null)
            {
                return;
            }
            var symbol = selectedItem.ToString();

            Quote      quote = null;
            SymbolInfo info  = null;

            lock (this.synchronizer)
            {
                this.symbolToInfo.TryGetValue(symbol, out info);
                this.symbolToLevel2.TryGetValue(symbol, out quote);
            }

            if ((null != quote) && (null != info))
            {
                var level2 = new Level2(quote, info);
                var st     = level2.ToJson();
                Clipboard.SetText(st);
            }
        }
Example #2
0
        void OnCopy(object sender, EventArgs e)
        {
            var selectedItem = m_symbols.SelectedItem;
            if (selectedItem == null)
            {
                return;
            }
            var symbol = selectedItem.ToString();

            Quote quote = null;
            SymbolInfo info = null;

            lock (this.synchronizer)
            {
                this.symbolToInfo.TryGetValue(symbol, out info);
                this.symbolToLevel2.TryGetValue(symbol, out quote);
            }

            if ((null != quote) && (null != info))
            {
                var level2 = new Level2(quote, info);
                var st = level2.ToJson();
                Clipboard.SetText(st);
            }
        }