frmMultiSourceSelect.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Windows.Forms;
  3. namespace OTSIncAReportApp
  4. {
  5. public partial class frmMultiSourceSelect : Form
  6. {
  7. public frmMultiSourceSelect(TreeView in_tv)
  8. {
  9. InitializeComponent();
  10. foreach (TreeNode tn in in_tv.Nodes)
  11. {
  12. this.treeView1.Nodes.Add(tn.Text);
  13. }
  14. //选择
  15. for (int i = 0; i < in_tv.Nodes.Count; i++)
  16. {
  17. this.treeView1.Nodes[i].Checked = in_tv.Nodes[i].Checked;
  18. }
  19. this.treeView1.DrawMode = TreeViewDrawMode.Normal;
  20. }
  21. private void frmMultiSourceSelect_Load(object sender, EventArgs e)
  22. {
  23. //
  24. }
  25. private void button1_Click(object sender, EventArgs e)
  26. {
  27. //确定,切换刷新属性窗口和主显示窗口
  28. this.DialogResult = DialogResult.OK;
  29. }
  30. private void button2_Click(object sender, EventArgs e)
  31. {
  32. //取消
  33. this.Close();
  34. }
  35. }
  36. }