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

  • 大小: 202KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-02
  • 語言: C#
  • 標(biāo)簽: tabwpfgif??

資源簡(jiǎn)介

此項(xiàng)目中有兩個(gè)工程 WpfTest 附加 GifImageLib 即可使用 美化了tabcontrol控件,同時(shí)支持gif動(dòng)畫,學(xué)習(xí)的好資料

資源截圖

代碼片段和文件信息

using?System;
using?System.IO;
using?System.Collections.Generic;
using?System.Windows;
using?System.Windows.Controls;
using?System.Windows.Media.Imaging;
using?System.Windows.Threading;

namespace?GifImageLib
{
????
????class?GifAnimation?:?Viewbox
????{
???????
????????private?class?Gifframe?:?Image
????????{
????????????
????????????public?int?delayTime;

????????????public?int?disposalMethod;
???????????
????????????public?int?left;
????????????
????????????public?int?top;
????????????
????????????public?int?width;
????????????
????????????public?int?height;
????????}

????????private?Canvas?canvas?=?null;

????????private?Listame>?frameList?=?null;

????????private?int?frameCounter?=?0;
????????private?int?numberOfframes?=?0;

????????private?int?numberOfLoops?=?-1;
????????private?int?currentLoop?=?0;

????????private?int?logicalWidth?=?0;
????????private?int?logicalHeight?=?0;

????????private?DispatcherTimer?frameTimer?=?null;

????????private?Gifframe?currentParseGifframe;

????????public?GifAnimation()
????????{
????????????canvas?=?new?Canvas();
????????????this.Child?=?canvas;
????????}

????????private?void?Reset()
????????{
????????????if?(frameList?!=?null)
????????????{
????????????????frameList.Clear();
????????????}
????????????frameList?=?null;
????????????frameCounter?=?0;
????????????numberOfframes?=?0;
????????????numberOfLoops?=?-1;
????????????currentLoop?=?0;
????????????logicalWidth?=?0;
????????????logicalHeight?=?0;
????????????if?(frameTimer?!=?null)
????????????{
????????????????frameTimer.Stop();
????????????????frameTimer?=?null;
????????????}
????????}

????????#region?PARSE
????????private?void?ParseGif(byte[]?gifData)
????????{
????????????frameList?=?new?Listame>();
????????????currentParseGifframe?=?new?Gifframe();
????????????ParseGifDataStream(gifData?0);
????????}

???????
????????private?int?ParseBlock(byte[]?gifData?int?offset)
????????{
????????????switch?(gifData[offset])
????????????{
????????????????case?0x21:
????????????????????if?(gifData[offset?+?1]?==?0xF9)
????????????????????{
????????????????????????return?ParseGraphicControlExtension(gifData?offset);
????????????????????}
????????????????????else
????????????????????{
????????????????????????return?ParseExtensionBlock(gifData?offset);
????????????????????}
????????????????case?0x2C:
????????????????????offset?=?ParseGraphicBlock(gifData?offset);
????????????????????frameList.Add(currentParseGifframe);
????????????????????currentParseGifframe?=?new?Gifframe();
????????????????????return?offset;
????????????????case?0x3B:
????????????????????return?-1;
????????????????default:
????????????????????throw?new?Exception(“GIF?format?incorrect:?missing?graphic?block?or?special-purpose?block.?“);
????????????}
????????}

????????private?int?ParseGraphicControlExtension(byte[]?gifData?int?offset)
????????{
????????????int?return

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-01-15?22:24??GifImageLib\
?????文件???????11103??2007-12-23?15:56??GifImageLib\GifAnimation.cs
?????文件???????14264??2016-01-15?22:24??GifImageLib\GifImage.cs
?????文件????????3870??2016-01-15?21:13??GifImageLib\GifImageLib.csproj
?????目錄???????????0??2016-01-15?21:16??GifImageLib\Properties\
?????文件????????2290??2007-12-23?12:37??GifImageLib\Properties\AssemblyInfo.cs
?????文件????????2862??2016-01-15?21:13??GifImageLib\Properties\Resources.Designer.cs
?????文件????????5612??2007-12-23?12:37??GifImageLib\Properties\Resources.resx
?????文件????????1111??2016-01-15?21:13??GifImageLib\Properties\Settings.Designer.cs
?????文件?????????201??2007-12-23?12:37??GifImageLib\Properties\Settings.settings
?????目錄???????????0??2016-01-15?21:16??GifImageLib\bin\
?????目錄???????????0??2016-01-15?21:31??GifImageLib\bin\Debug\
?????文件???????17920??2016-01-15?22:24??GifImageLib\bin\Debug\GifImageLib.dll
?????文件???????38400??2016-01-15?22:24??GifImageLib\bin\Debug\GifImageLib.pdb
?????目錄???????????0??2016-01-15?21:16??GifImageLib\obj\
?????目錄???????????0??2016-01-15?22:15??GifImageLib\obj\Debug\
?????文件????????6927??2016-01-15?21:17??GifImageLib\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件?????????180??2016-01-15?21:31??GifImageLib\obj\Debug\GifImageLib.Properties.Resources.resources
?????文件????????1117??2016-01-15?22:15??GifImageLib\obj\Debug\GifImageLib.csproj.FileListAbsolute.txt
?????文件?????????789??2016-01-15?21:31??GifImageLib\obj\Debug\GifImageLib.csproj.GenerateResource.Cache
?????文件????????1824??2016-01-15?22:15??GifImageLib\obj\Debug\GifImageLib.csprojResolveAssemblyReference.cache
?????文件???????17920??2016-01-15?22:24??GifImageLib\obj\Debug\GifImageLib.dll
?????文件???????38400??2016-01-15?22:24??GifImageLib\obj\Debug\GifImageLib.pdb
?????目錄???????????0??2016-01-15?21:16??GifImageLib\obj\Debug\TempPE\
?????文件????????3584??2016-01-15?21:13??GifImageLib\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
?????目錄???????????0??2016-01-15?22:16??WpfTest\
?????目錄???????????0??2016-01-15?20:56??WpfTest\Entity\
?????文件????????2314??2016-01-15?20:56??WpfTest\Entity\TabEntity.cs
?????文件????????2218??2016-01-14?21:54??WpfTest\Form1.Designer.cs
?????文件?????????357??2016-01-14?21:54??WpfTest\Form1.cs
?????文件????????5817??2016-01-14?21:54??WpfTest\Form1.resx
............此處省略67個(gè)文件信息

評(píng)論

共有 條評(píng)論

相關(guān)資源