{\r
Panel rowPanel=new Panel();\r
Color frColor = Color.White;\r
+ Color ctgFrColor = Color.White;\r
if (!string.IsNullOrEmpty(data.Category))\r
{\r
frColor = Color.FromArgb(data.FrColor);\r
}\r
- //Color bgColor = Color.FromArgb(data.BgColor);\r
+ //カテゴリ用だけ、元の設定色を保持しておく。\r
+ ctgFrColor = Color.FromArgb(data.FrColor);\r
+\r
FontStyle style;\r
FontStyle timeStyle;\r
float fontsize;\r
- int rowsize;\r
+ float contentFontSize;\r
+ int rowsize=0;\r
\r
- if (data.ForecastMin >= 90|| data.RealMin >=90)\r
+ if (data.isComplete)\r
{\r
- fontsize = 10F;\r
- rowsize = 24;\r
+ //完了済みの場合は実測時間からサイズを判断\r
+ timeStyle = FontStyle.Strikeout;\r
+ style = FontStyle.Strikeout;\r
+ frColor = Color.Gray;\r
\r
- if (data.isComplete)\r
+\r
+ if (data.RealMin >= 120)\r
{\r
- style = FontStyle.Strikeout;\r
- timeStyle = FontStyle.Strikeout;\r
- frColor = Color.Gray;\r
+ fontsize = 14F;\r
+ contentFontSize = 12F;\r
+ rowsize = 30;\r
}\r
- else if (data.StartTime.IsValid)\r
+ else if (data.RealMin >= 90)\r
{\r
- timeStyle = FontStyle.Underline;\r
- style = FontStyle.Underline | FontStyle.Bold;\r
- rowsize += 1;\r
+ fontsize = 12F;\r
+ contentFontSize = 12F;\r
+ rowsize = 26;\r
}\r
- else if (data.ForecastMin >= 120 || data.RealMin >=120)\r
+ else if (data.RealMin >= 60)\r
{\r
- if (data.StartTime.IsValid)\r
- {\r
- timeStyle = FontStyle.Underline;\r
- style = FontStyle.Underline | FontStyle.Bold;\r
- rowsize += 1;\r
- }\r
- else\r
- {\r
- style = FontStyle.Regular;\r
- timeStyle = FontStyle.Bold;\r
- }\r
+\r
+ fontsize = 10F;\r
+ contentFontSize = 9F;\r
+ rowsize = 24;\r
}\r
else\r
{\r
- timeStyle = FontStyle.Regular;\r
- style = FontStyle.Regular;\r
+ fontsize = 9F;\r
+ contentFontSize = 9F;\r
+ rowsize = 18;\r
}\r
}\r
- else if (data.ForecastMin >= 60 || data.RealMin >= 60)\r
+ else\r
{\r
- fontsize = 9F;\r
- rowsize = 20;\r
-\r
- if (data.isComplete)\r
+ //未完了の場合は予測時間からサイズを判断\r
+ if (data.ForecastMin >= 120)\r
{\r
- timeStyle = FontStyle.Strikeout;\r
- style = FontStyle.Strikeout;\r
- frColor = Color.Gray;\r
+ fontsize = 14F;\r
+ contentFontSize = 12F;\r
+ rowsize = 30;\r
}\r
- else if (data.StartTime.IsValid)\r
+ else if (data.ForecastMin >= 90)\r
{\r
- timeStyle = FontStyle.Underline;\r
- style = FontStyle.Underline | FontStyle.Bold;\r
- rowsize += 1;\r
+ fontsize = 12F;\r
+ contentFontSize = 12F;\r
+ rowsize = 26;\r
}\r
- else\r
+ else if (data.ForecastMin >= 60)\r
{\r
- timeStyle = FontStyle.Regular;\r
- style = FontStyle.Regular;\r
+ fontsize = 10F;\r
+ contentFontSize = 9F;\r
+ rowsize = 24;\r
}\r
-\r
- }\r
- else\r
- {\r
- fontsize = 9F;\r
- rowsize = 16;\r
-\r
- if (data.isComplete)\r
+ else\r
{\r
- timeStyle = FontStyle.Strikeout;\r
- style = FontStyle.Strikeout;\r
- frColor = Color.Gray;\r
+ fontsize = 9F;\r
+ contentFontSize = 9F;\r
+ rowsize = 18;\r
}\r
- else if (data.StartTime.IsValid)\r
+\r
+ if (data.StartTime.IsValid)\r
{\r
timeStyle = FontStyle.Underline;\r
- style = FontStyle.Underline| FontStyle.Bold;\r
+ style = FontStyle.Underline | FontStyle.Bold;\r
rowsize += 1;\r
}\r
else\r
timeStyle = FontStyle.Regular;\r
style = FontStyle.Regular;\r
}\r
-\r
}\r
//全体サイズからContentの長さを決める。\r
\r
int wkContentAdditional = wkPanelSize - 825;\r
if (wkContentAdditional < 0) wkContentAdditional = 0;\r
//int wkContentSize = wkPanelSize - 689;\r
- int wkDelaySize = 395+wkContentAdditional;\r
+ int wkDelaySize = 395 + wkContentAdditional;\r
\r
sortID = data.SortID;\r
//rowPanel.Controls.Add(new CustomLabel(data.Indicator, frColor, bgColor, FontStyle.Regular, 9F, 0, 21, rowsize,ContentAlignment.MiddleCenter));\r
rowPanel.Controls.Add(new CustomLabel(data.DoDate.getDateString(), frColor, style, 9F, 40, 56, rowsize,ContentAlignment.MiddleCenter));\r
rowPanel.Controls.Add(new CustomLabel(data.DoDate.getDowStr(), frColor, style, 9F, 95, 26, rowsize,ContentAlignment.MiddleCenter));\r
rowPanel.Controls.Add(new CustomLabel(data.TimeArea, frColor, style, 9F, 120, 21, rowsize,ContentAlignment.MiddleCenter));\r
- rowPanel.Controls.Add(new CustomLabel(data.Category, frColor, style, 9F, 140, 81, rowsize));\r
+ rowPanel.Controls.Add(new CustomLabel(data.Category, ctgFrColor, style, 9F, 140, 81, rowsize));\r
\r
- rowPanel.Controls.Add(new CustomLabel(data.Contents, frColor, style, 9F, 220, 175 + wkContentAdditional, rowsize));\r
+ rowPanel.Controls.Add(new CustomLabel(data.Contents, frColor, style, contentFontSize, 220, 175 + wkContentAdditional, rowsize));\r
\r
rowPanel.Controls.Add(new CustomLabel(data.getForcastHourStr, frColor, timeStyle, fontsize, wkDelaySize, 51, rowsize, ContentAlignment.MiddleRight));\r
rowPanel.Controls.Add(new CustomLabel(data.ForecastMin.ToString(), frColor, timeStyle, fontsize, wkDelaySize + 50, 51, rowsize, ContentAlignment.MiddleRight));\r
rowPanel.Controls.Add(new CustomLabel(data.RealMin.ToString(), frColor, timeStyle, fontsize, wkDelaySize + 100, 51, rowsize, ContentAlignment.MiddleRight));\r
- rowPanel.Controls.Add(new CustomLabel(data.StartTime.ToString(), frColor, style, 9F, wkDelaySize + 150, 61, rowsize, ContentAlignment.MiddleCenter));\r
- rowPanel.Controls.Add(new CustomLabel(data.EndTime.ToString(), frColor, style, 9F, wkDelaySize + 210, 61, rowsize, ContentAlignment.MiddleCenter));\r
+ rowPanel.Controls.Add(new CustomLabel(data.StartTime.ToString(), frColor, style, fontsize, wkDelaySize + 150, 61, rowsize, ContentAlignment.MiddleCenter));\r
+ rowPanel.Controls.Add(new CustomLabel(data.EndTime.ToString(), frColor, style, fontsize, wkDelaySize + 210, 61, rowsize, ContentAlignment.MiddleCenter));\r
\r
rowPanel.Controls.Add(new CustomLabel(data.Project, frColor, style, 9F, wkDelaySize + 270, 81, rowsize));\r
rowPanel.Controls.Add(new CustomLabel((data.IsRepeat == 1 ? "R" : ""), frColor, style, 9F, wkDelaySize + 350, 21, rowsize, ContentAlignment.MiddleCenter));\r