private void DrawColorMatrix() { try { char[] colHeader, rowHeader; if (OA.PermutationXAxis) { colHeader = OA.Permutation; char[] charArray = OA.WildTypePeptide.ToCharArray(); if (!OA.PositionYAxisTopToBottom) { Array.Reverse(charArray); } rowHeader = charArray; } else { colHeader = OA.WildTypePeptide.ToCharArray(); rowHeader = OA.Permutation; } ColorMatrix cm = new ColorMatrix(); cm.SetData(OA.NormalizedMatrix, colHeader, rowHeader); mdMatrix.SetThreshold(OA.PositiveThreshold, OA.NegativeThreshold); mdMatrix.SetColorMatrix(cm); } catch { } }