void r_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { Rectangle r = (Rectangle)sender; PatternIndex p = (PatternIndex)r.Tag; pattern[p.Note, p.Step] = pattern[p.Note, p.Step] == 0 ? (byte)127 : (byte)0; r.Fill = GetFillBrush(p.Note, p.Step); }
private void patternDataGrid_CellClick(object sender, DataGridViewCellEventArgs e) { DataGridViewCell cell = patternDataGrid.Rows[e.RowIndex].Cells[e.ColumnIndex]; PatternIndex pi = (PatternIndex)cell.Tag; pattern[pi.Note, pi.Step] = pattern[pi.Note, pi.Step] == 0 ? (byte)127 : (byte)0; if (GetBackColor(pi.Note, pi.Step) == true) { cell.Style.BackColor = Color.LightSalmon; } else { cell.Style.BackColor = Color.White; } }
public S2MappingsTile(byte[] file, int address) { Y = unchecked((sbyte)file[address]); Width = (byte)(((file[address + 1] & 0xC) >> 2) + 1); Height = (byte)((file[address + 1] & 0x3) + 1); Tile = new PatternIndex(file, address + 2); Tile2 = new PatternIndex(file, address + 4); X = ByteConverter.ToInt16(file, address + 6); }
public S1MappingsTile(byte[] file, int address) { Y = unchecked((sbyte)file[address]); Width = (byte)(((file[address + 1] & 0xC) >> 2) + 1); Height = (byte)((file[address + 1] & 0x3) + 1); Tile = new PatternIndex(file, address + 2); X = unchecked((sbyte)file[address + 4]); }
public void AcceptAttributePatternIndex(PatternIndex patterIndex, PrintContext parameter) { parameter.WriteLine("Pattern Index: {0}", patterIndex.Index); }
public virtual void AcceptAttributePatternIndex(PatternIndex patternIndex, T parameter) { // intentionally left blank }