❶ 華為程序員,985本科,36歲,昨天公司通知不再續約你咋看
都說35歲是職場的一個轉折點,要是在這個歲數還想在一線當程序員還真有點困難,而剩下的選擇要麼就是轉管理崗,要麼就可能會被辭退。
原因自然不復雜,35歲的程序員,相信大多數都已經成家了吧?
有了家庭,而且歲數也接近中年了,自然不可能像小年輕一樣可以那麼拼的加班熬夜,而且三十多歲的工資價格再咋樣也得比剛畢業沒多久的小年輕多個幾倍吧?
雖說是老生常談了,但就像上面那位一樣,在沒有保持知識輸入,遲早會跟不上時代的。
更不提程序員這個技能更新飛快的職業,每年都可能會有新的代碼知識要學習。
不管這是不是雞湯,筆者誠信建議不要放棄知識輸入才是!
❷ 我昨天周4面試PHP程序員 面試官說今天周5給我答復 結果現在是周512點了還沒有給我答復 我該怎麼辦
正常來說,告訴你周五通知你,就一定會在指定的時間聯系你,不管是通過還是沒有通過,都會對你昨天的面試有一個答復,你繼續等等吧。但是你要知道一點,不要把雞蛋放在一個籃子里,繼續到其他公司進行面試,你可以擇優嘛,加油吧。
❸ 鍒╃敤C#瀹炵幇浠誨姟鏍忛氱煡紿楀彛
銆銆浣滀負紼嬪簭鍛樺湪浜鍙楃殑鍚屾椂鎴戜滑涔熶笉紱佽侀棶 榪欏埌搴曟槸鎬庝箞瀹炵幇鐨勫憿錛熸湰鏂囧氨鍒╃敤Visual Studio Net C# 浠ュ強 Net妗嗘灦緇樺浘鎶鏈鏉ュ疄鐜拌繖縐嶄換鍔℃爮閫氱煡紿楀彛
銆銆綆浠
銆銆QQ鍜孧SN鐨勪換鍔℃爮閫氱煡紿楀彛寰堜漢鎬у寲 瀹冨彲浠ュ湪涓嶄涪澶變富紿椾綋鐒︾偣鐨勫墠鎻愪笅鏄劇ず涓涓鍏峰囩毊鑲Skin鐨勯氱煡紿椾綋 褰撳畠鏄劇ず涓孌墊椂闂村悗浼氳嚜鍔ㄦ秷澶 鎵浠ョ敤鎴鋒牴鏈涓嶇敤騫查勫畠
銆銆榪欐牱鐨勯氱煡紿椾綋鍜屼竴鑸鐨勫叿澶囨爣棰樻爮 緋葷粺鍥炬爣鍜屾寜閽鐨勭獥浣撴病鏈夊お澶х殑鍖哄埆 紿椾綋琛ㄩ潰鍏跺疄灝辨槸鐢諱笂鍘葷殑涓寮犱綅鍥捐屽凡 鑰岀獥浣撶殑嫻鍔ㄥ垯浼氬嶆潅涓鐐 鎴戜滑浼氱敤鍒 Net妗嗘灦鐨勫弻閲嶇紦鍐插尯緇樺浘鎶鏈錛堝弬瑙佷綔鑰呯紪璇戞枃絝 Windows紿椾綋鐨 Net妗嗘灦緇樺浘鎶鏈 錛夋潵淇濊瘉縐誨姩紿椾綋鏃舵墍鏄劇ず鐨勫唴瀹瑰鉤婊戜笖涓嶉棯鐑 浠ュ強浣跨敤P/Invoke騫沖彴璋冪敤榪涜屽筗in API鍑芥暟鐨勮皟鐢ㄦ潵瀹屾垚涓嶈幏寰楃劍鐐圭殑紿椾綋鏄劇ず鍜岄潪鏍囬樻爮紿椾綋鎷栧姩 涓ょ嶄綅鍥劇殑鐨鑲よ繍琛屾椂鐨勭晫闈㈠備笅
銆銆鑳屾櫙鐭ヨ瘑
銆銆閫氱煡紿楀彛灝辨槸灝嗕竴鑸鐨勭獥浣撻檮鍔犱笂涓灞傜毊鑲 榪欓噷鎵璋撶殑鐨鑲ゅ氨鏄涓寮犱綅鍥懼浘鐗 璇ヤ綅鍥懼浘鐗囬氳繃紿椾綋鐨凮nPaintbackground浜嬩歡琚緇樺埗鍒扮獥浣撹〃闈 鍦ㄩ檮鍔犱綅鍥句箣鍓嶉渶瑕佽皟鏁寸獥浣撶殑鍙瑙嗗睘鎬 鐢變簬緇樺埗鎿嶄綔鏄閽堝逛簬紿椾綋瀹㈡埛鍖哄煙鐨 鎵璋撳㈡埛鍖哄煙灝辨槸鎸囩獥浣撴爣棰樻爮涓嬫柟浠ュ強紿椾綋杈規嗕互鍐呯殑鎵鏈夊尯鍩 鎵浠ラ渶瑕佸皢紿椾綋鐨勮竟妗嗗拰澶栬傚睘鎬FormBorderStyle璋冩暣涓 None 榪欐牱鎵緇樺埗鐨勫浘鍍忓氨浼氬~鍏呮暣涓紿椾綋
銆銆棣栧厛 鎴戜滑浼氱敤鍒癛egion瀵硅薄 Region瀵硅薄鍙浠ョ簿紜鐨勬弿緇樺嚭浠繪剰褰㈢姸鐨勮疆寤撹寖鍥 閫氳繃涓涓浣嶅浘鍥懼儚鍒涘緩Region瀵硅薄鍚庡啀灝嗗叾浼犻掔粰紿椾綋鐨凴egion灞炴у氨鍙浠ヤ嬌紿椾綋鎸夌収Region鎵瀹氫箟鐨勮疆寤撴樉紺哄嚭鏉 浣滀負鐨鑲や嬌鐢ㄧ殑浣嶅浘鏂囦歡鍙浠ラ氳繃浠諱綍鍥懼儚緙栬緫杞浠惰稿 Photeshop鏉ュ壋寤哄拰緙栬緫 鍙鏄娉ㄦ剰涓鐐 闇瑕佸皢鍥劇墖鐨勮儗鏅鑹茶皟鎴愮壒瀹氶滆壊浠ヤ究紼嬪簭緇樺埗鏃跺皢鍏舵竻闄 鎴戜滑鍦ㄨ繖閲屼嬌鐢ㄧ殑鑳屾櫙鑹蹭負綺夌孩鑹 涓轟簡鑳藉熻㏑egion瀵硅薄鎸夌収鍥懼儚涓鎰熷叴瓚g殑鍐呭硅竟妗嗘潵鍒涘緩紿椾綋 鎴戜滑榪橀渶瑕佷嬌鐢℅raphicsPath綾誨皢鍥懼儚杞寤撴寜鐓т竴瀹氳礬寰勬爣娉ㄤ笅鏉 紼嶅悗渚挎寜鐓цヨ礬寰勫壋寤篟egion瀵硅薄
銆銆鐒跺悗閫氳繃紿椾綋鐨勭粯鍥句簨浠跺皢浣嶅浘鐨勫唴瀹規樉紺哄湪紿椾綋琛ㄩ潰 鎴戜滑娌℃湁鐩存帴浣跨敤OnPaintbackground浜嬩歡鑰屾槸閲嶈澆浜嗚ユ柟娉 榪欐牱鍋氱殑濂藉勫氨鏄涓浜涗綆灞傜殑緇樺埗鎿嶄綔榪樼戶緇浜ょ敱 Net妗嗘灦榪愯屾椂鏉ュ勭悊 鎴戜滑鍙鑰冭檻瀹為檯闇瑕佺殑緇樺埗鎿嶄綔鍗沖彲 鍦∣nPaintbackground鏂規硶涓鎴戜滑鍚鐢ㄤ簡鍙岄噸緙撳啿鍖虹粯鍥炬妧鏈 鎵璋撹ユ妧鏈灝辨槸鎸囧厛鍦ㄥ唴瀛樹腑鐨勪竴鍧楃敾甯冧笂鎶婂皢瑕佹樉紺虹殑鍥懼儚鏄劇ず鍑烘潵鎴栬繘琛屽勭悊 絳夊埌鎿嶄綔瀹屾垚鍐嶅皢璇ョ敾甯冧笂鎵鏄劇ず鐨勫浘鍍忔斁緗鍒扮獥浣撹〃闈 榪欐牱鐨勬満鍒跺彲浠ラ潪甯告湁鏁堢殑闄嶄綆闂鐑佺殑鍑虹幇 浣垮浘鍍忔樉紺烘洿鍔犲鉤婊
銆銆閫氱煡紿椾綋浠庡睆騫曠殑鍙充笅鏂硅繘琛屽崌璧峰仠鐣欎竴孌墊椂闂村悗鍐嶆參鎱㈠洖钀 榪欓噷闇瑕佺敤鍒拌繑鍥炲睆騫曞尯鍩熺殑澶у皬鑼冨洿鐨 Net妗嗘灦鏂規硶Screen GetWorkingArea錛圵orkAreaRectangle錛 閫氳繃涓瀹氱畻娉曡$畻鍑洪氱煡紿椾綋鏄劇ず鍓嶇殑鍒濆嬩綅緗
銆銆鏈鍚 鎴戜滑灝嗚佹樉紺虹殑鏂囨湰鎸夌収涓瀹氭牸寮忓拰Rectangle瀵硅薄鎵鎸囧畾鐨勫尯鍩熻寖鍥寸粯鍒跺埌紿椾綋琛ㄩ潰 閫氱煡紿椾綋鐨勫叧闂鎿嶄綔鏄閫氳繃璁懼畾涓涓鍖哄煙 褰撶敤鎴風敤榧犳爣鍗曞嚮鏃舵嫻嬪崟鍑誨潗鏍囨槸鍚﹀湪璇ュ尯鍩熷唴 鑻ュ湪鍖哄煙鍐呭氨鍙浠ユ墽琛岄殣鈃忛氱煡紿椾綋鐨勪唬鐮
銆銆鎴戜滑娉ㄦ剰浜 褰換Q鍜孧SN鐨勯氱煡紿楀彛鏄劇ず鏃跺叾涓葷獥浣撶殑鐒︾偣娌℃湁涓㈠け 涔熷氨鏄璇寸▼搴忔病鏈夊皢鑷韜鐨勭劍鐐硅漿縐誨埌鏄劇ず鐨勯氱煡紿椾綋涓 緇忚繃嫻嬭瘯 鎴戜滑鏃犺烘庝箞鏍瘋皟鐢 Net妗嗘灦鎻愪緵鐨勭獥浣撴樉紺轟緥紼嬭濡 Form Show閮芥棤娉曚繚璇佷富紿椾綋鐨勭劍鐐逛笉涓㈠け 鍦╒C鐜澧冧笅鎴戜滑鍙浠ヤ嬌鐢╓in API鐨 ShowWindows鍑芥暟鏉ュ畬鎴愬嶆潅鐨勭獥浣撴樉紺烘搷浣 浣嗘槸 Net妗嗘灦鏍規湰娌℃湁鎻愪緵綾諱技鐨勬柟娉 閭d箞鎴戜滑鑳藉惁閫氳繃 Net妗嗘灦璋冪敤璇API鍑芥暟鏉ユ樉紺虹獥浣撳憿錛
銆銆騫稿ソ Net妗嗘灦鎻愪緵浜哖/Invoke騫沖彴璋冪敤 鍒╃敤騫沖彴璋冪敤榪欑嶆湇鍔 鎵樼′唬鐮佸氨鍙浠ヨ皟鐢ㄥ湪鍔ㄦ侀摼鎺ュ簱涓瀹炵幇鐨勯潪鎵樼″嚱鏁 騫跺彲浠ュ皝閫佸叾鍙傛暟 鎴戜滑鍙浠ヨ交鏉劇殑鏄劇ず浣嗕笉鑾峰緱鐒︾偣鐨勭獥浣 紼嬪簭涓鐢ㄥ埌鐨刉indows API浠ュ強甯擱噺鐨勫畾涔夐兘淇濆瓨鍦╓inUser h澶存枃浠朵腑 鍏跺瑰簲鐨勫姩鎬侀摼鎺ュ簱鏂囦歡灝辨槸user dll 浣跨敤 Net妗嗘灦鎻愪緵鐨 DllImportAttribute綾誨瑰煎叆鐨勫嚱鏁拌繘琛屽畾涔 鐒跺悗灝卞彲浠ラ潪甯告柟渚跨殑鍦ㄧ▼搴忎腑璋冪敤璇ュ嚱鏁頒簡
銆銆鐢變簬鎴戜滑灝嗛氱煡紿椾綋鐨勬爣棰樻爮闅愯棌浜 鎵浠ュ圭獥浣撴嫋鍔ㄦ搷浣滆繕闇瑕佹垜浠鑷宸卞姩鎵嬭繘琛屽勭悊 鏈鏂囦粙緇嶄簡濡備綍鏇村姞楂樻晥鐨勮繘琛屾嫋鍔ㄧ獥浣撴搷浣 鏈変簺緗戝弸鍦ㄥ逛簬闈炴爣棰樻爮鎷栧姩紿椾綋緙栫▼鏃跺嚲鍚戠粍鍚堜嬌鐢ㄩ紶鏍囦簨浠舵潵榪涜 榪欐牱鍋氱殑鏈璐ㄦ病鏈変換浣曚笉濡 浣嗘槸棰戠箒鐨勪簨浠跺搷搴斿拰澶勭悊鍙嶈屼嬌紼嬪簭鎬ц兘鏈夋墍闄嶄綆 鎴戜滑灝嗙戶緇浣跨敤 Win API鐨勫簳灞傚勭悊鏂規硶鏉ヨВ鍐寵ラ棶棰 灝辨槸鍚戠獥浣撳彂閫佹爣棰樻爮琚鍗曞嚮鐨勬秷鎮 妯℃嫙瀹為檯鐨勬嫋鍔ㄦ搷浣
銆銆鎴戜滑浼氶氳繃 涓璁℃椂鍣ㄦ潵瀹屾垚紿椾綋鐨勬樉紺 鍋滅暀鍜岄殣鈃 閫氳繃璁劇疆閫熷害鍙橀噺鍙浠ユ敼鍙樼獥鍙f樉紺哄拰闅愯棌鐨勯熷害
銆銆[DllImportAttribute錛 user dll 錛塢 public static extern int SendMessage錛圛ntPtr hWnd int Msg int wParam int lParam錛 //鍙戦佹秷鎮//winuser h 涓鏈夊嚱鏁板師鍨嬪畾涔塠DllImportAttribute錛 user dll 錛塢 public static extern bool ReleaseCapture錛堬級 //閲婃斁榧犳爣鎹曟崏winuser h [DllImportAttribute錛 user dll 錛塢 //winuser h private static extern Boolean ShowWindow錛圛ntPtr hWnd Int nCmdShow錛 SendMessage鍚戞秷鎮寰鐜鍙戦佹爣棰樻爮琚鎸変笅鐨勬秷鎮鏉ユā鎷熺獥浣撶殑鎷栧姩 ShowWindow鐢ㄦ潵灝嗙壒瀹氬彞鏌勭殑紿椾綋鏄劇ず鍑烘潵 娉ㄦ剰絎浜屼釜鍙傛暟 nCmdShow 瀹冭〃紺虹獥浣撳簲璇ユ庢牱鏄劇ず鍑烘潵 鑰屾垜浠闇瑕佺獥浣撲笉鑾峰緱鐒︾偣鏄劇ず鍑烘潵 SW_SHOWNOACTIVATE鍙浠ユ弧瓚蟲垜浠瑕佹眰 緇х畫鍦 WinUser h鏂囦歡涓鎼滅儲鎵懼埌璇ュ父閲忓瑰簲鐨勫間負 浜庢槸鎴戜滑灝卞彲浠ヨ繖鏍瘋皟鐢ㄦ潵鏄劇ず紿椾綋浜
銆銆ShowWindow錛坱his Handle 錛 鎴戜滑鍒涘緩浜嗕竴涓鑷瀹氫箟鍑芥暟ShowForm鐢ㄦ潵灝佽呬笂闈㈢殑ShowWindow鐢ㄦ潵鏄鏄劇ず紿椾綋 鍚屾椂浼犻掍簡鎵鐢ㄥ埌鐨勫嚑涓猂ectangle鐭╁艦鍖哄煙瀵硅薄 鏈鍚庤皟鐢⊿howWindows鍑芥暟灝嗙獥浣撴樉紺哄嚭鏉 浠g爜鐗囨靛備笅
銆銆public void ShowForm錛坰tring ftitletext string fcontenttext Rectangle fRegionofFormTitle Rectangle fRegionofFormTitlebar Rectangle fRegionofFormContent Rectangle fRegionofCloseBtn錛
銆銆{ titleText = ftitletext contentText = fcontenttext WorkAreaRectangle = Screen GetWorkingArea錛圵orkAreaRectangle錛 this Top = WorkAreaRectangle Height + this Height FormBorderStyle = FormBorderStyle None WindowState = FormWindowState Normal this SetBounds錛圵orkAreaRectangle Width this Width WorkAreaRectangle Height currentTop this Width this Height錛 CurrentState = timer Enabled = true TitleRectangle = fRegionofFormTitle TitlebarRectangle = fRegionofFormTitlebar ContentRectangle = fRegionofFormContent CloseBtnRectangle = fRegionofCloseBtn ShowWindow錛坱his Handle 錛 //#define SW_SHOWNOACTIVATE } CurrentState鍙橀噺琛ㄧず紿椾綋鐨勭姸鎬佹槸鏄劇ず涓 鍋滅暀涓榪樻槸闅愯棌涓 涓や釜璁℃椂鍣ㄦ牴鎹紿椾綋涓嶅悓鐘舵佸圭獥浣撶殑浣嶇疆榪涜屾洿鏀 鎴戜滑浼氫嬌鐢⊿etBounds鏉ユ墽琛岃ユ搷浣
銆銆this SetBounds錛圵orkAreaRectangle Width this Width WorkAreaRectangle Height currentTop this Width this Height錛 褰撶獥浣撻渶瑕佸崌璧鋒椂灝嗙獥浣撶殑Top灞炴у間笉鏂鍑忓皯 鑰岀獥浣撳洖钀芥椂灝員op灞炴у煎炲姞騫惰秴榪囧睆騫曠殑楂樺害紿椾綋灝辨秷澶變簡 鉶界劧鍘熺悊寰堢畝鍗曚絾浠嶉渶綺劇『鎺у埗
銆銆SetBackgroundBitmap鍑芥暟棣栧厛灝嗙獥浣撹儗鏅鍥懼儚淇濆瓨鍒癇ackgroundBitmap鍙橀噺涓 鐒跺悗鏍規嵁璇ヤ綅鍥懼浘鍍忚疆寤撳拰閫忔槑鑹插壋寤篟egion BitmapToRegion灝辯敤浜庡畬鎴怋itmap鍒癛egion鐨勮漿鎹 紼嬪簭鍐嶅皢榪欎釜Region浠樺肩粰紿椾綋鐨凴egion灞炴т互瀹屾垚涓嶈勫垯紿椾綋鐨勫壋寤
銆銆public void SetBackgroundBitmap錛圛mage image Color transparencyColor錛
銆銆{ BackgroundBitmap = new Bitmap錛坕mage錛 Width = BackgroundBitmap Width Height = BackgroundBitmap Height Region = BitmapToRegion錛圔ackgroundBitmap transparencyColor錛 } public Region BitmapToRegion錛圔itmap bitmap Color transparencyColor錛
銆銆{ if 錛坆itmap == null錛
銆銆throw new ArgumentNullException錛 Bitmap Bitmap cannot be null錛 錛 int height = bitmap Height int width = bitmap Width GraphicsPath path = new GraphicsPath錛堬級 for 錛坕nt j = j < height j++錛
銆銆for 錛坕nt i = i < width i++錛
銆銆{ if 錛坆itmap GetPixel錛坕 j錛 == transparencyColor錛
銆銆continue int x = i while 錛堬紙i < width錛 && 錛坆itmap GetPixel錛坕 j錛 錛= transparencyColor錛夛級
銆銆i++ path AddRectangle錛坣ew Rectangle錛坸 j i x 錛夛級 } Region region = new Region錛坧ath錛 path Dispose錛堬級 return region }閫氱煡紿椾綋鑳屾櫙浠ュ強鏂囧瓧鐨勭粯鍒跺湪閲嶈澆鐨凮nPaintBackground鏂規硶涓瀹屾垚 鑰屼笖鍒╃敤浜嗗弻閲嶇紦鍐插尯鎶鏈鏉ヨ繘琛岀粯鍒舵搷浣 浠g爜濡備笅
銆銆protected override void OnPaintBackground錛圥aintEventArgs e錛
銆銆{ Graphics grfx = e Graphics grfx PageUnit = GraphicsUnit Pixel Graphics offScreenGraphics Bitmap offscreenBitmap ffscreenBitmap = new Bitmap錛圔ackgroundBitmap Width BackgroundBitmap Height錛 ffScreenGraphics = Graphics FromImage錛坥ffscreenBitmap錛 if 錛圔ackgroundBitmap 錛= null錛
銆銆{ offScreenGraphics DrawImage錛圔ackgroundBitmap BackgroundBitmap Width BackgroundBitmap Height錛 } DrawText錛坥ffScreenGraphics錛 grfx DrawImage錛坥ffscreenBitmap 錛 }涓婅堪浠g爜棣栧厛榪斿洖紿椾綋緇樺埗琛ㄩ潰鐨凣raphics騫朵繚瀛樺湪鍙橀噺grfx涓 鐒跺悗鍒涘緩涓涓鍐呭瓨Graphics瀵硅薄 offScreenGraphics鍜屽唴瀛樹綅鍥懼硅薄offscreenBitmap 灝嗗唴瀛樹綅鍥懼硅薄鐨勫紩鐢ㄤ粯鍊肩粰offScreenGraphics 榪欐牱鎵鏈夊篔ffScreenGraphics鐨勭粯鍒舵搷浣滀篃閮藉悓鏃朵綔鐢ㄤ簬offscreenBitmap 榪欐椂灝卞皢闇瑕佺粯鍒跺埌閫氱煡紿椾綋琛ㄩ潰鐨勮儗鏅鍥懼儚 BackgroundBitmap緇樺埗鍒板唴瀛樼殑Graphics瀵硅薄涓 DrawText鍑芥暟鏍規嵁闇瑕佹樉紺烘枃瀛楃殑澶у皬鍜岃寖鍥磋皟鐢 Graphics DrawString灝嗘枃瀛楁樉紺哄湪紿椾綋鐨勭壒瀹氬尯鍩 鏈鍚 璋冪敤Graphics DrawImage灝嗗唴瀛樹腑宸茬粡緇樺埗瀹屾垚鐨勫浘鍍忔樉紺哄埌閫氱煡紿椾綋琛ㄩ潰
銆銆鎴戜滑榪橀渶瑕佹崟鑾風獥浣撶殑榧犳爣鎿嶄綔 鏈変笁涓鎿嶄綔鍦ㄨ繖閲岃繘琛 澶勭悊鎷栧姩紿椾綋鎿嶄綔 澶勭悊閫氱煡紿椾綋鐨勫叧闂鎿嶄綔 鍐呭瑰尯鍩熺殑鍗曞嚮鎿嶄綔 涓変釜鎿嶄綔閮介渶瑕佹嫻嬮紶鏍囩殑褰撳墠浣嶇疆涓庢瘡涓猂ectangle鍖哄煙鐨勫寘鍚鍏崇郴 鍙瑕佸崟鍑昏惤鍦ㄧ壒瀹氬尯鍩熸垜浠灝辮繘琛岀浉搴旂殑澶勭悊 浠g爜濡備笅
銆銆private void TaskbarForm_MouseDown錛坥bject sender MouseEventArgs e錛
銆銆{ if 錛坋 Button == MouseButtons Left錛
銆銆{ if 錛圱itlebarRectangle Contains錛坋 Location錛夛級 //鍗曞嚮鏍囬樻爮鏃舵嫋鍔▄ ReleaseCapture錛堬級 //閲婃斁榧犳爣鎹曟崏SendMessage錛圚andle WM_NCLBUTTONDOWN HT_CAPTION 錛 //鍙戦佸乏閿鐐瑰嚮鐨//娑堟伅鑷寵ョ獥浣擄紙鏍囬樻爮錛
銆銆} if 錛圕loseBtnRectangle Contains錛坋 Location錛夛級 //鍗曞嚮Close鎸夐挳鍏抽棴{ this Hide錛堬級 currentTop = } if 錛圕ontentRectangle Contains錛坋 Location 錛夛級 //鍗曞嚮鍐呭瑰尯鍩焮 System Diagnostics Process Start錛 錛 } }緇撹
lishixin/Article/program/net/201311/11965