-
大小: 278KB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2021-05-25
- 語(yǔ)言: C#
- 標(biāo)簽:
資源簡(jiǎn)介
C#開(kāi)發(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)修改過(guò)
????///?
????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;
????????//?隊(duì)列循環(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?““;
??????}
????}
????///?
????///?獲取下一個(gè)圖像文件名
????///?
????public?string?NextImage
????{
??????get
??????{
????????int?next?=?(current?+?1)?%?max;
????????return?History[next];
??????}
????}
????///?
????///?建立歷史記錄類
????///?
????///?初始化文件目錄
????///?統(tǒng)計(jì)次數(shù)
????public?HistoryImage(string?initDirectory?int?max)
????{
??????this.initDirectory?=?initDirectory;
??????this.max?=?max;
??????History?=?new?string[max];
??????for?(int?i?=?0;?i???????{
????????History
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????4355??2006-04-01?03:42??PhotoSprite\History.cs
?????文件???????2238??2005-12-23?15:05??PhotoSprite\Logo.ICO
?????文件??????19214??2006-04-05?08:35??PhotoSprite\PhotoSprite.csproj
?????文件????????603??2006-04-05?08:35??PhotoSprite\PhotoSprite.csproj.user
?????文件????????910??2005-12-23?14:22??PhotoSprite\PhotoSprite.sln
????..A..H.????163840??2006-10-12?21:06??PhotoSprite\PhotoSprite.suo
?????文件????????741??2006-03-04?10:13??PhotoSprite\Program.cs
?????文件????????279??2006-05-23?17:13??PhotoSprite\Readme.txt
?????文件??????10364??2006-04-05?08:02??PhotoSprite\WinMain.cs
?????文件?????182917??2006-04-05?08:02??PhotoSprite\WinMain.Designer.cs
?????文件??????10094??2006-04-05?06:54??PhotoSprite\WinMain.Menu.Context.cs
?????文件??????48491??2006-04-05?07:01??PhotoSprite\WinMain.Menu.cs
?????文件??????29690??2006-04-05?08:02??PhotoSprite\WinMain.resx
?????文件??????18389??2006-04-05?07:01??PhotoSprite\WinMain.Tool.cs
?????文件???????3214??2006-03-30?00:02??PhotoSprite\Widget\AngleChooser.cs
?????文件???????1252??2006-01-10?16:41??PhotoSprite\Widget\AngleChooser.designer.cs
?????文件???????5814??2006-01-10?16:41??PhotoSprite\Widget\AngleChooser.resx
?????文件???????5564??2006-04-05?07:50??PhotoSprite\Widget\Canvas.cs
?????文件???????1717??2006-03-12?10:10??PhotoSprite\Widget\Canvas.Designer.cs
?????文件???????6016??2006-03-12?10:10??PhotoSprite\Widget\Canvas.resx
?????文件???????2858??2006-04-05?07:04??PhotoSprite\Widget\la
?????文件???????1231??2006-02-16?20:31??PhotoSprite\Widget\la
?????文件???????5814??2006-02-16?20:31??PhotoSprite\Widget\la
?????文件???????3653??2006-03-30?13:47??PhotoSprite\Tool\BrushTool.cs
?????文件???????2534??2006-03-30?14:07??PhotoSprite\Tool\ColorPickerTool.cs
?????文件???????2542??2006-03-30?00:06??PhotoSprite\Tool\EllipseSelectTool.cs
?????文件???????2804??2006-03-30?03:35??PhotoSprite\Tool\EraserTool.cs
?????文件???????2853??2006-03-30?00:06??PhotoSprite\Tool\LassoSelectTool.cs
?????文件???????3907??2006-03-30?14:41??PhotoSprite\Tool\LineTool.cs
?????文件???????6893??2006-03-30?14:09??PhotoSprite\Tool\PaintBucketTool.cs
............此處省略150個(gè)文件信息
評(píng)論
共有 條評(píng)論