dlgOrderAskDown.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. using Core.Mes.Client.Comm.Server;
  11. namespace Core.Mes.Client.Comm.Control
  12. {
  13. public partial class dlgOrderAskDown : FrmBase
  14. {
  15. OpeBase ob = new OpeBase();
  16. /// <summary>
  17. /// 客户编号
  18. /// </summary>
  19. private string pic = "";
  20. public string Pic
  21. {
  22. get { return pic; }
  23. set { pic = value; }
  24. }
  25. private List<string> pathList = new List<string>();
  26. public List<string> PathList
  27. {
  28. get { return pathList; }
  29. set { pathList = value; }
  30. }
  31. private List<string> folderList = new List<string>();
  32. public List<string> FolderList
  33. {
  34. get { return folderList; }
  35. set { folderList = value; }
  36. }
  37. public Button DeleteButton
  38. {
  39. get { return ctrlFileDown1.Button3; }
  40. }
  41. private string flag = "0";
  42. private string path_name = "";
  43. public dlgOrderAskDown()
  44. {
  45. InitializeComponent();
  46. }
  47. public dlgOrderAskDown(OpeBase ops, string pic)
  48. {
  49. this.ob = ops;
  50. this.pic = pic;
  51. InitializeComponent();
  52. this.ctrlFileDown1.FileChangeEvent += ctrlFileDown1_FileChangeEvent;
  53. }
  54. /// <summary>
  55. /// 批量下载
  56. /// </summary>
  57. /// <param name="ops"></param>
  58. /// <param name="list"></param>
  59. public dlgOrderAskDown(OpeBase ops, List<string> list)
  60. {
  61. this.ob = ops;
  62. this.pathList = list;
  63. InitializeComponent();
  64. flag = "1";
  65. this.ctrlFileDown1.FileChangeEvent += ctrlFileDown1_FileChangeEvent;
  66. this.ctrlFileDown1.FileCloseEvent += ctrlFileDown1_FileCloseEvent;
  67. }
  68. public dlgOrderAskDown(OpeBase ops, List<string> list, string f, List<string> folder)
  69. {
  70. this.ob = ops;
  71. this.pathList = list;
  72. InitializeComponent();
  73. flag = f;
  74. this.folderList = folder;
  75. this.ctrlFileDown1.FileChangeEvent += ctrlFileDown1_FileChangeEvent;
  76. this.ctrlFileDown1.FileCloseEvent += ctrlFileDown1_FileCloseEvent;
  77. }
  78. void ctrlFileDown1_FileCloseEvent(string path)
  79. {
  80. this.pic = path;
  81. this.Close();
  82. }
  83. void ctrlFileDown1_FileChangeEvent(string fileName)
  84. {
  85. this.Text = "文件浏览:" + fileName;
  86. }
  87. private void dlgOrderAskDown_Load(object sender, EventArgs e)
  88. {
  89. this.Cursor = Cursors.WaitCursor;
  90. if (flag == "0")
  91. {
  92. ctrlFileDown1.FilePath = pic;
  93. }
  94. else if (flag == "1")
  95. {
  96. ctrlFileDown1.SetPathList(pathList);
  97. this.ctrlFileDown1.BatchFlag = "1";
  98. }
  99. else if (flag == "2")
  100. {
  101. ctrlFileDown1.SetPathList(pathList, "2", FolderList);
  102. this.ctrlFileDown1.BatchFlag = "2";
  103. this.ctrlFileDown1.FolderList = FolderList;
  104. }
  105. this.Cursor = Cursors.Default;
  106. }
  107. }
  108. }