private void CassetteDeck_FoundBlock(ITZXBlock block) { ListViewItem lvi = new ListViewItem(""); lvi.SubItems.Add(block.Index.ToString()); lvi.SubItems.Add(block.ToString()); listViewItems.Add(lvi); }
private void CassetteDeck_NextBlock(ITZXBlock block, int blockIndex) { if (InvokeRequired) { Invoke(new CassetteDeckNextBlockEventHandler(CassetteDeck_NextBlock), new object[] { block, blockIndex }); return; } if (listView1.Items.Count == 0) { return; } foreach (ListViewItem item in listView1.Items) { item.Selected = false; } class11.Text = block.Details; if (class11.Visible) { if (block is ITZXDataBlock) { int b = 0; string s = block.Details; int charindex = s.IndexOf("TZXTAP Block:") + 16; // "TZXTAP Block: /r/n".Length charindexstart = charindex += 5; // " {\r\n".Length int row = b / 16; int col = (b % 16); //line += row + 2; charindex = charindex + (row * 57); charindex += 11; charindex += (col * 3) - 3; class11.GotoPosition(charindex); class11.SelectionStart = charindex; class11.SelectionEnd = charindex + 2; class11.SetSelectionBackColor(true, Color.Lime); class11.SetSelectionForeColor(true, SystemColors.WindowFrame); } else { class11.SelectionStart = class11.SelectionEnd = 0; class11.SetSelectionForeColor(true, Color.Lime); class11.SetSelectionBackColor(true, SystemColors.WindowFrame); class11.SelectionEnd = class11.SelectionStart = 0; class11.Invalidate(); Console.WriteLine(block.ID.ToString()); } } listView1.Items[blockIndex].Selected = true; UpdateTapeViewBlock(); }
void OnFoundBlock(ITZXBlock block) { if (block.ID == TZXBlockType.EndOfFile) { return; } block.Index = Blocks.Count; Blocks.Add(block); contents.AppendLine(block.ID.ToString() + "[" + block.Details + "]"); if (FoundBlock != null) { FoundBlock(block); } }
public Coord(ITZXBlock block, int blockNo, RectangleF rect) { BlockNo = blockNo; Block = block; Rect = rect; }
private static void TZXFile_FoundBlock(ITZXBlock block) { OnFoundBlock(block); }
public static void OnEndBlock(ITZXBlock block, int blockIndex) { EndBlock?.Invoke(block, blockIndex); }
public static void OnNextBlock(ITZXBlock block, int blockIndex) { NextBlock?.Invoke(block, blockIndex); }
internal static void OnFoundBlock(ITZXBlock block) { FoundBlock?.Invoke(block); }