資源簡介
VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼.

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
namespace?PhotoSprite
{
??///?
??///?圖像處理歷史記錄
??///?
??public?class?HistoryImage
??{
????private?int?current?=?-1;
????private?string?[]?History;
????private?string?initDirectory?=?““;
????private?int?max?=?0;
????private?int?count?=?0;
????private?int?save?=?-1;
????///?
????///?獲取或設(shè)置初始化文件目錄
????///?
????public?string?InitDirectory
????{
??????get
??????{
????????return?initDirectory;
??????}
??????set
??????{
????????initDirectory?=?value;
??????}
????}
????///?
????///?獲取?bool?值,指示是否可以撤消
????///?
????public?bool?CanUndo
????{
??????get
??????{
????????if?(current?>?0)
??????????return?true;
????????else
??????????return?false;
??????}
????}
????///?
????///?獲取?bool?值,指示是否可以重復(fù)
????///?
????public?bool?CanRedo
????{
??????get
??????{
????????if?(current???????????return?true;
????????else
??????????return?false;
??????}
????}
????///?
????///?獲取?bool?值,指示圖像是否已經(jīng)修改過
????///?
????public?bool?IsDirty
????{
??????get
??????{
????????if?(current?!=?save)
??????????return?true;
????????else
??????????return?false;
??????}
????}
????///?
????///?獲取最大歷史記錄數(shù)
????///?
????public?int?Max
????{
??????get
??????{
????????return?max;
??????}
????}
????///?
????///?獲取當(dāng)前已記錄的最大歷史記錄數(shù)
????///?
????public?int?Count
????{
??????get
??????{
????????return?count;
??????}
????}
????///?
????///?獲取或設(shè)置當(dāng)前圖像文件
????///?
????public?int?Current
????{
??????get
??????{
????????return?current;
??????}
??????set
??????{
????????current?=?value;
????????//?隊列循環(huán)
????????if?(current?0)
????????{
??????????if?(count?????????????current?=?0;
??????????else
????????????current?=?max?-?1;
????????}
????????else?if?(current?>=?max)
????????{
??????????current?=?0;
??????????count?=?max;
????????}
????????if?(current?>=?count)
??????????count?=?current?+?1;
????????OnHistoryChanged();
??????}
????}
????///?
????///?獲取當(dāng)前圖像文件名
????///?
????public?string?CurrentImage
????{
??????get
??????{
????????if?(current?>=?0)
??????????return?History[current];
????????else
??????????return?““;
??????}
????}
????///?
????///?獲取下一個圖像文件名
????///?
????public?string?NextImage
????{
??????get
??????{
????????int?next?=?(current?+?1)?%?max;
????????return?History[next];
??????}
????}
????///?
????///?建立歷史記錄類
????///?
????///?初始化文件目錄
????///?統(tǒng)計次數(shù)
????public?HistoryImage(string?initDirectory?int?max)
????{
??????this.initDirectory?=?initDirectory;
??????this.max?=?max;
??????History?=?new?string[max];
??????for?(int?i?=?0;?i???????{
????????History
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????.......??????5632??2005-09-23?06:56??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\PhotoSprite.vshost.exe
????.......?????22775??2006-04-05?07:38??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\About.gif
????.......???????172??2006-03-14?11:56??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\AddNoise.gif
????.......???????571??2006-03-07?13:34??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\ArtString.gif
????.......???????360??2006-03-10?19:08??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Blur.gif
????.......???????185??2006-03-12?12:09??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Bold.gif
????.......???????563??2005-12-25?12:10??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Brightness.gif
????.......???????227??2005-12-24?12:52??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Brush.gif
????.......???????605??2006-03-14?11:50??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Channel.gif
????.......???????143??2006-01-31?18:07??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\ColorBalance.gif
????.......???????351??2005-12-24?11:50??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\ColorPicker.gif
????.......???????271??2006-03-14?12:15??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Contrast.gif
????.......???????573??2005-12-24?11:35??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Copy.gif
????.......???????210??2005-12-25?12:12??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Crop.gif
????.......???????564??2006-03-14?11:48??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Curves.gif
????.......???????329??2005-12-24?11:34??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Cut.gif
????.......???????101??2006-01-31?17:35??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Diffuse.gif
????.......???????592??2006-03-14?11:49??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\EdgeDetect.gif
????.......????????76??2006-03-14?11:03??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\EllipseSelect.gif
????.......???????250??2006-01-31?17:44??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Emboss.gif
????.......???????322??2006-03-14?12:09??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Equalizer.gif
????.......???????365??2005-12-24?12:51??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Eraser.gif
????.......???????165??2006-01-31?17:49??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\FindEdge.gif
????.......???????626??2006-02-17?13:33??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Fireworks.gif
????.......???????333??2005-12-30?10:36??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\FlipH.gif
????.......???????330??2005-12-30?10:36??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\FlipV.gif
????.......???????318??2006-03-15?10:57??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\GlowingEdge.gif
????.......???????367??2005-12-25?12:21??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Gray.gif
????.......???????403??2005-12-24?11:50??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Hand.gif
????.......???????614??2005-12-24?11:36??VS2005C《圖像編程精髓從開發(fā)自己的Photoshop開始》配套代碼\bin\Debug\XP\Help.gif
............此處省略269個文件信息
評論
共有 條評論