private void biAddTicker_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { TickerExchangeWebInfo info = new TickerExchangeWebInfo(); TickerWebInfoForm form = new TickerWebInfoForm(); form.Ticker = info; if (form.ShowDialog() == DialogResult.OK) { Info.Tickers.Add(info); this.gridView1.RefreshData(); Info.Save(); } }
private void biEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { TickerExchangeWebInfo sel = (TickerExchangeWebInfo)this.gridView1.GetFocusedRow(); if (sel == null) { return; } TickerExchangeWebInfo info = sel.Clone(); TickerWebInfoForm form = new TickerWebInfoForm(); form.Ticker = info; if (form.ShowDialog() == DialogResult.OK) { sel.AssignFrom(info); this.gridView1.RefreshData(); Info.Save(); } }