FrmPopFileShow.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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;using Pur.Entity;
  10. using Core.Mes.Client.Comm.Server;
  11. using Core.Mes.Client.Comm.Control;
  12. using Pur.Entity;
  13. namespace Pur.Pop_upWindow
  14. {
  15. public partial class FrmPopFileShow : FrmPmsBase
  16. {
  17. private string pic = "";
  18. public string Pic
  19. {
  20. get { return pic; }
  21. set { pic = value; }
  22. }
  23. private List<string> pathList = new List<string>();
  24. public List<string> PathList
  25. {
  26. get { return pathList; }
  27. set { pathList = value; }
  28. }
  29. public Button DeleteButton
  30. {
  31. get { return ctrlFileDown1.Button3; }
  32. }
  33. //public ctrlFileDown ctrlFileDown2
  34. //{
  35. // get { return this.ctrlFileDown1; }
  36. //}
  37. private string flag = "0";
  38. public FrmPopFileShow()
  39. {
  40. InitializeComponent();
  41. }
  42. /// <summary>
  43. /// 单个下载
  44. /// </summary>
  45. /// <param name="Ob"></param>
  46. /// <param name="picFile"></param>
  47. public FrmPopFileShow(OpeBase Ob,string picFile)
  48. {
  49. InitializeComponent();
  50. this.ob = Ob;
  51. this.pic = picFile;
  52. this.ctrlFileDown1.FileChangeEvent += ctrlFileDown1_FileChangeEvent;
  53. }
  54. ///// <summary>
  55. ///// 批量下载
  56. ///// </summary>
  57. ///// <param name="ops"></param>
  58. ///// <param name="list"></param>
  59. //public FrmPopFileShow(OpeBase Ob, List<string> list)
  60. //{
  61. // this.ob = Ob;
  62. // this.pathList = list;
  63. // InitializeComponent();
  64. // flag = "1";
  65. // this.ctrlFileDown1.FileChangeEvent += ctrlFileDown1_FileChangeEvent;
  66. // this.ctrlFileDown1.FileCloseEvent += ctrlFileDown1_FileCloseEvent;
  67. //}
  68. void ctrlFileDown1_FileCloseEvent(string path)
  69. {
  70. this.pic = path;
  71. this.Close();
  72. }
  73. void ctrlFileDown1_FileChangeEvent(string fileName)
  74. {
  75. this.Text = "文件浏览:" + fileName;
  76. }
  77. //private void dlgOrderAskDown_Load(object sender, EventArgs e)
  78. //{
  79. // this.Cursor = Cursors.WaitCursor;
  80. // if (flag == "0")
  81. // {
  82. // ctrlFileDown1.FilePath = pic;
  83. // }
  84. // else if (flag == "1")
  85. // {
  86. // ctrlFileDown1.SetPathList(pathList);
  87. // this.ctrlFileDown1.BatchFlag = "1";
  88. // }
  89. // this.Cursor = Cursors.Default;
  90. //}
  91. private void FrmPopFileShow_Load(object sender, EventArgs e)
  92. {
  93. this.Cursor = Cursors.WaitCursor;
  94. if (flag == "0")
  95. {
  96. ctrlFileDown1.FilePath = pic;
  97. }
  98. //else if (flag == "1")
  99. //{
  100. // ctrlFileDown1.SetPathList(pathList);
  101. // this.ctrlFileDown1.BatchFlag = "1";
  102. //}
  103. this.Cursor = Cursors.Default;
  104. }
  105. }
  106. }