private void menuFileOpen_Click(object sender, EventArgs e) { OpenFileDialog openDlg = new OpenFileDialog(); openDlg.Filter = "全站仪数据(*.dat)|*.dat|文本文件(*.txt)|*.txt"; openDlg.Title = "打开测量数据"; if (openDlg.ShowDialog() == DialogResult.OK) { ClearAll(); tableType = 0; pnlResult.Controls.Clear(); dataType = ReadData.OpenFile(openDlg.FileName, ref col0, ref col1, ref col2, ref col3); isCalculate = false; } }
private void treeRecord_AfterSelect(object sender, TreeViewEventArgs e) { if (treeRecord.SelectedNode.Index == 0) { if (approximateDataType == DataType.Data.ConnectingTraverse || approximateDataType == DataType.Data.OpenTraverse) { if (isCalculate == false) { tableLayoutPanel = new TableLayoutPanel(); tableLayoutPanel.GetType().GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(tableLayoutPanel, true, null); TraverseRecordTable.DrawTable(pnlResult, dataCount, ref tableLayoutPanel); InputTraverseRecordTable.GetData(pnlResult, dataCount, backCount, approximateDataType, ref tableLayoutPanel); dataType = DataType.DataType.HandMade; tableType = 1; } } } else if (treeRecord.SelectedNode.Index == 1) { if (approximateDataType == DataType.Data.ConnectingTraverse || approximateDataType == DataType.Data.OpenTraverse) { if (isCalculate == false) { tableLayoutPanel = new TableLayoutPanel(); tableLayoutPanel.GetType().GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(tableLayoutPanel, true, null); LevelingRecordTable.DrawTable(pnlResult, dataCount, ref tableLayoutPanel); InputLevelingRecordTable.GetData(pnlResult, dataCount, backCount, approximateDataType, ref tableLayoutPanel); dataType = DataType.DataType.HandMade; tableType = 2; } } } else if (treeRecord.SelectedNode.Index == 2) { } }