private void ViewInitialization() { treeView1.Nodes[0].ImageIndex = 2; treeView1.Nodes[1].ImageIndex = 2; AddTree.AddNodes(MainFormContainers.ProfileID, treeView1, 1); AddTree.AddNodes(MainFormContainers.ukProfileID, treeView1, 0); GetView.GetGridView(MainFormContainers.SoilType, dataGridView2); }
private void toolStripButton11_Click(object sender, EventArgs e) { if (Convert.ToInt32(toolStripLabel2.Text) < GetView.MaxPage) { int page = Convert.ToInt32(toolStripLabel2.Text); toolStripLabel2.Text = (page + 1).ToString(); toolStripTextBox1.Text = (page + 1).ToString(); GetView.Page = page + 1; GetView.GetGridView(MainFormContainers.Spectral, dataGridView1); } }
private void button2_Click_1(object sender, EventArgs e) { DataTable subdt1 = new DataTable(); DataTable subdt2 = new DataTable(); InputData id = new InputData(); subdt1 = id.InputCSV(rootAdddress + "WaveCharacterResult(" + level.ToString() + "," + k.ToString() + ").csv"); GetView.GetGridView(subdt1, dataGridView1); subdt2 = id.InputCSV(rootAdddress + "CorrectResult(" + level.ToString() + "," + k.ToString() + ").csv"); GetView.GetGridView(subdt2, dataGridView2); }
void changeGrid1(DataTable dt) { if (dataGridView1.InvokeRequired) { GridDelegate grid = new GridDelegate(changeGrid1); dataGridView1.BeginInvoke(grid, new object[] { dt }); } else { GetView.GetGridView(dt, dataGridView1); } }
private void toolStripTextBox1_TextChanged(object sender, EventArgs e) { if (Convert.ToInt32(toolStripTextBox1.Text) > 0 && Convert.ToInt32(toolStripTextBox1.Text) < GetView.MaxPage) { GetView.Page = Convert.ToInt32(toolStripTextBox1.Text); toolStripLabel2.Text = toolStripTextBox1.Text; GetView.GetGridView(MainFormContainers.Spectral, dataGridView1); } else { MessageBox.Show("页码超出范围!"); } }
/// <summary> /// 目录树线程函数 /// </summary> /// <param name="name"></param> private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { if (treeView1.SelectedNode.Level > 0) { Waiting w = new Waiting(); w.Show(); InputData id = new InputData(); if (treeView1.SelectedNode.Parent.Text == "测试集合") { string path = Config.uksoilfolder + "\\" + treeView1.SelectedNode.Text + ".csv"; MainFormContainers.Spectral = id.InputCSV(path); Thread newthread = new Thread(new ParameterizedThreadStart(SelectTree1)); newthread.Start(treeView1.SelectedNode.Text); GetView.GetGridView(MainFormContainers.Spectral, dataGridView1); tabControl1.SelectedTab = tabPage1; } else if (treeView1.SelectedNode.Parent.Text == "样本集合") { string path = Config.soilfolder + "\\" + treeView1.SelectedNode.Text + ".csv"; MainFormContainers.Spectral = id.InputCSV(path); Thread newthread = new Thread(new ParameterizedThreadStart(SelectTree2)); newthread.Start(treeView1.SelectedNode.Text); GetView.GetGridView(MainFormContainers.Spectral, dataGridView1); tabControl1.SelectedTab = tabPage1; } } }
private void toolStripButton12_Click(object sender, EventArgs e) { GetView.Page = GetView.MaxPage; toolStripLabel2.Text = GetView.MaxPage.ToString(); GetView.GetGridView(MainFormContainers.Spectral, dataGridView1); }
private void toolStripButton2_Click(object sender, EventArgs e) { GetView.Page = 1; toolStripLabel2.Text = "1"; GetView.GetGridView(MainFormContainers.Spectral, dataGridView1); }