private void BuildStringBuilder() { toDisPstring.Clear(); if (isGameOver) { toDisPstring.Append("GAME OVER \n"); } else { toDisPstring.Append(" \n"); } toDisPstring.Append("Score: " + score + " \n\n"); for (int i = 0; i < fieldHeight; i++) { for (int j = 0; j < fieldWidth; j++) { toDisPstring.Append(playField[j, i]); } toDisPstring.Append("\n"); } toDisPstring.Append("\nNext Block: " + nextBlock.ToString() + " "); }
public BlockOptionMeta(BlockOptions opt) { BlockOption = opt; Name = opt.ToString(); if (opt == BlockOptions.IP_MACAddress || opt == BlockOptions.DeviceProperties_DeviceID || opt == BlockOptions.DeviceProperties_DeviceVendor || opt == BlockOptions.DeviceProperties_DeviceRole || opt == BlockOptions.DeviceProperties_DeviceOptions || opt == BlockOptions.DeviceProperties_DeviceInstance || opt == BlockOptions.DeviceProperties_OEMDeviceID || opt == BlockOptions.DeviceInitiative_DeviceInitiative) { IsReadable = true; } else if (opt == BlockOptions.DeviceProperties_AliasName || opt == BlockOptions.Control_Response || opt == BlockOptions.AllSelector_AllSelector) { //none } else if (opt == BlockOptions.Control_Start || opt == BlockOptions.Control_Stop || opt == BlockOptions.Control_Signal || opt == BlockOptions.Control_FactoryReset || opt == BlockOptions.Control_ResetToFactory) { IsWriteable = true; } else { //default IsReadable = true; IsWriteable = true; } }