예제 #1
0
        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);
        }
예제 #2
0
        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;
            }
        }
예제 #3
0
 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);
 }
예제 #4
0
 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]);
 }
예제 #5
0
 public void AcceptAttributePatternIndex(PatternIndex patterIndex, PrintContext parameter)
 {
     parameter.WriteLine("Pattern Index: {0}", patterIndex.Index);
 }
예제 #6
0
 public virtual void AcceptAttributePatternIndex(PatternIndex patternIndex, T parameter)
 {
     // intentionally left blank
 }