frmBaiduShareUrl.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace LYFZ.Software.MainBusiness.OssTask
  6. {
  7. public class frmBaiduShareUrl : LYFZ.Software.OssTask.frmBaiduShareUrl
  8. {
  9. public frmBaiduShareUrl()
  10. {
  11. this.OK.Click += OK_Click;
  12. this.Cancel.Click += Cancel_Click;
  13. // 居中显示;
  14. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  15. }
  16. private void Cancel_Click( object sender, EventArgs e )
  17. {
  18. this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  19. this.Close();
  20. }
  21. private void OK_Click( object sender, EventArgs e )
  22. {
  23. if ( string.IsNullOrEmpty( this.tx_code.Text ) || string.IsNullOrEmpty( this.tx_url.Text ) )
  24. {
  25. MessageBoxCustom.Show( "请输入提取码和百度分享地址链接!" );
  26. return;
  27. }
  28. this.DialogResult = System.Windows.Forms.DialogResult.OK;
  29. this.Close();
  30. }
  31. }
  32. }