Exemplo n.º 1
0
        private void sbConfirm_Click(object sender, EventArgs e)
        {
            if (clbcExperiments.CheckedItems.Count == 0)
            {
                MessageBox.Show("请选择至少一个实验作为导出数据。");
                return;
            }
            if (string.IsNullOrEmpty(beOutputFile.Text))
            {
                MessageBox.Show("请指定输出文件的保存路径。");
                return;
            }

            int[] checkedExps = new int[clbcExperiments.CheckedItems.Count];
            for (int iCheckedExp = 0; iCheckedExp < clbcExperiments.CheckedItems.Count; ++iCheckedExp)
            {
                checkedExps[iCheckedExp] = (int)(clbcExperiments.CheckedItems[iCheckedExp]);
            }

            ValueExporter exporter = new ValueExporter(ctxt.BatchExperiment);

            exporter.ExportScalar(beOutputFile.Text, checkedExps, ctxt.FocusedItem.Index);

            Close();
        }
Exemplo n.º 2
0
        private void sbConfirm_Click(object sender, EventArgs e)
        {
            if (clbcExperiments.CheckedItems.Count == 0) {
                MessageBox.Show("��ѡ������һ��ʵ����Ϊ�������ݡ�");
                return;
            }
            if (string.IsNullOrEmpty(beOutputFile.Text)) {
                MessageBox.Show("��ָ������ļ��ı���·����");
                return;
            }

            int[] checkedExps = new int[clbcExperiments.CheckedItems.Count];
            for (int iCheckedExp = 0; iCheckedExp < clbcExperiments.CheckedItems.Count; ++iCheckedExp) {
                checkedExps[iCheckedExp] = (int)(clbcExperiments.CheckedItems[iCheckedExp]);
            }

            ValueExporter exporter = new ValueExporter(ctxt.BatchExperiment);
            exporter.ExportScalar(beOutputFile.Text, checkedExps, ctxt.FocusedItem.Index);

            Close();
        }