Пример #1
0
        private void dgvTick_SelectionChanged(object sender, EventArgs e)
        {
            if (dgvTick.CurrentRow == null)
            {
                return;
            }

            nTickCurrentRowIndex = dgvTick.CurrentRow.Index;
            if (listTickView == null || nTickCurrentRowIndex >= listTickView.Count)
            {
                return;
            }

            PbTickView tick2 = listTickView[nTickCurrentRowIndex];

            BarInfoView bi = tick2.Bar;

            if (bi == null)
            {
                //bi = new BarInfoView();
            }
            pgBar.SelectedObject = bi;

            StaticInfoView si = tick2.Static;

            if (si == null)
            {
                //si = new StaticInfoView();
            }
            pgStatic.SelectedObject = si;

            ConfigInfoView ci = tick2.Config;

            if (ci == null)
            {
                //ci = new ConfigInfoView();
            }
            pgConfig.SelectedObject = ci;

            StockSplitInfoView ssi = tick2.Split;

            if (ssi == null)
            {
                //ssi = new StockSplitInfoView();
            }
            pgSplit.SelectedObject = ssi;

            dgvDepth.DataSource = Int2DoubleConverter.ToList(tick2.Depth1_3);
        }
Пример #2
0
        private void dgvDepth_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        {
            if (listTickView == null || nTickCurrentRowIndex >= listTickView.Count)
            {
                return;
            }

            ValueChanged(true);

            PbTickView tick2 = listTickView[nTickCurrentRowIndex];

            List <DepthDetailView> list = (List <DepthDetailView>)dgvDepth.DataSource;

            tick2.Depth1_3 = Int2DoubleConverter.FromList(list);
        }