private void GridQuoteUserHitCell(object sender, MouseEventArgs e, int rowIndex, FastColumn col) { if (e.Button == MouseButtons.Right) { var selected = gridQuote.rows.Where(r => r.Selected).Select(r => (TickerInfo) r.ValueObject).ToList(); menuQuote.Tag = selected.Count > 1 ? selected : new List<TickerInfo> {(TickerInfo) gridQuote.rows[rowIndex].ValueObject}; menuQuote.Show(gridQuote, e.X, e.Y); return; } selectedTicker = (TickerInfo)gridQuote.rows[rowIndex].ValueObject; tbActiveBase.Text = selectedTicker.ActiveBase; tbActiveCounter.Text = selectedTicker.ActiveCounter; tbFormat.Text = string.Format("{0:f" + selectedTicker.Precision + "}", 1.2345678); }
private void GridQuoteUserHitCell(object sender, MouseEventArgs e, int rowIndex, FastColumn col) { if (e.Button == MouseButtons.Right) { var selected = gridQuote.rows.Where(r => r.Selected).Select(r => (TickerInfo)r.ValueObject).ToList(); menuQuote.Tag = selected.Count > 1 ? selected : new List <TickerInfo> { (TickerInfo)gridQuote.rows[rowIndex].ValueObject }; menuQuote.Show(gridQuote, e.X, e.Y); return; } selectedTicker = (TickerInfo)gridQuote.rows[rowIndex].ValueObject; tbActiveBase.Text = selectedTicker.ActiveBase; tbActiveCounter.Text = selectedTicker.ActiveCounter; tbFormat.Text = string.Format("{0:f" + selectedTicker.Precision + "}", 1.2345678); }
private void RefreshTickers() { var tickers = TickerInfo.GetTickers(); gridQuote.DataBind(tickers); }