Esempio n. 1
0
        public void tキャッシュに追加する(ListViewItem 追加するLVI)
        {
            CWAV cwav = new CWAV();

            cwav.tコピーfrom(追加するLVI);
            this.tキャッシュに追加する(cwav);
        }
Esempio n. 2
0
        public void t新規生成のUndo(CWAV wc生成前はNull, CWAV wc生成されたWAVの複製)
        {
            int num = wc生成されたWAVの複製.nWAV番号1to1295;

            new CWAV().tコピーto(this.listViewWAVリスト.Items[num - 1]);
            this.WAVキャッシュ.tWAVをキャッシュから削除する(num);
            this._Form.tタブを選択する(CMainForm.Eタブ種別.WAV);
            this.listViewWAVリスト.Refresh();
        }
Esempio n. 3
0
        public void t新規生成のRedo(CWAV wc生成前はNull, CWAV wc生成されたWAVの複製)
        {
            int  num  = wc生成されたWAVの複製.nWAV番号1to1295;
            CWAV cwav = this.WAVキャッシュ.tWAVをキャッシュから検索して返す_なければ新規生成する(num);

            cwav.tコピーfrom(wc生成されたWAVの複製);
            cwav.tコピーto(this.listViewWAVリスト.Items[num - 1]);
            this._Form.tタブを選択する(CMainForm.Eタブ種別.WAV);
            this.listViewWAVリスト.Refresh();
        }
Esempio n. 4
0
        public void tキャッシュに追加する(CWAV 追加するセル)
        {
            CWAV cwav;

            if (this.dicWAVディクショナリ.TryGetValue(追加するセル.nWAV番号1to1295, out cwav))
            {
                this.dicWAVディクショナリ.Remove(追加するセル.nWAV番号1to1295);
            }
            this.dicWAVディクショナリ.Add(追加するセル.nWAV番号1to1295, 追加するセル);
        }
Esempio n. 5
0
        public void tWAV編集のUndo(CWAV wc変更前, CWAV wc変更後)
        {
            int  num  = wc変更前.nWAV番号1to1295;
            CWAV cwav = this.WAVキャッシュ.tWAVをキャッシュから検索して返す(num);

            cwav.tコピーfrom(wc変更前);
            cwav.tコピーto(this.listViewWAVリスト.Items[num - 1]);
            this._Form.tWAV_BMP_AVIリストのカーソルを全部同じ行に合わせる(cwav.nWAV番号1to1295 - 1);
            this._Form.tタブを選択する(CMainForm.Eタブ種別.WAV);
            this.listViewWAVリスト.Refresh();
        }
Esempio n. 6
0
        public void tWAVをキャッシュから削除する(int nWAV番号1to1295)
        {
            if ((nWAV番号1to1295 < 1) || (nWAV番号1to1295 > 36 * 36 - 1))
            {
                throw new Exception("WAV番号が範囲を超えています。-> [" + nWAV番号1to1295 + "]");
            }
            CWAV cwav = null;

            if (this.dicWAVディクショナリ.TryGetValue(nWAV番号1to1295, out cwav))
            {
                this.dicWAVディクショナリ.Remove(nWAV番号1to1295);
            }
        }
Esempio n. 7
0
        private void tItemを交換する_WAVキャッシュ(int nItem番号1, int nItem番号2)
        {
            int  num   = nItem番号1 + 1;
            int  num2  = nItem番号2 + 1;
            CWAV wc    = this.WAVキャッシュ.tWAVをキャッシュから検索して返す(num);
            CWAV cwav2 = this.WAVキャッシュ.tWAVをキャッシュから検索して返す(num2);
            CWAV cwav3 = new CWAV();

            cwav3.tコピーfrom(wc);
            wc.tコピーfrom(cwav2);
            wc.nWAV番号1to1295 = num;
            cwav2.tコピーfrom(cwav3);
            cwav2.nWAV番号1to1295 = num2;
        }
Esempio n. 8
0
        private void tItemを交換する_ListViewItem(int nItem番号1, int nItem番号2)
        {
            int  num  = nItem番号1 + 1;
            int  num2 = nItem番号2 + 1;
            CWAV cwav = new CWAV();

            cwav.tコピーfrom(this.listViewWAVリスト.Items[nItem番号1]);
            cwav.nWAV番号1to1295 = num2;
            CWAV cwav2 = new CWAV();

            cwav2.tコピーfrom(this.listViewWAVリスト.Items[nItem番号2]);
            cwav2.nWAV番号1to1295 = num;
            cwav2.tコピーto(this.listViewWAVリスト.Items[nItem番号1]);
            cwav.tコピーto(this.listViewWAVリスト.Items[nItem番号2]);
        }
Esempio n. 9
0
 public void tプレビュー音を再生する(CWAV wc)
 {
     if ((wc != null) && (wc.strファイル名.Length != 0))
     {
         string str = this._Form.strファイルの存在するディレクトリを絶対パスで返す(wc.strファイル名);
         try
         {
             this.tプレビュー音を停止する();
             this.soundPreview           = this.sound管理.tGenerateSound(str);
             this.soundPreview.nVolume   = wc.n音量0to100;
             this.soundPreview.nPosition = wc.n位置_100to100;
             this.soundPreview.tStartPlaying();
         }
         catch
         {
         }
     }
 }
Esempio n. 10
0
 public void tファイル名の相対パス化(string str基本フォルダ名)
 {
     for (int i = 1; i <= 36 * 36 - 1; i++)
     {
         CWAV cwav = this.WAVキャッシュ.tWAVをキャッシュから検索して返す(i);
         if ((cwav != null) && (cwav.strファイル名.Length > 0))
         {
             try
             {
                 Uri uri = new Uri(str基本フォルダ名);
                 cwav.strファイル名 = Uri.UnescapeDataString(uri.MakeRelativeUri(new Uri(cwav.strファイル名)).ToString()).Replace('/', '\\');
             }
             catch (UriFormatException)
             {
             }
         }
     }
 }
Esempio n. 11
0
        public CWAV tWAVをキャッシュから検索して返す_なければ新規生成する(int nWAV番号1to1295)
        {
            if ((nWAV番号1to1295 < 1) || (nWAV番号1to1295 > 36 * 36 - 1))
            {
                throw new Exception("WAV番号が範囲を超えています。-> [" + nWAV番号1to1295 + "]");
            }
            CWAV cwav = null;

            if (!this.dicWAVディクショナリ.TryGetValue(nWAV番号1to1295, out cwav))
            {
                cwav               = new CWAV();
                cwav.strラベル名       = "";
                cwav.nWAV番号1to1295 = nWAV番号1to1295;
                cwav.strファイル名      = "";
                cwav.n音量0to100     = 100;
                cwav.n位置_100to100  = 0;
                cwav.bBGMとして使用     = false;
                this.tキャッシュに追加する(cwav);
            }
            return(cwav);
        }
Esempio n. 12
0
 public void tコピーfrom(CWAV wc)
 {
     this.strラベル名 = wc.strラベル名;
     if ((wc.nWAV番号1to1295 < 1) || (wc.nWAV番号1to1295 > 36 * 36 - 1))
     {
         throw new Exception("WAV番号が範囲を超えています。-> [" + this.nWAV番号1to1295 + "]");
     }
     this.nWAV番号1to1295 = wc.nWAV番号1to1295;
     this.strファイル名      = wc.strファイル名;
     if ((wc.n音量0to100 < 0) || (wc.n音量0to100 > 100))
     {
         throw new Exception("音量が範囲を超えています。-> [" + this.n音量0to100 + "]");
     }
     this.n音量0to100 = wc.n音量0to100;
     if ((wc.n位置_100to100 < -100) || (wc.n位置_100to100 > 100))
     {
         throw new Exception("位置が範囲を超えています。-> [" + this.n位置_100to100 + "]");
     }
     this.n位置_100to100 = wc.n位置_100to100;
     this.bBGMとして使用    = wc.bBGMとして使用;
     this.col文字色       = wc.col文字色;
     this.col背景色       = wc.col背景色;
 }
Esempio n. 13
0
 public bool b内容が同じwith(CWAV wc)
 {
     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背景色))));
 }
Esempio n. 14
0
        public void tプレビュー音を再生する(int nWAV番号1to1295)
        {
            CWAV wc = this.WAVキャッシュ.tWAVをキャッシュから検索して返す(nWAV番号1to1295);

            this.tプレビュー音を再生する(wc);
        }
Esempio n. 15
0
        public void tサウンドプロパティを開いて編集する(int nWAV番号1to1295, string str相対パスの基本フォルダ)
        {
            this._Form.dlgチップパレット.t一時的に隠蔽する();
            CWAV         cwav          = this.tWAVをキャッシュから検索して返す_なければ新規生成する(nWAV番号1to1295);
            ListViewItem item          = cwav.t現在の内容から新しいListViewItemを作成して返す();
            string       directoryName = "";

            if (item.SubItems[2].Text.Length > 0)
            {
                directoryName = Path.GetDirectoryName(this._Form.strファイルの存在するディレクトリを絶対パスで返す(item.SubItems[2].Text));
            }
            CSoundPropertiesDialog cサウンドプロパティダイアログ = new CSoundPropertiesDialog(str相対パスの基本フォルダ, directoryName, new DGサウンドを再生する(this.tプレビュー音を再生する));

            cサウンドプロパティダイアログ.wav                    = cwav;
            cサウンドプロパティダイアログ.textBoxラベル.Text        = item.SubItems[0].Text;
            cサウンドプロパティダイアログ.textBoxWAV番号.Text      = item.SubItems[1].Text;
            cサウンドプロパティダイアログ.textBoxファイル.Text       = item.SubItems[2].Text;
            cサウンドプロパティダイアログ.textBox音量.Text         = item.SubItems[3].Text;
            cサウンドプロパティダイアログ.textBox位置.Text         = item.SubItems[4].Text;
            cサウンドプロパティダイアログ.hScrollBar音量.Value     = cサウンドプロパティダイアログ.wav.n音量0to100;
            cサウンドプロパティダイアログ.hScrollBar位置.Value     = cサウンドプロパティダイアログ.wav.n位置_100to100 + 100;
            cサウンドプロパティダイアログ.checkBoxBGM.CheckState = cサウンドプロパティダイアログ.wav.bBGMとして使用 ? CheckState.Checked : CheckState.Unchecked;
            cサウンドプロパティダイアログ.textBoxWAV番号.ForeColor = item.ForeColor;
            cサウンドプロパティダイアログ.textBoxWAV番号.BackColor = item.BackColor;
            if (cサウンドプロパティダイアログ.ShowDialog() == DialogResult.OK)
            {
                CWAV wav   = cサウンドプロパティダイアログ.wav;
                CWAV cwav3 = new CWAV();
                cwav3.nWAV番号1to1295 = cサウンドプロパティダイアログ.wav.nWAV番号1to1295;
                cwav3.strラベル名       = cサウンドプロパティダイアログ.textBoxラベル.Text;
                cwav3.strファイル名      = cサウンドプロパティダイアログ.textBoxファイル.Text;
                cwav3.n音量0to100     = cサウンドプロパティダイアログ.hScrollBar音量.Value;
                cwav3.n位置_100to100  = cサウンドプロパティダイアログ.hScrollBar位置.Value - 100;
                cwav3.bBGMとして使用     = cサウンドプロパティダイアログ.checkBoxBGM.Checked;
                cwav3.col文字色        = cサウンドプロパティダイアログ.textBoxWAV番号.ForeColor;
                cwav3.col背景色        = cサウンドプロパティダイアログ.textBoxWAV番号.BackColor;
                if (!cwav3.b内容が同じwith(wav))
                {
                    wav = new CWAV();
                    wav.tコピーfrom(cサウンドプロパティダイアログ.wav);
                    this._Form.mgrUndoRedo管理者.tノードを追加する(new CUndoRedoCell <CWAV>(null, new DGUndoを実行する <CWAV>(this.tWAV編集のUndo), new DGRedoを実行する <CWAV>(this.tWAV編集のRedo), wav, cwav3));
                    this._Form.tUndoRedo用GUIの有効_無効を設定する();
                    cサウンドプロパティダイアログ.wav.tコピーfrom(cwav3);
                    if (this.tWAV番号に対応するListViewItemを返す(nWAV番号1to1295) != null)
                    {
                        ListViewItem item2 = cサウンドプロパティダイアログ.wav.t現在の内容から新しいListViewItemを作成して返す();
                        item = this.tWAV番号に対応するListViewItemを返す(nWAV番号1to1295);
                        item.SubItems[0].Text = item2.SubItems[0].Text;
                        item.SubItems[1].Text = item2.SubItems[1].Text;
                        item.SubItems[2].Text = item2.SubItems[2].Text;
                        item.SubItems[3].Text = item2.SubItems[3].Text;
                        item.SubItems[4].Text = item2.SubItems[4].Text;
                        item.SubItems[5].Text = item2.SubItems[5].Text;
                        item.ForeColor        = item2.ForeColor;
                        item.BackColor        = item2.BackColor;
                    }
                    this.listViewWAVリスト.Refresh();
                    this._Form.b未保存 = true;
                }
            }
            this._Form.dlgチップパレット.t一時的な隠蔽を解除する();
        }