private void SetJournalPoints()
{
columns = 7;
aiColumnX = new int[8];
aiX = new int[8];
Graphics g = CreateGraphics();
asTitles = new string[7]
{
Language.T("Number"),
Language.T("Description"),
Language.T("Price"),
Language.T("Direction"),
Language.T("Lots"),
Language.T("Position"),
Language.T("Order")
};
string longestDescription = "";
foreach (WayPointType wpType in Enum.GetValues(typeof(WayPointType)))
if (g.MeasureString(Language.T(Way_Point.WPTypeToString(wpType)), fontInfo).Width >
g.MeasureString(longestDescription, fontInfo).Width)
longestDescription = Language.T(Way_Point.WPTypeToString(wpType));
string longestDirection = "";
foreach (PosDirection posDir in Enum.GetValues(typeof(PosDirection)))
if (g.MeasureString(Language.T(posDir.ToString()), fontInfo).Width >
g.MeasureString(longestDirection, fontInfo).Width)
longestDirection = Language.T(posDir.ToString());
asContent = new string[7]
{
"99",
longestDescription,
"99.99999",
longestDirection,
"99999",
"99999",
"99999",
};
aiColumnX[0] = border;
for (int i = 0; i < columns; i++)
aiColumnX[i + 1] = aiColumnX[i] + (int)Math.Max(g.MeasureString(asContent[i], fontInfo).Width, g.MeasureString(asTitles[i], fontInfo).Width) + 4;
szPrice = g.MeasureString("9.9999", fontInfo).ToSize();
g.Dispose();
return;
}