public void tキャッシュに追加する(ListViewItem lvi) { CBMP cbmp = new CBMP(); cbmp.tコピーfrom(lvi); this.tキャッシュに追加する(cbmp); }
public void t新規生成のUndo(CBMP bc生成前はNull, CBMP bc生成されたBMPの複製) { int num = bc生成されたBMPの複製.nBMP番号1to1295; new CBMP().tコピーto(this.listViewBMPリスト.Items[num - 1]); this.BMPキャッシュ.tBMPをキャッシュから削除する(num); this._Form.tタブを選択する(CMainForm.Eタブ種別.BMP); this.listViewBMPリスト.Refresh(); }
public void tキャッシュに追加する(CBMP bc追加するBMP) { CBMP cbmp; if (this.dicBMPディクショナリ.TryGetValue(bc追加するBMP.nBMP番号1to1295, out cbmp)) { this.dicBMPディクショナリ.Remove(bc追加するBMP.nBMP番号1to1295); } this.dicBMPディクショナリ.Add(bc追加するBMP.nBMP番号1to1295, bc追加するBMP); }
public void t新規生成のRedo(CBMP bc生成前はNull, CBMP bc生成されたBMPの複製) { int num = bc生成されたBMPの複製.nBMP番号1to1295; CBMP cbmp = this.BMPキャッシュ.tBMPをキャッシュから検索して返す_なければ新規生成する(num); cbmp.tコピーfrom(bc生成されたBMPの複製); cbmp.tコピーto(this.listViewBMPリスト.Items[num - 1]); this._Form.tタブを選択する(CMainForm.Eタブ種別.BMP); this.listViewBMPリスト.Refresh(); }
public void tBMP編集のUndo(CBMP bc変更前, CBMP bc変更後) { int num = bc変更前.nBMP番号1to1295; CBMP cbmp = this.BMPキャッシュ.tBMPをキャッシュから検索して返す(num); cbmp.tコピーfrom(bc変更前); cbmp.tコピーto(this.listViewBMPリスト.Items[num - 1]); this._Form.tWAV_BMP_AVIリストのカーソルを全部同じ行に合わせる(cbmp.nBMP番号1to1295 - 1); this._Form.tタブを選択する(CMainForm.Eタブ種別.BMP); this.listViewBMPリスト.Refresh(); }
public void t画像プロパティを開いて編集する(int nBMP番号1to1295, string str相対パスの基本フォルダ) { this._Form.dlgチップパレット.t一時的に隠蔽する(); CBMP cbmp = this.tBMPをキャッシュから検索して返す_なければ新規生成する(nBMP番号1to1295); ListViewItem item = cbmp.t現在の内容から新しいListViewItemを作成して返す(); string directoryName = ""; if (item.SubItems[3].Text.Length > 0) { directoryName = Path.GetDirectoryName(this._Form.strファイルの存在するディレクトリを絶対パスで返す(item.SubItems[3].Text)); } CImagePropertiesDialog c画像プロパティダイアログ = new CImagePropertiesDialog(str相対パスの基本フォルダ, directoryName); c画像プロパティダイアログ.bmp = cbmp; c画像プロパティダイアログ.textBoxBMP番号.Text = item.SubItems[2].Text; c画像プロパティダイアログ.textBoxラベル.Text = item.SubItems[1].Text; c画像プロパティダイアログ.textBoxファイル.Text = item.SubItems[3].Text; c画像プロパティダイアログ.checkBoxBMPTEX.CheckState = c画像プロパティダイアログ.bmp.bテクスチャ ? CheckState.Checked : CheckState.Unchecked; c画像プロパティダイアログ.textBoxBMP番号.ForeColor = item.ForeColor; c画像プロパティダイアログ.textBoxBMP番号.BackColor = item.BackColor; if (c画像プロパティダイアログ.ShowDialog() == DialogResult.OK) { CBMP bmp = c画像プロパティダイアログ.bmp; CBMP cbmp3 = new CBMP(); cbmp3.nBMP番号1to1295 = c画像プロパティダイアログ.bmp.nBMP番号1to1295; cbmp3.strラベル名 = c画像プロパティダイアログ.textBoxラベル.Text; cbmp3.strファイル名 = c画像プロパティダイアログ.textBoxファイル.Text; cbmp3.bテクスチャ = c画像プロパティダイアログ.checkBoxBMPTEX.Checked; cbmp3.col文字色 = c画像プロパティダイアログ.textBoxBMP番号.ForeColor; cbmp3.col背景色 = c画像プロパティダイアログ.textBoxBMP番号.BackColor; if (!cbmp3.b内容が同じwith(bmp)) { bmp = new CBMP(); bmp.tコピーfrom(c画像プロパティダイアログ.bmp); this._Form.mgrUndoRedo管理者.tノードを追加する(new CUndoRedoCell <CBMP>(null, new DGUndoを実行する <CBMP>(this.tBMP編集のUndo), new DGRedoを実行する <CBMP>(this.tBMP編集のRedo), bmp, cbmp3)); this._Form.tUndoRedo用GUIの有効_無効を設定する(); c画像プロパティダイアログ.bmp.tコピーfrom(cbmp3); if (this.tBMP番号に対応するListViewItemを返す(nBMP番号1to1295) != null) { ListViewItem item2 = c画像プロパティダイアログ.bmp.t現在の内容から新しいListViewItemを作成して返す(); item = this.tBMP番号に対応するListViewItemを返す(nBMP番号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.ForeColor = item2.ForeColor; item.BackColor = item2.BackColor; } this.listViewBMPリスト.Refresh(); this._Form.b未保存 = true; } } this._Form.dlgチップパレット.t一時的な隠蔽を解除する(); }
public void tコピーfrom(CBMP bc) { this.bテクスチャ = bc.bテクスチャ; this.strラベル名 = bc.strラベル名; if ((bc.nBMP番号1to1295 < 1) || (bc.nBMP番号1to1295 > 36 * 36 - 1)) { throw new Exception("BMP番号が範囲を超えています。-> [" + this.nBMP番号1to1295 + "]"); } this.nBMP番号1to1295 = bc.nBMP番号1to1295; this.strファイル名 = bc.strファイル名; this.col背景色 = bc.col背景色; this.col文字色 = bc.col文字色; }
public void tBMPをキャッシュから削除する(int nBMP番号1to1295) { if ((nBMP番号1to1295 < 1) || (nBMP番号1to1295 > 36 * 36 - 1)) { throw new Exception("BMP番号が範囲を超えています。-> [" + nBMP番号1to1295 + "]"); } CBMP cbmp = null; if (this.dicBMPディクショナリ.TryGetValue(nBMP番号1to1295, out cbmp)) { this.dicBMPディクショナリ.Remove(nBMP番号1to1295); } }
private void tItemを交換する_BMPキャッシュ(int nItem番号1, int nItem番号2) { int num = nItem番号1 + 1; int num2 = nItem番号2 + 1; CBMP bc = this.BMPキャッシュ.tBMPをキャッシュから検索して返す(num); CBMP cbmp2 = this.BMPキャッシュ.tBMPをキャッシュから検索して返す(num2); CBMP cbmp3 = new CBMP(); cbmp3.tコピーfrom(bc); bc.tコピーfrom(cbmp2); bc.nBMP番号1to1295 = num; cbmp2.tコピーfrom(cbmp3); cbmp2.nBMP番号1to1295 = num2; }
private void tItemを交換する_ListViewItem(int nItem番号1, int nItem番号2) { int num = nItem番号1 + 1; int num2 = nItem番号2 + 1; CBMP cbmp = new CBMP(); cbmp.tコピーfrom(this.listViewBMPリスト.Items[nItem番号1]); cbmp.nBMP番号1to1295 = num2; CBMP cbmp2 = new CBMP(); cbmp2.tコピーfrom(this.listViewBMPリスト.Items[nItem番号2]); cbmp2.nBMP番号1to1295 = num; cbmp2.tコピーto(this.listViewBMPリスト.Items[nItem番号1]); cbmp.tコピーto(this.listViewBMPリスト.Items[nItem番号2]); }
public CBMP tBMPをキャッシュから検索して返す_なければ新規生成する(int nBMP番号1to1295) { if ((nBMP番号1to1295 < 1) || (nBMP番号1to1295 > 36 * 36 - 1)) { throw new Exception("BMP番号が範囲を超えています。-> [" + nBMP番号1to1295 + "]"); } CBMP cbmp = null; if (!this.dicBMPディクショナリ.TryGetValue(nBMP番号1to1295, out cbmp)) { cbmp = new CBMP(); cbmp.nBMP番号1to1295 = nBMP番号1to1295; this.tキャッシュに追加する(cbmp); } return(cbmp); }
public void tファイル名の相対パス化(string str基本フォルダ名) { for (int i = 1; i <= 36 * 36 - 1; i++) { CBMP cbmp = this.BMPキャッシュ.tBMPをキャッシュから検索して返す(i); if ((cbmp != null) && (cbmp.strファイル名.Length > 0)) { try { Uri uri = new Uri(str基本フォルダ名); cbmp.strファイル名 = Uri.UnescapeDataString(uri.MakeRelativeUri(new Uri(cbmp.strファイル名)).ToString()).Replace('/', '\\'); } catch (UriFormatException) { } } } }
public bool b内容が同じwith(CBMP bc) { 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背景色))); }
public bool b内容が同じ_BMP番号を除くwith(CBMP bc) { return((this.strラベル名.Equals(bc.strラベル名) && this.strファイル名.Equals(bc.strファイル名)) && (((this.bテクスチャ == bc.bテクスチャ) && (this.col文字色 == bc.col文字色)) && (this.col背景色 == bc.col背景色))); }