private void tsbCheckTask_Click(object sender, EventArgs e) { try { string str = string.Empty; foreach (Node node in advTree1.Nodes) { if (node.IsSelected) { str = node.Text; break; } } if (!string.IsNullOrEmpty(str)) { frmCheckTaskInfo CheckTaskInfo = new frmCheckTaskInfo(); CheckTaskInfo.GetMaterialTaskId = str; CheckTaskInfo.ShowDialog(); } } catch (Exception ex) { throw ex; } }