轉(zhuǎn)帖|其它|編輯:郝浩|2011-05-06 14:13:05.000|閱讀 1185 次
概述:最近老是聽(tīng)到用戶沒(méi)有及時(shí)登錄到eip中審批文件,導(dǎo)致事情延誤的事情。細(xì)想一下也沒(méi)辦法,基于B/S下的工作流確實(shí)沒(méi) 有winform那樣方便的提醒功能,雖然里面也有提醒,但也只是在eip打開(kāi)的情況下才有。于是最近抽出了一點(diǎn)私人時(shí)間寫(xiě)了一個(gè)類似QQ消息提醒的東西。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門(mén)軟控件火熱銷售中 >>
目的:
最近老是聽(tīng)到用戶沒(méi)有及時(shí)登錄到eip中審批文件,導(dǎo)致事情延誤的事情。細(xì)想一下也沒(méi)辦法,基于B/S下的工作流確實(shí)沒(méi) 有winform那樣方便的提醒功能,雖然里面也有提醒,但也只是在eip打開(kāi)的情況下才有。于是最近抽出了一點(diǎn)私人時(shí)間寫(xiě)了一個(gè)類似QQ消息提醒的東西。
技術(shù):
1.webserivce:用于調(diào)用遠(yuǎn)端的工作流的接口
2.GDI+:繪制提醒框的界面。
3.多線程。
4.異步委托。
組件:
1.appconfig輔助類。
2.reg輔助類。用戶寫(xiě)注冊(cè)表。
3.SQL輔助類。訪問(wèn)數(shù)據(jù)庫(kù),用于驗(yàn)證用戶身份。
4.第三方控件。
功能:
1.檢驗(yàn)當(dāng)前配置文件中的賬號(hào)是否有效。
有效就執(zhí)行提醒。無(wú)效就彈出賬號(hào)設(shè)置界面。
2.類似QQ自動(dòng)提醒。
3.可以設(shè)置開(kāi)機(jī)自動(dòng)運(yùn)行。
4.密碼或賬號(hào)有誤會(huì)自動(dòng)終止并彈出賬號(hào)設(shè)置界面。
圖片:
1.賬號(hào)設(shè)置界面
2.配置界面
3.參數(shù)配置界面
4.完成界面以及消息提醒界面
底下的小牛托盤(pán)便是。
5.運(yùn)行時(shí)相關(guān)操作
代碼:
由于這個(gè)是個(gè)小玩具,代碼比較簡(jiǎn)單所以就不提供了,免得貽笑大方,而且網(wǎng)上也可以搜索的到,相關(guān)的代碼。
這個(gè)是畫(huà)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);
}
希望大家批評(píng)指正。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:豆豆網(wǎng)