예제 #1
0
        private void OpenMeasurement_CurrentRow()
        {
            if (null != GridAlgorithms.CurrentRow)
            {
                RowBatchAlgorithm row = (RowBatchAlgorithm)GridAlgorithms.CurrentRow.DataBoundItem;
                if (null != row)
                {

                    MeasuresEditForm sel = new MeasuresEditForm(row.Item4, ReferencesToArray(), row.Item5);
                    sel.ShowDialog(this);
                    if (sel.DialogResult == System.Windows.Forms.DialogResult.OK)
                    {
                        List<MetricExecBase> ex = sel.Execs;

                        BindingList<RowBatchAlgorithm> datasource = (BindingList<RowBatchAlgorithm>)GridAlgorithms.DataSource;

                        datasource[GridAlgorithms.CurrentRow.Index] = new RowBatchAlgorithm(
                                row.Item1, row.Item2, row.Item3, row.Item4, ex);

                    }
                    sel.Dispose();

                }
            }
        }
예제 #2
0
        private void OpenMeasurementCurrentRow()
        {
            try
            {
                if (null != gridAlgorithms.CurrentRow)
                {
                    RowBatchFilter row = (RowBatchFilter)gridAlgorithms.CurrentRow.DataBoundItem;
                    if (null != row)
                    {

                        MeasuresEditForm sel = new MeasuresEditForm(row.Item3, ReferencesToArray(), row.Item4);
                        sel.ShowDialog(this);
                        if (sel.DialogResult == System.Windows.Forms.DialogResult.OK)
                        {
                            List<MetricExecBase> ex = sel.Execs;

                            BindingList<RowBatchFilter> datasource = (BindingList<RowBatchFilter>)gridAlgorithms.DataSource;

                            datasource[gridAlgorithms.CurrentRow.Index] = new RowBatchFilter(
                                    row.Item1, row.Item2, row.Item3, ex, row.Item5);

                        }
                        sel.Dispose();

                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.GetType().FullName, ex.Message);
            }
        }