Ejemplo n.º 1
0
        private void toolStripSplitAPI_TextChanged(object sender, EventArgs e)
        {
            int err;

            _factory.RefreshSymbols(out symbolsDic, out err);
            if (symbolsDic != null)
            {
                toolStripBtnSymbols.Enabled = true;
                toolStripCBSymbol.Enabled   = true;
                PrepareSymbolsPanel(symbolsDic, sender == null);
            }
            else
            {
                MessageBox.Show("Error while getting symbols: " + ((APIError)err).ToString(), Properties.Settings.Default.tm, MessageBoxButtons.OK);
            }
        }
Ejemplo n.º 2
0
        public CSymbolsPanel(IWnFOpenAPI agent, bool sector = false) : this()
        {
            int err;

            _factory = agent;
            _sector  = sector;
            if (_sector)
            {
                _factory.GetSectors(out _symbols, out err);
            }
            else
            {
                _factory.RefreshSymbols(out _symbols, out err);
            }

            if (err < 0)
            {
                MessageBox.Show("Error while getting symbols: " + ((APIError)err).ToString(), Properties.Settings.Default.tm, MessageBoxButtons.OK);
            }
        }