개정판 4913851c
issue #923: change control's color when mouse is over1
Change-Id: Id6c30459bd314a0d7d87d9c3ba037aef0db53338
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
1150 | 1150 |
if (mouseHandlingMode != MouseHandlingMode.Drawing) |
1151 | 1151 |
{ |
1152 | 1152 |
#region 마우스 오버 시 색상 변경 |
1153 |
//var firstCondition = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.IsMouseOver).FirstOrDefault(); |
|
1154 |
//Color TempColor = MarkupToPDF.Controls.Common.ValueConverter.StringToColorConverter.Parse("FF07B4FF"); |
|
1153 |
/* |
|
1154 |
var firstCondition = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.IsMouseOver).FirstOrDefault(); |
|
1155 |
Color TempColor = MarkupToPDF.Controls.Common.ValueConverter.StringToColorConverter.Parse("FF07B4FF"); |
|
1155 | 1156 |
|
1156 |
//if (firstCondition != null)
|
|
1157 |
//{
|
|
1158 |
// firstCondition.MouseLeave += new System.Windows.Input.MouseEventHandler(firstCondition_MouseLeave);
|
|
1157 |
if (firstCondition != null) |
|
1158 |
{ |
|
1159 |
firstCondition.MouseLeave += new System.Windows.Input.MouseEventHandler(firstCondition_MouseLeave); |
|
1159 | 1160 |
|
1160 |
// if (firstCondition.GetType().Name == "TextControl")
|
|
1161 |
// {
|
|
1162 |
// (firstCondition as TextControl).BackInnerColor = new SolidColorBrush(TempColor);
|
|
1163 |
// return;
|
|
1164 |
// }
|
|
1165 |
// else if (firstCondition.GetType().Name == "ArrowTextControl")
|
|
1166 |
// {
|
|
1167 |
// (firstCondition as ArrowTextControl).BackInnerColor = new SolidColorBrush(TempColor);
|
|
1168 |
// return;
|
|
1169 |
// }
|
|
1161 |
if (firstCondition.GetType().Name == "TextControl") |
|
1162 |
{ |
|
1163 |
(firstCondition as TextControl).BackInnerColor = new SolidColorBrush(TempColor); |
|
1164 |
return; |
|
1165 |
} |
|
1166 |
else if (firstCondition.GetType().Name == "ArrowTextControl") |
|
1167 |
{ |
|
1168 |
(firstCondition as ArrowTextControl).BackInnerColor = new SolidColorBrush(TempColor); |
|
1169 |
return; |
|
1170 |
} |
|
1170 | 1171 |
|
1171 |
// if (L_Size == 0) |
|
1172 |
// { |
|
1173 |
// L_Size = (firstCondition as IPath).LineSize; |
|
1174 |
// (firstCondition as IPath).LineSize *= 4; |
|
1175 |
// } |
|
1176 |
// switch (firstCondition.GetType().Name) |
|
1177 |
// { |
|
1178 |
// case "RectangleControl": |
|
1179 |
// { |
|
1180 |
// (firstCondition as RectangleControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1181 |
// } |
|
1182 |
// break; |
|
1183 |
// case "CircleControl": |
|
1184 |
// { |
|
1185 |
// (firstCondition as CircleControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1186 |
// } |
|
1187 |
// break; |
|
1188 |
// case "TriControl": |
|
1189 |
// { |
|
1190 |
// (firstCondition as TriControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1191 |
// } |
|
1192 |
// break; |
|
1193 |
// case "RectCloudControl": |
|
1194 |
// { |
|
1195 |
// (firstCondition as RectCloudControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1196 |
// } |
|
1197 |
// break; |
|
1198 |
// case "CloudControl": |
|
1199 |
// { |
|
1200 |
// (firstCondition as CloudControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1201 |
// } |
|
1202 |
// break; |
|
1203 |
// case "PolygonControl": |
|
1204 |
// { |
|
1205 |
// (firstCondition as PolygonControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1206 |
// } |
|
1207 |
// break; |
|
1208 |
// case "ArcControl": |
|
1209 |
// { |
|
1210 |
// (firstCondition as ArcControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1211 |
// } |
|
1212 |
// break; |
|
1213 |
// case "LineControl": |
|
1214 |
// { |
|
1215 |
// (firstCondition as LineControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1216 |
// } |
|
1217 |
// break; |
|
1218 |
// case "ArrowControl_Multi": |
|
1219 |
// { |
|
1220 |
// (firstCondition as ArrowControl_Multi).StrokeColor = new SolidColorBrush(TempColor); |
|
1221 |
// } |
|
1222 |
// break; |
|
1223 |
|
|
1224 |
// default: |
|
1225 |
// { |
|
1226 |
|
|
1227 |
// } |
|
1228 |
// break; |
|
1229 |
// } |
|
1230 |
//} |
|
1172 |
if (L_Size == 0) |
|
1173 |
{ |
|
1174 |
L_Size = (firstCondition as IPath).LineSize; |
|
1175 |
(firstCondition as IPath).LineSize *= 4; |
|
1176 |
} |
|
1177 |
switch (firstCondition.GetType().Name) |
|
1178 |
{ |
|
1179 |
case "RectangleControl": |
|
1180 |
{ |
|
1181 |
(firstCondition as RectangleControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1182 |
} |
|
1183 |
break; |
|
1184 |
case "CircleControl": |
|
1185 |
{ |
|
1186 |
(firstCondition as CircleControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1187 |
} |
|
1188 |
break; |
|
1189 |
case "TriControl": |
|
1190 |
{ |
|
1191 |
(firstCondition as TriControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1192 |
} |
|
1193 |
break; |
|
1194 |
case "RectCloudControl": |
|
1195 |
{ |
|
1196 |
(firstCondition as RectCloudControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1197 |
} |
|
1198 |
break; |
|
1199 |
case "CloudControl": |
|
1200 |
{ |
|
1201 |
(firstCondition as CloudControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1202 |
} |
|
1203 |
break; |
|
1204 |
case "PolygonControl": |
|
1205 |
{ |
|
1206 |
(firstCondition as PolygonControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1207 |
} |
|
1208 |
break; |
|
1209 |
case "ArcControl": |
|
1210 |
{ |
|
1211 |
(firstCondition as ArcControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1212 |
} |
|
1213 |
break; |
|
1214 |
case "LineControl": |
|
1215 |
{ |
|
1216 |
(firstCondition as LineControl).StrokeColor = new SolidColorBrush(TempColor); |
|
1217 |
} |
|
1218 |
break; |
|
1219 |
case "ArrowControl_Multi": |
|
1220 |
{ |
|
1221 |
(firstCondition as ArrowControl_Multi).StrokeColor = new SolidColorBrush(TempColor); |
|
1222 |
} |
|
1223 |
break; |
|
1224 |
|
|
1225 |
default: |
|
1226 |
{ |
|
1227 |
|
|
1228 |
} |
|
1229 |
break; |
|
1230 |
} |
|
1231 |
} |
|
1232 |
*/ |
|
1231 | 1233 |
#endregion |
1232 | 1234 |
} |
1233 | 1235 |
|
... | ... | |
4944 | 4946 |
if (item is AdornerFinal) |
4945 | 4947 |
{ |
4946 | 4948 |
|
4947 |
var over = (item as AdornerFinal).MemberSet.Where(data => data.DrawingData.IsMouseOver).FirstOrDefault();
|
|
4949 |
var over = (item as AdornerFinal).Members.Where(data => data.DrawingData.IsMouseOver).FirstOrDefault();
|
|
4948 | 4950 |
if (over != null) |
4949 | 4951 |
{ |
4950 | 4952 |
mouseOff = true; |
... | ... | |
5689 | 5691 |
if (item.GetType().Name == "AdornerFinal") |
5690 | 5692 |
{ |
5691 | 5693 |
adorner_ = (item as Controls.AdornerFinal); |
5692 |
foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
|
|
5694 |
foreach (var InnerItem in (item as Controls.AdornerFinal).Members.Cast<Controls.AdornerMember>())
|
|
5693 | 5695 |
{ |
5694 | 5696 |
if (!ViewerDataModel.Instance.MarkupControls.Contains(InnerItem.DrawingData)) |
5695 | 5697 |
{ |
내보내기 Unified diff