개정판 4913851c
issue #923: change control's color when mouse is over1
Change-Id: Id6c30459bd314a0d7d87d9c3ba037aef0db53338
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
35 | 35 |
public string Symbol_ID { get; set; } |
36 | 36 |
public long Group_ID { get; set; } |
37 | 37 |
} |
38 |
|
|
38 | 39 |
public partial class AdornerFinal : UserControl |
39 | 40 |
{ |
40 | 41 |
public TextBox editTextBox { get; set; } |
41 | 42 |
#region 공용 인스턴스 |
42 |
public List<AdornerMember> MemberSet { get; set; }
|
|
43 |
public List<AdornerMember> Members { get; } = new List<AdornerMember>();
|
|
43 | 44 |
public Dictionary<Thumb, DragData> _dragData = new Dictionary<Thumb, DragData>(); |
44 | 45 |
public double AngleValue = 0; |
45 | 46 |
public bool IsTextAngle = false; |
... | ... | |
51 | 52 |
public RadCalendar dropCalendar; |
52 | 53 |
public Thumb mainDragThumb { get; set; } |
53 | 54 |
|
55 |
private bool disposed; |
|
56 |
|
|
54 | 57 |
public Point reSizePoint { get; set; } |
55 | 58 |
private Point rotatePoint { get; set; } /// 2018.05.09 added by humkyung |
56 | 59 |
#endregion |
... | ... | |
59 | 62 |
{ |
60 | 63 |
dropData = sender as RadDropDownButton; |
61 | 64 |
} |
65 |
|
|
62 | 66 |
private void Date_Calendar_Loaded(object sender, RoutedEventArgs e) |
63 | 67 |
{ |
64 | 68 |
dropCalendar = sender as RadCalendar; |
65 | 69 |
dropCalendar.SelectionChanged += (sen, ea) => |
66 | 70 |
{ |
67 | 71 |
dropData.IsOpen = false; |
68 |
if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "DateControl")
|
|
72 |
if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "DateControl")
|
|
69 | 73 |
{ |
70 |
DateControl data = (MemberSet.First() as AdornerMember).DrawingData as DateControl;
|
|
74 |
DateControl data = (this.Members.First() as AdornerMember).DrawingData as DateControl;
|
|
71 | 75 |
data.Text = dropCalendar.SelectedDate.Value.ToShortDateString(); |
72 | 76 |
} |
73 | 77 |
}; |
74 | 78 |
} |
79 |
|
|
75 | 80 |
public AdornerFinal() |
76 | 81 |
{ |
77 | 82 |
InitializeComponent(); |
78 |
MemberSet = new List<AdornerMember>(); |
|
79 | 83 |
BorderSize = new Rect(); |
80 | 84 |
_dragData.Add(rotateTop, new DragData() { CursorAngle = 0, DragType = DragType.Rotate, RotateIsLeft = true, RotateIsTop = true }); |
81 |
//_dragData.Add(rotateCenter, new DragData() { CursorAngle = 0, DragType = DragType.Rotate, RotateIsLeft = true, RotateIsTop = true }); |
|
85 |
} |
|
86 |
|
|
87 |
~AdornerFinal() |
|
88 |
{ |
|
89 |
this.Dispose(false); |
|
90 |
} |
|
91 |
|
|
92 |
public void Dispose() |
|
93 |
{ |
|
94 |
this.Dispose(true); |
|
95 |
GC.SuppressFinalize(this); |
|
96 |
} |
|
97 |
|
|
98 |
protected virtual void Dispose(bool disposing) |
|
99 |
{ |
|
100 |
if (this.disposed) return; |
|
101 |
if (disposing) |
|
102 |
{ |
|
103 |
foreach (var member in this.Members) |
|
104 |
{ |
|
105 |
if(!Common.ViewerDataModel.Instance.MarkupControls_USER.Contains(member.DrawingData)) |
|
106 |
Common.ViewerDataModel.Instance.MarkupControls_USER.Add(member.DrawingData as CommentUserInfo); |
|
107 |
} |
|
108 |
// IDisposable 인터페이스를 구현하는 멤버들을 여기서 정리합니다. |
|
109 |
} |
|
110 |
// .NET Framework에 의하여 관리되지 않는 외부 리소스들을 여기서 정리합니다. |
|
111 |
this.disposed = true; |
|
82 | 112 |
} |
83 | 113 |
|
84 | 114 |
void DragThumb_Loaded(object sender, RoutedEventArgs e) |
... | ... | |
106 | 136 |
SetAdornerMember(objectData as CommentUserInfo); |
107 | 137 |
this.Focus(); |
108 | 138 |
} |
139 |
|
|
109 | 140 |
public AdornerFinal(List<CommentUserInfo> objectData) : this() |
110 | 141 |
{ |
111 | 142 |
InitializeComponent(); |
... | ... | |
126 | 157 |
|
127 | 158 |
} |
128 | 159 |
} |
129 |
SetAdornerMember(objectData); |
|
160 |
this.SetAdornerMember(objectData);
|
|
130 | 161 |
this.Focus(); |
131 | 162 |
} |
132 | 163 |
|
... | ... | |
153 | 184 |
{ |
154 | 185 |
#region 컨트롤 조건 |
155 | 186 |
case "LineControl": //Angle추가 안했음 |
156 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
187 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
157 | 188 |
break; |
158 | 189 |
case "ImgControl": //Angle추가 안했음 |
159 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
190 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
160 | 191 |
//AdornerBorder.RenderTransformOrigin = new Point(0.5, 0.5); |
161 | 192 |
//DragThumb.RenderTransformOrigin = new Point(0.5, 0.5); |
162 | 193 |
AngleValue = (member as ImgControl).Angle; |
163 | 194 |
break; |
164 | 195 |
//case "SymControl": //Angle추가 안했음 |
165 |
// MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = MarkupType.Viewbox, ThumbList = new List<Thumb>() });
|
|
196 |
// this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = MarkupType.Viewbox, ThumbList = new List<Thumb>() });
|
|
166 | 197 |
// AngleValue = (member as SymControl).Angle; |
167 | 198 |
// //ViewBoxRotate(member); |
168 | 199 |
// break; |
169 | 200 |
//case "SymControlN": //Angle추가 안했음 |
170 |
// MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = MarkupType.Viewbox, ThumbList = new List<Thumb>() });
|
|
201 |
// this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = MarkupType.Viewbox, ThumbList = new List<Thumb>() });
|
|
171 | 202 |
// AngleValue = (member as SymControlN).Angle; |
172 | 203 |
// //ViewBoxRotate(member); |
173 | 204 |
// break; |
174 | 205 |
case "PolygonControl": //Angle추가 안했음 |
175 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
206 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
176 | 207 |
break; |
177 | 208 |
case "ArrowControl": |
178 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
209 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
179 | 210 |
break; |
180 | 211 |
case "ArrowTextControl": |
181 |
MemberSet.Add(new AdornerMember
|
|
212 |
this.Members.Add(new AdornerMember
|
|
182 | 213 |
{ |
183 | 214 |
DrawingData = member, |
184 | 215 |
Drawingtype = ControlType.ArrowTextControl, |
... | ... | |
200 | 231 |
}); |
201 | 232 |
break; |
202 | 233 |
case "ArcControl": |
203 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
234 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
204 | 235 |
break; |
205 | 236 |
case "ArrowArcControl": |
206 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
237 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
207 | 238 |
break; |
208 | 239 |
case "ArrowControl_Multi": |
209 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
240 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
210 | 241 |
break; |
211 | 242 |
case "RectangleControl": |
212 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
243 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
213 | 244 |
break; |
214 | 245 |
case "DateControl": |
215 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
246 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
216 | 247 |
AngleValue = (member as DateControl).Angle; |
217 | 248 |
break; |
218 | 249 |
case "TriControl": |
219 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
250 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
220 | 251 |
break; |
221 | 252 |
case "CircleControl": |
222 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
253 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
223 | 254 |
break; |
224 | 255 |
case "CloudControl": |
225 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
256 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
226 | 257 |
break; |
227 | 258 |
case "RectCloudControl": |
228 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
259 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
229 | 260 |
break; |
230 | 261 |
case "SignControl": |
231 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
262 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
232 | 263 |
AngleValue = (member as SignControl).Angle; |
233 | 264 |
break; |
234 | 265 |
|
235 | 266 |
case "SymControl": |
236 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
267 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
237 | 268 |
AngleValue = (member as SymControl).Angle; |
238 | 269 |
break; |
239 | 270 |
case "SymControlN": |
240 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
271 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
241 | 272 |
AngleValue = (member as SymControlN).Angle; |
242 | 273 |
break; |
243 | 274 |
case "InkControl": //Angle추가 안했음 |
244 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
275 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
245 | 276 |
break; |
246 | 277 |
case "TextControl": |
247 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
278 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
248 | 279 |
RectangleGeometry Data = new RectangleGeometry |
249 | 280 |
{ |
250 | 281 |
Rect = new Rect() |
... | ... | |
299 | 330 |
}); |
300 | 331 |
break; |
301 | 332 |
case "InsideWhiteControl": |
302 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.InsideWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
333 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.InsideWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
303 | 334 |
break; |
304 | 335 |
case "OverlapWhiteControl": |
305 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.OverlapWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
336 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.OverlapWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
306 | 337 |
break; |
307 | 338 |
case "ClipWhiteControl": |
308 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ClipWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
339 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ClipWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
309 | 340 |
break; |
310 | 341 |
case "CoordinateControl": |
311 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Coordinate, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
342 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Coordinate, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
312 | 343 |
break; |
313 | 344 |
default: |
314 | 345 |
break; |
... | ... | |
326 | 357 |
RegistryPoint(member); |
327 | 358 |
} |
328 | 359 |
BorderUpdate(); |
360 |
|
|
361 |
if (Common.ViewerDataModel.Instance.MarkupControls_USER.Contains(member)) Common.ViewerDataModel.Instance.MarkupControls_USER.Remove(member); |
|
329 | 362 |
} |
330 | 363 |
|
331 | 364 |
private void ViewBoxRotate(UIElement member) |
... | ... | |
335 | 368 |
AdornerBorder.RenderTransform = new RotateTransform() { Angle = (member as IViewBox).Angle }; |
336 | 369 |
DragThumb.RenderTransform = new RotateTransform() { Angle = (member as IViewBox).Angle }; |
337 | 370 |
} |
371 |
|
|
338 | 372 |
public void SetAdornerMember(List<CommentUserInfo> members) |
339 | 373 |
{ |
340 | 374 |
foreach (var member in members) |
... | ... | |
343 | 377 |
{ |
344 | 378 |
#region 컨트롤 조건 |
345 | 379 |
case "LineControl": |
346 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
380 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
347 | 381 |
break; |
348 | 382 |
case "ImgControl": |
349 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
383 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
350 | 384 |
break; |
351 | 385 |
case "ArrowControl": |
352 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
386 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
353 | 387 |
break; |
354 | 388 |
case "PolygonControl": |
355 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
389 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
356 | 390 |
break; |
357 | 391 |
case "ArrowTextControl": |
358 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowTextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
392 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowTextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
359 | 393 |
(member as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
360 | 394 |
break; |
361 | 395 |
case "ArcControl": |
362 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
396 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
363 | 397 |
break; |
364 | 398 |
case "ArrowArcControl": |
365 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
399 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
366 | 400 |
break; |
367 | 401 |
case "DateControl": |
368 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
402 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
369 | 403 |
break; |
370 | 404 |
case "ArrowControl_Multi": |
371 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
405 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
372 | 406 |
break; |
373 | 407 |
case "RectangleControl": |
374 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
408 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
375 | 409 |
break; |
376 | 410 |
case "TriControl": |
377 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
411 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
378 | 412 |
break; |
379 | 413 |
case "CircleControl": |
380 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
414 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
381 | 415 |
break; |
382 | 416 |
case "CloudControl": |
383 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
417 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
384 | 418 |
break; |
385 | 419 |
case "RectCloudControl": |
386 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
420 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
387 | 421 |
break; |
388 | 422 |
case "SignControl": |
389 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
423 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
390 | 424 |
break; |
391 | 425 |
case "SymControl": |
392 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
426 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
393 | 427 |
break; |
394 | 428 |
case "SymControlN": |
395 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
429 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
396 | 430 |
break; |
397 | 431 |
case "InkControl": |
398 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
432 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
399 | 433 |
break; |
400 | 434 |
case "TextControl": |
401 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
435 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
402 | 436 |
Observable.FromEventPattern(((TextControl)member), "PropertyChanged").Subscribe(a => |
403 | 437 |
{ |
404 | 438 |
BorderUpdate(); |
... | ... | |
418 | 452 |
}); |
419 | 453 |
break; |
420 | 454 |
case "InsideWhiteControl": |
421 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.InsideWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
455 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.InsideWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
422 | 456 |
break; |
423 | 457 |
case "OverlapWhiteControl": |
424 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.OverlapWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
458 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.OverlapWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
425 | 459 |
break; |
426 | 460 |
case "ClipWhiteControl": |
427 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ClipWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
461 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ClipWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
428 | 462 |
break; |
429 | 463 |
case "CoordinateControl": |
430 |
MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Coordinate, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
464 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Coordinate, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
431 | 465 |
break; |
432 | 466 |
default: |
433 | 467 |
break; |
... | ... | |
443 | 477 |
{ |
444 | 478 |
RegistryPoint(member, members.Count); |
445 | 479 |
} |
480 |
|
|
481 |
if (Common.ViewerDataModel.Instance.MarkupControls_USER.Contains(member)) Common.ViewerDataModel.Instance.MarkupControls_USER.Remove(member); /// remove commment from mycontrols |
|
446 | 482 |
} |
447 | 483 |
|
448 | 484 |
BorderUpdate(); |
... | ... | |
461 | 497 |
double maxX = double.MinValue; |
462 | 498 |
double maxY = double.MinValue; |
463 | 499 |
|
464 |
if (MemberSet.Count == 1)
|
|
500 |
if (this.Members.Count == 1)
|
|
465 | 501 |
{ |
466 |
if (MemberSet.First().DrawingData.GetType().Name == "TextControl")
|
|
502 |
if (this.Members.First().DrawingData.GetType().Name == "TextControl")
|
|
467 | 503 |
{ |
468 |
if ((MemberSet.First().DrawingData as TextControl).Angle != 0)
|
|
504 |
if ((this.Members.First().DrawingData as TextControl).Angle != 0)
|
|
469 | 505 |
{ |
470 |
trRotate.Angle = (MemberSet.First().DrawingData as TextControl).Angle;
|
|
471 |
trRotateThumb.Angle = (MemberSet.First().DrawingData as TextControl).Angle;
|
|
506 |
trRotate.Angle = (this.Members.First().DrawingData as TextControl).Angle;
|
|
507 |
trRotateThumb.Angle = (this.Members.First().DrawingData as TextControl).Angle;
|
|
472 | 508 |
} |
473 | 509 |
else |
474 | 510 |
{ |
... | ... | |
477 | 513 |
} |
478 | 514 |
} |
479 | 515 |
} |
480 |
foreach (var item in MemberSet)
|
|
516 |
foreach (var item in this.Members)
|
|
481 | 517 |
{ |
482 | 518 |
UIElement currentControl = (item as AdornerMember).DrawingData; |
483 | 519 |
if (item.DrawingData.GetType().Name == "TextControl") |
... | ... | |
646 | 682 |
list.Add(new Point((member as IPath).PathData.Bounds.Right, (member as IPath).PathData.Bounds.Bottom)); |
647 | 683 |
list.Add(new Point((member as IPath).PathData.Bounds.Right, (member as IPath).PathData.Bounds.Top)); |
648 | 684 |
} |
649 |
ControlType markT = MemberSet.Where(p => p.DrawingData == member).First().Drawingtype;
|
|
685 |
ControlType markT = this.Members.Where(p => p.DrawingData == member).First().Drawingtype;
|
|
650 | 686 |
foreach (var ax in list) |
651 | 687 |
{ |
652 | 688 |
Minx = (ax.X < Minx) ? ax.X : Minx; |
... | ... | |
659 | 695 |
Style = (Style)this.LayoutRoot.Resources["ThumbResizeStyle"], |
660 | 696 |
}; |
661 | 697 |
|
662 |
MemberSet.Last().ThumbList.Add(tm);
|
|
698 |
this.Members.Last().ThumbList.Add(tm);
|
|
663 | 699 |
|
664 | 700 |
if ((markT == ControlType.ArcLine && list[i] == (member as ArcControl).MidPoint) || (markT == ControlType.ArcArrow && list[i] == (member as ArrowArcControl).MidPoint)) |
665 | 701 |
{ |
... | ... | |
667 | 703 |
} |
668 | 704 |
if (member.GetType().Name == "ArrowTextControl" && i == 1) |
669 | 705 |
{ |
670 |
//if (MemberSet.Count()<=1)
|
|
706 |
//if (this.Members.Count()<=1)
|
|
671 | 707 |
//{ |
672 | 708 |
tm.Style = (Style)this.LayoutRoot.Resources["ThumbArcControlStyle"]; |
673 | 709 |
List<Point> ps = new List<Point>(); |
674 | 710 |
|
675 |
if ((MemberSet.First() as AdornerMember).DrawingData as ArrowTextControl != null)
|
|
711 |
if ((this.Members.First() as AdornerMember).DrawingData as ArrowTextControl != null)
|
|
676 | 712 |
{ |
677 |
var temp = (MemberSet.First() as AdornerMember).DrawingData as ArrowTextControl;
|
|
713 |
var temp = (this.Members.First() as AdornerMember).DrawingData as ArrowTextControl;
|
|
678 | 714 |
|
679 | 715 |
|
680 | 716 |
switch (Math.Abs(temp.Angle).ToString()) |
... | ... | |
836 | 872 |
|
837 | 873 |
private void ResizeTm_DragDelta(object sender, DragDeltaEventArgs e) |
838 | 874 |
{ |
839 |
if (MemberSet.Count > 1)
|
|
875 |
if (this.Members.Count > 1)
|
|
840 | 876 |
return; |
841 | 877 |
if (reSizePoint != new Point(0, 0)) |
842 | 878 |
{ |
... | ... | |
866 | 902 |
|
867 | 903 |
Point setPoint = new Point(Canvas.GetLeft(thumb), Canvas.GetTop(thumb)); |
868 | 904 |
|
869 |
AdornerMember control = (from userThumb in MemberSet
|
|
905 |
AdornerMember control = (from userThumb in this.Members
|
|
870 | 906 |
where userThumb.ThumbList.Contains(thumb) |
871 | 907 |
select userThumb).FirstOrDefault(); |
872 | 908 |
Point nearPoint = new Point(0, 0); |
... | ... | |
874 | 910 |
if (ControlType.TextControl != control.Drawingtype) |
875 | 911 |
{ |
876 | 912 |
|
877 |
var temp = (MemberSet.First() as AdornerMember).DrawingData as ArrowTextControl;
|
|
913 |
var temp = (this.Members.First() as AdornerMember).DrawingData as ArrowTextControl;
|
|
878 | 914 |
List<Point> ps = new List<Point>(); |
879 | 915 |
|
880 | 916 |
nearPoint = MathSet.getNearPoint((control.DrawingData as IPath).PointSet, setPoint); |
... | ... | |
1193 | 1229 |
this.isDragging = false; |
1194 | 1230 |
DraggerThumb = null; |
1195 | 1231 |
|
1196 |
var comments = (from drawing in this.MemberSet
|
|
1232 |
var comments = (from drawing in this.Members
|
|
1197 | 1233 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
1198 | 1234 |
UndoCommand.Instance.Push(comments, this.AngleValue); |
1199 | 1235 |
} |
... | ... | |
1229 | 1265 |
} |
1230 | 1266 |
} |
1231 | 1267 |
|
1232 |
var comments = (from drawing in this.MemberSet
|
|
1268 |
var comments = (from drawing in this.Members
|
|
1233 | 1269 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
1234 | 1270 |
UndoCommand.Instance.Push(comments, this.AngleValue); |
1235 | 1271 |
} |
1236 | 1272 |
|
1237 | 1273 |
private void rotate_MouseMove(object sender, MouseEventArgs e) |
1238 | 1274 |
{ |
1239 |
if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
|
|
1275 |
if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
|
|
1240 | 1276 |
{ |
1241 | 1277 |
if (LastRotateVerticalValue < e.GetPosition(this).X) |
1242 | 1278 |
IsTextAngle = true; |
... | ... | |
1271 | 1307 |
|
1272 | 1308 |
Dispatcher.BeginInvoke((Action)(() => |
1273 | 1309 |
{ |
1274 |
foreach (var item in MemberSet)
|
|
1310 |
foreach (var item in this.Members)
|
|
1275 | 1311 |
{ |
1276 | 1312 |
#region 라인 & 아크 |
1277 | 1313 |
if (item.Drawingtype == ControlType.SingleLine || item.Drawingtype == ControlType.ArcLine || item.Drawingtype == ControlType.ArrowMultiLine || item.Drawingtype == ControlType.ArcArrow) |
... | ... | |
1437 | 1473 |
testP = new Point(endP.X + 50, endP.Y); |
1438 | 1474 |
//System.Diagnostics.Debug.WriteLine("우단"); |
1439 | 1475 |
} |
1440 |
Canvas.SetLeft((MemberSet.First() as AdornerMember).ThumbList[1], testP.X);
|
|
1441 |
Canvas.SetTop((MemberSet.First() as AdornerMember).ThumbList[1], testP.Y);
|
|
1476 |
Canvas.SetLeft((this.Members.First() as AdornerMember).ThumbList[1], testP.X);
|
|
1477 |
Canvas.SetTop((this.Members.First() as AdornerMember).ThumbList[1], testP.Y);
|
|
1442 | 1478 |
} |
1443 | 1479 |
else |
1444 | 1480 |
{ |
1445 | 1481 |
var endP = MathSet.getNearPoint(ps, temp.MidPoint); |
1446 | 1482 |
var tempP = MathSet.getMiddlePoint(temp.StartPoint, endP); |
1447 |
Canvas.SetLeft((MemberSet.First() as AdornerMember).ThumbList[1], tempP.X);
|
|
1448 |
Canvas.SetTop((MemberSet.First() as AdornerMember).ThumbList[1], tempP.Y);
|
|
1483 |
Canvas.SetLeft((this.Members.First() as AdornerMember).ThumbList[1], tempP.X);
|
|
1484 |
Canvas.SetTop((this.Members.First() as AdornerMember).ThumbList[1], tempP.Y);
|
|
1449 | 1485 |
} |
1450 | 1486 |
} |
1451 | 1487 |
} |
... | ... | |
1470 | 1506 |
} |
1471 | 1507 |
|
1472 | 1508 |
#region 센터 포인트 구하기 (그룹핑) |
1473 |
foreach (var item in MemberSet)
|
|
1509 |
foreach (var item in this.Members)
|
|
1474 | 1510 |
{ |
1475 | 1511 |
if (item.DrawingData.GetType().Name == "TextControl") |
1476 | 1512 |
{ |
... | ... | |
1489 | 1525 |
|
1490 | 1526 |
Dispatcher.BeginInvoke((Action)(() => |
1491 | 1527 |
{ |
1492 |
foreach (var item in MemberSet)
|
|
1528 |
foreach (var item in this.Members)
|
|
1493 | 1529 |
{ |
1494 | 1530 |
foreach (var thumb in item.ThumbList) |
1495 | 1531 |
{ |
... | ... | |
1508 | 1544 |
if (!(item.DrawingData as ArrowTextControl).isTrans) |
1509 | 1545 |
{ |
1510 | 1546 |
List<Point> ps = new List<Point>(); |
1511 |
var temp = (MemberSet.First() as AdornerMember).DrawingData as ArrowTextControl;
|
|
1547 |
var temp = (this.Members.First() as AdornerMember).DrawingData as ArrowTextControl;
|
|
1512 | 1548 |
switch (Math.Abs(temp.Angle).ToString()) |
1513 | 1549 |
{ |
1514 | 1550 |
case "90": |
... | ... | |
1555 | 1591 |
|
1556 | 1592 |
var endP = MathSet.getNearPoint(ps, temp.MidPoint); |
1557 | 1593 |
var tempP = MathSet.getMiddlePoint(temp.StartPoint, endP); |
1558 |
Canvas.SetLeft((MemberSet.First() as AdornerMember).ThumbList[1], tempP.X);
|
|
1559 |
Canvas.SetTop((MemberSet.First() as AdornerMember).ThumbList[1], tempP.Y);
|
|
1594 |
Canvas.SetLeft((this.Members.First() as AdornerMember).ThumbList[1], tempP.X);
|
|
1595 |
Canvas.SetTop((this.Members.First() as AdornerMember).ThumbList[1], tempP.Y);
|
|
1560 | 1596 |
} |
1561 | 1597 |
} |
1562 | 1598 |
} |
... | ... | |
1567 | 1603 |
} |
1568 | 1604 |
} |
1569 | 1605 |
#region 컨트롤 업데이트 |
1570 |
foreach (var item in MemberSet)
|
|
1606 |
foreach (var item in this.Members)
|
|
1571 | 1607 |
{ |
1572 | 1608 |
switch (item.Drawingtype) |
1573 | 1609 |
{ |
... | ... | |
1736 | 1772 |
Point CenterPoint = new Point(); |
1737 | 1773 |
|
1738 | 1774 |
#region 센터 포인트 구하기 (그룹핑) |
1739 |
foreach (var item in MemberSet)
|
|
1775 |
foreach (var item in this.Members)
|
|
1740 | 1776 |
{ |
1741 | 1777 |
if (item.DrawingData.GetType().Name == "TextControl") |
1742 | 1778 |
{ |
... | ... | |
1775 | 1811 |
|
1776 | 1812 |
Dispatcher.BeginInvoke((Action)(() => |
1777 | 1813 |
{ |
1778 |
foreach (var item in MemberSet)
|
|
1814 |
foreach (var item in this.Members)
|
|
1779 | 1815 |
{ |
1780 | 1816 |
foreach (var thumb in item.ThumbList) |
1781 | 1817 |
{ |
... | ... | |
1793 | 1829 |
} |
1794 | 1830 |
} |
1795 | 1831 |
#region 보더 업데이트 |
1796 |
foreach (var item in MemberSet)
|
|
1832 |
foreach (var item in this.Members)
|
|
1797 | 1833 |
{ |
1798 | 1834 |
switch (item.Drawingtype) |
1799 | 1835 |
{ |
... | ... | |
1928 | 1964 |
rotateTop.Cursor = Cursors.SizeAll; |
1929 | 1965 |
|
1930 | 1966 |
/// get angle from text controls' angle if only text control exists - 2018.05.10 added by humkyung |
1931 |
if ((1 == MemberSet.Count) && (MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
|
|
1967 |
if ((1 == this.Members.Count) && (this.Members.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
|
|
1932 | 1968 |
{ |
1933 |
this.AngleValue = ((MemberSet.First() as AdornerMember).DrawingData as TextControl).Angle;
|
|
1969 |
this.AngleValue = ((this.Members.First() as AdornerMember).DrawingData as TextControl).Angle;
|
|
1934 | 1970 |
} |
1935 | 1971 |
/// up to here |
1936 | 1972 |
|
... | ... | |
1957 | 1993 |
} |
1958 | 1994 |
} |
1959 | 1995 |
|
1960 |
var comments = (from drawing in this.MemberSet
|
|
1996 |
var comments = (from drawing in this.Members
|
|
1961 | 1997 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
1962 | 1998 |
UndoCommand.Instance.Push(comments, this.AngleValue); |
1963 | 1999 |
} |
... | ... | |
1966 | 2002 |
{ |
1967 | 2003 |
rotateTop.Cursor = new Cursor(MainWindow.CursorChange().StreamSource); |
1968 | 2004 |
|
1969 |
var comments = (from drawing in this.MemberSet
|
|
2005 |
var comments = (from drawing in this.Members
|
|
1970 | 2006 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
1971 | 2007 |
UndoCommand.Instance.Push(comments, this.AngleValue); |
1972 | 2008 |
} |
... | ... | |
1992 | 2028 |
} |
1993 | 2029 |
} |
1994 | 2030 |
|
1995 |
var comments = (from drawing in this.MemberSet
|
|
2031 |
var comments = (from drawing in this.Members
|
|
1996 | 2032 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
1997 | 2033 |
UndoCommand.Instance.Push(comments, this.AngleValue); |
1998 | 2034 |
} |
... | ... | |
2001 | 2037 |
{ |
2002 | 2038 |
DragThumb.Cursor = new Cursor(MainWindow.CursorChange().StreamSource); |
2003 | 2039 |
|
2004 |
var comments = (from drawing in this.MemberSet
|
|
2040 |
var comments = (from drawing in this.Members
|
|
2005 | 2041 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
2006 | 2042 |
UndoCommand.Instance.Push(comments, this.AngleValue); |
2007 | 2043 |
} |
2008 | 2044 |
|
2009 | 2045 |
public void ControlPointMouseLeftButtonDown(object sender, MouseButtonEventArgs e) |
2010 | 2046 |
{ |
2011 |
AdornerMember control = MemberSet.FirstOrDefault();
|
|
2047 |
AdornerMember control = this.Members.FirstOrDefault();
|
|
2012 | 2048 |
|
2013 | 2049 |
if ((control.DrawingData as ArrowTextControl) != null && DraggerThumb == null) |
2014 | 2050 |
{ |
... | ... | |
2022 | 2058 |
|
2023 | 2059 |
public void TextControlChanger() |
2024 | 2060 |
{ |
2025 |
if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
|
|
2061 |
if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
|
|
2026 | 2062 |
{ |
2027 |
TextControl AllControl = (MemberSet.First() as AdornerMember).DrawingData as TextControl;
|
|
2063 |
TextControl AllControl = (this.Members.First() as AdornerMember).DrawingData as TextControl;
|
|
2028 | 2064 |
AllControl.Base_TextBox.Focus(); |
2029 | 2065 |
AllControl.Base_TextBox.Visibility = Visibility.Visible; |
2030 | 2066 |
AllControl.Base_TextBlock.Visibility = Visibility.Collapsed; |
... | ... | |
2060 | 2096 |
|
2061 | 2097 |
private void RectThumb_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) //더블클릭 |
2062 | 2098 |
{ |
2063 |
if (e.ClickCount == 2 && MemberSet.Count == 1)
|
|
2099 |
if (e.ClickCount == 2 && this.Members.Count == 1)
|
|
2064 | 2100 |
{ |
2065 | 2101 |
|
2066 |
if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
|
|
2102 |
if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
|
|
2067 | 2103 |
{ |
2068 | 2104 |
TextControlChanger(); |
2069 | 2105 |
} |
2070 | 2106 |
|
2071 |
else if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "ArrowTextControl")
|
|
2107 |
else if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "ArrowTextControl")
|
|
2072 | 2108 |
{ |
2073 |
ArrowTextControl AllControl = (MemberSet.First() as AdornerMember).DrawingData as ArrowTextControl;
|
|
2074 |
Thumb tm = (MemberSet.First() as AdornerMember).ThumbList.Last();
|
|
2109 |
ArrowTextControl AllControl = (this.Members.First() as AdornerMember).DrawingData as ArrowTextControl;
|
|
2110 |
Thumb tm = (this.Members.First() as AdornerMember).ThumbList.Last();
|
|
2075 | 2111 |
((ArrowTextControl)AllControl).Base_TextBox.Focus(); |
2076 | 2112 |
|
2077 | 2113 |
//ArrowControl TextBox Thumb없애기 |
2078 | 2114 |
tm.Visibility = Visibility.Collapsed; |
2079 | 2115 |
|
2080 |
((MemberSet.First() as AdornerMember).DrawingData as ArrowTextControl).Base_TextBox.IsHitTestVisible = true;
|
|
2116 |
((this.Members.First() as AdornerMember).DrawingData as ArrowTextControl).Base_TextBox.IsHitTestVisible = true;
|
|
2081 | 2117 |
|
2082 | 2118 |
((ArrowTextControl)AllControl).Base_TextBox.SizeChanged += (sen, ea) => |
2083 | 2119 |
|
... | ... | |
2099 | 2135 |
var tempP = MathSet.getMiddlePoint(AllControl.StartPoint, endP); |
2100 | 2136 |
if (AllControl.isTrans) |
2101 | 2137 |
{ |
2102 |
Canvas.SetLeft((MemberSet.First() as AdornerMember).ThumbList[1], AllControl.MidPoint.X);
|
|
2103 |
Canvas.SetTop((MemberSet.First() as AdornerMember).ThumbList[1], AllControl.MidPoint.Y);
|
|
2138 |
Canvas.SetLeft((this.Members.First() as AdornerMember).ThumbList[1], AllControl.MidPoint.X);
|
|
2139 |
Canvas.SetTop((this.Members.First() as AdornerMember).ThumbList[1], AllControl.MidPoint.Y);
|
|
2104 | 2140 |
} |
2105 | 2141 |
else |
2106 | 2142 |
{ |
2107 |
Canvas.SetLeft((MemberSet.First() as AdornerMember).ThumbList[1], tempP.X);
|
|
2108 |
Canvas.SetTop((MemberSet.First() as AdornerMember).ThumbList[1], tempP.Y);
|
|
2143 |
Canvas.SetLeft((this.Members.First() as AdornerMember).ThumbList[1], tempP.X);
|
|
2144 |
Canvas.SetTop((this.Members.First() as AdornerMember).ThumbList[1], tempP.Y);
|
|
2109 | 2145 |
} |
2110 | 2146 |
|
2111 | 2147 |
|
... | ... | |
2113 | 2149 |
|
2114 | 2150 |
}; |
2115 | 2151 |
} |
2116 |
else if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "DateControl")
|
|
2152 |
else if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "DateControl")
|
|
2117 | 2153 |
{ |
2118 |
DateControl data = (MemberSet.First() as AdornerMember).DrawingData as DateControl;
|
|
2154 |
DateControl data = (this.Members.First() as AdornerMember).DrawingData as DateControl;
|
|
2119 | 2155 |
CalendarControl instanceCal = new CalendarControl(data.Text); |
2120 | 2156 |
//dropData.IsOpen = true; |
2121 | 2157 |
RadWindow rc = new RadWindow(); |
... | ... | |
2137 | 2173 |
rc.ShowDialog(); |
2138 | 2174 |
//CalendarControl.xaml |
2139 | 2175 |
} |
2140 |
else if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "ArcControl")
|
|
2176 |
else if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "ArcControl")
|
|
2141 | 2177 |
{ |
2142 |
ArcControl instance = ((MemberSet.First() as AdornerMember).DrawingData as ArcControl);
|
|
2178 |
ArcControl instance = ((this.Members.First() as AdornerMember).DrawingData as ArcControl);
|
|
2143 | 2179 |
if (instance.isTransOn) |
2144 | 2180 |
{ |
2145 | 2181 |
instance.isTransOn = false; |
... | ... | |
2151 | 2187 |
///instance.SetArcPath(); |
2152 | 2188 |
BorderUpdate(); |
2153 | 2189 |
} |
2154 |
else if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "ArrowArcControl")
|
|
2190 |
else if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "ArrowArcControl")
|
|
2155 | 2191 |
{ |
2156 |
ArrowArcControl instance = ((MemberSet.First() as AdornerMember).DrawingData as ArrowArcControl);
|
|
2192 |
ArrowArcControl instance = ((this.Members.First() as AdornerMember).DrawingData as ArrowArcControl);
|
|
2157 | 2193 |
if (instance.isTransOn) |
2158 | 2194 |
{ |
2159 | 2195 |
instance.isTransOn = false; |
... | ... | |
2173 | 2209 |
|
2174 | 2210 |
private void DragThumb_MouseDoubleClick(object sender, MouseButtonEventArgs e) |
2175 | 2211 |
{ |
2176 |
if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "TextControl" || (MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "ArrowTextControl")
|
|
2212 |
if ((this.Members.First() as AdornerMember).DrawingData.GetType().Name == "TextControl" || (this.Members.First() as AdornerMember).DrawingData.GetType().Name == "ArrowTextControl")
|
|
2177 | 2213 |
{ |
2178 | 2214 |
DragThumb.Visibility = Visibility.Collapsed; |
2179 | 2215 |
} |
내보내기 Unified diff