今天我继续学习了C#WPF编程,并且修复了程序的一些bug。

我增加了验证码图片修改的监听,以前我们使用的是sleep等待验证码的图片返回更新,现在我增加了监听,可以知道验证码图片何时更新了,提高了程序的运行速度及稳定性。并且我增加了程序关闭时删除无用文件。

            fsw = new FileSystemWatcher();
            fsw.Path = System.Environment.CurrentDirectory;
            fsw.Filter = "image.jpg";
            fsw.NotifyFilter = NotifyFilters.FileName | NotifyFilters.DirectoryName | NotifyFilters.Size;
            fsw.Created += new FileSystemEventHandler(changed);  //绑定事件触发后处理数据的方法。  
            fsw.Changed += new FileSystemEventHandler(changed);
            fsw.EnableRaisingEvents = true;

 

制作了部分吐槽墙UI与客户端代码的连接。

但是由于小组成员的误操作,我的修改丢失过一次,所以今天完成的内容较少。

相关文章:

  • 2021-11-16
  • 2022-01-22
  • 2021-12-08
猜你喜欢
  • 2021-11-17
  • 2021-06-27
  • 2022-02-21
  • 2021-11-07
  • 2021-08-24
  • 2022-02-17
相关资源
相似解决方案