OSDN Git Service

・ 「DTXCreatorプロジェクト」と「実行時フォルダ(DTXCreator)」を trunk/ に追加。
[dtxmania/dtxmania.git] / DTXCreatorプロジェクト / コード / 02.WAV_BMP_AVI / CAVI.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 CAVI\r
11         {\r
12                 public Color col背景色 = SystemColors.Window;\r
13                 public Color col文字色 = SystemColors.WindowText;\r
14                 public int nAVI番号1to1295 = 1;\r
15                 public string strファイル名 = "";\r
16                 public string strラベル名 = "";\r
17 \r
18                 public bool b内容が同じ・AVI番号を除くwith( CAVI ac )\r
19                 {\r
20                         return ( ( this.strラベル名.Equals( ac.strラベル名 ) && this.strファイル名.Equals( ac.strファイル名 ) ) && ( ( this.col文字色 == ac.col文字色 ) && ( this.col背景色 == ac.col背景色 ) ) );\r
21                 }\r
22                 public bool b内容が同じwith( CAVI ac )\r
23                 {\r
24                         return ( ( this.strラベル名.Equals( ac.strラベル名 ) && ( this.nAVI番号1to1295 == ac.nAVI番号1to1295 ) ) && ( ( this.strファイル名.Equals( ac.strファイル名 ) && ( this.col文字色 == ac.col文字色 ) ) && ( this.col背景色 == ac.col背景色 ) ) );\r
25                 }\r
26                 public void tコピーfrom( CAVI ac )\r
27                 {\r
28                         this.strラベル名 = ac.strラベル名;\r
29                         if( ( ac.nAVI番号1to1295 < 1 ) || ( ac.nAVI番号1to1295 > 0x50f ) )\r
30                         {\r
31                                 throw new Exception( "AVI番号が範囲を超えています。-> [" + this.nAVI番号1to1295 + "]" );\r
32                         }\r
33                         this.nAVI番号1to1295 = ac.nAVI番号1to1295;\r
34                         this.strファイル名 = ac.strファイル名;\r
35                         this.col背景色 = ac.col背景色;\r
36                         this.col文字色 = ac.col文字色;\r
37                 }\r
38                 public void tコピーfrom( ListViewItem lvi )\r
39                 {\r
40                         this.strラベル名 = lvi.SubItems[ 0 ].Text;\r
41                         this.nAVI番号1to1295 = C変換.n36進数2桁の文字列を数値に変換して返す( lvi.SubItems[ 1 ].Text );\r
42                         this.strファイル名 = lvi.SubItems[ 2 ].Text;\r
43                         this.col背景色 = lvi.BackColor;\r
44                         this.col文字色 = lvi.ForeColor;\r
45                 }\r
46                 public void tコピーto( ListViewItem lvi )\r
47                 {\r
48                         lvi.SubItems[ 0 ].Text = this.strラベル名;\r
49                         lvi.SubItems[ 1 ].Text = C変換.str数値を36進数2桁に変換して返す( this.nAVI番号1to1295 );\r
50                         lvi.SubItems[ 2 ].Text = this.strファイル名;\r
51                         lvi.ForeColor = this.col文字色;\r
52                         lvi.BackColor = this.col背景色;\r
53                 }\r
54                 public ListViewItem t現在の内容から新しいListViewItemを作成して返す()\r
55                 {\r
56                         ListViewItem item = new ListViewItem( new string[] { this.strラベル名, C変換.str数値を36進数2桁に変換して返す( this.nAVI番号1to1295 ), this.strファイル名 } );\r
57                         item.ForeColor = this.col文字色;\r
58                         item.BackColor = this.col背景色;\r
59                         return item;\r
60                 }\r
61         }\r
62 }\r