dlgOrderAskDown.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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.StlMes.Client.GlBusiness
  12. {
  13. public partial class dlgOrderAskDown : Form
  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. public Button DeleteButton
  32. {
  33. get { return ctrlFileDown1.Button3; }
  34. }
  35. private string flag = "0";
  36. public dlgOrderAskDown()
  37. {
  38. InitializeComponent();
  39. }
  40. public dlgOrderAskDown(OpeBase ops, string pic)
  41. {
  42. this.ob = ops;
  43. this.pic = pic;
  44. InitializeComponent();
  45. this.ctrlFileDown1.FileChangeEvent += ctrlFileDown1_FileChangeEvent;
  46. }
  47. /// <summary>
  48. /// 批量下载
  49. /// </summary>
  50. /// <param name="ops"></param>
  51. /// <param name="list"></param>
  52. public dlgOrderAskDown(OpeBase ops, List<string> list)
  53. {
  54. this.ob = ops;
  55. this.pathList = list;
  56. InitializeComponent();
  57. flag = "1";
  58. this.ctrlFileDown1.FileChangeEvent += ctrlFileDown1_FileChangeEvent;
  59. this.ctrlFileDown1.FileCloseEvent += ctrlFileDown1_FileCloseEvent;
  60. }
  61. void ctrlFileDown1_FileCloseEvent(string path)
  62. {
  63. this.pic = path;
  64. this.Close();
  65. }
  66. void ctrlFileDown1_FileChangeEvent(string fileName)
  67. {
  68. this.Text = "文件浏览:" + fileName;
  69. }
  70. private void dlgOrderAskDown_Load(object sender, EventArgs e)
  71. {
  72. this.Cursor = Cursors.WaitCursor;
  73. if (flag == "0")
  74. {
  75. ctrlFileDown1.FilePath = pic;
  76. }
  77. else if (flag == "1")
  78. {
  79. ctrlFileDown1.SetPathList(pathList);
  80. this.ctrlFileDown1.BatchFlag = "1";
  81. }
  82. this.Cursor = Cursors.Default;
  83. }
  84. }
  85. }