/// <summary> /// Write Joy Assignment Status to KeyMappingGridCell. /// </summary> public string KeyMappingPreviewPOV(KeyAssgn keyAssign) { string result = ""; for (int i = 0; i < pov.Length; i++) { for (int ii = 0; ii < pov[i].direction.Length; ii++) { string direction = pov[i].GetDirection(ii); for (int iii = 0; iii < 2; iii++) { if (pov[i].direction[ii].GetCallback((Pinky)iii) == "SimDoNothing") { continue; } if (keyAssign.GetCallback() != pov[i].direction[ii].GetCallback((Pinky)iii)) { continue; } if (result != "") { result += "\n"; } result += " POV" + (i + 1) + "." + direction; if (iii == 1) //PRESS + SHIFT { result += " SHFT"; } } } } return(result); }
/// <summary> /// Write Joy Assignment Status to KeyMappingGridCell. /// </summary> public string KeyMappingPreviewDX(KeyAssgn keyAssign) { string result; result = ""; for (int i = 0; i < dx.Length; i++) { for (int ii = 0; ii < dx[i].assign.Length; ii++) { if (dx[i].assign[ii].GetCallback() == "SimDoNothing") { continue; } if (keyAssign.GetCallback() != dx[i].assign[ii].GetCallback()) { continue; } if (result != "") { result += "\n"; } result += " DX" + (i + 1); if (ii == CommonConstants.DX_PRESS_SHIFT) { result += " SHIFT"; } if (ii == CommonConstants.DX_RELEASE) { result += " RELEASE"; } if (ii == CommonConstants.DX_RELEASE_SHIFT) { result += " RELEASE SHIFT"; } if (dx[i].assign[ii].GetInvoke() == Invoke.Down && ii != CommonConstants.DX_RELEASE && ii != CommonConstants.DX_RELEASE_SHIFT) { result += " HOLD"; } } } return(result); }