轉帖|其它|編輯:郝浩|2011-05-06 14:13:05.000|閱讀 1185 次
概述:最近老是聽到用戶沒有及時登錄到eip中審批文件,導致事情延誤的事情。細想一下也沒辦法,基于B/S下的工作流確實沒 有winform那樣方便的提醒功能,雖然里面也有提醒,但也只是在eip打開的情況下才有。于是最近抽出了一點私人時間寫了一個類似QQ消息提醒的東西。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
目的:
最近老是聽到用戶沒有及時登錄到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消息框的源碼。
protected virtual void drawBorder (Graphics fx)
{
fx.DrawRectangle (Pens.Silver, 2, 2, Width - 4, ActualHeight - 4);
// fx.DrawRectangle(new Pen(new SolidBrush(Color.FromArgb(49,191,239))),2,2,Width-4,16);
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(51, 94, 168))), 0, 0, Width, 0);
fx.FillRectangle(new SolidBrush(Color.FromArgb(59,191,239)),1,1,Width-2,17);
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(141, 230, 255))), 0, 16, Width, 16);
// Top border
//fx.DrawLine (Pens.Silver, 0, 0, Width, 0);
//fx.DrawLine (Pens.White, 0, 1, Width, 1);
//fx.DrawLine (Pens.DarkGray, 3, 3, Width - 4, 3);
//fx.DrawLine (Pens.DimGray, 4, 4, Width - 5, 4);
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(51, 94, 168))), 0, 0, 0, ActualHeight);
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(59, 191, 239))), 1, 1, 1, ActualHeight);
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(141, 230, 255))), 2, 17, 2, ActualHeight);
// Left border
//fx.DrawLine (Pens.Silver, 0, 0, 0, ActualHeight);
//fx.DrawLine (Pens.White, 1, 1, 1, ActualHeight);
//fx.DrawLine (Pens.DarkGray, 3, 3, 3, ActualHeight - 4);
//fx.DrawLine (Pens.DimGray, 4, 4, 4, ActualHeight - 5);
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(51, 94, 168))), 1, ActualHeight - 1, Width - 1, ActualHeight - 1);
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(141, 230, 255))), 2, ActualHeight - 2, Width - 2, ActualHeight - 2);
/**///// Bottom border
//fx.DrawLine (Pens.DarkGray, 1, ActualHeight - 1, Width - 1, ActualHeight - 1);
//fx.DrawLine (Pens.White, 3, ActualHeight - 3, Width - 3, ActualHeight - 3);
//fx.DrawLine (Pens.Silver, 4, ActualHeight - 4, Width - 4, ActualHeight - 4);
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(51, 94, 168))), Width - 1, 1, Width - 1, ActualHeight - 1);
fx.DrawLine(new Pen(new SolidBrush(Color.FromArgb(141, 230, 255))), Width - 2, 16, Width - 2, ActualHeight - 2);
/**///// Right border
//fx.DrawLine (Pens.DarkGray, Width - 1, 1, Width - 1, ActualHeight - 1);
//fx.DrawLine (Pens.White, Width - 3, 3, Width - 3, ActualHeight - 3);
//fx.DrawLine (Pens.Silver, Width - 4, 4, Width - 4, ActualHeight - 4);
}
希望大家批評指正。
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:豆豆網