2 using System.Collections.Generic;
\r
4 using System.Drawing;
\r
5 using System.Windows.Forms;
\r
8 namespace DTXCreator.WAV_BMP_AVI
\r
12 public bool bBGMとして使用;
\r
13 public Color col背景色 = SystemColors.Window;
\r
14 public Color col文字色 = SystemColors.WindowText;
\r
15 public int nWAV番号1to1295 = 1;
\r
16 public int n位置_100to100;
\r
17 public int n音量0to100 = 100;
\r
18 public string strファイル名 = "";
\r
19 public string strラベル名 = "";
\r
21 public bool b内容が同じ・WAV番号を除くwith( CWAV wc )
\r
23 return ( ( ( this.strラベル名.Equals( wc.strラベル名 ) && this.strファイル名.Equals( wc.strファイル名 ) ) && ( ( this.n音量0to100 == wc.n音量0to100 ) && ( this.n位置_100to100 == wc.n位置_100to100 ) ) ) && ( ( ( this.bBGMとして使用 == wc.bBGMとして使用 ) && ( this.col文字色 == wc.col文字色 ) ) && ( this.col背景色 == wc.col背景色 ) ) );
\r
25 public bool b内容が同じwith( CWAV wc )
\r
27 return ( ( ( this.strラベル名.Equals( wc.strラベル名 ) && ( this.nWAV番号1to1295 == wc.nWAV番号1to1295 ) ) && ( this.strファイル名.Equals( wc.strファイル名 ) && ( this.n音量0to100 == wc.n音量0to100 ) ) ) && ( ( ( this.n位置_100to100 == wc.n位置_100to100 ) && ( this.bBGMとして使用 == wc.bBGMとして使用 ) ) && ( ( this.col文字色 == wc.col文字色 ) && ( this.col背景色 == wc.col背景色 ) ) ) );
\r
29 public void tコピーfrom( CWAV wc )
\r
31 this.strラベル名 = wc.strラベル名;
\r
32 if( ( wc.nWAV番号1to1295 < 1 ) || ( wc.nWAV番号1to1295 > 0x50f ) )
\r
34 throw new Exception( "WAV番号が範囲を超えています。-> [" + this.nWAV番号1to1295 + "]" );
\r
36 this.nWAV番号1to1295 = wc.nWAV番号1to1295;
\r
37 this.strファイル名 = wc.strファイル名;
\r
38 if( ( wc.n音量0to100 < 0 ) || ( wc.n音量0to100 > 100 ) )
\r
40 throw new Exception( "音量が範囲を超えています。-> [" + this.n音量0to100 + "]" );
\r
42 this.n音量0to100 = wc.n音量0to100;
\r
43 if( ( wc.n位置_100to100 < -100 ) || ( wc.n位置_100to100 > 100 ) )
\r
45 throw new Exception( "位置が範囲を超えています。-> [" + this.n位置_100to100 + "]" );
\r
47 this.n位置_100to100 = wc.n位置_100to100;
\r
48 this.bBGMとして使用 = wc.bBGMとして使用;
\r
49 this.col文字色 = wc.col文字色;
\r
50 this.col背景色 = wc.col背景色;
\r
52 public void tコピーfrom( ListViewItem lvi )
\r
54 this.strラベル名 = lvi.SubItems[ 0 ].Text;
\r
55 this.nWAV番号1to1295 = C変換.n36進数2桁の文字列を数値に変換して返す( lvi.SubItems[ 1 ].Text );
\r
56 this.strファイル名 = lvi.SubItems[ 2 ].Text;
\r
57 if( !int.TryParse( lvi.SubItems[ 3 ].Text, out this.n音量0to100 ) )
\r
59 this.n音量0to100 = 100;
\r
61 if( ( this.n音量0to100 < 0 ) || ( this.n音量0to100 > 100 ) )
\r
63 throw new Exception( "音量の値が範囲を超えています。-> [" + this.n音量0to100 + "]" );
\r
65 if( !int.TryParse( lvi.SubItems[ 4 ].Text, out this.n位置_100to100 ) )
\r
67 this.n位置_100to100 = 0;
\r
69 if( ( this.n位置_100to100 < -100 ) || ( this.n位置_100to100 > 100 ) )
\r
71 throw new Exception( "位置の値が範囲を超えています。-> [" + this.n音量0to100 + "]" );
\r
73 this.bBGMとして使用 = lvi.SubItems[ 5 ].Text.Equals( "o" );
\r
74 this.col文字色 = lvi.ForeColor;
\r
75 this.col背景色 = lvi.BackColor;
\r
77 public void tコピーto( ListViewItem lvi )
\r
79 lvi.SubItems[ 0 ].Text = this.strラベル名;
\r
80 lvi.SubItems[ 1 ].Text = C変換.str数値を36進数2桁に変換して返す( this.nWAV番号1to1295 );
\r
81 lvi.SubItems[ 2 ].Text = this.strファイル名;
\r
82 lvi.SubItems[ 3 ].Text = this.n音量0to100.ToString();
\r
83 lvi.SubItems[ 4 ].Text = this.n位置_100to100.ToString();
\r
84 lvi.SubItems[ 5 ].Text = this.bBGMとして使用 ? "o" : "";
\r
85 lvi.ForeColor = this.col文字色;
\r
86 lvi.BackColor = this.col背景色;
\r
88 public ListViewItem t現在の内容から新しいListViewItemを作成して返す()
\r
90 ListViewItem item = new ListViewItem( new string[] { this.strラベル名, C変換.str数値を36進数2桁に変換して返す( this.nWAV番号1to1295 ), this.strファイル名, this.n音量0to100.ToString(), this.n位置_100to100.ToString(), this.bBGMとして使用 ? "o" : "" } );
\r
91 item.ForeColor = this.col文字色;
\r
92 item.BackColor = this.col背景色;
\r