Exemple #1
0
        void OnGetSymbolsAndQuotes(object sender, EventArgs e)
        {
            var dialog = new ServerDialog();
            var result = dialog.ShowDialog();

            if ((DialogResult.OK != result) || (null == dialog.Symbols))
            {
                return;
            }

            this.calculator.Symbols.Clear();
            this.m_symbols.Items.Clear();

            foreach (var element in dialog.Symbols)
            {
                var entry = new SymbolEntry(this.calculator, element.Name, element.SettlementCurrency, element.Currency);
                if (dialog.UseContractSize)
                {
                    entry.ContractSize = element.RoundLot;
                }
                this.calculator.Symbols.Add(entry);
                this.m_symbols.Items.Add(entry);
            }

            this.m_quotes.Items.Clear();

            foreach (var element in dialog.Quotes)
            {
                this.m_quotes.Items.Add(element);
            }
        }
Exemple #2
0
        void OnGetSymbolsAndQuotes(object sender, EventArgs e)
        {
            var dialog = new ServerDialog();
            var result = dialog.ShowDialog();
            if ((DialogResult.OK != result) || (null == dialog.Symbols))
                return;

            this.calculator.Symbols.Clear();
            this.m_symbols.Items.Clear();

            foreach (var element in dialog.Symbols)
            {
                var entry = new SymbolEntry(this.calculator, element.Name, element.SettlementCurrency, element.Currency);
                if (dialog.UseContractSize)
                {
                    entry.ContractSize = element.RoundLot;
                }
                this.calculator.Symbols.Add(entry);
                this.m_symbols.Items.Add(entry);
            }

            this.m_quotes.Items.Clear();

            foreach (var element in dialog.Quotes)
            {
                this.m_quotes.Items.Add(element);
            }
        }