91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 10.21MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-10-07
  • 語言: C#
  • 標簽: c#??

資源簡介

分為客戶端,服務(wù)端兩個部分,其中有其余代碼,會在我的文章中解釋注釋。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Drawing;
using?System.IO;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;

namespace?MCaptureDemo
{
????public?class?CacheHelper
????{

????????//緩存容器?
????????private?static?Dictionaryject>?CacheDictionary?=?new?Dictionaryject>();

????????///?
????????///?添加緩存
????????///?

????????public?static?void?Add(string?key?object?value)
????????{
????????????CacheDictionary.Add(key?value);
????????}

????????///?
????????///?獲取緩存
????????///?

????????public?static?T?Get(string?key)
????????{
????????????return?(T)CacheDictionary[key];
????????}

????????///?
????????///?清除緩存
????????///?

????????///?
????????public?static?void?Clear(string?key)?{
????????????CacheDictionary.Remove(key);
????????}

????????///?
????????///?判斷緩存是否存在
????????///?

????????///?
????????///?
????????public?static?bool?Exsits(string?key)
????????{
????????????return?CacheDictionary.ContainsKey(key);
????????}

????????public?static?byte[]?GetCache(string?keyBitmap?img)
????????{
????????????byte[]?bytes?=?new?byte[8];

????????????if?(CacheHelper.Exsits(key))
????????????{
????????????????//緩存存在,直接獲取原數(shù)據(jù)
????????????????bytes?=?GetbitByte(CacheHelper.Get(key));
????????????}
????????????else
????????????{
????????????????//緩存不存在,去生成緩存,并加入容器
????????????????
????????????????CacheHelper.Add(key?img);
????????????}

????????????return?bytes;
????????}


????????private?static?byte[]?GetbitByte(Bitmap?MemImage)
????????{
????????????MemoryStream?mstream?=?new?MemoryStream();
????????????MemImage.Save(mstream?System.Drawing.Imaging.ImageFormat.Jpeg);
????????????byte[]?byData?=?new?Byte[mstream.Length];

????????????mstream.Position?=?0;
????????????mstream.Read(byData?0?byData.Length);
????????????mstream.Close();
????????????return?byData;
????????}

????}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-12-03?11:55??viedoplayer\
?????目錄???????????0??2018-12-03?11:55??viedoplayer\MolCS_Client\
?????文件??????????12??2018-12-02?15:16??viedoplayer\MolCS_Client\.gitignore
?????目錄???????????0??2018-12-03?11:55??viedoplayer\MolCS_Client\.vs\
?????目錄???????????0??2018-12-03?11:55??viedoplayer\MolCS_Client\.vs\Oraycn.MCaptureDemo\
?????目錄???????????0??2018-12-03?11:55??viedoplayer\MolCS_Client\.vs\Oraycn.MCaptureDemo\v15\
?????文件??????142848??2018-12-03?11:54??viedoplayer\MolCS_Client\.vs\Oraycn.MCaptureDemo\v15\.suo
?????目錄???????????0??2018-12-03?11:55??viedoplayer\MolCS_Client\.vs\Oraycn.MCaptureDemo\v15\Server\
?????目錄???????????0??2018-12-03?11:55??viedoplayer\MolCS_Client\.vs\Oraycn.MCaptureDemo\v15\Server\sqlite3\
?????文件???????????0??2018-11-29?18:05??viedoplayer\MolCS_Client\.vs\Oraycn.MCaptureDemo\v15\Server\sqlite3\db.lock
?????文件?????1093632??2018-12-01?15:10??viedoplayer\MolCS_Client\.vs\Oraycn.MCaptureDemo\v15\Server\sqlite3\storage.ide
?????文件???????32768??2018-12-03?09:39??viedoplayer\MolCS_Client\.vs\Oraycn.MCaptureDemo\v15\Server\sqlite3\storage.ide-shm
?????文件?????4140632??2018-12-02?15:36??viedoplayer\MolCS_Client\.vs\Oraycn.MCaptureDemo\v15\Server\sqlite3\storage.ide-wal
?????目錄???????????0??2018-12-03?11:55??viedoplayer\MolCS_Client\.vs\Oraycn.MCaptureDemo\v15\sqlite3\
?????文件?????1261568??2018-12-02?15:16??viedoplayer\MolCS_Client\.vs\Oraycn.MCaptureDemo\v15\sqlite3\storage.ide
?????文件?????????762??2018-12-02?15:24??viedoplayer\MolCS_Client\app.config
?????目錄???????????0??2018-12-03?11:55??viedoplayer\MolCS_Client\bin\
?????目錄???????????0??2018-12-03?11:55??viedoplayer\MolCS_Client\bin\Debug\
?????文件??????435712??2018-11-29?18:13??viedoplayer\MolCS_Client\bin\Debug\ESBasic.dll
?????文件??????215220??2018-11-29?18:13??viedoplayer\MolCS_Client\bin\Debug\ESBasic.xml
?????目錄???????????0??2018-12-03?11:55??viedoplayer\MolCS_Client\bin\Debug\Log\
?????文件??????290816??2017-12-06?18:22??viedoplayer\MolCS_Client\bin\Debug\log4net.dll
?????文件?????????138??2018-12-02?15:27??viedoplayer\MolCS_Client\bin\Debug\Log\2018-12-02_WGongXH_DEBUG.log
?????文件???????46592??2018-12-02?15:30??viedoplayer\MolCS_Client\bin\Debug\MCaptureDemo.exe
?????文件?????????762??2018-12-02?15:24??viedoplayer\MolCS_Client\bin\Debug\MCaptureDemo.exe.config
?????文件??????126464??2018-12-02?15:30??viedoplayer\MolCS_Client\bin\Debug\MCaptureDemo.pdb
?????文件??????662528??2018-11-29?18:13??viedoplayer\MolCS_Client\bin\Debug\Newtonsoft.Json.dll
?????文件??????684778??2018-11-29?18:13??viedoplayer\MolCS_Client\bin\Debug\Newtonsoft.Json.xml
?????文件?????1226752??2018-11-29?18:13??viedoplayer\MolCS_Client\bin\Debug\Oraycn.MCapture.dll
?????文件?????1026906??2018-11-29?18:13??viedoplayer\MolCS_Client\bin\Debug\Oraycn.MCapture.xml
?????文件???????40448??2017-12-06?17:42??viedoplayer\MolCS_Client\bin\Debug\SuperSocket.Common.dll
............此處省略210個文件信息

評論

共有 條評論