├── 1.png ├── GFFClient ├── Emotion │ ├── 1.gif │ ├── 2.gif │ ├── 3.gif │ ├── 4.gif │ ├── 5.gif │ ├── 6.gif │ ├── 7.gif │ ├── 8.gif │ ├── 9.gif │ ├── 10.gif │ ├── 100.gif │ ├── 101.gif │ ├── 102.gif │ ├── 103.gif │ ├── 104.gif │ ├── 105.gif │ ├── 106.gif │ ├── 107.gif │ ├── 108.gif │ ├── 109.gif │ ├── 11.gif │ ├── 110.gif │ ├── 111.gif │ ├── 112.gif │ ├── 113.gif │ ├── 114.gif │ ├── 115.gif │ ├── 116.gif │ ├── 117.gif │ ├── 118.gif │ ├── 119.gif │ ├── 12.gif │ ├── 120.gif │ ├── 121.gif │ ├── 122.gif │ ├── 123.gif │ ├── 124.gif │ ├── 125.gif │ ├── 126.gif │ ├── 127.gif │ ├── 128.gif │ ├── 129.gif │ ├── 13.gif │ ├── 130.gif │ ├── 131.gif │ ├── 132.gif │ ├── 133.gif │ ├── 134.gif │ ├── 135.gif │ ├── 14.gif │ ├── 15.gif │ ├── 16.gif │ ├── 17.gif │ ├── 18.gif │ ├── 19.gif │ ├── 20.gif │ ├── 21.gif │ ├── 22.gif │ ├── 23.gif │ ├── 24.gif │ ├── 25.gif │ ├── 26.gif │ ├── 27.gif │ ├── 28.gif │ ├── 29.gif │ ├── 30.gif │ ├── 31.gif │ ├── 32.gif │ ├── 33.gif │ ├── 34.gif │ ├── 35.gif │ ├── 36.gif │ ├── 37.gif │ ├── 38.gif │ ├── 39.gif │ ├── 40.gif │ ├── 41.gif │ ├── 42.gif │ ├── 43.gif │ ├── 44.gif │ ├── 45.gif │ ├── 46.gif │ ├── 47.gif │ ├── 48.gif │ ├── 49.gif │ ├── 50.gif │ ├── 51.gif │ ├── 52.gif │ ├── 53.gif │ ├── 54.gif │ ├── 55.gif │ ├── 56.gif │ ├── 57.gif │ ├── 58.gif │ ├── 59.gif │ ├── 60.gif │ ├── 61.gif │ ├── 62.gif │ ├── 63.gif │ ├── 64.gif │ ├── 65.gif │ ├── 66.gif │ ├── 67.gif │ ├── 68.gif │ ├── 69.gif │ ├── 70.gif │ ├── 71.gif │ ├── 72.gif │ ├── 73.gif │ ├── 74.gif │ ├── 75.gif │ ├── 76.gif │ ├── 77.gif │ ├── 78.gif │ ├── 79.gif │ ├── 80.gif │ ├── 81.gif │ ├── 82.gif │ ├── 83.gif │ ├── 84.gif │ ├── 85.gif │ ├── 86.gif │ ├── 87.gif │ ├── 88.gif │ ├── 89.gif │ ├── 90.gif │ ├── 91.gif │ ├── 92.gif │ ├── 93.gif │ ├── 94.gif │ ├── 95.gif │ ├── 96.gif │ ├── 97.gif │ ├── 98.gif │ └── 99.gif ├── favourite.ico ├── Dlls │ ├── CSkin.dll │ ├── Newtonsoft.Json.dll │ ├── Microsoft.DirectX.dll │ └── Microsoft.DirectX.DirectSound.dll ├── Resources │ ├── 4.png │ ├── file.jpg │ ├── noon.jpg │ ├── main_1.jpg │ ├── main_2.jpg │ ├── main_3.jpg │ ├── main_4.jpg │ ├── main_5.jpg │ ├── main_6.jpg │ ├── main_7.jpg │ ├── night.jpg │ ├── afternoon.jpg │ ├── btn_Down.png │ ├── btn_Mouse.png │ ├── btn_norml.png │ ├── morning.jpg │ ├── set_icon.png │ ├── BackPalace.png │ ├── BackPalace1.png │ ├── allbtn_down.png │ ├── ShadowPalace.png │ ├── Full_close_down.PNG │ ├── Full_close_hover.PNG │ ├── aio_head_normal.png │ ├── aio_setting_down.png │ ├── allbtn_highlight.png │ ├── icon_close_down.png │ ├── icon_close_hover.png │ ├── menu_btn_normal.png │ ├── sysbtn_max_down.png │ ├── sysbtn_max_hover.png │ ├── sysbtn_min_down.png │ ├── sysbtn_min_hover.png │ ├── Full_close_normal.PNG │ ├── aio_setting_hover.png │ ├── aio_setting_normal.png │ ├── icon_close_normal.png │ ├── menu_btn_highlight.png │ ├── sysbtn_close_down.png │ ├── sysbtn_close_hover.png │ ├── sysbtn_close_normal.png │ ├── sysbtn_max_normal.png │ ├── sysbtn_min_normal.png │ ├── sysbtn_restore_down.png │ ├── sysbtn_restore_hover.png │ ├── sysbtn_restore_normal.png │ ├── aio_setting_white_down.png │ ├── aio_setting_white_hover.png │ └── aio_setting_white_normal.png ├── Properties │ ├── Settings.settings │ ├── AssemblyInfo.cs │ └── Settings.Designer.cs ├── Program.cs ├── packages.config ├── InitForm.cs ├── app.config ├── FriendHelper.cs └── MessageHelper.cs ├── GFFServer ├── favicon.ico ├── Properties │ └── AssemblyInfo.cs ├── Controllers │ └── FileController.cs ├── packages.config ├── App.config ├── Program.cs └── GFFServerSC.csproj ├── GFF.Component ├── Resources │ ├── ok.png │ ├── arrow.png │ ├── brush.png │ ├── close.png │ ├── color.bmp │ ├── large.png │ ├── none.png │ ├── out.png │ ├── rect.png │ ├── save.png │ ├── small.png │ ├── text.png │ ├── cancel.png │ ├── ellips.png │ ├── middle.png │ ├── microphone.png │ └── separator.png ├── Capture │ ├── ScreenCapture.cs │ ├── ToolButtonDesigner.cs │ ├── ToolButton.designer.cs │ ├── ImageProcessBox.designer.cs │ ├── ColorBox.designer.cs │ ├── FrmSize.cs │ ├── FrmSize.designer.cs │ ├── ColorBox.cs │ └── ToolButton.cs ├── ChatBox │ ├── Internals │ │ ├── CHARRANGE.cs │ │ ├── GETCLIPBOARDDATAFLAGS.cs │ │ ├── GETOBJECTOPTIONS.cs │ │ ├── STATDATA.cs │ │ ├── STGMEDIUM.cs │ │ ├── FORMATETC.cs │ │ ├── DVASPECT.cs │ │ ├── TYMED.cs │ │ ├── tagOLEVERB.cs │ │ ├── ISequentialStream.cs │ │ ├── tagLOGPALETTE.cs │ │ ├── STGM.cs │ │ ├── IEnumSTATSTG.cs │ │ ├── CLIPFORMAT.cs │ │ ├── COMRECT.cs │ │ ├── IAdviseSink.cs │ │ ├── IEnumSTATDATA.cs │ │ ├── IOleContainer.cs │ │ ├── IEnumOLEVERB.cs │ │ ├── REOBJECT.cs │ │ ├── IEnumFORMATETC.cs │ │ ├── REOOBJECTFLAGS.cs │ │ ├── ILockBytes.cs │ │ ├── IOleClientSite.cs │ │ ├── IStream.cs │ │ ├── NativeMethods.cs │ │ ├── IDataObject.cs │ │ ├── IRichEditOle.cs │ │ ├── IStorge.cs │ │ └── IOleObject.cs │ ├── ImageForm.cs │ ├── ImageForm.designer.cs │ └── ChatBoxContent.cs ├── Properties │ └── AssemblyInfo.cs ├── packages.config ├── Config │ ├── ClientConfig.cs │ └── ServerConfig.cs ├── app.config └── Emotion │ ├── ImageEntity.cs │ └── EmotionForm.designer.cs ├── README.md ├── GFF.Model ├── packages.config ├── Properties │ └── AssemblyInfo.cs ├── Interface │ └── IMessage.cs ├── Enum │ ├── MessageProtocalEnum.cs │ ├── VideoSizeModel.cs │ └── TransmitType.cs └── Entity │ ├── Message.cs │ ├── VideoSize.cs │ └── VideoCapturerSize.cs ├── GFF.Helper ├── packages.config ├── CbGeneric.cs ├── Properties │ └── AssemblyInfo.cs ├── ByteHelper.cs ├── Extention │ └── ExtentionHelper.cs ├── CircleCache.cs ├── VibrationHelper.cs ├── Win32 │ └── SendMessageClass.cs ├── MutiThreadHelper.cs ├── FunHelper.cs ├── GlobalResourceManager.cs └── DataBuffer.cs └── GFF.sln /1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/1.png -------------------------------------------------------------------------------- /GFFClient/Emotion/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/1.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/2.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/3.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/4.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/5.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/6.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/7.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/8.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/9.gif -------------------------------------------------------------------------------- /GFFClient/favourite.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/favourite.ico -------------------------------------------------------------------------------- /GFFServer/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFServer/favicon.ico -------------------------------------------------------------------------------- /GFFClient/Dlls/CSkin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Dlls/CSkin.dll -------------------------------------------------------------------------------- /GFFClient/Emotion/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/10.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/100.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/100.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/101.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/101.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/102.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/102.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/103.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/103.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/104.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/104.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/105.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/105.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/106.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/106.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/107.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/107.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/108.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/108.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/109.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/109.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/11.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/110.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/110.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/111.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/111.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/112.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/112.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/113.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/113.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/114.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/114.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/115.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/115.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/116.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/116.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/117.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/117.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/118.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/118.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/119.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/119.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/12.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/120.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/120.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/121.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/121.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/122.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/122.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/123.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/123.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/124.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/124.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/125.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/125.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/126.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/126.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/127.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/127.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/128.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/128.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/129.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/129.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/13.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/130.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/130.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/131.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/131.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/132.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/132.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/133.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/133.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/134.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/134.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/135.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/135.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/14.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/15.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/16.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/17.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/18.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/19.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/20.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/21.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/22.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/23.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/24.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/25.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/26.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/27.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/28.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/29.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/30.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/31.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/32.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/33.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/34.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/35.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/36.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/37.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/38.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/39.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/40.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/41.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/42.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/43.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/44.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/45.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/46.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/47.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/48.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/49.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/50.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/51.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/52.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/53.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/54.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/55.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/56.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/57.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/58.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/59.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/60.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/61.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/62.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/63.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/64.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/65.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/66.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/67.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/68.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/69.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/70.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/71.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/72.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/72.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/73.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/73.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/74.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/74.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/75.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/75.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/76.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/76.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/77.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/77.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/78.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/78.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/79.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/79.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/80.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/80.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/81.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/81.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/82.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/82.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/83.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/83.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/84.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/84.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/85.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/85.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/86.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/86.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/87.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/87.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/88.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/88.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/89.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/89.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/90.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/90.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/91.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/91.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/92.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/92.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/93.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/93.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/94.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/94.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/95.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/95.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/96.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/96.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/97.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/97.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/98.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/98.gif -------------------------------------------------------------------------------- /GFFClient/Emotion/99.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Emotion/99.gif -------------------------------------------------------------------------------- /GFFClient/Resources/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/4.png -------------------------------------------------------------------------------- /GFFClient/Resources/file.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/file.jpg -------------------------------------------------------------------------------- /GFFClient/Resources/noon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/noon.jpg -------------------------------------------------------------------------------- /GFF.Component/Resources/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/ok.png -------------------------------------------------------------------------------- /GFFClient/Resources/main_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/main_1.jpg -------------------------------------------------------------------------------- /GFFClient/Resources/main_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/main_2.jpg -------------------------------------------------------------------------------- /GFFClient/Resources/main_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/main_3.jpg -------------------------------------------------------------------------------- /GFFClient/Resources/main_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/main_4.jpg -------------------------------------------------------------------------------- /GFFClient/Resources/main_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/main_5.jpg -------------------------------------------------------------------------------- /GFFClient/Resources/main_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/main_6.jpg -------------------------------------------------------------------------------- /GFFClient/Resources/main_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/main_7.jpg -------------------------------------------------------------------------------- /GFFClient/Resources/night.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/night.jpg -------------------------------------------------------------------------------- /GFF.Component/Resources/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/arrow.png -------------------------------------------------------------------------------- /GFF.Component/Resources/brush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/brush.png -------------------------------------------------------------------------------- /GFF.Component/Resources/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/close.png -------------------------------------------------------------------------------- /GFF.Component/Resources/color.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/color.bmp -------------------------------------------------------------------------------- /GFF.Component/Resources/large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/large.png -------------------------------------------------------------------------------- /GFF.Component/Resources/none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/none.png -------------------------------------------------------------------------------- /GFF.Component/Resources/out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/out.png -------------------------------------------------------------------------------- /GFF.Component/Resources/rect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/rect.png -------------------------------------------------------------------------------- /GFF.Component/Resources/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/save.png -------------------------------------------------------------------------------- /GFF.Component/Resources/small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/small.png -------------------------------------------------------------------------------- /GFF.Component/Resources/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/text.png -------------------------------------------------------------------------------- /GFFClient/Resources/afternoon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/afternoon.jpg -------------------------------------------------------------------------------- /GFFClient/Resources/btn_Down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/btn_Down.png -------------------------------------------------------------------------------- /GFFClient/Resources/btn_Mouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/btn_Mouse.png -------------------------------------------------------------------------------- /GFFClient/Resources/btn_norml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/btn_norml.png -------------------------------------------------------------------------------- /GFFClient/Resources/morning.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/morning.jpg -------------------------------------------------------------------------------- /GFFClient/Resources/set_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/set_icon.png -------------------------------------------------------------------------------- /GFF.Component/Resources/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/cancel.png -------------------------------------------------------------------------------- /GFF.Component/Resources/ellips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/ellips.png -------------------------------------------------------------------------------- /GFF.Component/Resources/middle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/middle.png -------------------------------------------------------------------------------- /GFFClient/Dlls/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Dlls/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /GFFClient/Resources/BackPalace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/BackPalace.png -------------------------------------------------------------------------------- /GFFClient/Resources/BackPalace1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/BackPalace1.png -------------------------------------------------------------------------------- /GFFClient/Resources/allbtn_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/allbtn_down.png -------------------------------------------------------------------------------- /GFF.Component/Resources/microphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/microphone.png -------------------------------------------------------------------------------- /GFF.Component/Resources/separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFF.Component/Resources/separator.png -------------------------------------------------------------------------------- /GFFClient/Dlls/Microsoft.DirectX.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Dlls/Microsoft.DirectX.dll -------------------------------------------------------------------------------- /GFFClient/Resources/ShadowPalace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/ShadowPalace.png -------------------------------------------------------------------------------- /GFFClient/Resources/Full_close_down.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/Full_close_down.PNG -------------------------------------------------------------------------------- /GFFClient/Resources/Full_close_hover.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/Full_close_hover.PNG -------------------------------------------------------------------------------- /GFFClient/Resources/aio_head_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/aio_head_normal.png -------------------------------------------------------------------------------- /GFFClient/Resources/aio_setting_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/aio_setting_down.png -------------------------------------------------------------------------------- /GFFClient/Resources/allbtn_highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/allbtn_highlight.png -------------------------------------------------------------------------------- /GFFClient/Resources/icon_close_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/icon_close_down.png -------------------------------------------------------------------------------- /GFFClient/Resources/icon_close_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/icon_close_hover.png -------------------------------------------------------------------------------- /GFFClient/Resources/menu_btn_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/menu_btn_normal.png -------------------------------------------------------------------------------- /GFFClient/Resources/sysbtn_max_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/sysbtn_max_down.png -------------------------------------------------------------------------------- /GFFClient/Resources/sysbtn_max_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/sysbtn_max_hover.png -------------------------------------------------------------------------------- /GFFClient/Resources/sysbtn_min_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/sysbtn_min_down.png -------------------------------------------------------------------------------- /GFFClient/Resources/sysbtn_min_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/sysbtn_min_hover.png -------------------------------------------------------------------------------- /GFFClient/Resources/Full_close_normal.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/Full_close_normal.PNG -------------------------------------------------------------------------------- /GFFClient/Resources/aio_setting_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/aio_setting_hover.png -------------------------------------------------------------------------------- /GFFClient/Resources/aio_setting_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/aio_setting_normal.png -------------------------------------------------------------------------------- /GFFClient/Resources/icon_close_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/icon_close_normal.png -------------------------------------------------------------------------------- /GFFClient/Resources/menu_btn_highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/menu_btn_highlight.png -------------------------------------------------------------------------------- /GFFClient/Resources/sysbtn_close_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/sysbtn_close_down.png -------------------------------------------------------------------------------- /GFFClient/Resources/sysbtn_close_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/sysbtn_close_hover.png -------------------------------------------------------------------------------- /GFFClient/Resources/sysbtn_close_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/sysbtn_close_normal.png -------------------------------------------------------------------------------- /GFFClient/Resources/sysbtn_max_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/sysbtn_max_normal.png -------------------------------------------------------------------------------- /GFFClient/Resources/sysbtn_min_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/sysbtn_min_normal.png -------------------------------------------------------------------------------- /GFFClient/Resources/sysbtn_restore_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/sysbtn_restore_down.png -------------------------------------------------------------------------------- /GFFClient/Resources/sysbtn_restore_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/sysbtn_restore_hover.png -------------------------------------------------------------------------------- /GFFClient/Resources/sysbtn_restore_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/sysbtn_restore_normal.png -------------------------------------------------------------------------------- /GFFClient/Dlls/Microsoft.DirectX.DirectSound.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Dlls/Microsoft.DirectX.DirectSound.dll -------------------------------------------------------------------------------- /GFFClient/Resources/aio_setting_white_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/aio_setting_white_down.png -------------------------------------------------------------------------------- /GFFClient/Resources/aio_setting_white_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/aio_setting_white_hover.png -------------------------------------------------------------------------------- /GFFClient/Resources/aio_setting_white_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yswenli/GFF/HEAD/GFFClient/Resources/aio_setting_white_normal.png -------------------------------------------------------------------------------- /GFF.Component/Capture/ScreenCapture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace GFF.Component.Capture 6 | { 7 | public class ScreenCapture 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /GFFClient/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/CHARRANGE.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [StructLayout(LayoutKind.Sequential)] 9 | public struct CHARRANGE 10 | { 11 | public int cpMin; 12 | public int cpMax; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/GETCLIPBOARDDATAFLAGS.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace GFF.Component.ChatBox.Internals 6 | { 7 | public enum GETCLIPBOARDDATAFLAGS 8 | { 9 | RECO_PASTE = 0, 10 | RECO_DROP = 1, 11 | RECO_COPY = 2, 12 | RECO_CUT = 3, 13 | RECO_DRAG = 4 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/GETOBJECTOPTIONS.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace GFF.Component.ChatBox.Internals 6 | { 7 | public enum GETOBJECTOPTIONS 8 | { 9 | REO_GETOBJ_NO_INTERFACES = 0x00000000, 10 | REO_GETOBJ_POLEOBJ = 0x00000001, 11 | REO_GETOBJ_PSTG = 0x00000002, 12 | REO_GETOBJ_POLESITE = 0x00000004, 13 | REO_GETOBJ_ALL_INTERFACES = 0x00000007, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/STATDATA.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComVisible(false), StructLayout(LayoutKind.Sequential)] 9 | public sealed class STATDATA 10 | { 11 | 12 | [MarshalAs(UnmanagedType.U4)] 13 | public int advf; 14 | [MarshalAs(UnmanagedType.U4)] 15 | public int dwConnection; 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/STGMEDIUM.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [StructLayout(LayoutKind.Sequential), ComVisible(false)] 9 | public struct STGMEDIUM 10 | { 11 | //[MarshalAs(UnmanagedType.I4)] 12 | public int tymed; 13 | public IntPtr unionmember; 14 | public IntPtr pUnkForRelease; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/FORMATETC.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [StructLayout(LayoutKind.Sequential), ComVisible(false)] 9 | public struct FORMATETC 10 | { 11 | public CLIPFORMAT cfFormat; 12 | public IntPtr ptd; 13 | public DVASPECT dwAspect; 14 | public int lindex; 15 | public TYMED tymed; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/DVASPECT.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [Flags, ComVisible(false)] 9 | public enum DVASPECT : int 10 | { 11 | DVASPECT_CONTENT = 1, 12 | DVASPECT_THUMBNAIL = 2, 13 | DVASPECT_ICON = 4, 14 | DVASPECT_DOCPRINT = 8, 15 | DVASPECT_OPAQUE = 16, 16 | DVASPECT_TRANSPARENT = 32, 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/TYMED.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [Flags, ComVisible(false)] 9 | public enum TYMED : int 10 | { 11 | TYMED_NULL = 0, 12 | TYMED_HGLOBAL = 1, 13 | TYMED_FILE = 2, 14 | TYMED_ISTREAM = 4, 15 | TYMED_ISTORAGE = 8, 16 | TYMED_GDI = 16, 17 | TYMED_MFPICT = 32, 18 | TYMED_ENHMF = 64, 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GFF 2 | GFF is a imitation QQ communication project, based on SAEA.MessageSocket、SAEA.Http、SAEA.MVC. 3 | 4 | GFF是仿QQ通信项目,通信基于SAEA.MessageSocket、SAEA.Http、SAEA.MVC实现的。 5 | 6 | QQ群:788260487 7 | 8 | SAEA github地址:https://github.com/yswenli/SAEA 9 | 10 | [![GitHub release](https://img.shields.io/github/release/yswenli/gff.svg)](https://github.com/yswenli/GFF/releases) 11 | 12 | nuget url: https://www.nuget.org/packages?q=saea 13 | 14 | GFF详细介绍:https://www.cnblogs.com/yswenli/p/6274526.html 15 | 16 | ### 运行实例截图 17 | 18 | GFF 19 | 20 | 21 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/tagOLEVERB.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComVisible(false), StructLayout(LayoutKind.Sequential)] 9 | public sealed class tagOLEVERB 10 | { 11 | [MarshalAs(UnmanagedType.I4)] 12 | public int lVerb; 13 | 14 | [MarshalAs(UnmanagedType.LPWStr)] 15 | public String lpszVerbName; 16 | 17 | [MarshalAs(UnmanagedType.U4)] 18 | public int fuFlags; 19 | 20 | [MarshalAs(UnmanagedType.U4)] 21 | public int grfAttribs; 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /GFF.Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/ISequentialStream.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown), 9 | Guid("0c733a30-2a1c-11ce-ade5-00aa0044773d")] 10 | public interface ISequentialStream 11 | { 12 | int Read( 13 | /* [length_is][size_is][out] */ IntPtr pv, 14 | /* [in] */ uint cb, 15 | /* [out] */ out uint pcbRead); 16 | 17 | int Write( 18 | /* [size_is][in] */ IntPtr pv, 19 | /* [in] */ uint cb, 20 | /* [out] */ out uint pcbWritten); 21 | 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/tagLOGPALETTE.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComVisible(false), StructLayout(LayoutKind.Sequential)] 9 | public sealed class tagLOGPALETTE 10 | { 11 | [MarshalAs(UnmanagedType.U2)/*leftover(offset=0, palVersion)*/] 12 | public short palVersion; 13 | 14 | [MarshalAs(UnmanagedType.U2)/*leftover(offset=2, palNumEntries)*/] 15 | public short palNumEntries; 16 | 17 | // UNMAPPABLE: palPalEntry: Cannot be used as a structure field. 18 | // /** @com.structmap(UNMAPPABLE palPalEntry) */ 19 | // public UNMAPPABLE palPalEntry; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /GFF.Helper/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /GFF.Component/Capture/ToolButtonDesigner.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | using System.Windows.Forms.Design; 6 | using System.Drawing; 7 | 8 | namespace GFF.Component.Capture 9 | { 10 | public class ToolButtonDesigner : ControlDesigner 11 | { 12 | protected override void OnPaintAdornments(System.Windows.Forms.PaintEventArgs pe) { 13 | Pen p = new Pen(Color.SteelBlue, 1); 14 | p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; 15 | pe.Graphics.DrawRectangle(p, 0, 0, pe.ClipRectangle.Width - 1, 20); 16 | p.Dispose(); 17 | base.OnPaintAdornments(pe); 18 | } 19 | 20 | public override SelectionRules SelectionRules { 21 | get { 22 | return base.SelectionRules & ~SelectionRules.AllSizeable; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/STGM.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [Flags, ComVisible(false)] 9 | public enum STGM : int 10 | { 11 | STGM_DIRECT = 0x0, 12 | STGM_TRANSACTED = 0x10000, 13 | STGM_SIMPLE = 0x8000000, 14 | STGM_READ = 0x0, 15 | STGM_WRITE = 0x1, 16 | STGM_READWRITE = 0x2, 17 | STGM_SHARE_DENY_NONE = 0x40, 18 | STGM_SHARE_DENY_READ = 0x30, 19 | STGM_SHARE_DENY_WRITE = 0x20, 20 | STGM_SHARE_EXCLUSIVE = 0x10, 21 | STGM_PRIORITY = 0x40000, 22 | STGM_DELETEONRELEASE = 0x4000000, 23 | STGM_NOSCRATCH = 0x100000, 24 | STGM_CREATE = 0x1000, 25 | STGM_CONVERT = 0x20000, 26 | STGM_FAILIFTHERE = 0x0, 27 | STGM_NOSNAPSHOT = 0x200000, 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/IEnumSTATSTG.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComImport] 9 | [Guid("0000000d-0000-0000-C000-000000000046")] 10 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] 11 | public interface IEnumSTATSTG 12 | { 13 | // The user needs to allocate an STATSTG array whose size is celt. 14 | [PreserveSig] 15 | uint 16 | Next( 17 | uint celt, 18 | [MarshalAs(UnmanagedType.LPArray), Out] 19 | System.Runtime.InteropServices.ComTypes.STATSTG[] rgelt, 20 | out uint pceltFetched 21 | ); 22 | 23 | void Skip(uint celt); 24 | 25 | void Reset(); 26 | 27 | [return: MarshalAs(UnmanagedType.Interface)] 28 | IEnumSTATSTG Clone(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/CLIPFORMAT.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComVisible(false)] 9 | public enum CLIPFORMAT : int 10 | { 11 | CF_TEXT = 1, 12 | CF_BITMAP = 2, 13 | CF_METAFILEPICT = 3, 14 | CF_SYLK = 4, 15 | CF_DIF = 5, 16 | CF_TIFF = 6, 17 | CF_OEMTEXT = 7, 18 | CF_DIB = 8, 19 | CF_PALETTE = 9, 20 | CF_PENDATA = 10, 21 | CF_RIFF = 11, 22 | CF_WAVE = 12, 23 | CF_UNICODETEXT = 13, 24 | CF_ENHMETAFILE = 14, 25 | CF_HDROP = 15, 26 | CF_LOCALE = 16, 27 | CF_MAX = 17, 28 | CF_OWNERDISPLAY = 0x80, 29 | CF_DSPTEXT = 0x81, 30 | CF_DSPBITMAP = 0x82, 31 | CF_DSPMETAFILEPICT = 0x83, 32 | CF_DSPENHMETAFILE = 0x8E, 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/COMRECT.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComVisible(true), 9 | StructLayout(LayoutKind.Sequential)] 10 | public class COMRECT 11 | { 12 | public int left; 13 | public int top; 14 | public int right; 15 | public int bottom; 16 | 17 | public COMRECT() 18 | { 19 | } 20 | 21 | public COMRECT(int left, int top, int right, int bottom) 22 | { 23 | this.left = left; 24 | this.top = top; 25 | this.right = right; 26 | this.bottom = bottom; 27 | } 28 | 29 | public static COMRECT FromXYWH(int x, int y, int width, int height) 30 | { 31 | return new COMRECT(x, y, x + width, y + height); 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/IAdviseSink.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComVisible(true), 9 | Guid("0000010F-0000-0000-C000-000000000046"), 10 | InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] 11 | public interface IAdviseSink 12 | { 13 | 14 | //C#r: UNDONE (Field in interface) public static readonly Guid iid; 15 | void OnDataChange( 16 | [In] 17 | FORMATETC pFormatetc, 18 | [In] 19 | STGMEDIUM pStgmed); 20 | 21 | void OnViewChange( 22 | [In, MarshalAs(UnmanagedType.U4)] 23 | int dwAspect, 24 | [In, MarshalAs(UnmanagedType.I4)] 25 | int lindex); 26 | 27 | void OnRename( 28 | [In, MarshalAs(UnmanagedType.Interface)] 29 | object pmk); 30 | 31 | void OnSave(); 32 | 33 | 34 | void OnClose(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /GFF.Helper/CbGeneric.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归@wenli所有,All Rights Reserved (C) 2015-2017 3 | ***************************************************************************************************** 4 | * CLR版本:4.0.30319.42000 5 | * 唯一标识:ceb33349-e711-4855-91b7-23e71ede2da4 6 | * 机器名称:WENLI-PC 7 | * 联系人邮箱:wenguoli_520@qq.com 8 | ***************************************************************************************************** 9 | * 项目名称:$projectname$ 10 | * 命名空间:GFF.Helper 11 | * 类名称:CbGeneric 12 | * 创建时间:2017/2/20 16:01:53 13 | * 创建人:wenli 14 | * 创建说明: 15 | *****************************************************************************************************/ 16 | using System; 17 | using System.Collections.Generic; 18 | using System.Linq; 19 | using System.Text; 20 | 21 | namespace GFF.Helper 22 | { 23 | public delegate void CbGeneric(T obj); 24 | 25 | public delegate void CbGeneric(T1 obj1, T2 obj2); 26 | } 27 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/IEnumSTATDATA.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComVisible(true), 9 | Guid("00000105-0000-0000-C000-000000000046"), 10 | InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] 11 | public interface IEnumSTATDATA 12 | { 13 | 14 | //C#r: UNDONE (Field in interface) public static readonly Guid iid; 15 | 16 | void Next( 17 | [In, MarshalAs(UnmanagedType.U4)] 18 | int celt, 19 | [Out] 20 | STATDATA rgelt, 21 | [Out, MarshalAs(UnmanagedType.LPArray)] 22 | int[] pceltFetched); 23 | 24 | 25 | void Skip( 26 | [In, MarshalAs(UnmanagedType.U4)] 27 | int celt); 28 | 29 | 30 | void Reset(); 31 | 32 | 33 | void Clone( 34 | [Out, MarshalAs(UnmanagedType.LPArray)] 35 | IEnumSTATDATA[] ppenum); 36 | 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/IOleContainer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComVisible(true), 9 | Guid("0000011B-0000-0000-C000-000000000046"), 10 | InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] 11 | public interface IOleContainer 12 | { 13 | void ParseDisplayName( 14 | [In, MarshalAs(UnmanagedType.Interface)] object pbc, 15 | [In, MarshalAs(UnmanagedType.BStr)] string pszDisplayName, 16 | [Out, MarshalAs(UnmanagedType.LPArray)] int[] pchEaten, 17 | [Out, MarshalAs(UnmanagedType.LPArray)] object[] ppmkOut); 18 | 19 | void EnumObjects( 20 | [In, MarshalAs(UnmanagedType.U4)] int grfFlags, 21 | [Out, MarshalAs(UnmanagedType.LPArray)] object[] ppenum); 22 | 23 | void LockContainer( 24 | [In, MarshalAs(UnmanagedType.I4)] int fLock); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/IEnumOLEVERB.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComVisible(true), 9 | ComImport(), 10 | Guid("00000104-0000-0000-C000-000000000046"), 11 | InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] 12 | public interface IEnumOLEVERB 13 | { 14 | 15 | [return: MarshalAs(UnmanagedType.I4)] 16 | [PreserveSig] 17 | int Next( 18 | [MarshalAs(UnmanagedType.U4)] 19 | int celt, 20 | [Out] 21 | tagOLEVERB rgelt, 22 | [Out, MarshalAs(UnmanagedType.LPArray)] 23 | int[] pceltFetched); 24 | 25 | [return: MarshalAs(UnmanagedType.I4)] 26 | [PreserveSig] 27 | int Skip( 28 | [In, MarshalAs(UnmanagedType.U4)] 29 | int celt); 30 | 31 | void Reset(); 32 | 33 | 34 | void Clone( 35 | out IEnumOLEVERB ppenum); 36 | 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /GFF.Helper/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // 有关程序集的一般信息由以下 5 | // 控制。更改这些特性值可修改 6 | // 与程序集关联的信息。 7 | 8 | [assembly: AssemblyTitle("GFF.Helper")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("wenli")] 12 | [assembly: AssemblyProduct("GFF.Helper")] 13 | [assembly: AssemblyCopyright("Copyright © wenli 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | //将 ComVisible 设置为 false 将使此程序集中的类型 18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | 21 | [assembly: ComVisible(false)] 22 | 23 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 24 | 25 | [assembly: Guid("9293b703-cfed-4072-93ed-65bac837d1ae")] 26 | 27 | // 程序集的版本信息由下列四个值组成: 28 | // 29 | // 主版本 30 | // 次版本 31 | // 生成号 32 | // 修订号 33 | // 34 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 35 | // 方法是按如下所示使用“*”: : 36 | // [assembly: AssemblyVersion("1.0.*")] 37 | 38 | [assembly: AssemblyVersion("2.0.0.0")] 39 | [assembly: AssemblyFileVersion("2.0.0.0")] -------------------------------------------------------------------------------- /GFF.Model/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // 有关程序集的一般信息由以下 5 | // 控制。更改这些特性值可修改 6 | // 与程序集关联的信息。 7 | 8 | [assembly: AssemblyTitle("GFF.Model")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("wenli")] 12 | [assembly: AssemblyProduct("GFF.Model")] 13 | [assembly: AssemblyCopyright("Copyright © wenli 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | //将 ComVisible 设置为 false 将使此程序集中的类型 18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | 21 | [assembly: ComVisible(false)] 22 | 23 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 24 | 25 | [assembly: Guid("7e4f864a-ac23-49e5-a9df-fd57ba1c58ed")] 26 | 27 | // 程序集的版本信息由下列四个值组成: 28 | // 29 | // 主版本 30 | // 次版本 31 | // 生成号 32 | // 修订号 33 | // 34 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 35 | // 方法是按如下所示使用“*”: : 36 | // [assembly: AssemblyVersion("1.0.*")] 37 | 38 | [assembly: AssemblyVersion("2.0.0.0")] 39 | [assembly: AssemblyFileVersion("2.0.0.0")] -------------------------------------------------------------------------------- /GFFClient/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // 有关程序集的一般信息由以下 5 | // 控制。更改这些特性值可修改 6 | // 与程序集关联的信息。 7 | 8 | [assembly: AssemblyTitle("GFFClient")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("wenli")] 12 | [assembly: AssemblyProduct("GFFClient")] 13 | [assembly: AssemblyCopyright("Copyright wenli © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | //将 ComVisible 设置为 false 将使此程序集中的类型 18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | 21 | [assembly: ComVisible(false)] 22 | 23 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 24 | 25 | [assembly: Guid("844b2a62-45b4-48c1-90d3-b8c563365dfd")] 26 | 27 | // 程序集的版本信息由下列四个值组成: 28 | // 29 | // 主版本 30 | // 次版本 31 | // 生成号 32 | // 修订号 33 | // 34 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 35 | // 方法是按如下所示使用“*”: : 36 | // [assembly: AssemblyVersion("1.0.*")] 37 | 38 | [assembly: AssemblyVersion("1.0.0.0")] 39 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /GFFServer/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // 有关程序集的一般信息由以下 5 | // 控制。更改这些特性值可修改 6 | // 与程序集关联的信息。 7 | 8 | [assembly: AssemblyTitle("GFFServer")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("yswenli")] 12 | [assembly: AssemblyProduct("GFFServer")] 13 | [assembly: AssemblyCopyright("Copyright wenli © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | //将 ComVisible 设置为 false 将使此程序集中的类型 18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | 21 | [assembly: ComVisible(false)] 22 | 23 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 24 | 25 | [assembly: Guid("dad5c70e-b99d-4afd-9fc6-b82924c4e452")] 26 | 27 | // 程序集的版本信息由下列四个值组成: 28 | // 29 | // 主版本 30 | // 次版本 31 | // 生成号 32 | // 修订号 33 | // 34 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 35 | // 方法是按如下所示使用“*”: : 36 | // [assembly: AssemblyVersion("1.0.*")] 37 | 38 | [assembly: AssemblyVersion("1.0.0.0")] 39 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /GFFClient/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace GFFClient.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /GFF.Model/Interface/IMessage.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:20da4241-0bdc-4a06-8793-6d0889c31f95 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:MCITest 12 | 13 | 14 | * 创建年份:2015 15 | * 创建时间:2015-12-02 11:15:24 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | 20 | namespace GFF.Model.InterFace 21 | { 22 | public interface IMessage 23 | { 24 | string Accepter { get; set; } 25 | 26 | byte Protocal { get; set; } 27 | 28 | byte[] Data { get; set; } 29 | 30 | string Sender { get; set; } 31 | 32 | long SendTick { get; set; } 33 | } 34 | } -------------------------------------------------------------------------------- /GFF.Component/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("GFF.Component")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("wenli")] 12 | [assembly: AssemblyProduct("GFF.Component")] 13 | [assembly: AssemblyCopyright("Copyright © wenli 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | //将 ComVisible 设置为 false 将使此程序集中的类型 18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("2771c51e-5e0f-4501-8e58-99ad70027c58")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: : 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("2.0.0.0")] 36 | [assembly: AssemblyFileVersion("2.0.0.0")] 37 | -------------------------------------------------------------------------------- /GFFServer/Controllers/FileController.cs: -------------------------------------------------------------------------------- 1 | using SAEA.MVC; 2 | using System.IO; 3 | 4 | namespace GFFServer.Controllers 5 | { 6 | /// 7 | /// 文件处理 8 | /// 9 | public class FileController : Controller 10 | { 11 | public ActionResult Test() 12 | { 13 | return Content("GFF File Server"); 14 | } 15 | 16 | [HttpPost] 17 | public ActionResult Upload() 18 | { 19 | var postFile = HttpContext.Current.Request.PostFiles[0]; 20 | 21 | var filePath = HttpContext.Current.Server.MapPath("/Files"); 22 | if (!Directory.Exists(filePath)) Directory.CreateDirectory(filePath); 23 | filePath = Path.Combine(filePath, postFile.FileName); 24 | postFile.Save(filePath); 25 | return Content("Download?fileName=" + postFile.FileName); 26 | } 27 | 28 | 29 | public ActionResult Download(string fileName) 30 | { 31 | var filePath = Path.Combine(HttpContext.Current.Server.MapPath("/Files"), fileName); 32 | return File(filePath); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /GFF.Model/Enum/MessageProtocalEnum.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:20da4241-0bdc-4a06-8793-6d0889c31f95 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:MCITest 12 | 13 | 14 | * 创建年份:2015 15 | * 创建时间:2015-12-02 11:15:24 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | 20 | namespace GFF.Model.Enum 21 | { 22 | public enum MessageProtocalEnum 23 | { 24 | Heart = 0, 25 | Login = 1, 26 | Logout = 2, 27 | Subscribe = 3, 28 | Unsubscribe = 4, 29 | PrivateMsg = 5, 30 | Message = 6, 31 | File=7, 32 | RLogin = 101, 33 | RSubscribe = 103 34 | } 35 | } -------------------------------------------------------------------------------- /GFF.Component/Capture/ToolButton.designer.cs: -------------------------------------------------------------------------------- 1 | namespace GFF.Component.Capture 2 | { 3 | partial class ToolButton 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) { 15 | if (disposing && (components != null)) { 16 | components.Dispose(); 17 | } 18 | base.Dispose(disposing); 19 | } 20 | 21 | #region Component Designer generated code 22 | 23 | /// 24 | /// Required method for Designer support - do not modify 25 | /// the contents of this method with the code editor. 26 | /// 27 | private void InitializeComponent() { 28 | components = new System.ComponentModel.Container(); 29 | } 30 | 31 | #endregion 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/REOBJECT.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | using System.Drawing; 6 | 7 | namespace GFF.Component.ChatBox.Internals 8 | { 9 | [StructLayout(LayoutKind.Sequential)] 10 | public class REOBJECT 11 | { 12 | public int cbStruct = Marshal.SizeOf(typeof(REOBJECT)); // Size of structure 13 | public int posistion; // Character position of object 14 | public Guid clsid; // Class ID of object 15 | public IntPtr poleobj; // OLE object interface 16 | public IStorage pstg; // Associated storage interface 17 | public IOleClientSite polesite; // Associated client site interface 18 | public Size sizel; // Size of object (may be 0,0) 19 | public uint dvAspect; // Display aspect to use 20 | public uint dwFlags; // Object status flags 21 | public uint dwUser; // Dword for user's use 22 | 23 | public override string ToString() 24 | { 25 | return string.Format("posistion:{0} ,tag:{1}" ,this.posistion,this.dwUser); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/IEnumFORMATETC.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComVisible(true), 9 | ComImport(), 10 | Guid("00000103-0000-0000-C000-000000000046"), 11 | InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] 12 | public interface IEnumFORMATETC 13 | { 14 | [return: MarshalAs(UnmanagedType.I4)] 15 | [PreserveSig] 16 | int Next( 17 | [In, MarshalAs(UnmanagedType.U4)] 18 | int celt, 19 | [Out] 20 | FORMATETC rgelt, 21 | [In, Out, MarshalAs(UnmanagedType.LPArray)] 22 | int[] pceltFetched); 23 | 24 | [return: MarshalAs(UnmanagedType.I4)] 25 | [PreserveSig] 26 | int Skip( 27 | [In, MarshalAs(UnmanagedType.U4)] 28 | int celt); 29 | 30 | [return: MarshalAs(UnmanagedType.I4)] 31 | [PreserveSig] 32 | int Reset(); 33 | 34 | [return: MarshalAs(UnmanagedType.I4)] 35 | [PreserveSig] 36 | int Clone( 37 | [Out, MarshalAs(UnmanagedType.LPArray)] 38 | IEnumFORMATETC[] ppenum); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /GFFClient/Program.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:20da4241-0bdc-4a06-8793-6d0889c31f95 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:MCITest 12 | 13 | 14 | * 创建年份:2015 15 | * 创建时间:2015-12-02 11:15:24 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | 20 | using System; 21 | using System.Windows.Forms; 22 | 23 | namespace GFFClient 24 | { 25 | internal static class Program 26 | { 27 | /// 28 | /// 应用程序的主入口点。 29 | /// 30 | [STAThread] 31 | private static void Main() 32 | { 33 | Application.EnableVisualStyles(); 34 | Application.SetCompatibleTextRenderingDefault(false); 35 | Application.Run(new InitForm()); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /GFF.Component/Capture/ImageProcessBox.designer.cs: -------------------------------------------------------------------------------- 1 | namespace GFF.Component.Capture 2 | { 3 | partial class ImageProcessBox 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) { 15 | if (disposing && (components != null)) { 16 | components.Dispose(); 17 | } 18 | base.Dispose(disposing); 19 | } 20 | 21 | #region Component Designer generated code 22 | 23 | /// 24 | /// Required method for Designer support - do not modify 25 | /// the contents of this method with the code editor. 26 | /// 27 | private void InitializeComponent() { 28 | this.SuspendLayout(); 29 | // 30 | // ImageProcessBox 31 | // 32 | this.Cursor = System.Windows.Forms.Cursors.Default; 33 | this.ResumeLayout(false); 34 | 35 | } 36 | 37 | #endregion 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/REOOBJECTFLAGS.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [Flags, ComVisible(false)] 9 | public enum REOOBJECTFLAGS : uint 10 | { 11 | REO_NULL = 0x00000000, // No flags 12 | REO_READWRITEMASK = 0x0000003F, // Mask out RO bits 13 | REO_DONTNEEDPALETTE = 0x00000020, // Object doesn't need palette 14 | REO_BLANK = 0x00000010, // Object is blank 15 | REO_DYNAMICSIZE = 0x00000008, // Object defines size always 16 | REO_INVERTEDSELECT = 0x00000004, // Object drawn all inverted if sel 17 | REO_BELOWBASELINE = 0x00000002, // Object sits below the baseline 18 | REO_RESIZABLE = 0x00000001, // Object may be resized 19 | REO_LINK = 0x80000000, // Object is a link (RO) 20 | REO_STATIC = 0x40000000, // Object is static (RO) 21 | REO_SELECTED = 0x08000000, // Object selected (RO) 22 | REO_OPEN = 0x04000000, // Object open in its server (RO) 23 | REO_INPLACEACTIVE = 0x02000000, // Object in place active (RO) 24 | REO_HILITED = 0x01000000, // Object is to be hilited (RO) 25 | REO_LINKAVAILABLE = 0x00800000, // Link believed available (RO) 26 | REO_GETMETAFILE = 0x00400000 // Object requires metafile (RO) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /GFF.Helper/ByteHelper.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:20da4241-0bdc-4a06-8793-6d0889c31f95 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:MCITest 12 | 13 | 14 | * 创建年份:2015 15 | * 创建时间:2015-12-02 11:15:24 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | 20 | using System; 21 | 22 | namespace GFF.Helper 23 | { 24 | public static class ByteHelper 25 | { 26 | /// 27 | /// 截取字节 28 | /// 29 | /// 30 | /// 31 | /// 32 | /// 33 | public static byte[] GetData(byte[] buffer, int offset, int count) 34 | { 35 | var data = new byte[count]; 36 | Array.Copy(buffer, offset, data, 0, count); 37 | return data; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /GFF.Component/Capture/ColorBox.designer.cs: -------------------------------------------------------------------------------- 1 | namespace GFF.Component.Capture 2 | { 3 | partial class ColorBox 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Component Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.SuspendLayout(); 32 | // 33 | // ColorBox 34 | // 35 | this.Name = "ColorBox"; 36 | this.Size = new System.Drawing.Size(203, 50); 37 | this.ResumeLayout(false); 38 | 39 | } 40 | 41 | #endregion 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/ILockBytes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComImport] 9 | [Guid("0000000a-0000-0000-C000-000000000046")] 10 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] 11 | public interface ILockBytes 12 | { 13 | int ReadAt( 14 | /* [in] */ ulong ulOffset, 15 | /* [unique][out] */ IntPtr pv, 16 | /* [in] */ uint cb, 17 | /* [out] */ out IntPtr pcbRead); 18 | 19 | int WriteAt( 20 | /* [in] */ ulong ulOffset, 21 | /* [size_is][in] */ IntPtr pv, 22 | /* [in] */ uint cb, 23 | /* [out] */ out IntPtr pcbWritten); 24 | 25 | int Flush(); 26 | 27 | int SetSize( 28 | /* [in] */ ulong cb); 29 | 30 | int LockRegion( 31 | /* [in] */ ulong libOffset, 32 | /* [in] */ ulong cb, 33 | /* [in] */ uint dwLockType); 34 | 35 | int UnlockRegion( 36 | /* [in] */ ulong libOffset, 37 | /* [in] */ ulong cb, 38 | /* [in] */ uint dwLockType); 39 | 40 | int Stat( 41 | /* [out] */ out System.Runtime.InteropServices.ComTypes.STATSTG pstatstg, 42 | /* [in] */ uint grfStatFlag); 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/IOleClientSite.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComVisible(true), 9 | Guid("00000118-0000-0000-C000-000000000046"), 10 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] 11 | public interface IOleClientSite 12 | { 13 | 14 | [return: MarshalAs(UnmanagedType.I4)] 15 | [PreserveSig] 16 | int SaveObject(); 17 | 18 | [return: MarshalAs(UnmanagedType.I4)] 19 | [PreserveSig] 20 | int GetMoniker( 21 | [In, MarshalAs(UnmanagedType.U4)] int dwAssign, 22 | [In, MarshalAs(UnmanagedType.U4)] int dwWhichMoniker, 23 | [Out, MarshalAs(UnmanagedType.Interface)] out object ppmk); 24 | 25 | [return: MarshalAs(UnmanagedType.I4)] 26 | [PreserveSig] 27 | int GetContainer([MarshalAs(UnmanagedType.Interface)] out IOleContainer container); 28 | 29 | [return: MarshalAs(UnmanagedType.I4)] 30 | [PreserveSig] 31 | int ShowObject(); 32 | 33 | [return: MarshalAs(UnmanagedType.I4)] 34 | [PreserveSig] 35 | int OnShowWindow( 36 | [In, MarshalAs(UnmanagedType.I4)] int fShow); 37 | 38 | [return: MarshalAs(UnmanagedType.I4)] 39 | [PreserveSig] 40 | int RequestNewObjectLayout(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/IStream.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComImport] 9 | [Guid("0000000c-0000-0000-C000-000000000046")] 10 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] 11 | public interface IStream : ISequentialStream 12 | { 13 | int Seek( 14 | /* [in] */ ulong dlibMove, 15 | /* [in] */ uint dwOrigin, 16 | /* [out] */ out ulong plibNewPosition); 17 | 18 | int SetSize( 19 | /* [in] */ ulong libNewSize); 20 | 21 | int CopyTo( 22 | /* [unique][in] */ [In] IStream pstm, 23 | /* [in] */ ulong cb, 24 | /* [out] */ out ulong pcbRead, 25 | /* [out] */ out ulong pcbWritten); 26 | 27 | int Commit( 28 | /* [in] */ uint grfCommitFlags); 29 | 30 | int Revert(); 31 | 32 | int LockRegion( 33 | /* [in] */ ulong libOffset, 34 | /* [in] */ ulong cb, 35 | /* [in] */ uint dwLockType); 36 | 37 | int UnlockRegion( 38 | /* [in] */ ulong libOffset, 39 | /* [in] */ ulong cb, 40 | /* [in] */ uint dwLockType); 41 | 42 | int Stat( 43 | /* [out] */ out System.Runtime.InteropServices.ComTypes.STATSTG pstatstg, 44 | /* [in] */ uint grfStatFlag); 45 | 46 | int Clone( 47 | /* [out] */ out IStream ppstm); 48 | 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/NativeMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | internal class NativeMethods 9 | { 10 | public const int WM_USER = 0x0400; 11 | public const int EM_GETOLEINTERFACE = WM_USER + 60; 12 | 13 | [DllImport("User32.dll", 14 | CharSet = CharSet.Auto, 15 | PreserveSig = false)] 16 | public static extern IRichEditOle SendMessage( 17 | IntPtr hWnd, int message, int wParam); 18 | 19 | [DllImport("ole32.dll")] 20 | public static extern int CreateILockBytesOnHGlobal( 21 | IntPtr hGlobal, bool fDeleteOnRelease, out ILockBytes ppLkbyt); 22 | 23 | [DllImport("ole32.dll")] 24 | public static extern int StgCreateDocfileOnILockBytes( 25 | ILockBytes plkbyt, uint grfMode, uint reserved, out IStorage ppstgOpen); 26 | 27 | [DllImport("ole32.dll")] 28 | public static extern int OleCreateFromFile([In] ref Guid rclsid, 29 | [MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, 30 | [In] ref Guid riid, 31 | uint renderopt, 32 | ref FORMATETC pFormatEtc, 33 | IOleClientSite pClientSite, 34 | IStorage pStg, 35 | [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); 36 | 37 | [DllImport("ole32.dll")] 38 | public static extern int OleSetContainedObject( 39 | [MarshalAs(UnmanagedType.IUnknown)] object pUnk, bool fContained); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /GFF.Component/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /GFF.Component/Config/ClientConfig.cs: -------------------------------------------------------------------------------- 1 | using GFF.Helper; 2 | using System; 3 | using System.IO; 4 | 5 | namespace GFF.Component.Config 6 | { 7 | /// 8 | /// 客户端配置类 9 | /// 10 | public class ClientConfig 11 | { 12 | /// 13 | /// 服务器监听IP 14 | /// 15 | public string IP { get; set; } = "127.0.0.1"; 16 | 17 | /// 18 | /// 服务器监听端口 19 | /// 20 | public int Port { get; set; } = 39654; 21 | 22 | /// 23 | /// 文件服务器 24 | /// 25 | public string Url { get; set; } = "http://127.0.0.1:39655/File/"; //文件服务器 26 | 27 | 28 | /// 29 | /// 解析命令初始缓存大小 30 | /// 31 | public int InitBufferSize { get; set; } = 1024 * 10; //解析命令初始缓存大小 32 | 33 | 34 | public static ClientConfig Instance() 35 | { 36 | var config = new ClientConfig(); 37 | try 38 | { 39 | var json = File.ReadAllText(Environment.CurrentDirectory + "\\config.json"); 40 | return SerializeHelper.JsonDeserialize(json); 41 | } 42 | catch (FileNotFoundException fex) 43 | { 44 | Save(config); 45 | } 46 | return config; 47 | } 48 | 49 | public static void Save(ClientConfig config) 50 | { 51 | var json = SerializeHelper.JsonSerialize(config); 52 | File.WriteAllText(Environment.CurrentDirectory + "\\config.json", json); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /GFFClient/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /GFF.Model/Enum/VideoSizeModel.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归@wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * CLR版本:4.0.30319.42000 5 | * 唯一标识:6077c3a9-e57d-4868-bd1b-1549e6421288 6 | * 机器名称:WENLI-PC 7 | * 联系人邮箱:wenguoli_520@qq.com 8 | ***************************************************************************************************** 9 | * 项目名称:$projectname$ 10 | * 命名空间:GFF.Model.Enum 11 | * 类名称:VideoSizeModel 12 | * 创建时间:2016/11/10 17:17:18 13 | * 创建人:wenli 14 | * 创建说明: 15 | *****************************************************************************************************/ 16 | using System; 17 | using System.Collections.Generic; 18 | using System.Linq; 19 | using System.Text; 20 | 21 | namespace GFF.Model.Enum 22 | { 23 | /// 24 | /// 视频模式 25 | /// 26 | public enum VideoSizeModel 27 | { 28 | /// 29 | /// 捕获视频大小宽为160,高120像素 30 | /// 31 | W160_H120, 32 | /// 33 | /// 捕获视频大小宽为176,高144像素 34 | /// 35 | W176_H144, 36 | /// 37 | /// 捕获视频大小宽为320,高240像素 38 | /// 39 | W320_H240, 40 | /// 41 | /// 捕获视频大小宽为352,高288像素 42 | /// 43 | W352_H288, 44 | /// 45 | /// 捕获视频大小宽为640,高480像素 46 | /// 47 | W640_H480, 48 | /// 49 | /// 捕获视频大小宽为800,高600像素 50 | /// 51 | W800_H600, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /GFF.Model/Enum/TransmitType.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归@wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * CLR版本:4.0.30319.42000 5 | * 唯一标识:083ef75b-1c26-4b53-810a-fcc4359d79f2 6 | * 机器名称:WENLI-PC 7 | * 联系人邮箱:wenguoli_520@qq.com 8 | ***************************************************************************************************** 9 | * 项目名称:$projectname$ 10 | * 命名空间:GFF.Model.Enum 11 | * 类名称:TransmitType 12 | * 创建时间:2016/11/8 16:06:34 13 | * 创建人:wenli 14 | * 创建说明: 15 | *****************************************************************************************************/ 16 | using System; 17 | using System.Collections.Generic; 18 | using System.Linq; 19 | using System.Text; 20 | 21 | namespace GFF.Model.Enum 22 | { 23 | /// 24 | /// UDP传输类型 25 | /// 26 | public enum TransmitType 27 | { 28 | /// 29 | /// 获得远程主机信息 30 | /// 31 | getRemoteEP = 126, 32 | /// 33 | /// 传输文件数据包 34 | /// 35 | getFilePackage = 235, 36 | /// 37 | /// 音频包 38 | /// 39 | Audio = 237, 40 | /// 41 | /// 视频包 42 | /// 43 | Video = 239, 44 | /// 45 | ///传输命令 46 | /// 47 | Cmd = 241, 48 | /// 49 | /// 打洞数据包 50 | /// 51 | Penetrate = 114, 52 | /// 53 | /// 传输完成 54 | /// 55 | over = 118, 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/IDataObject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComVisible(true), 9 | ComImport(), 10 | Guid("0000010E-0000-0000-C000-000000000046"), 11 | InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] 12 | public interface IDataObject 13 | { 14 | [PreserveSig()] 15 | uint GetData( 16 | ref FORMATETC a, 17 | ref STGMEDIUM b); 18 | 19 | [PreserveSig()] 20 | uint GetDataHere( 21 | ref FORMATETC pFormatetc, 22 | out STGMEDIUM pMedium); 23 | 24 | [PreserveSig()] 25 | uint QueryGetData( 26 | ref FORMATETC pFormatetc); 27 | 28 | [PreserveSig()] 29 | uint GetCanonicalFormatEtc( 30 | ref FORMATETC pformatectIn, 31 | out FORMATETC pformatetcOut); 32 | 33 | [PreserveSig()] 34 | uint SetData( 35 | ref FORMATETC pFormatectIn, 36 | ref STGMEDIUM pmedium, 37 | [In, MarshalAs(UnmanagedType.Bool)] 38 | bool fRelease); 39 | 40 | [PreserveSig()] 41 | uint EnumFormatEtc( 42 | uint dwDirection, IEnumFORMATETC penum); 43 | 44 | [PreserveSig()] 45 | uint DAdvise( 46 | ref FORMATETC pFormatetc, 47 | int advf, 48 | [In, MarshalAs(UnmanagedType.Interface)] 49 | IAdviseSink pAdvSink, 50 | out uint pdwConnection); 51 | 52 | [PreserveSig()] 53 | uint DUnadvise( 54 | uint dwConnection); 55 | 56 | [PreserveSig()] 57 | uint EnumDAdvise( 58 | [Out, MarshalAs(UnmanagedType.Interface)] 59 | out IEnumSTATDATA ppenumAdvise); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /GFFServer/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /GFF.Component/Config/ServerConfig.cs: -------------------------------------------------------------------------------- 1 | using GFF.Helper; 2 | using System; 3 | using System.IO; 4 | 5 | namespace GFF.Component.Config 6 | { 7 | public class ServerConfig 8 | { 9 | private static readonly string jsonFilePath = Environment.CurrentDirectory + "\\serverConfig.json"; 10 | 11 | /// 12 | /// 服务器监听IP 13 | /// 14 | public string IP { get; set; } = "127.0.0.1"; //服务器监听IP 15 | 16 | /// 17 | /// 服务器监听端口 18 | /// 19 | public int Port { get; set; } = 39654; //服务器监听端口 20 | 21 | 22 | public int FilePort { get; set; } = 39655; 23 | 24 | /// 25 | /// 解析命令初始缓存大小 26 | /// 27 | public int InitBufferSize { get; set; } = 1024 * 10; //解析命令初始缓存大小 28 | 29 | /// 30 | /// 最大连接数 31 | /// 32 | public int MaxClientSize { get; set; } = 10000; //最大连接数 33 | 34 | 35 | /// 36 | /// 服务器配置实例 37 | /// 38 | /// 39 | public static ServerConfig Instance() 40 | { 41 | var config = new ServerConfig(); 42 | try 43 | { 44 | var json = File.ReadAllText(jsonFilePath); 45 | return SerializeHelper.JsonDeserialize(json); 46 | } 47 | catch (FileNotFoundException fex) 48 | { 49 | Save(config); 50 | } 51 | return config; 52 | } 53 | 54 | /// 55 | /// 保存服务器配置 56 | /// 57 | /// 58 | public static void Save(ServerConfig config) 59 | { 60 | var json = SerializeHelper.JsonSerialize(config); 61 | File.WriteAllText(jsonFilePath, json); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /GFF.Component/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /GFF.Helper/Extention/ExtentionHelper.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归@wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * CLR版本:4.0.30319.42000 5 | * 唯一标识:2f332a1e-ef68-4722-8500-52d7c6493a53 6 | * 机器名称:WENLI-PC 7 | * 联系人邮箱:wenguoli_520@qq.com 8 | ***************************************************************************************************** 9 | * 项目名称:$projectname$ 10 | * 命名空间:GFF.Helper.Extention 11 | * 类名称:ExtentionHelper 12 | * 创建时间:2016/11/11 16:11:25 13 | * 创建人:wenli 14 | * 创建说明: 15 | *****************************************************************************************************/ 16 | using System; 17 | using System.Collections.Generic; 18 | using System.Windows.Forms; 19 | 20 | namespace GFF.Helper.Extention 21 | { 22 | public static class ExtentionHelper 23 | { 24 | /// 25 | /// winform控件UI多线程处理 26 | /// 27 | /// 28 | /// 29 | public static void InvokeAction(this Control control, Action action) 30 | { 31 | if (control.IsHandleCreated) 32 | { 33 | if (control.InvokeRequired) 34 | { 35 | control.BeginInvoke(action); 36 | } 37 | else 38 | { 39 | action(); 40 | } 41 | } 42 | } 43 | 44 | public static List ToList(this string[] arr) 45 | { 46 | List list = new List(); 47 | if (arr != null && arr.Length > 0) 48 | { 49 | for (int i = 0; i < arr.Length; i++) 50 | { 51 | list.Add(arr[i]); 52 | } 53 | } 54 | return list; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /GFF.Helper/CircleCache.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归@wenli所有,All Rights Reserved (C) 2015-2017 3 | ***************************************************************************************************** 4 | * CLR版本:4.0.30319.42000 5 | * 唯一标识:9fc3a6a9-c71e-4ae4-80c9-f14ffbc3f932 6 | * 机器名称:WENLI-PC 7 | * 联系人邮箱:wenguoli_520@qq.com 8 | ***************************************************************************************************** 9 | * 项目名称:$projectname$ 10 | * 命名空间:GFF.Helper 11 | * 类名称:CircleCache 12 | * 创建时间:2017/2/20 15:37:02 13 | * 创建人:wenli 14 | * 创建说明: 15 | *****************************************************************************************************/ 16 | using System; 17 | using System.Collections.Generic; 18 | using System.Linq; 19 | using System.Text; 20 | 21 | namespace GFF.Helper 22 | { 23 | /// 24 | /// CircleCache 循环缓存。循环使用缓存中的每个对象。线程安全。 25 | /// 26 | public class CircleCache 27 | { 28 | private object locker = new object(); 29 | private Circle circle = new Circle(); 30 | 31 | #region Ctor 32 | public CircleCache() 33 | { 34 | } 35 | public CircleCache(ICollection collection) 36 | { 37 | if (collection != null && collection.Count > 0) 38 | { 39 | foreach (T t in collection) 40 | { 41 | this.circle.Append(t); 42 | } 43 | 44 | } 45 | } 46 | #endregion 47 | 48 | #region Add 49 | public void Add(T t) 50 | { 51 | lock (this.locker) 52 | { 53 | this.circle.Append(t); 54 | } 55 | } 56 | #endregion 57 | 58 | #region Get 59 | public T Get() 60 | { 61 | lock (this.locker) 62 | { 63 | this.circle.MoveNext(); 64 | return this.circle.Current; 65 | } 66 | } 67 | #endregion 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /GFF.Helper/VibrationHelper.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归@wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * CLR版本:4.0.30319.42000 5 | * 唯一标识:e678aad3-469f-4f9b-a5da-0824f90d56fc 6 | * 机器名称:WENLI-PC 7 | * 联系人邮箱:wenguoli_520@qq.com 8 | ***************************************************************************************************** 9 | * 项目名称:$projectname$ 10 | * 命名空间:GFF.Helper 11 | * 类名称:VibrationHelper 12 | * 创建时间:2016/12/27 14:17:02 13 | * 创建人:wenli 14 | * 创建说明: 15 | *****************************************************************************************************/ 16 | using System; 17 | using System.Drawing; 18 | using System.Threading; 19 | using System.Windows.Forms; 20 | 21 | namespace GFF.Helper 22 | { 23 | /// 24 | /// 控件震动效果 25 | /// 26 | public class VibrationHelper 27 | { 28 | public static void Vibration(Control control) 29 | { 30 | Point pOld = control.Location;//原来的位置 31 | int radius = 3;//半径 32 | for (int n = 0; n < 3; n++) //旋转圈数 33 | { 34 | //右半圆逆时针 35 | for (int i = -radius; i <= radius; i++) 36 | { 37 | int x = Convert.ToInt32(Math.Sqrt(radius * radius - i * i)); 38 | int y = -i; 39 | 40 | control.Location = new Point(pOld.X + x, pOld.Y + y); 41 | Thread.Sleep(10); 42 | } 43 | //左半圆逆时针 44 | for (int j = radius; j >= -radius; j--) 45 | { 46 | int x = -Convert.ToInt32(Math.Sqrt(radius * radius - j * j)); 47 | int y = -j; 48 | 49 | control.Location = new Point(pOld.X + x, pOld.Y + y); 50 | Thread.Sleep(10); 51 | } 52 | } 53 | //抖动完成,恢复原来位置 54 | control.Location = pOld; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /GFFClient/InitForm.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:20da4241-0bdc-4a06-8793-6d0889c31f95 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:MCITest 12 | 13 | 14 | * 创建年份:2015 15 | * 创建时间:2015-12-02 11:15:24 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | 20 | using CCWin; 21 | using CCWin.SkinControl; 22 | using GFF.Component.Config; 23 | using System; 24 | 25 | namespace GFFClient 26 | { 27 | public partial class InitForm : CCSkinMain 28 | { 29 | private readonly ClientConfig config = ClientConfig.Instance(); 30 | 31 | public InitForm() 32 | { 33 | InitializeComponent(); 34 | } 35 | 36 | private void InitForm_Load(object sender, EventArgs e) 37 | { 38 | skinWaterTextBox3.Text = config.IP; 39 | } 40 | 41 | private void skinButton1_Click(object sender, EventArgs e) 42 | { 43 | var name = skinWaterTextBox1.Text; 44 | var discription = skinWaterTextBox2.Text; 45 | if (!string.IsNullOrEmpty(discription) && (discription.Length > 20)) 46 | discription = discription.Substring(0, 20); 47 | if (!string.IsNullOrEmpty(name)) 48 | { 49 | name = name.Replace("|", ""); 50 | 51 | if (name.Length > 10) name = name.Substring(0, 10); 52 | 53 | config.IP = skinWaterTextBox3.Text; 54 | ClientConfig.Save(config); 55 | 56 | new MainForm(new ChatListSubItem 57 | { 58 | NicName = name, 59 | DisplayName = name, 60 | PersonalMsg = discription 61 | }).Show(); 62 | Hide(); 63 | } 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /GFF.Helper/Win32/SendMessageClass.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归@wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * CLR版本:4.0.30319.42000 5 | * 唯一标识:115d8aaa-502d-4c1d-a0d7-d3dedd4ea90a 6 | * 机器名称:WENLI-PC 7 | * 联系人邮箱:wenguoli_520@qq.com 8 | ***************************************************************************************************** 9 | * 项目名称:$projectname$ 10 | * 命名空间:GFF.Helper.Win32 11 | * 类名称:SendMessageClass 12 | * 创建时间:2016/11/9 14:42:49 13 | * 创建人:wenli 14 | * 创建说明: 15 | *****************************************************************************************************/ 16 | 17 | using System; 18 | using System.Runtime.InteropServices; 19 | using System.Text; 20 | 21 | namespace GFF.Helper.Win32 22 | { 23 | 24 | #region SendMessageClass 25 | 26 | public class SendMessageClass 27 | { 28 | [DllImport("USER32.DLL")] 29 | public static extern int SendMessage( 30 | IntPtr hwnd, 31 | int wMsg, 32 | int wParam, 33 | int lParam 34 | ); 35 | 36 | [DllImport("USER32.DLL")] 37 | public static extern int SendMessage( 38 | IntPtr hwnd, 39 | int wMsg, 40 | int wParam, 41 | IntPtr lParam 42 | ); 43 | 44 | [DllImport("USER32.DLL")] 45 | public static extern int SendMessage( 46 | IntPtr hwnd, 47 | int wMsg, 48 | int wParam, 49 | StringBuilder lParam 50 | ); 51 | 52 | [DllImport("USER32.DLL")] 53 | public static extern int SendMessage( 54 | IntPtr hwnd, 55 | int wMsg, 56 | int wParam, 57 | string lParam 58 | ); 59 | 60 | [DllImport("USER32.DLL")] 61 | public static extern int SendMessage( 62 | IntPtr hwnd, 63 | int wMsg, 64 | bool wParam, 65 | string lParam 66 | ); 67 | 68 | [DllImport("USER32.DLL")] 69 | public static extern int SendMessage( 70 | IntPtr hwnd, 71 | int wMsg, 72 | bool wParam, 73 | int lParam 74 | ); 75 | } 76 | 77 | #endregion 78 | } -------------------------------------------------------------------------------- /GFF.Component/Capture/FrmSize.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace GFF.Component.Capture 10 | { 11 | public partial class FrmSize : Form 12 | { 13 | public FrmSize(Size se) { 14 | InitializeComponent(); 15 | imageSize = se; 16 | this.StartPosition = FormStartPosition.CenterParent; 17 | this.FormBorderStyle = FormBorderStyle.FixedSingle; 18 | this.MaximizeBox = false; 19 | this.MinimizeBox = false; 20 | this.TopMost = true; 21 | } 22 | 23 | private Size imageSize; 24 | public Size ImageSize { 25 | get { return imageSize; } 26 | set { imageSize = value; } 27 | } 28 | 29 | private void FrmSize_Load(object sender, EventArgs e) { 30 | textBox1.Text = imageSize.Width.ToString(); 31 | textBox2.Text = imageSize.Height.ToString(); 32 | textBox1.BackColor = Color.White; 33 | textBox2.BackColor = Color.White; 34 | button1.Text = "OK"; 35 | button2.Text = "Cancel"; 36 | this.AcceptButton = button1; 37 | this.CancelButton = button2; 38 | } 39 | 40 | private void button1_Click(object sender, EventArgs e) { 41 | if (textBox1.BackColor != Color.White || textBox2.BackColor != Color.White) { 42 | MessageBox.Show("The input value is invalid!"); 43 | return; 44 | } 45 | this.DialogResult = DialogResult.OK; 46 | this.Close(); 47 | } 48 | 49 | private void button2_Click(object sender, EventArgs e) { 50 | this.DialogResult = DialogResult.Cancel; 51 | this.Close(); 52 | } 53 | 54 | private void textBox_Validating(object sender, CancelEventArgs e) { 55 | TextBox tbx = sender as TextBox; 56 | try { 57 | int v = int.Parse(tbx.Text); 58 | if (tbx == textBox1) 59 | this.imageSize.Width = v; 60 | else 61 | this.imageSize.Height = v; 62 | tbx.BackColor = Color.White; 63 | } catch { 64 | tbx.BackColor = Color.Yellow; 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /GFF.Model/Entity/Message.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:20da4241-0bdc-4a06-8793-6d0889c31f95 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:MCITest 12 | 13 | 14 | * 创建年份:2015 15 | * 创建时间:2015-12-02 11:15:24 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | 20 | using System; 21 | using System.Runtime.Serialization; 22 | using GFF.Model.InterFace; 23 | using ProtoBuf; 24 | 25 | namespace GFF.Model.Entity 26 | { 27 | [DataContract] 28 | [ProtoContract] 29 | public class Message : IMessage, IDisposable 30 | { 31 | /// 32 | /// 频道ID或私信ID 33 | /// 34 | [DataMember] 35 | [ProtoMember(1, IsRequired = false)] 36 | public string Accepter 37 | { 38 | get; set; 39 | } 40 | 41 | [DataMember] 42 | [ProtoMember(2, IsRequired = true)] 43 | public byte Protocal 44 | { 45 | get; set; 46 | } 47 | 48 | [DataMember] 49 | [ProtoMember(3, IsRequired = true)] 50 | public byte[] Data 51 | { 52 | get; set; 53 | } 54 | 55 | /// 56 | /// 发送者id 57 | /// 58 | [DataMember] 59 | [ProtoMember(4, IsRequired = true)] 60 | public string Sender 61 | { 62 | get; set; 63 | } 64 | 65 | /// 66 | /// 发送时间 67 | /// 68 | [DataMember] 69 | [ProtoMember(5, IsRequired = true)] 70 | public long SendTick 71 | { 72 | get; set; 73 | } 74 | 75 | public void Dispose() 76 | { 77 | this.Accepter = null; 78 | this.Protocal = 0; 79 | if (Data != null) 80 | Array.Clear(this.Data, 0, this.Data.Length); 81 | this.Sender = null; 82 | this.SendTick = 0; 83 | } 84 | 85 | } 86 | } -------------------------------------------------------------------------------- /GFF.Model/Entity/VideoSize.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归@wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * CLR版本:4.0.30319.42000 5 | * 唯一标识:afa9cde9-e164-48fd-9d00-986f102303d2 6 | * 机器名称:WENLI-PC 7 | * 联系人邮箱:wenguoli_520@qq.com 8 | ***************************************************************************************************** 9 | * 项目名称:$projectname$ 10 | * 命名空间:GFF.Model.Entity 11 | * 类名称:VideoSize 12 | * 创建时间:2016/11/10 17:17:36 13 | * 创建人:wenli 14 | * 创建说明: 15 | *****************************************************************************************************/ 16 | using System; 17 | using System.Collections.Generic; 18 | using System.Linq; 19 | using System.Text; 20 | using GFF.Model.Enum; 21 | 22 | namespace GFF.Model.Entity 23 | { 24 | /// 25 | /// 视频显示尺寸大小 26 | /// 27 | public sealed class VideoSize 28 | { 29 | /// 30 | /// 视频显示高度 31 | /// 32 | public static int Width = 160; 33 | 34 | /// 35 | /// 视频显示宽度 36 | /// 37 | public static int Height = 120; 38 | 39 | /// 40 | /// 设置大小模式 41 | /// 42 | /// 视频显示尺寸大小 43 | public static void SetModel(VideoSizeModel Model) 44 | { 45 | switch (Model) 46 | { 47 | case VideoSizeModel.W160_H120: 48 | Width = 160; 49 | Height = 120; 50 | break; 51 | case VideoSizeModel.W176_H144: 52 | Width = 176; 53 | Height = 144; 54 | break; 55 | case VideoSizeModel.W320_H240: 56 | Width = 320; 57 | Height = 240; 58 | break; 59 | case VideoSizeModel.W352_H288: 60 | Width = 352; 61 | Height = 288; 62 | break; 63 | case VideoSizeModel.W640_H480: 64 | Width = 640; 65 | Height = 480; 66 | break; 67 | case VideoSizeModel.W800_H600: 68 | Width = 800; 69 | Height = 600; 70 | break; 71 | } 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /GFF.Helper/MutiThreadHelper.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:20da4241-0bdc-4a06-8793-6d0889c31f95 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:MCITest 12 | 13 | 14 | * 创建年份:2015 15 | * 创建时间:2015-12-02 11:15:24 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | 20 | using System; 21 | using System.Collections.Generic; 22 | using System.Threading; 23 | 24 | namespace GFF.Helper 25 | { 26 | /// 27 | /// 多线程处理类 28 | /// 29 | public class MutiThreadHelper : IDisposable 30 | { 31 | private List list; 32 | 33 | public MutiThreadHelper() 34 | { 35 | list = new List(); 36 | } 37 | 38 | public int Count { get; private set; } 39 | 40 | public bool IsStarted { get; private set; } 41 | 42 | public void Dispose() 43 | { 44 | Stop(); 45 | } 46 | 47 | /// 48 | /// 多线程任务启动 49 | /// 50 | /// 51 | /// 52 | public void Start(int num, Action action) 53 | { 54 | if (num > 0) 55 | if (!IsStarted) 56 | { 57 | Count = num; 58 | IsStarted = true; 59 | for (var i = 0; i < num; i++) 60 | { 61 | var th = new Thread(new ThreadStart(action)); 62 | th.IsBackground = true; 63 | th.Start(); 64 | list.Add(th); 65 | } 66 | } 67 | } 68 | 69 | /// 70 | /// 多线程任务停止 71 | /// 72 | public void Stop() 73 | { 74 | if (IsStarted) 75 | { 76 | foreach (var td in list) 77 | if (td != null) 78 | td.Abort(); 79 | IsStarted = false; 80 | Count = 0; 81 | list.Clear(); 82 | } 83 | } 84 | } 85 | } -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/IRichEditOle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComImport, 9 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown), 10 | Guid("00020D00-0000-0000-c000-000000000046")] 11 | public interface IRichEditOle 12 | { 13 | [return: MarshalAs(UnmanagedType.I4)] 14 | [PreserveSig] 15 | int GetClientSite(out IOleClientSite site); 16 | [return: MarshalAs(UnmanagedType.I4)] 17 | [PreserveSig] 18 | int GetObjectCount(); 19 | [return: MarshalAs(UnmanagedType.I4)] 20 | [PreserveSig] 21 | int GetLinkCount(); 22 | [return: MarshalAs(UnmanagedType.I4)] 23 | [PreserveSig] 24 | int GetObject(int iob, [In, Out] REOBJECT lpreobject, [MarshalAs(UnmanagedType.U4)] GETOBJECTOPTIONS flags); 25 | [return: MarshalAs(UnmanagedType.I4)] 26 | [PreserveSig] 27 | int InsertObject(REOBJECT lpreobject); 28 | [return: MarshalAs(UnmanagedType.I4)] 29 | [PreserveSig] 30 | int ConvertObject(int iob, Guid rclsidNew, string lpstrUserTypeNew); 31 | [return: MarshalAs(UnmanagedType.I4)] 32 | [PreserveSig] 33 | int ActivateAs(Guid rclsid, Guid rclsidAs); 34 | [return: MarshalAs(UnmanagedType.I4)] 35 | [PreserveSig] 36 | int SetHostNames(string lpstrContainerApp, string lpstrContainerObj); 37 | [return: MarshalAs(UnmanagedType.I4)] 38 | [PreserveSig] 39 | int SetLinkAvailable(int iob, bool fAvailable); 40 | [return: MarshalAs(UnmanagedType.I4)] 41 | [PreserveSig] 42 | int SetDvaspect(int iob, uint dvaspect); 43 | [return: MarshalAs(UnmanagedType.I4)] 44 | [PreserveSig] 45 | int HandsOffStorage(int iob); 46 | [return: MarshalAs(UnmanagedType.I4)] 47 | [PreserveSig] 48 | int SaveCompleted(int iob, IStorage lpstg); 49 | [return: MarshalAs(UnmanagedType.I4)] 50 | [PreserveSig] 51 | int InPlaceDeactivate(); 52 | [return: MarshalAs(UnmanagedType.I4)] 53 | [PreserveSig] 54 | int ContextSensitiveHelp(bool fEnterMode); 55 | [return: MarshalAs(UnmanagedType.I4)] 56 | [PreserveSig] 57 | int GetClipboardData([In, Out] ref CHARRANGE lpchrg, [MarshalAs(UnmanagedType.U4)] GETCLIPBOARDDATAFLAGS reco, out IDataObject lplpdataobj); 58 | [return: MarshalAs(UnmanagedType.I4)] 59 | [PreserveSig] 60 | int ImportDataObject(IDataObject lpdataobj, int cf, IntPtr hMetaPict); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /GFF.Model/Entity/VideoCapturerSize.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归@wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * CLR版本:4.0.30319.42000 5 | * 唯一标识:3db293a3-c4f5-46ee-ab84-842223b0e34a 6 | * 机器名称:WENLI-PC 7 | * 联系人邮箱:wenguoli_520@qq.com 8 | ***************************************************************************************************** 9 | * 项目名称:$projectname$ 10 | * 命名空间:GFF.Model.Entity 11 | * 类名称:VideoCapturerSize 12 | * 创建时间:2016/11/10 17:18:03 13 | * 创建人:wenli 14 | * 创建说明: 15 | *****************************************************************************************************/ 16 | using System; 17 | using System.Collections.Generic; 18 | using System.Linq; 19 | using System.Text; 20 | using GFF.Model.Enum; 21 | 22 | namespace GFF.Model.Entity 23 | { 24 | /// 25 | /// 视频显示尺寸大小 26 | /// 27 | public class VideoCapturerSize 28 | { 29 | /// 30 | /// 视频显示高度 31 | /// 32 | public int Width = 160; 33 | 34 | /// 35 | /// 视频显示宽度 36 | /// 37 | public int Height = 120; 38 | 39 | /// 40 | /// 设置大小模式 41 | /// 42 | /// 视频显示尺寸大小 43 | public VideoCapturerSize(VideoSizeModel Model) 44 | { 45 | SetModel(Model); 46 | } 47 | 48 | 49 | /// 50 | /// 设置大小模式 51 | /// 52 | /// 53 | public void SetModel(VideoSizeModel Model) 54 | { 55 | switch (Model) 56 | { 57 | case VideoSizeModel.W160_H120: 58 | Width = 160; 59 | Height = 120; 60 | break; 61 | case VideoSizeModel.W176_H144: 62 | Width = 176; 63 | Height = 144; 64 | break; 65 | case VideoSizeModel.W320_H240: 66 | Width = 320; 67 | Height = 240; 68 | break; 69 | case VideoSizeModel.W352_H288: 70 | Width = 352; 71 | Height = 288; 72 | break; 73 | case VideoSizeModel.W640_H480: 74 | Width = 640; 75 | Height = 480; 76 | break; 77 | case VideoSizeModel.W800_H600: 78 | Width = 800; 79 | Height = 600; 80 | break; 81 | } 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /GFFClient/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /GFFServer/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /GFF.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.2048 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFFClient", "GFFClient\GFFClient.csproj", "{844B2A62-45B4-48C1-90D3-B8C563365DFD}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFFServer", "GFFServer\GFFServer.csproj", "{DAD5C70E-B99D-4AFD-9FC6-B82924C4E452}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFF.Helper", "GFF.Helper\GFF.Helper.csproj", "{9293B703-CFED-4072-93ED-65BAC837D1AE}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFF.Model", "GFF.Model\GFF.Model.csproj", "{7E4F864A-AC23-49E5-A9DF-FD57BA1C58ED}" 13 | EndProject 14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFF.Component", "GFF.Component\GFF.Component.csproj", "{2771C51E-5E0F-4501-8E58-99AD70027C58}" 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|Any CPU = Debug|Any CPU 19 | Release|Any CPU = Release|Any CPU 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {844B2A62-45B4-48C1-90D3-B8C563365DFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {844B2A62-45B4-48C1-90D3-B8C563365DFD}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {844B2A62-45B4-48C1-90D3-B8C563365DFD}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {844B2A62-45B4-48C1-90D3-B8C563365DFD}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {DAD5C70E-B99D-4AFD-9FC6-B82924C4E452}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {DAD5C70E-B99D-4AFD-9FC6-B82924C4E452}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {DAD5C70E-B99D-4AFD-9FC6-B82924C4E452}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {DAD5C70E-B99D-4AFD-9FC6-B82924C4E452}.Release|Any CPU.Build.0 = Release|Any CPU 30 | {9293B703-CFED-4072-93ED-65BAC837D1AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {9293B703-CFED-4072-93ED-65BAC837D1AE}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {9293B703-CFED-4072-93ED-65BAC837D1AE}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {9293B703-CFED-4072-93ED-65BAC837D1AE}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {7E4F864A-AC23-49E5-A9DF-FD57BA1C58ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 35 | {7E4F864A-AC23-49E5-A9DF-FD57BA1C58ED}.Debug|Any CPU.Build.0 = Debug|Any CPU 36 | {7E4F864A-AC23-49E5-A9DF-FD57BA1C58ED}.Release|Any CPU.ActiveCfg = Release|Any CPU 37 | {7E4F864A-AC23-49E5-A9DF-FD57BA1C58ED}.Release|Any CPU.Build.0 = Release|Any CPU 38 | {2771C51E-5E0F-4501-8E58-99AD70027C58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 39 | {2771C51E-5E0F-4501-8E58-99AD70027C58}.Debug|Any CPU.Build.0 = Debug|Any CPU 40 | {2771C51E-5E0F-4501-8E58-99AD70027C58}.Release|Any CPU.ActiveCfg = Release|Any CPU 41 | {2771C51E-5E0F-4501-8E58-99AD70027C58}.Release|Any CPU.Build.0 = Release|Any CPU 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | GlobalSection(ExtensibilityGlobals) = postSolution 47 | SolutionGuid = {7D30586C-1CB7-4449-A820-E38BF49BD14C} 48 | EndGlobalSection 49 | GlobalSection(SubversionScc) = preSolution 50 | Svn-Managed = True 51 | Manager = AnkhSVN - Subversion Support for Visual Studio 52 | EndGlobalSection 53 | EndGlobal 54 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/IStorge.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace GFF.Component.ChatBox.Internals 7 | { 8 | [ComImport] 9 | [Guid("0000000b-0000-0000-C000-000000000046")] 10 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] 11 | public interface IStorage 12 | { 13 | int CreateStream( 14 | /* [string][in] */ string pwcsName, 15 | /* [in] */ uint grfMode, 16 | /* [in] */ uint reserved1, 17 | /* [in] */ uint reserved2, 18 | /* [out] */ out IStream ppstm); 19 | 20 | int OpenStream( 21 | /* [string][in] */ string pwcsName, 22 | /* [unique][in] */ IntPtr reserved1, 23 | /* [in] */ uint grfMode, 24 | /* [in] */ uint reserved2, 25 | /* [out] */ out IStream ppstm); 26 | 27 | int CreateStorage( 28 | /* [string][in] */ string pwcsName, 29 | /* [in] */ uint grfMode, 30 | /* [in] */ uint reserved1, 31 | /* [in] */ uint reserved2, 32 | /* [out] */ out IStorage ppstg); 33 | 34 | int OpenStorage( 35 | /* [string][unique][in] */ string pwcsName, 36 | /* [unique][in] */ IStorage pstgPriority, 37 | /* [in] */ uint grfMode, 38 | /* [unique][in] */ IntPtr snbExclude, 39 | /* [in] */ uint reserved, 40 | /* [out] */ out IStorage ppstg); 41 | 42 | int CopyTo( 43 | /* [in] */ uint ciidExclude, 44 | /* [size_is][unique][in] */ Guid rgiidExclude, 45 | /* [unique][in] */ IntPtr snbExclude, 46 | /* [unique][in] */ IStorage pstgDest); 47 | 48 | int MoveElementTo( 49 | /* [string][in] */ string pwcsName, 50 | /* [unique][in] */ IStorage pstgDest, 51 | /* [string][in] */ string pwcsNewName, 52 | /* [in] */ uint grfFlags); 53 | 54 | int Commit( 55 | /* [in] */ uint grfCommitFlags); 56 | 57 | int Revert(); 58 | 59 | int EnumElements( 60 | /* [in] */ uint reserved1, 61 | /* [size_is][unique][in] */ IntPtr reserved2, 62 | /* [in] */ uint reserved3, 63 | /* [out] */ out IEnumSTATSTG ppenum); 64 | 65 | int DestroyElement( 66 | /* [string][in] */ string pwcsName); 67 | 68 | int RenameElement( 69 | /* [string][in] */ string pwcsOldName, 70 | /* [string][in] */ string pwcsNewName); 71 | 72 | int SetElementTimes( 73 | /* [string][unique][in] */ string pwcsName, 74 | /* [unique][in] */ System.Runtime.InteropServices.ComTypes.FILETIME pctime, 75 | /* [unique][in] */ System.Runtime.InteropServices.ComTypes.FILETIME patime, 76 | /* [unique][in] */ System.Runtime.InteropServices.ComTypes.FILETIME pmtime); 77 | 78 | int SetClass( 79 | /* [in] */ Guid clsid); 80 | 81 | int SetStateBits( 82 | /* [in] */ uint grfStateBits, 83 | /* [in] */ uint grfMask); 84 | 85 | int Stat( 86 | /* [out] */ out System.Runtime.InteropServices.ComTypes.STATSTG pstatstg, 87 | /* [in] */ uint grfStatFlag); 88 | 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /GFFClient/FriendHelper.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:20da4241-0bdc-4a06-8793-6d0889c31f95 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:MCITest 12 | 13 | 14 | * 创建年份:2015 15 | * 创建时间:2015-12-02 11:15:24 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | 20 | using System; 21 | using System.Collections.Generic; 22 | using System.Linq; 23 | using System.Threading; 24 | using System.Threading.Tasks; 25 | 26 | namespace GFFClient 27 | { 28 | /// 29 | /// 好友辅助类 30 | /// 31 | public static class FriendHelper 32 | { 33 | public delegate void OnListChangedHander(List list); 34 | 35 | private static readonly List _Friends = new List(); 36 | 37 | static FriendHelper() 38 | { 39 | Task.Factory.StartNew(() => 40 | { 41 | try 42 | { 43 | while (true) 44 | { 45 | try 46 | { 47 | var rlist = new List(); 48 | foreach (var item in _Friends) 49 | if (item.JoinTime.AddMinutes(1) < DateTime.Now) 50 | rlist.Add(item); 51 | if (rlist.Count > 0) 52 | { 53 | rlist.ForEach(item => { _Friends.Remove(item); }); 54 | RaiseOnListChanged(_Friends); 55 | } 56 | } 57 | catch 58 | { 59 | break; 60 | } 61 | Thread.Sleep(500); 62 | } 63 | } 64 | catch 65 | { 66 | } 67 | }); 68 | } 69 | 70 | public static event OnListChangedHander OnListChanged; 71 | 72 | private static void RaiseOnListChanged(List list) 73 | { 74 | OnListChanged?.Invoke(list); 75 | } 76 | 77 | 78 | public static void Set(string userName) 79 | { 80 | var f = _Friends.Where(b => b.UserName == userName).FirstOrDefault(); 81 | if (f != null) 82 | { 83 | _Friends.Remove(f); 84 | _Friends.Add(new Friend {UserName = userName, JoinTime = DateTime.Now}); 85 | } 86 | else 87 | { 88 | _Friends.Add(new Friend {UserName = userName, JoinTime = DateTime.Now}); 89 | RaiseOnListChanged(_Friends); 90 | } 91 | } 92 | } 93 | 94 | public class Friend 95 | { 96 | public string UserName { get; set; } 97 | 98 | public DateTime JoinTime { get; set; } 99 | } 100 | } -------------------------------------------------------------------------------- /GFF.Component/Emotion/ImageEntity.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:94aee558-896d-424d-b921-472e3e200704 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:Em.MCIFrameWork.Controls.Emotion 12 | * 类名称:ImageEntity 13 | * 文件名:ImageEntity 14 | * 创建年份:2015 15 | * 创建时间:2015-12-16 16:06:24 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | 20 | using System; 21 | using System.Diagnostics; 22 | using System.Drawing; 23 | using System.IO; 24 | using System.Windows.Forms; 25 | using GFF.Helper; 26 | 27 | namespace GFF.Component.Emotion 28 | { 29 | [Serializable] 30 | public class ImageEntity 31 | { 32 | public ImageEntity() 33 | { 34 | } 35 | 36 | public ImageEntity(string fullName) 37 | : this() 38 | { 39 | this.FullName = fullName.Replace(Application.StartupPath + "\\", ""); ; 40 | 41 | this.FilePath = Path.GetDirectoryName(fullName).Replace(Application.StartupPath + "\\", ""); 42 | 43 | this.RelativePath = this.FilePath.Replace(Application.StartupPath + "\\", ""); 44 | 45 | this.FileName = Path.GetFileName(fullName); 46 | 47 | try 48 | { 49 | this.Image = Image.FromStream(new MemoryStream(File.ReadAllBytes(fullName))); 50 | this.MD5 = EncryptionHelper.MD5Helper.GetFileMd5(fullName); 51 | } 52 | catch (Exception ex) 53 | { 54 | this.Image = null; 55 | try 56 | { 57 | File.Delete(fullName); 58 | } 59 | catch 60 | { 61 | } 62 | Debug.WriteLine(fullName); 63 | Debug.WriteLine(ex); 64 | } 65 | } 66 | 67 | public ImageEntity(string filePath, object tag) 68 | : this(filePath) 69 | { 70 | this.Tag = tag; 71 | } 72 | 73 | public string FileName { get; set; } 74 | 75 | private string _fullName; 76 | public string FullName 77 | { 78 | get 79 | { 80 | return Path.Combine(Application.StartupPath, this._fullName); 81 | } 82 | set { this._fullName = value; } 83 | } 84 | 85 | public string RelativePath { get; set; } 86 | 87 | private string _filePath; 88 | public string FilePath 89 | { 90 | get 91 | { 92 | return Path.Combine(Application.StartupPath, this._filePath); 93 | } 94 | set { this._filePath = value; } 95 | } 96 | 97 | public bool IsCustom { get; set; } 98 | 99 | public Image Image { get; set; } 100 | 101 | public string MD5 { get; set; } 102 | 103 | public object Tag { get; private set; } 104 | 105 | public bool IsDelete { get; set; } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/ImageForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace GFF.Component.ChatBox 10 | { 11 | public partial class ImageForm : Form 12 | { 13 | public ImageForm(Image img) 14 | { 15 | InitializeComponent(); 16 | if (img == null) 17 | { 18 | return; 19 | } 20 | 21 | int maxLen = img.Width > img.Height ? img.Width : img.Height; 22 | maxLen += 40; 23 | if (maxLen > Screen.PrimaryScreen.Bounds.Width || maxLen > Screen.PrimaryScreen.Bounds.Height) 24 | { 25 | this.WindowState = FormWindowState.Maximized; 26 | } 27 | else 28 | { 29 | this.Size = new Size(maxLen, maxLen); 30 | } 31 | 32 | this.gifBox1.Image = img; 33 | this.MouseDown += new MouseEventHandler(pictureBox1_MouseDown); 34 | this.MouseUp += new MouseEventHandler(pictureBox1_MouseUp); 35 | this.MouseMove += new MouseEventHandler(pictureBox1_MouseMove); 36 | this.KeyUp += new KeyEventHandler(ImageForm_KeyUp); 37 | 38 | this.gifBox1.MouseDown += new MouseEventHandler(pictureBox1_MouseDown); 39 | this.gifBox1.MouseUp += new MouseEventHandler(pictureBox1_MouseUp); 40 | this.gifBox1.MouseMove += new MouseEventHandler(pictureBox1_MouseMove); 41 | this.gifBox1.KeyUp += new KeyEventHandler(ImageForm_KeyUp); 42 | } 43 | 44 | void ImageForm_KeyUp(object sender, KeyEventArgs e) 45 | { 46 | if (e.KeyCode == Keys.Escape) 47 | { 48 | this.Close(); 49 | } 50 | } 51 | 52 | 53 | void pictureBox1_MouseMove(object sender, MouseEventArgs e) 54 | { 55 | if (this.moving) 56 | { 57 | int delt = Math.Abs(e.Location.X - this.originMouseLocation.X) + Math.Abs(e.Location.Y - this.originMouseLocation.Y); 58 | if (delt >= 4) 59 | { 60 | this.Location = new Point(this.Location.X + e.Location.X - this.originMouseLocation.X, this.Location.Y + e.Location.Y - this.originMouseLocation.Y); 61 | } 62 | } 63 | } 64 | 65 | void pictureBox1_MouseUp(object sender, MouseEventArgs e) 66 | { 67 | if (e.Button == System.Windows.Forms.MouseButtons.Left) 68 | { 69 | this.moving = false; 70 | this.Cursor = Cursors.Default; 71 | } 72 | } 73 | 74 | private bool moving = false; 75 | private Point originMouseLocation; 76 | void pictureBox1_MouseDown(object sender, MouseEventArgs e) 77 | { 78 | if (e.Button == System.Windows.Forms.MouseButtons.Left) 79 | { 80 | if (this.WindowState == FormWindowState.Maximized) 81 | { 82 | return; 83 | } 84 | 85 | this.moving = true; 86 | this.originMouseLocation = e.Location; 87 | this.Cursor = Cursors.Hand; 88 | } 89 | } 90 | 91 | private void panel1_Click(object sender, EventArgs e) 92 | { 93 | this.Close(); 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /GFF.Helper/FunHelper.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:20da4241-0bdc-4a06-8793-6d0889c31f95 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:MCITest 12 | 13 | 14 | * 创建年份:2015 15 | * 创建时间:2015-12-02 11:15:24 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | 20 | using System; 21 | using System.Collections.Concurrent; 22 | using System.Threading; 23 | using System.Threading.Tasks; 24 | 25 | namespace GFF.Helper 26 | { 27 | /// 28 | /// 任务处理帮助类 29 | /// 30 | public static class FunHelper 31 | { 32 | static FunHelper() 33 | { 34 | Task.Factory.StartNew(() => 35 | { 36 | while (true) 37 | { 38 | Action a; 39 | ActionQueue.TryDequeue(out a); 40 | a?.Invoke(); 41 | if (a == null) 42 | Thread.Sleep(1); 43 | } 44 | }); 45 | Task.Factory.StartNew(() => 46 | { 47 | while (true) 48 | { 49 | Func f; 50 | FunQueue.TryDequeue(out f); 51 | f?.Invoke(); 52 | if (f == null) 53 | Thread.Sleep(1); 54 | } 55 | }); 56 | } 57 | 58 | public static void OneceAsync(Action funcation) 59 | { 60 | Task.Factory.StartNew(() => { funcation(); }); 61 | } 62 | 63 | private static void SingleWhileAsync(Action funcation, int mil) 64 | { 65 | Task.Factory.StartNew(() => 66 | { 67 | while (true) 68 | { 69 | funcation(); 70 | Thread.Sleep(mil); 71 | } 72 | }); 73 | } 74 | 75 | public static void WhileAsync(Action funcation, int mil, bool muti = false) 76 | { 77 | if (!muti) 78 | SingleWhileAsync(funcation, mil); 79 | else 80 | Task.Factory.StartNew(() => 81 | { 82 | while (true) 83 | { 84 | Task.Factory.StartNew(() => { funcation(); }); 85 | Thread.Sleep(mil); 86 | } 87 | }); 88 | } 89 | 90 | public static void ForAsync(Action funcation, int num) 91 | { 92 | Task.Factory.StartNew(() => { Parallel.For(0, num, i => { funcation(); }); }); 93 | } 94 | 95 | #region Queues 96 | 97 | /// 98 | /// 无返回值的任务队列 99 | /// 100 | public static ConcurrentQueue ActionQueue { get; } = new ConcurrentQueue(); 101 | 102 | /// 103 | /// 含返回值的任务队列 104 | /// 105 | public static ConcurrentQueue> FunQueue { get; } = new ConcurrentQueue>(); 106 | 107 | #endregion 108 | } 109 | } -------------------------------------------------------------------------------- /GFFServer/Program.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:20da4241-0bdc-4a06-8793-6d0889c31f95 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:MCITest 12 | 13 | 14 | * 创建年份:2015 15 | * 创建时间:2015-12-02 11:15:24 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | using GFF.Component.Config; 20 | using GFF.Helper; 21 | using SAEA.Audio; 22 | using SAEA.Audio.Storage; 23 | using SAEA.MessageSocket; 24 | using SAEA.MVC; 25 | using System; 26 | 27 | namespace GFFServer 28 | { 29 | internal class Program 30 | { 31 | private static MessageServer messageServer; 32 | 33 | private static SAEAMvcApplication fileServer; 34 | 35 | private static AudioServer _audioServer; 36 | 37 | private static void Main(string[] args) 38 | { 39 | Console.Title = "GFFServer"; 40 | 41 | 42 | ConsoleHelper.WriteLine("正在初始化消息服务器...", ConsoleColor.Green); 43 | messageServer = new MessageServer(count: 100); 44 | messageServer.OnAccepted += Server_OnAccepted; 45 | messageServer.OnError += Server_OnError; 46 | messageServer.OnDisconnected += Server_OnDisconnected; 47 | ConsoleHelper.WriteLine("消息服务器初始化完毕...", ConsoleColor.Green); 48 | 49 | ConsoleHelper.WriteLine("正在启动消息服务器...", ConsoleColor.Green); 50 | messageServer.Start(); 51 | ConsoleHelper.WriteLine("消息服务器启动完毕...", ConsoleColor.Green); 52 | 53 | 54 | ConsoleHelper.WriteLine("正在初始化文件服务器...", ConsoleColor.DarkYellow); 55 | var filePort = ServerConfig.Instance().FilePort; 56 | fileServer = new SAEAMvcApplication(port: filePort); 57 | fileServer.SetDefault("File", "Test"); 58 | ConsoleHelper.WriteLine("文件服务器初始化完毕...", ConsoleColor.DarkYellow); 59 | 60 | ConsoleHelper.WriteLine("正在启动文件服务器...", ConsoleColor.DarkYellow); 61 | fileServer.Start(); 62 | ConsoleHelper.WriteLine("文件服务器初始化完毕,http://127.0.0.1:" + filePort + "/...", ConsoleColor.DarkYellow); 63 | 64 | 65 | 66 | ConsoleHelper.WriteLine("正在初始化语音服务器...", ConsoleColor.DarkBlue); 67 | _audioServer = new AudioServer(filePort + 1); 68 | ConsoleHelper.WriteLine("语音服务器初始化完毕...", ConsoleColor.DarkBlue); 69 | ConsoleHelper.WriteLine("正在启动语音服务器...", ConsoleColor.DarkBlue); 70 | _audioServer.Start(); 71 | ConsoleHelper.WriteLine("语音服务器初始化完毕", ConsoleColor.DarkBlue); 72 | 73 | 74 | ConsoleHelper.WriteLine("点击回车,结束服务"); 75 | Console.ReadLine(); 76 | } 77 | 78 | private static void Server_OnDisconnected(string ID, Exception ex) 79 | { 80 | ConsoleHelper.WriteInfo(string.Format("客户端{0}已断开连接,当前连接数共记:{1}", ID, messageServer.ClientCounts)); 81 | } 82 | 83 | private static void Server_OnError(string ID, Exception ex) 84 | { 85 | ConsoleHelper.WriteErr(ex); 86 | } 87 | 88 | private static void Server_OnAccepted(object userToken) 89 | { 90 | var id = userToken.ToString(); 91 | 92 | ConsoleHelper.WriteInfo(string.Format("客户端{0}已连接,当前连接数共记:{1}", id, messageServer.ClientCounts)); 93 | } 94 | } 95 | } -------------------------------------------------------------------------------- /GFF.Component/ChatBox/ImageForm.designer.cs: -------------------------------------------------------------------------------- 1 | namespace GFF.Component.ChatBox 2 | { 3 | partial class ImageForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageForm)); 32 | this.panel1 = new System.Windows.Forms.Panel(); 33 | this.gifBox1 = new GFF.Component.ChatBox.GifBox(); 34 | this.SuspendLayout(); 35 | // 36 | // panel1 37 | // 38 | this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 39 | this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); 40 | this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; 41 | this.panel1.Location = new System.Drawing.Point(379, 2); 42 | this.panel1.Name = "panel1"; 43 | this.panel1.Size = new System.Drawing.Size(12, 12); 44 | this.panel1.TabIndex = 1; 45 | this.panel1.Click += new System.EventHandler(this.panel1_Click); 46 | // 47 | // gifBox1 48 | // 49 | this.gifBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 50 | | System.Windows.Forms.AnchorStyles.Left) 51 | | System.Windows.Forms.AnchorStyles.Right))); 52 | this.gifBox1.BorderColor = System.Drawing.Color.Transparent; 53 | this.gifBox1.Image = null; 54 | this.gifBox1.Location = new System.Drawing.Point(12, 12); 55 | this.gifBox1.Name = "gifBox1"; 56 | this.gifBox1.Size = new System.Drawing.Size(369, 317); 57 | this.gifBox1.TabIndex = 2; 58 | this.gifBox1.Text = "gifBox1"; 59 | // 60 | // ImageForm 61 | // 62 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 63 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 64 | this.BackColor = System.Drawing.Color.White; 65 | this.ClientSize = new System.Drawing.Size(393, 341); 66 | this.ControlBox = false; 67 | this.Controls.Add(this.panel1); 68 | this.Controls.Add(this.gifBox1); 69 | this.MaximizeBox = false; 70 | this.MinimizeBox = false; 71 | this.Name = "ImageForm"; 72 | this.Opacity = 0.95D; 73 | this.ShowIcon = false; 74 | this.ShowInTaskbar = false; 75 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 76 | this.ResumeLayout(false); 77 | 78 | } 79 | 80 | #endregion 81 | 82 | private System.Windows.Forms.Panel panel1; 83 | private GifBox gifBox1; 84 | } 85 | } -------------------------------------------------------------------------------- /GFFServer/GFFServerSC.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {DAD5C70E-B99D-4AFD-9FC6-B82924C4E452} 8 | Exe 9 | Properties 10 | GFFServer 11 | GFFServer 12 | v4.5 13 | 512 14 | 15 | 16 | x64 17 | true 18 | full 19 | true 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | true 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | False 38 | bin\Debug\GFF.dll 39 | 40 | 41 | False 42 | bin\Debug\GFF.Component.dll 43 | 44 | 45 | False 46 | bin\Debug\GFF.Core.dll 47 | 48 | 49 | False 50 | bin\Debug\GFF.Helper.dll 51 | 52 | 53 | False 54 | bin\Debug\GFF.Model.dll 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 80 | -------------------------------------------------------------------------------- /GFFClient/MessageHelper.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:20da4241-0bdc-4a06-8793-6d0889c31f95 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:MCITest 12 | 13 | 14 | * 创建年份:2015 15 | * 创建时间:2015-12-02 11:15:24 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | 20 | using GFF.Component.Config; 21 | using SAEA.MessageSocket; 22 | using System; 23 | using System.Net; 24 | using System.Text; 25 | using System.Threading.Tasks; 26 | 27 | namespace GFFClient 28 | { 29 | public class MessageHelper 30 | { 31 | public delegate void OnErrorHander(Exception ex, string msg); 32 | 33 | public delegate void OnMessageHanndle(string channelID, string msg); 34 | 35 | private static readonly object lockObj = new object(); 36 | 37 | private string _channelID; 38 | 39 | private string _userName; 40 | 41 | ClientConfig clientConfig; 42 | 43 | public MessageHelper() 44 | { 45 | clientConfig = ClientConfig.Instance(); 46 | } 47 | 48 | /// 49 | /// Tcp客户端 50 | /// 51 | public MessageClient Client { get; private set; } 52 | 53 | public void Start(string userName, string channelID) 54 | { 55 | _userName = userName; 56 | _channelID = channelID; 57 | 58 | Client = new MessageClient(10240, clientConfig.IP, clientConfig.Port); 59 | Client.OnChannelMessage += Client_OnChannelMessage; 60 | Client.OnPrivateMessage += Client_OnPrivateMessage; 61 | Client.OnError += Client_OnError; 62 | Client.Connect(); 63 | Client.Login(); 64 | Client.Subscribe(channelID); 65 | } 66 | 67 | private void Client_OnError(string ID, Exception ex) 68 | { 69 | OnError.Invoke(ex, ex.Message); 70 | } 71 | 72 | private void Client_OnChannelMessage(SAEA.MessageSocket.Model.Business.ChannelMessage msg) 73 | { 74 | OnMessage?.Invoke(_channelID, msg.Content); 75 | } 76 | 77 | private void Client_OnPrivateMessage(SAEA.MessageSocket.Model.Business.PrivateMessage msg) 78 | { 79 | OnMessage?.Invoke(msg.Receiver, msg.Content); 80 | } 81 | 82 | public void Publish(string channelID, string value) 83 | { 84 | Client.SendChannelMsg(channelID, value); 85 | } 86 | 87 | 88 | public void SendFile(string channelID, string fileName, Action callBack) 89 | { 90 | HttpSendFileAsync(fileName, url => { callBack?.Invoke(url); }); 91 | } 92 | 93 | 94 | public void HttpSendFileAsync(string fileName, Action callBack) 95 | { 96 | Task.Run(() => 97 | { 98 | using (WebClient webClient = new WebClient()) 99 | { 100 | var url = clientConfig.Url + Encoding.UTF8.GetString(webClient.UploadFile(clientConfig.Url + "Upload", fileName)); 101 | callBack.Invoke(url); 102 | } 103 | }); 104 | } 105 | 106 | public void Stop() 107 | { 108 | try 109 | { 110 | //Client.Dispose(); 111 | } 112 | catch { } 113 | } 114 | 115 | public event OnMessageHanndle OnMessage; 116 | 117 | public event OnErrorHander OnError; 118 | } 119 | } -------------------------------------------------------------------------------- /GFF.Component/Capture/FrmSize.designer.cs: -------------------------------------------------------------------------------- 1 | namespace GFF.Component.Capture 2 | { 3 | partial class FrmSize 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) { 15 | if (disposing && (components != null)) { 16 | components.Dispose(); 17 | } 18 | base.Dispose(disposing); 19 | } 20 | 21 | #region Windows Form Designer generated code 22 | 23 | /// 24 | /// Required method for Designer support - do not modify 25 | /// the contents of this method with the code editor. 26 | /// 27 | private void InitializeComponent() { 28 | this.textBox1 = new System.Windows.Forms.TextBox(); 29 | this.textBox2 = new System.Windows.Forms.TextBox(); 30 | this.button1 = new System.Windows.Forms.Button(); 31 | this.button2 = new System.Windows.Forms.Button(); 32 | this.SuspendLayout(); 33 | // 34 | // textBox1 35 | // 36 | this.textBox1.Location = new System.Drawing.Point(15, 12); 37 | this.textBox1.Name = "textBox1"; 38 | this.textBox1.Size = new System.Drawing.Size(60, 20); 39 | this.textBox1.TabIndex = 0; 40 | this.textBox1.Validating += new System.ComponentModel.CancelEventHandler(this.textBox_Validating); 41 | // 42 | // textBox2 43 | // 44 | this.textBox2.Location = new System.Drawing.Point(15, 41); 45 | this.textBox2.Name = "textBox2"; 46 | this.textBox2.Size = new System.Drawing.Size(60, 20); 47 | this.textBox2.TabIndex = 1; 48 | this.textBox2.Validating += new System.ComponentModel.CancelEventHandler(this.textBox_Validating); 49 | // 50 | // button1 51 | // 52 | this.button1.Location = new System.Drawing.Point(81, 10); 53 | this.button1.Name = "button1"; 54 | this.button1.Size = new System.Drawing.Size(75, 23); 55 | this.button1.TabIndex = 2; 56 | this.button1.Text = "button1"; 57 | this.button1.UseVisualStyleBackColor = true; 58 | this.button1.Click += new System.EventHandler(this.button1_Click); 59 | // 60 | // button2 61 | // 62 | this.button2.Location = new System.Drawing.Point(81, 39); 63 | this.button2.Name = "button2"; 64 | this.button2.Size = new System.Drawing.Size(75, 23); 65 | this.button2.TabIndex = 3; 66 | this.button2.Text = "button2"; 67 | this.button2.UseVisualStyleBackColor = true; 68 | this.button2.Click += new System.EventHandler(this.button2_Click); 69 | // 70 | // FrmSize 71 | // 72 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 73 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 74 | this.ClientSize = new System.Drawing.Size(171, 73); 75 | this.Controls.Add(this.button2); 76 | this.Controls.Add(this.button1); 77 | this.Controls.Add(this.textBox2); 78 | this.Controls.Add(this.textBox1); 79 | this.Name = "FrmSize"; 80 | this.Text = "FrmSize"; 81 | this.Load += new System.EventHandler(this.FrmSize_Load); 82 | this.ResumeLayout(false); 83 | this.PerformLayout(); 84 | 85 | } 86 | 87 | #endregion 88 | 89 | private System.Windows.Forms.TextBox textBox1; 90 | private System.Windows.Forms.TextBox textBox2; 91 | private System.Windows.Forms.Button button1; 92 | private System.Windows.Forms.Button button2; 93 | } 94 | } -------------------------------------------------------------------------------- /GFF.Helper/GlobalResourceManager.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归@wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * CLR版本:4.0.30319.42000 5 | * 唯一标识:58343535-9f8e-4c5a-b65c-a1321121a20f 6 | * 机器名称:WENLI-PC 7 | * 联系人邮箱:wenguoli_520@qq.com 8 | ***************************************************************************************************** 9 | * 项目名称:$projectname$ 10 | * 命名空间:GFF.Helper 11 | * 类名称:GlobalResourceManager 12 | * 创建时间:2016/12/27 14:12:31 13 | * 创建人:wenli 14 | * 创建说明: 15 | *****************************************************************************************************/ 16 | using System; 17 | using System.Collections.Generic; 18 | using System.Drawing; 19 | using System.IO; 20 | using System.Windows.Forms; 21 | 22 | namespace GFF.Helper 23 | { 24 | public class GlobalResourceManager 25 | { 26 | #region 初始化表情 27 | public static void Initialize() 28 | { 29 | try 30 | { 31 | #region Emotion 32 | List tempList = FileHelper.GetOffspringFiles(AppDomain.CurrentDomain.BaseDirectory + "Emotion\\"); 33 | List emotionFileList = new List(); 34 | foreach (string file in tempList) 35 | { 36 | string name = file.ToLower(); 37 | if (name.EndsWith(".bmp") || name.EndsWith(".jpg") || name.EndsWith(".jpeg") || name.EndsWith(".png") || name.EndsWith(".gif")) 38 | { 39 | emotionFileList.Add(name); 40 | } 41 | } 42 | emotionFileList.Sort(new Comparison(CompareEmotionName)); 43 | List emotionList = new List(); 44 | for (int i = 0; i < emotionFileList.Count; i++) 45 | { 46 | emotionList.Add(Image.FromStream(new MemoryStream(File.ReadAllBytes(AppDomain.CurrentDomain.BaseDirectory + "Emotion\\" + emotionFileList[i])))); 47 | } 48 | GlobalResourceManager.emotionList = emotionList; 49 | #endregion 50 | } 51 | catch (Exception ee) 52 | { 53 | MessageBox.Show("加载系统资源时,出现错误。" + ee.Message); 54 | } 55 | } 56 | public static int CompareEmotionName(string a, string b) 57 | { 58 | if (a.Length != b.Length) 59 | { 60 | return a.Length - b.Length; 61 | } 62 | return a.CompareTo(b); 63 | } 64 | #endregion 65 | 66 | #region EmotionList、EmotionDictionary 67 | private static List emotionList; 68 | public static List EmotionList 69 | { 70 | get 71 | { 72 | return emotionList; 73 | } 74 | } 75 | private static Dictionary emotionDictionary; 76 | public static Dictionary EmotionDictionary 77 | { 78 | get 79 | { 80 | if (emotionDictionary == null) 81 | { 82 | emotionDictionary = new Dictionary(); 83 | for (uint i = 0; i < emotionList.Count; i++) 84 | { 85 | emotionDictionary.Add(i, emotionList[(int)i]); 86 | } 87 | } 88 | else if (emotionDictionary.Count != emotionList.Count) 89 | { 90 | emotionDictionary = new Dictionary(); 91 | for (uint i = 0; i < emotionList.Count; i++) 92 | { 93 | emotionDictionary.Add(i, emotionList[(int)i]); 94 | } 95 | } 96 | return emotionDictionary; 97 | } 98 | } 99 | #endregion 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /GFF.Component/Emotion/EmotionForm.designer.cs: -------------------------------------------------------------------------------- 1 | namespace GFF.Component.Emotion 2 | { 3 | partial class EmotionForm 4 | { 5 | 6 | 7 | /// 8 | /// Clean up any resources being used. 9 | /// 10 | /// true if managed resources should be disposed; otherwise, false. 11 | protected override void Dispose(bool disposing) 12 | { 13 | if (disposing && (components != null)) 14 | { 15 | components.Dispose(); 16 | } 17 | base.Dispose(disposing); 18 | } 19 | 20 | #region Windows Form Designer generated code 21 | 22 | /// 23 | /// Required method for Designer support - do not modify 24 | /// the contents of this method with the code editor. 25 | /// 26 | private void InitializeComponent() 27 | { 28 | this.components = new System.ComponentModel.Container(); 29 | this.ImageMenu = new System.Windows.Forms.ContextMenuStrip(this.components); 30 | this.AddItem = new System.Windows.Forms.ToolStripMenuItem(); 31 | this.DeleteItem = new System.Windows.Forms.ToolStripMenuItem(); 32 | this.Demo = new System.Windows.Forms.PictureBox(); 33 | this.ImageMenu.SuspendLayout(); 34 | ((System.ComponentModel.ISupportInitialize)(this.Demo)).BeginInit(); 35 | this.SuspendLayout(); 36 | // 37 | // ImageMenu 38 | // 39 | this.ImageMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 40 | this.AddItem, 41 | this.DeleteItem}); 42 | this.ImageMenu.Name = "Menu"; 43 | this.ImageMenu.Size = new System.Drawing.Size(118, 48); 44 | // 45 | // AddItem 46 | // 47 | this.AddItem.Name = "AddItem"; 48 | this.AddItem.Size = new System.Drawing.Size(117, 22); 49 | this.AddItem.Text = "增加(&A)"; 50 | this.AddItem.Click += new System.EventHandler(this.AddItem_Click); 51 | // 52 | // DeleteItem 53 | // 54 | this.DeleteItem.Name = "DeleteItem"; 55 | this.DeleteItem.Size = new System.Drawing.Size(117, 22); 56 | this.DeleteItem.Text = "删除(&D)"; 57 | this.DeleteItem.Click += new System.EventHandler(this.DeleteItem_Click); 58 | // 59 | // Demo 60 | // 61 | this.Demo.BackColor = System.Drawing.Color.White; 62 | this.Demo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 63 | this.Demo.Location = new System.Drawing.Point(5, 5); 64 | this.Demo.Name = "Demo"; 65 | this.Demo.Size = new System.Drawing.Size(72, 72); 66 | this.Demo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; 67 | this.Demo.TabIndex = 1; 68 | this.Demo.TabStop = false; 69 | // 70 | // FrmCountenance 71 | // 72 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 73 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 74 | this.BackColor = System.Drawing.Color.White; 75 | this.CanResize = false; 76 | this.ClientSize = new System.Drawing.Size(464, 316); 77 | this.ControlBox = false; 78 | this.Controls.Add(this.Demo); 79 | this.DropBack = false; 80 | this.EffectCaption = CCWin.TitleType.None; 81 | this.Mobile = CCWin.MobileStyle.None; 82 | this.Name = "FrmCountenance"; 83 | this.Opacity = 0.9D; 84 | this.Radius = 4; 85 | this.Shadow = false; 86 | this.ShowDrawIcon = false; 87 | this.ShowInTaskbar = false; 88 | this.Special = false; 89 | this.TopMost = true; 90 | this.ImageMenu.ResumeLayout(false); 91 | ((System.ComponentModel.ISupportInitialize)(this.Demo)).EndInit(); 92 | this.ResumeLayout(false); 93 | 94 | } 95 | 96 | #endregion 97 | 98 | 99 | 100 | 101 | } 102 | } -------------------------------------------------------------------------------- /GFF.Helper/DataBuffer.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归@wenli所有,All Rights Reserved (C) 2015-2017 3 | ***************************************************************************************************** 4 | * CLR版本:4.0.30319.42000 5 | * 唯一标识:a1b00523-518e-4bbb-8cc9-16fe865ff5a2 6 | * 机器名称:WENLI-PC 7 | * 联系人邮箱:wenguoli_520@qq.com 8 | ***************************************************************************************************** 9 | * 项目名称:$projectname$ 10 | * 命名空间:GFF.Helper 11 | * 类名称:DataBuffer 12 | * 创建时间:2017/2/20 15:42:27 13 | * 创建人:wenli 14 | * 创建说明: 15 | *****************************************************************************************************/ 16 | using System; 17 | using System.Collections.Generic; 18 | using System.Linq; 19 | using System.Text; 20 | 21 | namespace GFF.Helper 22 | { 23 | /// 24 | /// DataBuffer 数据缓冲区。 25 | /// 26 | [Serializable] 27 | public class DataBuffer 28 | { 29 | #region Ctor 30 | public DataBuffer() 31 | { 32 | } 33 | 34 | public DataBuffer(byte[] _data) 35 | { 36 | this.data = _data; 37 | this.length = this.data.Length; 38 | this.offset = 0; 39 | } 40 | 41 | public DataBuffer(byte[] _data, int len) 42 | { 43 | this.data = _data; 44 | this.length = len; 45 | this.offset = 0; 46 | } 47 | 48 | public DataBuffer(byte[] _data, int _offset, int len) 49 | { 50 | this.data = _data; 51 | this.offset = _offset; 52 | this.length = len; 53 | } 54 | #endregion 55 | 56 | #region Data 57 | private byte[] data; 58 | /// 59 | /// Data 存储数据的内存。 60 | /// 61 | public byte[] Data 62 | { 63 | get 64 | { 65 | return data; 66 | } 67 | set 68 | { 69 | data = value; 70 | } 71 | } 72 | #endregion 73 | 74 | #region Offset 75 | private int offset; 76 | /// 77 | /// Offset 有效数据起始处的偏移位置。 78 | /// 79 | public int Offset 80 | { 81 | get 82 | { 83 | return offset; 84 | } 85 | set 86 | { 87 | offset = value; 88 | } 89 | } 90 | #endregion 91 | 92 | #region Length 93 | private int length; 94 | /// 95 | /// Length 有效数据的长度。 96 | /// 97 | public int Length 98 | { 99 | get 100 | { 101 | return length; 102 | } 103 | set 104 | { 105 | length = value; 106 | } 107 | } 108 | #endregion 109 | 110 | #region GetPureData 111 | public byte[] GetPureData() 112 | { 113 | if (this.offset == 0 && this.data.Length == this.length) 114 | { 115 | return this.data; 116 | } 117 | 118 | byte[] buff = new byte[this.length]; 119 | Buffer.BlockCopy(this.data, this.offset, buff, 0, this.length); 120 | return buff; 121 | } 122 | #endregion 123 | 124 | #region MergeDataBuffers 125 | /// 126 | /// MergeDataBuffers 按顺序将所有DataBuffer中的数据复制到一个新的缓冲区中。 127 | /// 128 | public static byte[] MergeDataBuffers(params DataBuffer[] ary) 129 | { 130 | if (ary == null || ary.Length == 0) 131 | { 132 | return null; 133 | } 134 | 135 | if (ary.Length == 1) 136 | { 137 | return ary[0].GetPureData(); 138 | } 139 | 140 | int totalLen = 0; 141 | for (int i = 0; i < ary.Length; i++) 142 | { 143 | totalLen += ary[i].Length; 144 | } 145 | 146 | byte[] buff = new byte[totalLen]; 147 | int offset = 0; 148 | for (int i = 0; i < ary.Length; i++) 149 | { 150 | Buffer.BlockCopy(ary[i].Data, ary[i].Offset, buff, offset, ary[i].Length); 151 | offset += ary[i].Length; 152 | } 153 | 154 | return buff; 155 | } 156 | #endregion 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /GFF.Component/Capture/ColorBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Drawing; 5 | using System.Data; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | using CCWin.SkinControl; 9 | 10 | namespace GFF.Component.Capture 11 | { 12 | [Designer(typeof(ColorBoxDesginer))] 13 | public partial class ColorBox : Control 14 | { 15 | public ColorBox() { 16 | InitializeComponent(); 17 | selectedColor = Color.Red; 18 | m_rectSelected = new Rectangle(-100, -100, 14, 14); 19 | 20 | this.SetStyle(ControlStyles.ResizeRedraw, true); 21 | this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); 22 | this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); 23 | this.SetStyle(ControlStyles.UserPaint, true); 24 | this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); 25 | } 26 | 27 | private Color selectedColor; 28 | public Color SelectedColor { 29 | get { return selectedColor; } 30 | } 31 | 32 | private Point m_ptCurrent; 33 | private Rectangle m_rectSelected; 34 | private Bitmap m_clrImage = global::GFF.Component.Properties.Resources.color; 35 | private Color m_lastColor; 36 | 37 | public delegate void ColorChangedHandler(object sender, ColorChangedEventArgs e); 38 | public event ColorChangedHandler ColorChanged; 39 | protected virtual void OnColorChanged(ColorChangedEventArgs e) { 40 | if (this.ColorChanged != null) 41 | ColorChanged(this, e); 42 | } 43 | 44 | protected override void OnClick(EventArgs e) { 45 | Color clr = m_clrImage.GetPixel(m_ptCurrent.X, m_ptCurrent.Y); 46 | if (clr.ToArgb() != Color.FromArgb(255, 254, 254, 254).ToArgb() 47 | && clr.ToArgb() != Color.FromArgb(255, 133, 141, 151).ToArgb() 48 | && clr.ToArgb() != Color.FromArgb(255, 110, 126, 149).ToArgb()) { 49 | if (this.selectedColor != clr) 50 | this.selectedColor = clr; 51 | this.Invalidate(); 52 | this.OnColorChanged(new ColorChangedEventArgs(clr)); 53 | } 54 | base.OnClick(e); 55 | } 56 | 57 | protected override void OnMouseMove(MouseEventArgs e) { 58 | m_ptCurrent = e.Location; 59 | try { 60 | Color clr = m_clrImage.GetPixel(m_ptCurrent.X, m_ptCurrent.Y); 61 | if (clr != m_lastColor) { 62 | if (clr.ToArgb() != Color.FromArgb(255, 254, 254, 254).ToArgb() 63 | && clr.ToArgb() != Color.FromArgb(255, 133, 141, 151).ToArgb() 64 | && clr.ToArgb() != Color.FromArgb(255, 110, 126, 149).ToArgb() 65 | && e.X > 39) { 66 | m_rectSelected.Y = e.Y > 17 ? 17 : 2; 67 | m_rectSelected.X = ((e.X - 39) / 15) * 15 + 38; 68 | this.Invalidate(); 69 | } else { 70 | m_rectSelected.X = m_rectSelected.Y = -100; 71 | this.Invalidate(); 72 | } 73 | } 74 | m_lastColor = clr; 75 | } finally { 76 | base.OnMouseMove(e); 77 | } 78 | } 79 | 80 | protected override void OnMouseLeave(EventArgs e) { 81 | m_rectSelected.X = m_rectSelected.Y = -100; 82 | this.Invalidate(); 83 | base.OnMouseLeave(e); 84 | } 85 | 86 | protected override void OnPaint(PaintEventArgs e) { 87 | Graphics g = e.Graphics; 88 | g.DrawImage(global::GFF.Component.Properties.Resources.color, 89 | new Rectangle(0, 0, 165, 35)); 90 | g.DrawRectangle(Pens.SteelBlue, 0, 0, 164, 34); 91 | SolidBrush sb = new SolidBrush(selectedColor); 92 | g.FillRectangle(sb, 9, 5, 24, 24); 93 | g.DrawRectangle(Pens.DarkCyan, m_rectSelected); 94 | base.OnPaint(e); 95 | } 96 | 97 | protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified) { 98 | base.SetBoundsCore(x, y, 165, 35, specified); 99 | } 100 | } 101 | 102 | public class ColorChangedEventArgs : EventArgs 103 | { 104 | private Color color; 105 | public Color Color { 106 | get { return color; } 107 | } 108 | 109 | public ColorChangedEventArgs(Color clr) { 110 | this.color = clr; 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /GFF.Component/Capture/ToolButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Drawing; 5 | using System.Data; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace GFF.Component.Capture 10 | { 11 | [Designer(typeof(ToolButtonDesigner))] 12 | public partial class ToolButton : Control 13 | { 14 | public ToolButton() { 15 | InitializeComponent(); 16 | } 17 | 18 | private Image btnImage; 19 | public Image BtnImage { 20 | get { return btnImage; } 21 | set { 22 | btnImage = value; 23 | this.Invalidate(); 24 | } 25 | } 26 | 27 | private bool isSelectedBtn; 28 | public bool IsSelectedBtn { 29 | get { return isSelectedBtn; } 30 | set { 31 | isSelectedBtn = value; 32 | if (!isSelectedBtn) this.isSingleSelectedBtn = false; 33 | } 34 | } 35 | 36 | private bool isSingleSelectedBtn; 37 | public bool IsSingleSelectedBtn { 38 | get { return isSingleSelectedBtn; } 39 | set { 40 | isSingleSelectedBtn = value; 41 | if (isSingleSelectedBtn) this.isSelectedBtn = true; 42 | } 43 | } 44 | 45 | private bool isSelected; 46 | public bool IsSelected { 47 | get { return isSelected; } 48 | set { 49 | //if (!this.isSelectedBtn) return; 50 | if (value == isSelected) return; 51 | isSelected = value; 52 | this.Invalidate(); 53 | } 54 | } 55 | 56 | public override string Text { 57 | get { 58 | return base.Text; 59 | } 60 | set { 61 | base.Text = value; 62 | Size se = TextRenderer.MeasureText(this.Text, this.Font); 63 | this.Width = se.Width + 21; 64 | } 65 | } 66 | 67 | private bool m_bMouseEnter; 68 | 69 | protected override void OnMouseEnter(EventArgs e) { 70 | m_bMouseEnter = true; 71 | this.Invalidate(); 72 | base.OnMouseEnter(e); 73 | } 74 | 75 | protected override void OnMouseLeave(EventArgs e) { 76 | m_bMouseEnter = false; 77 | this.Invalidate(); 78 | base.OnMouseLeave(e); 79 | } 80 | 81 | protected override void OnClick(EventArgs e) { 82 | if (this.isSelectedBtn) { 83 | if (this.isSelected) { 84 | if (!this.isSingleSelectedBtn) { 85 | this.isSelected = false; 86 | this.Invalidate(); 87 | } 88 | } else { 89 | this.isSelected = true; this.Invalidate(); 90 | for (int i = 0, len = this.Parent.Controls.Count; i < len; i++) { 91 | if (this.Parent.Controls[i] is ToolButton && this.Parent.Controls[i] != this) { 92 | if (((ToolButton)(this.Parent.Controls[i])).isSelected) 93 | ((ToolButton)(this.Parent.Controls[i])).IsSelected = false; 94 | } 95 | } 96 | } 97 | } 98 | this.Focus(); 99 | base.OnClick(e); 100 | } 101 | 102 | protected override void OnDoubleClick(EventArgs e) { 103 | this.OnClick(e); 104 | base.OnDoubleClick(e); 105 | } 106 | 107 | protected override void OnPaint(PaintEventArgs e) { 108 | Graphics g = e.Graphics; 109 | if (m_bMouseEnter) { 110 | g.FillRectangle(Brushes.LightBlue, this.ClientRectangle); 111 | g.DrawRectangle(Pens.DarkCyan, new Rectangle(0, 0, this.Width - 1, this.Height - 1)); 112 | } 113 | if (this.btnImage == null) 114 | g.DrawImage(global::GFF.Component.Properties.Resources.none, new Rectangle(2, 2, 17, 17)); 115 | else 116 | g.DrawImage(this.btnImage, new Rectangle(2, 2, 17, 17)); 117 | g.DrawString(this.Text, this.Font, Brushes.Black, 21, (this.Height - this.Font.Height) / 2); 118 | if (this.isSelected) 119 | g.DrawRectangle(Pens.DarkCyan, new Rectangle(0, 0, this.Width - 1, this.Height - 1)); 120 | 121 | base.OnPaint(e); 122 | } 123 | 124 | protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified) { 125 | base.SetBoundsCore(x, y, TextRenderer.MeasureText(this.Text, this.Font).Width + 21, 21, specified); 126 | } 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/ChatBoxContent.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************************************** 2 | * 本代码版权归Wenli所有,All Rights Reserved (C) 2015-2016 3 | ***************************************************************************************************** 4 | * 所属域:WENLI-PC 5 | * 登录用户:Administrator 6 | * CLR版本:4.0.30319.17929 7 | * 唯一标识:514d1f0c-d181-460f-a428-315c6bdc9247 8 | * 机器名称:WENLI-PC 9 | * 联系人邮箱:wenguoli_520@qq.com 10 | ***************************************************************************************************** 11 | * 命名空间:GFF.Component.ChatBox 12 | * 类名称:ChatBoxContent 13 | * 文件名:ChatBoxContent 14 | * 创建年份:2015 15 | * 创建时间:2015-12-16 15:54:31 16 | * 创建人:Wenli 17 | * 创建说明: 18 | *****************************************************************************************************/ 19 | 20 | using System; 21 | using System.Collections.Generic; 22 | using System.Drawing; 23 | using System.Linq; 24 | using System.Text; 25 | 26 | namespace GFF.Component.ChatBox 27 | { 28 | #region ChatBoxContent 29 | [Serializable] 30 | public class ChatBoxContent 31 | { 32 | public ChatBoxContent() { } 33 | public ChatBoxContent(string _text, Font _font, Color c) 34 | { 35 | this.text = _text; 36 | this.font = _font; 37 | this.color = c; 38 | } 39 | 40 | #region Text 41 | private string text = ""; 42 | /// 43 | /// 纯文本信息 44 | /// 45 | public string Text 46 | { 47 | get { return text; } 48 | set { text = value; } 49 | } 50 | #endregion 51 | 52 | #region Font 53 | private Font font; 54 | public Font Font 55 | { 56 | get { return font; } 57 | set { font = value; } 58 | } 59 | #endregion 60 | 61 | #region Color 62 | private Color color; 63 | public Color Color 64 | { 65 | get { return color; } 66 | set { color = value; } 67 | } 68 | #endregion 69 | 70 | #region ForeignImageDictionary 71 | private Dictionary foreignImageDictionary = new Dictionary(); 72 | /// 73 | /// 非内置的表情图片。key - 在ChatBox中的位置。 74 | /// 75 | public Dictionary ForeignImageDictionary 76 | { 77 | get { return foreignImageDictionary; } 78 | set { foreignImageDictionary = value; } 79 | } 80 | #endregion 81 | 82 | #region EmotionDictionary 83 | private Dictionary emotionDictionary = new Dictionary(); 84 | /// 85 | /// 内置的表情图片。key - 在ChatBox中的位置 ,value - 表情图片在内置列表中的index。 86 | /// 87 | public Dictionary EmotionDictionary 88 | { 89 | get { return emotionDictionary; } 90 | set { emotionDictionary = value; } 91 | } 92 | #endregion 93 | 94 | #region PicturePositions 95 | private List picturePositions = new List(); 96 | /// 97 | /// 所有图片的位置。从小到大排列。 98 | /// 99 | public List PicturePositions 100 | { 101 | get { return picturePositions; } 102 | set { picturePositions = value; } 103 | } 104 | #endregion 105 | 106 | public bool IsEmpty() 107 | { 108 | return string.IsNullOrEmpty(this.text) && (this.foreignImageDictionary == null || this.foreignImageDictionary.Count == 0) && (this.emotionDictionary == null || this.emotionDictionary.Count == 0); 109 | } 110 | 111 | public bool ContainsForeignImage() 112 | { 113 | return this.foreignImageDictionary != null && this.foreignImageDictionary.Count > 0; 114 | } 115 | 116 | public void AddForeignImage(uint pos, Image img) 117 | { 118 | this.foreignImageDictionary.Add(pos, img); 119 | } 120 | 121 | public void AddEmotion(uint pos, uint emotionIndex) 122 | { 123 | this.emotionDictionary.Add(pos, emotionIndex); 124 | } 125 | 126 | public string GetTextWithPicPlaceholder(string placeholder) 127 | { 128 | if (this.picturePositions == null || this.picturePositions.Count == 0) 129 | { 130 | return this.Text; 131 | } 132 | 133 | string tmp = this.Text; 134 | for (int i = this.picturePositions.Count - 1; i >= 0; i--) 135 | { 136 | tmp = tmp.Insert((int)this.picturePositions[i], placeholder); 137 | } 138 | return tmp; 139 | } 140 | } 141 | #endregion 142 | } 143 | -------------------------------------------------------------------------------- /GFF.Component/ChatBox/Internals/IOleObject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | using System.Drawing; 6 | 7 | namespace GFF.Component.ChatBox.Internals 8 | { 9 | [ComVisible(true), 10 | ComImport(), 11 | Guid("00000112-0000-0000-C000-000000000046"), 12 | InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] 13 | public interface IOleObject 14 | { 15 | 16 | [return: MarshalAs(UnmanagedType.I4)] 17 | [PreserveSig] 18 | int SetClientSite( 19 | [In, MarshalAs(UnmanagedType.Interface)] 20 | IOleClientSite pClientSite); 21 | 22 | [return: MarshalAs(UnmanagedType.I4)] 23 | [PreserveSig] 24 | int GetClientSite(out IOleClientSite site); 25 | 26 | [return: MarshalAs(UnmanagedType.I4)] 27 | [PreserveSig] 28 | int SetHostNames( 29 | [In, MarshalAs(UnmanagedType.LPWStr)] 30 | string szContainerApp, 31 | [In, MarshalAs(UnmanagedType.LPWStr)] 32 | string szContainerObj); 33 | 34 | [return: MarshalAs(UnmanagedType.I4)] 35 | [PreserveSig] 36 | int Close( 37 | [In, MarshalAs(UnmanagedType.I4)] 38 | int dwSaveOption); 39 | 40 | [return: MarshalAs(UnmanagedType.I4)] 41 | [PreserveSig] 42 | int SetMoniker( 43 | [In, MarshalAs(UnmanagedType.U4)] 44 | int dwWhichMoniker, 45 | [In, MarshalAs(UnmanagedType.Interface)] 46 | object pmk); 47 | 48 | [return: MarshalAs(UnmanagedType.I4)] 49 | [PreserveSig] 50 | int GetMoniker( 51 | [In, MarshalAs(UnmanagedType.U4)] 52 | int dwAssign, 53 | [In, MarshalAs(UnmanagedType.U4)] 54 | int dwWhichMoniker, 55 | out object moniker); 56 | 57 | [return: MarshalAs(UnmanagedType.I4)] 58 | [PreserveSig] 59 | int InitFromData( 60 | [In, MarshalAs(UnmanagedType.Interface)] 61 | IDataObject pDataObject, 62 | [In, MarshalAs(UnmanagedType.I4)] 63 | int fCreation, 64 | [In, MarshalAs(UnmanagedType.U4)] 65 | int dwReserved); 66 | 67 | int GetClipboardData( 68 | [In, MarshalAs(UnmanagedType.U4)] 69 | int dwReserved, 70 | out IDataObject data); 71 | 72 | [return: MarshalAs(UnmanagedType.I4)] 73 | [PreserveSig] 74 | int DoVerb( 75 | [In, MarshalAs(UnmanagedType.I4)] 76 | int iVerb, 77 | [In] 78 | IntPtr lpmsg, 79 | [In, MarshalAs(UnmanagedType.Interface)] 80 | IOleClientSite pActiveSite, 81 | [In, MarshalAs(UnmanagedType.I4)] 82 | int lindex, 83 | [In] 84 | IntPtr hwndParent, 85 | [In] 86 | COMRECT lprcPosRect); 87 | 88 | [return: MarshalAs(UnmanagedType.I4)] 89 | [PreserveSig] 90 | int EnumVerbs(out IEnumOLEVERB e); 91 | 92 | [return: MarshalAs(UnmanagedType.I4)] 93 | [PreserveSig] 94 | int Update(); 95 | 96 | [return: MarshalAs(UnmanagedType.I4)] 97 | [PreserveSig] 98 | int IsUpToDate(); 99 | 100 | [return: MarshalAs(UnmanagedType.I4)] 101 | [PreserveSig] 102 | int GetUserClassID( 103 | [In, Out] 104 | ref Guid pClsid); 105 | 106 | [return: MarshalAs(UnmanagedType.I4)] 107 | [PreserveSig] 108 | int GetUserType( 109 | [In, MarshalAs(UnmanagedType.U4)] 110 | int dwFormOfType, 111 | [Out, MarshalAs(UnmanagedType.LPWStr)] 112 | out string userType); 113 | 114 | [return: MarshalAs(UnmanagedType.I4)] 115 | [PreserveSig] 116 | int SetExtent( 117 | [In, MarshalAs(UnmanagedType.U4)] 118 | int dwDrawAspect, 119 | [In] 120 | Size pSizel); 121 | 122 | [return: MarshalAs(UnmanagedType.I4)] 123 | [PreserveSig] 124 | int GetExtent( 125 | [In, MarshalAs(UnmanagedType.U4)] 126 | int dwDrawAspect, 127 | [Out] 128 | Size pSizel); 129 | 130 | [return: MarshalAs(UnmanagedType.I4)] 131 | [PreserveSig] 132 | int Advise([In, MarshalAs(UnmanagedType.Interface)] IAdviseSink pAdvSink, out int cookie); 133 | 134 | [return: MarshalAs(UnmanagedType.I4)] 135 | [PreserveSig] 136 | int Unadvise([In, MarshalAs(UnmanagedType.U4)] int dwConnection); 137 | 138 | [return: MarshalAs(UnmanagedType.I4)] 139 | [PreserveSig] 140 | int EnumAdvise(out IEnumSTATDATA e); 141 | 142 | [return: MarshalAs(UnmanagedType.I4)] 143 | [PreserveSig] 144 | int GetMiscStatus([In, MarshalAs(UnmanagedType.U4)] int dwAspect, out int misc); 145 | 146 | [return: MarshalAs(UnmanagedType.I4)] 147 | [PreserveSig] 148 | int SetColorScheme([In] tagLOGPALETTE pLogpal); 149 | } 150 | } 151 | --------------------------------------------------------------------------------