+++ /dev/null
-using System;\r
-using System.Collections.Generic;\r
-using System.Text;\r
-using System.Drawing;\r
-using System.Windows.Forms;\r
-using FDK;\r
-\r
-namespace DTXCreator.WAV_BMP_AVI\r
-{\r
- internal class CWAV\r
- {\r
- public bool bBGMとして使用;\r
- public Color col背景色 = SystemColors.Window;\r
- public Color col文字色 = SystemColors.WindowText;\r
- public int nWAV番号1to1295 = 1;\r
- public int n位置_100to100;\r
- public int n音量0to100 = 100;\r
- public string strファイル名 = "";\r
- public string strラベル名 = "";\r
-\r
- public bool b内容が同じ_WAV番号を除くwith( CWAV wc )\r
- {\r
- 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
- }\r
- public bool b内容が同じwith( CWAV wc )\r
- {\r
- 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
- }\r
- public void tコピーfrom( CWAV wc )\r
- {\r
- this.strラベル名 = wc.strラベル名;\r
- if( ( wc.nWAV番号1to1295 < 1 ) || ( wc.nWAV番号1to1295 > 36 * 36 - 1 ) )\r
- {\r
- throw new Exception( "WAV番号が範囲を超えています。-> [" + this.nWAV番号1to1295 + "]" );\r
- }\r
- this.nWAV番号1to1295 = wc.nWAV番号1to1295;\r
- this.strファイル名 = wc.strファイル名;\r
- if( ( wc.n音量0to100 < 0 ) || ( wc.n音量0to100 > 100 ) )\r
- {\r
- throw new Exception( "音量が範囲を超えています。-> [" + this.n音量0to100 + "]" );\r
- }\r
- this.n音量0to100 = wc.n音量0to100;\r
- if( ( wc.n位置_100to100 < -100 ) || ( wc.n位置_100to100 > 100 ) )\r
- {\r
- throw new Exception( "位置が範囲を超えています。-> [" + this.n位置_100to100 + "]" );\r
- }\r
- this.n位置_100to100 = wc.n位置_100to100;\r
- this.bBGMとして使用 = wc.bBGMとして使用;\r
- this.col文字色 = wc.col文字色;\r
- this.col背景色 = wc.col背景色;\r
- }\r
- public void tコピーfrom( ListViewItem lvi )\r
- {\r
- this.strラベル名 = lvi.SubItems[ 0 ].Text;\r
- this.nWAV番号1to1295 = C変換.n36進数2桁の文字列を数値に変換して返す( lvi.SubItems[ 1 ].Text );\r
- this.strファイル名 = lvi.SubItems[ 2 ].Text;\r
- if( !int.TryParse( lvi.SubItems[ 3 ].Text, out this.n音量0to100 ) )\r
- {\r
- this.n音量0to100 = 100;\r
- }\r
- if( ( this.n音量0to100 < 0 ) || ( this.n音量0to100 > 100 ) )\r
- {\r
- throw new Exception( "音量の値が範囲を超えています。-> [" + this.n音量0to100 + "]" );\r
- }\r
- if( !int.TryParse( lvi.SubItems[ 4 ].Text, out this.n位置_100to100 ) )\r
- {\r
- this.n位置_100to100 = 0;\r
- }\r
- if( ( this.n位置_100to100 < -100 ) || ( this.n位置_100to100 > 100 ) )\r
- {\r
- throw new Exception( "位置の値が範囲を超えています。-> [" + this.n音量0to100 + "]" );\r
- }\r
- this.bBGMとして使用 = lvi.SubItems[ 5 ].Text.Equals( "o" );\r
- this.col文字色 = lvi.ForeColor;\r
- this.col背景色 = lvi.BackColor;\r
- }\r
- public void tコピーto( ListViewItem lvi )\r
- {\r
- lvi.SubItems[ 0 ].Text = this.strラベル名;\r
- lvi.SubItems[ 1 ].Text = C変換.str数値を36進数2桁に変換して返す( this.nWAV番号1to1295 );\r
- lvi.SubItems[ 2 ].Text = this.strファイル名;\r
- lvi.SubItems[ 3 ].Text = this.n音量0to100.ToString();\r
- lvi.SubItems[ 4 ].Text = this.n位置_100to100.ToString();\r
- lvi.SubItems[ 5 ].Text = this.bBGMとして使用 ? "o" : "";\r
- lvi.ForeColor = this.col文字色;\r
- lvi.BackColor = this.col背景色;\r
- }\r
- public ListViewItem t現在の内容から新しいListViewItemを作成して返す()\r
- {\r
- 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
- item.ForeColor = this.col文字色;\r
- item.BackColor = this.col背景色;\r
- return item;\r
- }\r
- }\r
-}\r