예제 #1
0
        //创建下一步
        private void btnOK_Click(object sender, EventArgs e)
        {
            this.Hide();
            CreateUserDefinedTableForm2 form = new CreateUserDefinedTableForm2(this.rbRow.Checked == true? "row":"column");

            form.StartPosition = FormStartPosition.CenterParent;
            form.ShowDialog();
        }
예제 #2
0
        public CreateUserDefinedTableForm2(string restructType)
        {
            Control.CheckForIllegalCrossThreadCalls = false;
            InitializeComponent();

            //创建一个进程显示-加载数据-进度条
            Thread thdSub = new Thread(new ThreadStart(this.progressB));

            thdSub.Start();
            Thread.Sleep(100);


            this.restructType = restructType;
            if (this.restructType == "row")
            {
                this.Text = "第二步:选择行及筛选条件";
                添加行头列ToolStripMenuItem.Visible = true;
                添加列头行ToolStripMenuItem.Visible = false;
                this.dgvColumn.ClearSelection();
                this.dgvColumn.Enabled = false;
            }
            else if (this.restructType == "column")
            {
                this.Text = "第二步:选择列及筛选条件";
                添加列头行ToolStripMenuItem.Visible = true;
                添加行头列ToolStripMenuItem.Visible = false;
                this.dgvRow.ClearSelection();
                this.dgvRow.Enabled = false;
            }

            //读取模拟计算结果文件   在设置 列或者行 的 筛选条件时  会用到里面的数据
            if (false == ReadOutFiles())//最好放前面 后面的初始化都需要它先初始化
            {
                this.myprogress.isOver = true;
                return;
            }

            //获取所有行号与行码的对应
            rowNameAndCode = CreateUserDefinedTableForm2.GetAllRowName(); //这要放在 cbSourceDgv.SelectedIndex改变事件发生之前

            //获取所有模板
            GetFixedTemplate();
            if (this.cbSourceDgv.Items.Count > 0)
            {
                this.cbSourceDgv.SelectedIndex = 0;
            }

            //设置当前的模板表
            SetCurrentTableTemplate();

            //初始化所有的筛选条件 组合框
            ResetComboBox(); //这要放在 源表组合框初始化之后

            this.myprogress.isOver = true;
        }