目的:
最近老是听到用户没有及时登录到eip中审批文件,导致事情延误的事情。细想一下也没办法,基于B/S下的工作流确实没有winform那样方便的提醒功能,虽然里面也有提醒,但也只是在eip打开的情况下才有。于是最近抽出了一点私人时间写了一个类似QQ消息提醒的东西。
技术:
1.webserivce:用于调用远端的工作流的接口
2.GDI+:绘制提醒框的界面。
3.多线程。
4.异步委托。
组件:
1.appconfig辅助类。
2.reg辅助类。用户写注册表。
3.SQL辅助类。访问数据库,用于验证用户身份。
4.第三方控件。
功能:
1.检验当前配置文件中的账号是否有效。
有效就执行提醒。无效就弹出账号设置界面。
2.类似QQ自动提醒。
3.可以设置开机自动运行。
4.密码或账号有误会自动终止并弹出账号设置界面。
图片:
1.账号设置界面

2.配置界面


3.参数配置界面

4.完成界面以及消息提醒界面

底下的小牛托盘便是。
5.运行时相关操作

代码:
由于这个是个小玩具,代码比较简单所以就不提供了,免得贻笑大方,而且网上也可以搜索的到,相关的代码。
这个是画qq消息框的源码。

Code
1
protected virtual void drawBorder (Graphics fx)
2
{
3
fx.DrawRectangle (Pens.Silver, 2, 2, Width - 4, ActualHeight - 4);
4
// fx.DrawRectangle(new Pen(new SolidBrush(Color.FromArgb(49,191,239))),2,2,Width-4,16);
5
6
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(51, 94, 168))), 0, 0, Width, 0);
7
fx.FillRectangle(new SolidBrush(Color.FromArgb(59,191,239)),1,1,Width-2,17);
8
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(141, 230, 255))), 0, 16, Width, 16);
9
// Top border
10
//fx.DrawLine (Pens.Silver, 0, 0, Width, 0);
11
//fx.DrawLine (Pens.White, 0, 1, Width, 1);
12
//fx.DrawLine (Pens.DarkGray, 3, 3, Width - 4, 3);
13
//fx.DrawLine (Pens.DimGray, 4, 4, Width - 5, 4);
14
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(51, 94, 168))), 0, 0, 0, ActualHeight);
15
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(59, 191, 239))), 1, 1, 1, ActualHeight);
16
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(141, 230, 255))), 2, 17, 2, ActualHeight);
17
// Left border
18
//fx.DrawLine (Pens.Silver, 0, 0, 0, ActualHeight);
19
//fx.DrawLine (Pens.White, 1, 1, 1, ActualHeight);
20
//fx.DrawLine (Pens.DarkGray, 3, 3, 3, ActualHeight - 4);
21
//fx.DrawLine (Pens.DimGray, 4, 4, 4, ActualHeight - 5);
22
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(51, 94, 168))), 1, ActualHeight - 1, Width - 1, ActualHeight - 1);
23
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(141, 230, 255))), 2, ActualHeight - 2, Width - 2, ActualHeight - 2);
24
/**///// Bottom border
25
//fx.DrawLine (Pens.DarkGray, 1, ActualHeight - 1, Width - 1, ActualHeight - 1);
26
//fx.DrawLine (Pens.White, 3, ActualHeight - 3, Width - 3, ActualHeight - 3);
27
//fx.DrawLine (Pens.Silver, 4, ActualHeight - 4, Width - 4, ActualHeight - 4);
28
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(51, 94, 168))), Width - 1, 1, Width - 1, ActualHeight - 1);
29
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(141, 230, 255))), Width - 2, 16, Width - 2, ActualHeight - 2);
30
/**///// Right border
31
//fx.DrawLine (Pens.DarkGray, Width - 1, 1, Width - 1, ActualHeight - 1);
32
//fx.DrawLine (Pens.White, Width - 3, 3, Width - 3, ActualHeight - 3);
33
//fx.DrawLine (Pens.Silver, Width - 4, 4, Width - 4, ActualHeight - 4);
34
}
希望大家批评指正。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· 展开说说关于C#中ORM框架的用法!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?