OSDN Git Service

25d72501b415b95ad88a9b740fdd75a811e44b6c
[dtxmania/dtxmania.git] / DTXCreatorプロジェクト / コード / 02.WAV_BMP_AVI / CBMP.cs
1 using System;\r
2 using System.Collections.Generic;\r
3 using System.Text;\r
4 using System.Drawing;\r
5 using System.Windows.Forms;\r
6 using FDK;\r
7 \r
8 namespace DTXCreator.WAV_BMP_AVI\r
9 {\r
10         internal class CBMP\r
11         {\r
12                 public bool bテクスチャ;\r
13                 public Color col背景色 = SystemColors.Window;\r
14                 public Color col文字色 = SystemColors.WindowText;\r
15                 public int nBMP番号1to1295 = 1;\r
16                 public string strファイル名 = "";\r
17                 public string strラベル名 = "";\r
18 \r
19                 public bool b内容が同じ・BMP番号を除くwith( CBMP bc )\r
20                 {\r
21                         return ( ( this.strラベル名.Equals( bc.strラベル名 ) && this.strファイル名.Equals( bc.strファイル名 ) ) && ( ( ( this.bテクスチャ == bc.bテクスチャ ) && ( this.col文字色 == bc.col文字色 ) ) && ( this.col背景色 == bc.col背景色 ) ) );\r
22                 }\r
23                 public bool b内容が同じwith( CBMP bc )\r
24                 {\r
25                         return ( ( ( this.strラベル名.Equals( bc.strラベル名 ) && ( this.nBMP番号1to1295 == bc.nBMP番号1to1295 ) ) && ( this.strファイル名.Equals( bc.strファイル名 ) && ( this.bテクスチャ == bc.bテクスチャ ) ) ) && ( ( this.col文字色 == bc.col文字色 ) && ( this.col背景色 == bc.col背景色 ) ) );\r
26                 }\r
27                 public void tコピーfrom( CBMP bc )\r
28                 {\r
29                         this.bテクスチャ = bc.bテクスチャ;\r
30                         this.strラベル名 = bc.strラベル名;\r
31                         if( ( bc.nBMP番号1to1295 < 1 ) || ( bc.nBMP番号1to1295 > 0x50f ) )\r
32                         {\r
33                                 throw new Exception( "BMP番号が範囲を超えています。-> [" + this.nBMP番号1to1295 + "]" );\r
34                         }\r
35                         this.nBMP番号1to1295 = bc.nBMP番号1to1295;\r
36                         this.strファイル名 = bc.strファイル名;\r
37                         this.col背景色 = bc.col背景色;\r
38                         this.col文字色 = bc.col文字色;\r
39                 }\r
40                 public void tコピーfrom( ListViewItem lvi )\r
41                 {\r
42                         this.bテクスチャ = lvi.SubItems[ 0 ].Text.Equals( "o" );\r
43                         this.strラベル名 = lvi.SubItems[ 1 ].Text;\r
44                         this.nBMP番号1to1295 = C変換.n36進数2桁の文字列を数値に変換して返す( lvi.SubItems[ 2 ].Text );\r
45                         this.strファイル名 = lvi.SubItems[ 3 ].Text;\r
46                         this.col背景色 = lvi.BackColor;\r
47                         this.col文字色 = lvi.ForeColor;\r
48                 }\r
49                 public void tコピーto( ListViewItem lvi )\r
50                 {\r
51                         lvi.SubItems[ 0 ].Text = this.bテクスチャ ? "o" : "";\r
52                         lvi.SubItems[ 1 ].Text = this.strラベル名;\r
53                         lvi.SubItems[ 2 ].Text = C変換.str数値を36進数2桁に変換して返す( this.nBMP番号1to1295 );\r
54                         lvi.SubItems[ 3 ].Text = this.strファイル名;\r
55                         lvi.ForeColor = this.col文字色;\r
56                         lvi.BackColor = this.col背景色;\r
57                 }\r
58                 public ListViewItem t現在の内容から新しいListViewItemを作成して返す()\r
59                 {\r
60                         ListViewItem item = new ListViewItem( new string[] { this.bテクスチャ ? "o" : "", this.strラベル名, C変換.str数値を36進数2桁に変換して返す( this.nBMP番号1to1295 ), this.strファイル名 } );\r
61                         item.ForeColor = this.col文字色;\r
62                         item.BackColor = this.col背景色;\r
63                         return item;\r
64                 }\r
65         }\r
66 }\r