개정판 f513c215
issue #923: add CreateCommand and change thumb's opacity when mouse is enter or leave
Change-Id: I1e4b2ac57ca876e4681b14f02c1567abb265391e
KCOM/Controls/AdornerFinal.xaml | ||
---|---|---|
74 | 74 |
<!--<Setter Property="Cursor" Value="None" />--> |
75 | 75 |
<Setter Property="Margin" Value="-10" /> |
76 | 76 |
<Setter Property="Width" Value="20" /> |
77 |
<Setter Property="Opacity" Value="1" />
|
|
77 |
<Setter Property="Opacity" Value="0.6" />
|
|
78 | 78 |
<Setter Property="Cursor" Value="Hand"/> |
79 | 79 |
<Setter Property="Height" Value="20" /> |
80 | 80 |
<Setter Property="Template"> |
... | ... | |
83 | 83 |
<Ellipse Stroke="#ff2e3436" StrokeThickness="2" MouseLeftButtonDown="ControlPointMouseLeftButtonDown" |
84 | 84 |
HorizontalAlignment="Center" Width="20" Height="20" Margin="0,0,0,0" Canvas.ZIndex="1"> |
85 | 85 |
<Ellipse.Fill> |
86 |
<SolidColorBrush Color="#fff814df" Opacity="0.6"/>
|
|
86 |
<SolidColorBrush Color="#fff814df" Opacity="{Binding Opacity}"/>
|
|
87 | 87 |
</Ellipse.Fill> |
88 | 88 |
<i:Interaction.Behaviors> |
89 | 89 |
<behavior:ExpandingMouseOver ScaleFactor="2"/> |
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
23 | 23 |
|
24 | 24 |
namespace KCOM.Controls |
25 | 25 |
{ |
26 |
public class MyThumb : Thumb |
|
27 |
{ |
|
28 |
public MyThumb() |
|
29 |
{ |
|
30 |
this.Opacity = 0.6; |
|
31 |
this.MouseEnter += MyThumb_MouseEnter; |
|
32 |
this.MouseLeave += MyThumb_MouseLeave; |
|
33 |
} |
|
34 |
|
|
35 |
/// <summary> |
|
36 |
/// </summary> |
|
37 |
/// <param name="sender"></param> |
|
38 |
/// <param name="e"></param> |
|
39 |
private void MyThumb_MouseLeave(object sender, MouseEventArgs e) |
|
40 |
{ |
|
41 |
this.Opacity = 0.6; |
|
42 |
} |
|
43 |
|
|
44 |
/// <summary> |
|
45 |
/// |
|
46 |
/// </summary> |
|
47 |
/// <param name="sender"></param> |
|
48 |
/// <param name="e"></param> |
|
49 |
private void MyThumb_MouseEnter(object sender, MouseEventArgs e) |
|
50 |
{ |
|
51 |
this.Opacity = 1.0; |
|
52 |
} |
|
53 |
} |
|
54 |
|
|
26 | 55 |
/// <summary> |
27 | 56 |
/// Interaction logic for AdornerFinal.xaml |
28 | 57 |
/// </summary> |
... | ... | |
31 | 60 |
public UIElement DrawingData { get; set; } |
32 | 61 |
public ControlType Drawingtype { get; set; } |
33 | 62 |
public double DrawingAngle { get; set; } |
34 |
public List<Thumb> ThumbList { get; set; } |
|
63 |
public List<MyThumb> ThumbList { get; set; }
|
|
35 | 64 |
public string Symbol_ID { get; set; } |
36 | 65 |
public long Group_ID { get; set; } |
37 | 66 |
} |
... | ... | |
190 | 219 |
{ |
191 | 220 |
#region 컨트롤 조건 |
192 | 221 |
case "LineControl": //Angle추가 안했음 |
193 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
222 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
194 | 223 |
break; |
195 | 224 |
case "ImgControl": //Angle추가 안했음 |
196 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
225 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
197 | 226 |
//AdornerBorder.RenderTransformOrigin = new Point(0.5, 0.5); |
198 | 227 |
//DragThumb.RenderTransformOrigin = new Point(0.5, 0.5); |
199 | 228 |
AngleValue = (member as ImgControl).Angle; |
200 | 229 |
break; |
201 | 230 |
//case "SymControl": //Angle추가 안했음 |
202 |
// this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = MarkupType.Viewbox, ThumbList = new List<Thumb>() }); |
|
231 |
// this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = MarkupType.Viewbox, ThumbList = new List<MyThumb>() });
|
|
203 | 232 |
// AngleValue = (member as SymControl).Angle; |
204 | 233 |
// //ViewBoxRotate(member); |
205 | 234 |
// break; |
206 | 235 |
//case "SymControlN": //Angle추가 안했음 |
207 |
// this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = MarkupType.Viewbox, ThumbList = new List<Thumb>() }); |
|
236 |
// this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = MarkupType.Viewbox, ThumbList = new List<MyThumb>() });
|
|
208 | 237 |
// AngleValue = (member as SymControlN).Angle; |
209 | 238 |
// //ViewBoxRotate(member); |
210 | 239 |
// break; |
211 | 240 |
case "PolygonControl": //Angle추가 안했음 |
212 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
241 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
213 | 242 |
break; |
214 | 243 |
case "ArrowControl": |
215 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
244 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
216 | 245 |
break; |
217 | 246 |
case "ArrowTextControl": |
218 | 247 |
this.Members.Add(new AdornerMember |
219 | 248 |
{ |
220 | 249 |
DrawingData = member, |
221 | 250 |
Drawingtype = ControlType.ArrowTextControl, |
222 |
ThumbList = new List<Thumb>(), |
|
251 |
ThumbList = new List<MyThumb>(),
|
|
223 | 252 |
Symbol_ID = member.SymbolID, |
224 | 253 |
Group_ID = member.GroupID, |
225 | 254 |
}); |
... | ... | |
237 | 266 |
}); |
238 | 267 |
break; |
239 | 268 |
case "ArcControl": |
240 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
269 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
241 | 270 |
break; |
242 | 271 |
case "ArrowArcControl": |
243 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
272 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
244 | 273 |
break; |
245 | 274 |
case "ArrowControl_Multi": |
246 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
275 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
247 | 276 |
break; |
248 | 277 |
case "RectangleControl": |
249 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
278 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
250 | 279 |
break; |
251 | 280 |
case "DateControl": |
252 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
281 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
253 | 282 |
AngleValue = (member as DateControl).Angle; |
254 | 283 |
break; |
255 | 284 |
case "TriControl": |
256 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
285 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
257 | 286 |
break; |
258 | 287 |
case "CircleControl": |
259 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
288 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
260 | 289 |
break; |
261 | 290 |
case "CloudControl": |
262 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
291 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
263 | 292 |
break; |
264 | 293 |
case "RectCloudControl": |
265 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
294 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
266 | 295 |
break; |
267 | 296 |
case "SignControl": |
268 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
297 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
269 | 298 |
AngleValue = (member as SignControl).Angle; |
270 | 299 |
break; |
271 | 300 |
|
272 | 301 |
case "SymControl": |
273 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
302 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
274 | 303 |
AngleValue = (member as SymControl).Angle; |
275 | 304 |
break; |
276 | 305 |
case "SymControlN": |
277 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
306 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
278 | 307 |
AngleValue = (member as SymControlN).Angle; |
279 | 308 |
break; |
280 | 309 |
case "InkControl": //Angle추가 안했음 |
281 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
310 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
282 | 311 |
break; |
283 | 312 |
case "TextControl": |
284 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
313 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
285 | 314 |
RectangleGeometry Data = new RectangleGeometry |
286 | 315 |
{ |
287 | 316 |
Rect = new Rect() |
... | ... | |
336 | 365 |
}); |
337 | 366 |
break; |
338 | 367 |
case "InsideWhiteControl": |
339 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.InsideWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
368 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.InsideWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
340 | 369 |
break; |
341 | 370 |
case "OverlapWhiteControl": |
342 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.OverlapWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
371 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.OverlapWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
343 | 372 |
break; |
344 | 373 |
case "ClipWhiteControl": |
345 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ClipWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
374 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ClipWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
346 | 375 |
break; |
347 | 376 |
case "CoordinateControl": |
348 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Coordinate, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
377 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Coordinate, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
349 | 378 |
break; |
350 | 379 |
default: |
351 | 380 |
break; |
... | ... | |
383 | 412 |
{ |
384 | 413 |
#region 컨트롤 조건 |
385 | 414 |
case "LineControl": |
386 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
415 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
387 | 416 |
break; |
388 | 417 |
case "ImgControl": |
389 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
418 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
390 | 419 |
break; |
391 | 420 |
case "ArrowControl": |
392 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
421 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
393 | 422 |
break; |
394 | 423 |
case "PolygonControl": |
395 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
424 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
396 | 425 |
break; |
397 | 426 |
case "ArrowTextControl": |
398 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowTextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
427 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowTextControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
399 | 428 |
(member as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
400 | 429 |
break; |
401 | 430 |
case "ArcControl": |
402 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
431 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
403 | 432 |
break; |
404 | 433 |
case "ArrowArcControl": |
405 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
434 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
406 | 435 |
break; |
407 | 436 |
case "DateControl": |
408 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
437 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
409 | 438 |
break; |
410 | 439 |
case "ArrowControl_Multi": |
411 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
440 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
412 | 441 |
break; |
413 | 442 |
case "RectangleControl": |
414 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
443 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
415 | 444 |
break; |
416 | 445 |
case "TriControl": |
417 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
446 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
418 | 447 |
break; |
419 | 448 |
case "CircleControl": |
420 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
449 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
421 | 450 |
break; |
422 | 451 |
case "CloudControl": |
423 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
452 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
424 | 453 |
break; |
425 | 454 |
case "RectCloudControl": |
426 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
455 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
427 | 456 |
break; |
428 | 457 |
case "SignControl": |
429 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
458 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
430 | 459 |
break; |
431 | 460 |
case "SymControl": |
432 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
461 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
433 | 462 |
break; |
434 | 463 |
case "SymControlN": |
435 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
464 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
436 | 465 |
break; |
437 | 466 |
case "InkControl": |
438 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
467 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
439 | 468 |
break; |
440 | 469 |
case "TextControl": |
441 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
470 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
442 | 471 |
Observable.FromEventPattern(((TextControl)member), "PropertyChanged").Subscribe(a => |
443 | 472 |
{ |
444 | 473 |
BorderUpdate(); |
... | ... | |
458 | 487 |
}); |
459 | 488 |
break; |
460 | 489 |
case "InsideWhiteControl": |
461 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.InsideWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
490 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.InsideWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
462 | 491 |
break; |
463 | 492 |
case "OverlapWhiteControl": |
464 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.OverlapWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
493 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.OverlapWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
465 | 494 |
break; |
466 | 495 |
case "ClipWhiteControl": |
467 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ClipWhite, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
496 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ClipWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
468 | 497 |
break; |
469 | 498 |
case "CoordinateControl": |
470 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Coordinate, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
|
499 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Coordinate, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
|
|
471 | 500 |
break; |
472 | 501 |
default: |
473 | 502 |
break; |
... | ... | |
670 | 699 |
} |
671 | 700 |
this.ContainerContent.Children.Clear(); |
672 | 701 |
} |
702 |
|
|
673 | 703 |
/// <summary> |
674 | 704 |
/// 각 포인트들을 등록합니다. |
675 | 705 |
/// </summary> |
... | ... | |
696 | 726 |
} |
697 | 727 |
for (int i = 0; i < list.Count(); i++) |
698 | 728 |
{ |
699 |
Thumb tm = new Thumb
|
|
729 |
MyThumb tm = new MyThumb
|
|
700 | 730 |
{ |
701 | 731 |
Style = (Style)this.LayoutRoot.Resources["ThumbResizeStyle"], |
702 | 732 |
}; |
... | ... | |
1454 | 1484 |
ps.Add(new Point(Canvas.GetLeft(temp.Base_TextBox), Canvas.GetTop(temp.Base_TextBox) + temp.BoxHeight / 2)); //좌단 |
1455 | 1485 |
ps.Add(new Point(Canvas.GetLeft(temp.Base_TextBox) + temp.BoxWidth, Canvas.GetTop(temp.Base_TextBox) + temp.BoxHeight / 2)); //우단 |
1456 | 1486 |
|
1457 |
|
|
1458 |
|
|
1459 | 1487 |
if (temp.isFixed) |
1460 | 1488 |
{ |
1461 | 1489 |
var endP = MathSet.getNearPoint(ps, temp.MidPoint); |
... | ... | |
1492 | 1520 |
} |
1493 | 1521 |
} |
1494 | 1522 |
} |
1495 |
//} |
|
1496 | 1523 |
} |
1497 | 1524 |
|
1498 | 1525 |
public void Set_Rotate() |
1499 | 1526 |
{ |
1500 |
|
|
1501 | 1527 |
double dDeltaAngle = 0; |
1502 | 1528 |
List<Point> AllPointSet = new List<Point>(); |
1503 | 1529 |
Point CenterPoint = new Point(); |
1504 | 1530 |
|
1505 |
|
|
1506 | 1531 |
if (AngleValue >= 360) |
1507 | 1532 |
{ |
1508 | 1533 |
AngleValue -= 360; |
KCOM/Events/CreateCommand.cs | ||
---|---|---|
1 |
using KCOM.Common; |
|
2 |
using KCOM.Controls; |
|
3 |
using KCOM.Views; |
|
4 |
using MarkupToPDF.Common; |
|
5 |
using MarkupToPDF.Controls.Parsing; |
|
6 |
using Newtonsoft.Json; |
|
7 |
using Newtonsoft.Json.Converters; |
|
8 |
using Newtonsoft.Json.Linq; |
|
9 |
using Newtonsoft.Json.Serialization; |
|
10 |
using System; |
|
11 |
using System.Collections; |
|
12 |
using System.Collections.Generic; |
|
13 |
using System.ComponentModel; |
|
14 |
using System.Data; |
|
15 |
using System.IO; |
|
16 |
using System.Linq; |
|
17 |
using System.Reflection; |
|
18 |
using System.Runtime.Serialization.Formatters; |
|
19 |
using System.Runtime.Serialization.Formatters.Binary; |
|
20 |
using System.Runtime.Serialization.Json; |
|
21 |
using System.Text; |
|
22 |
using System.Windows; |
|
23 |
using System.Windows.Media; |
|
24 |
using System.Xml; |
|
25 |
using System.Xml.Serialization; |
|
26 |
|
|
27 |
namespace KCOM |
|
28 |
{ |
|
29 |
public class CreateCommand |
|
30 |
{ |
|
31 |
private static readonly CreateCommand _instance = new CreateCommand(); |
|
32 |
|
|
33 |
// Explicit static constructor to tell C# compiler |
|
34 |
// not to mark type as beforefieldinit |
|
35 |
static CreateCommand() |
|
36 |
{ |
|
37 |
} |
|
38 |
|
|
39 |
private CreateCommand() |
|
40 |
{ |
|
41 |
} |
|
42 |
|
|
43 |
public static CreateCommand Instance |
|
44 |
{ |
|
45 |
get |
|
46 |
{ |
|
47 |
return _instance; |
|
48 |
} |
|
49 |
} |
|
50 |
|
|
51 |
/// <summary> |
|
52 |
/// push given control to undo stack |
|
53 |
/// </summary> |
|
54 |
/// <author>humkyung</author> |
|
55 |
/// <date>2019.06.12</date> |
|
56 |
/// <param name="comments"></param> |
|
57 |
public void Execute(CommentUserInfo control) |
|
58 |
{ |
|
59 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
|
60 |
{ |
|
61 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
|
62 |
}); |
|
63 |
|
|
64 |
MarkupToPDF.Common.Undo_data UndoData = new Undo_data() |
|
65 |
{ |
|
66 |
IsUndo = false, |
|
67 |
Event = Event_Type.Create, |
|
68 |
EventTime = DateTime.Now, |
|
69 |
Markup_List = new List<Multi_Undo_data>() |
|
70 |
}; |
|
71 |
|
|
72 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data() |
|
73 |
{ |
|
74 |
Markup = control |
|
75 |
}; |
|
76 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
77 |
|
|
78 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
79 |
|
|
80 |
control.ApplyOverViewData(); |
|
81 |
} |
|
82 |
} |
|
83 |
} |
KCOM/Events/Event_KeyEvent.cs | ||
---|---|---|
21 | 21 |
public partial class MainWindow : Window |
22 | 22 |
{ |
23 | 23 |
public double CumulativeWheel = 0; |
24 |
|
|
25 |
public MarkupToPDF.Common.Undo_data UndoData; |
|
26 |
|
|
27 |
//20181108 |
|
28 |
//강인구 추가 |
|
29 |
//KCOM.Views.MainMenu mainMenu = new Views.MainMenu(); |
|
30 |
|
|
31 | 24 |
MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn(); |
32 | 25 |
|
33 | 26 |
public void KeyEventDownAction(object sender, KeyEventArgs e) |
KCOM/KCOM.csproj | ||
---|---|---|
323 | 323 |
<Compile Include="Controls\TeighaD3DImageResult.cs" /> |
324 | 324 |
<Compile Include="Events\ConsolidateCommand.cs" /> |
325 | 325 |
<Compile Include="Events\CopyCommand.cs" /> |
326 |
<Compile Include="Events\CreateCommand.cs" /> |
|
326 | 327 |
<Compile Include="Events\CutCommand.cs" /> |
327 | 328 |
<Compile Include="Events\DeleteCommand.cs" /> |
328 | 329 |
<Compile Include="Events\Move.cs" /> |
KCOM/MainWindow.xaml.cs | ||
---|---|---|
33 | 33 |
{ |
34 | 34 |
public MainWindow() |
35 | 35 |
{ |
36 |
//InitializeComponent(); |
|
37 | 36 |
this.Loaded += MainWindow_Loaded; |
38 | 37 |
this.KeyDown += new KeyEventHandler(KeyEventDownAction); |
39 | 38 |
this.KeyUp += new KeyEventHandler(KeyEventUpAction); |
... | ... | |
83 | 82 |
this.Left = (screenWidth / 2) - (windowWidth / 2); |
84 | 83 |
this.Top = (screenHeight / 2) - (windowHeight / 2); |
85 | 84 |
|
86 |
|
|
87 | 85 |
ViewerDataModel.Instance.SystemMain = this; |
88 | 86 |
|
89 | 87 |
if (!App.ParameterMode) |
... | ... | |
524 | 522 |
|
525 | 523 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data(); |
526 | 524 |
|
527 |
UndoData = new Undo_data() |
|
525 |
Undo_data UndoData = new Undo_data()
|
|
528 | 526 |
{ |
529 | 527 |
IsUndo = false, |
530 | 528 |
Event = Event_Type.Create, |
... | ... | |
589 | 587 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data(); |
590 | 588 |
|
591 | 589 |
//Undo/Redo 보류 |
592 |
UndoData = new Undo_data() |
|
590 |
Undo_data UndoData = new Undo_data()
|
|
593 | 591 |
{ |
594 | 592 |
IsUndo = false, |
595 | 593 |
Event = Event_Type.Create, |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
1140 | 1140 |
|
1141 | 1141 |
floatingTip.HorizontalOffset = currentPos.X + 20; |
1142 | 1142 |
floatingTip.VerticalOffset = currentPos.Y; |
1143 |
|
|
1144 |
|
|
1145 |
//ToolTip tool = new System.Windows.Controls.ToolTip(); |
|
1146 |
//tool.Content = "ToolTip"; |
|
1147 |
//panel.ToolTip = tool; |
|
1148 |
} |
|
1149 |
|
|
1150 |
if (mouseHandlingMode != MouseHandlingMode.Drawing) |
|
1151 |
{ |
|
1152 |
#region 마우스 오버 시 색상 변경 |
|
1153 |
/* |
|
1154 |
var firstCondition = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.IsMouseOver).FirstOrDefault(); |
|
1155 |
Color TempColor = MarkupToPDF.Controls.Common.ValueConverter.StringToColorConverter.Parse("FF07B4FF"); |
|
1156 |
|
|
1157 |
if (firstCondition != null) |
|
1158 |
{ |
|
1159 |
firstCondition.MouseLeave += new System.Windows.Input.MouseEventHandler(firstCondition_MouseLeave); |
|
1160 |
|
|
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 |
} |
|
1171 |
|
|
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 |
*/ |
|
1233 |
#endregion |
|
1234 | 1143 |
} |
1235 | 1144 |
|
1236 | 1145 |
getCurrentPoint = e.GetPosition(drawingRotateCanvas); |
... | ... | |
2425 | 2334 |
if (isDraggingSelectionRect) |
2426 | 2335 |
{ |
2427 | 2336 |
UpdateDragSelectionRect(canvasDrawingMouseDownPoint, curMouseDownPoint); |
2428 |
|
|
2429 | 2337 |
e.Handled = true; |
2430 | 2338 |
} |
2431 | 2339 |
else if (isLeftMouseButtonDownOnWindow) |
... | ... | |
2436 | 2344 |
if (dragDistance > DragThreshold) |
2437 | 2345 |
{ |
2438 | 2346 |
isDraggingSelectionRect = true; |
2439 |
|
|
2440 | 2347 |
InitDragSelectionRect(canvasDrawingMouseDownPoint, curMouseDownPoint); |
2441 | 2348 |
} |
2442 | 2349 |
|
2443 | 2350 |
e.Handled = true; |
2444 | 2351 |
} |
2445 | 2352 |
|
2446 |
|
|
2447 | 2353 |
if (canvasDrawingMouseDownPoint == curMouseDownPoint) |
2448 | 2354 |
{ |
2449 |
//SelectionPath = new Path(); |
|
2450 |
//PathFigure pathFigure = new PathFigure(); |
|
2451 |
//SelectionPath.Fill = new SolidColorBrush(Colors.Yellow); |
|
2452 |
//SelectionPath.Opacity = 0.5; |
|
2453 |
//SelectionPath.StrokeDashArray = new DoubleCollection() { 1 }; |
|
2454 |
//SelectionPath.StrokeDashCap = PenLineCap.Round; |
|
2455 |
//SelectionPath.Stroke = new SolidColorBrush(Colors.Black); |
|
2456 | 2355 |
} |
2457 | 2356 |
else |
2458 | 2357 |
{ |
2459 |
//List<Stroke> removingStroke = new List<Stroke>(); |
|
2460 |
//Rect p1 = new Rect(canvasDrawingMouseDownPoint, curMouseDownPoint); |
|
2461 |
//StrokeCollection stC = new StrokeCollection(); |
|
2462 |
//for (int i = 0; i <= inkBoard.Strokes.Count - 1; i++) |
|
2463 |
//{ |
|
2464 |
// Rect p2 = inkBoard.Strokes[i].GetBounds(); |
|
2465 |
// p1.Intersect(p2); |
|
2466 |
// if (p1.IsEmpty) |
|
2467 |
// { |
|
2468 |
|
|
2469 |
|
|
2470 |
// p1 = SelectionPath.Data.Bounds; |
|
2471 |
// bool intersectCheck = false; |
|
2472 |
// foreach (var T in inkBoard.Strokes[i].StylusPoints) |
|
2473 |
// { |
|
2474 |
// Rect p3 = new Rect(new Point(T.X, T.Y), new Size(10, 10)); |
|
2475 |
// p1.Intersect(p3); |
|
2476 |
// if (!p1.IsEmpty) |
|
2477 |
// { |
|
2478 |
// intersectCheck = true; |
|
2479 |
// } |
|
2480 |
// } |
|
2481 |
// if (intersectCheck) |
|
2482 |
// { |
|
2483 |
// removingStroke.Add(inkBoard.Strokes[i]); |
|
2484 |
// } |
|
2485 |
|
|
2486 |
// } |
|
2487 |
// else |
|
2488 |
// { |
|
2489 |
// removingStroke.Add(inkBoard.Strokes[i]); |
|
2490 |
// } |
|
2491 |
//} |
|
2492 |
|
|
2493 | 2358 |
e.Handled = true; |
2494 | 2359 |
} |
2495 | 2360 |
} |
... | ... | |
3081 | 2946 |
} |
3082 | 2947 |
} |
3083 | 2948 |
|
3084 |
///mouseButtonDown = e.ChangedButton; |
|
3085 |
/// complete drawing text control when user click mouse right button - 2018.05.14 added by humkyung |
|
3086 |
|
|
3087 | 2949 |
//if (currentControl != null) |
3088 | 2950 |
{ |
3089 | 2951 |
var text_item_ = ViewerDataModel.Instance.MarkupControls_USER.Where(data => (data as TextControl) != null && (data as TextControl).Base_TextBox.Visibility == Visibility.Visible).FirstOrDefault(); |
... | ... | |
3118 | 2980 |
|
3119 | 2981 |
if (mouseHandlingMode == MouseHandlingMode.DragSymbol && e.LeftButton == MouseButtonState.Pressed) |
3120 | 2982 |
{ |
3121 |
//this.cursor = new Cursor(MainWindow.CursorChange().StreamSource); |
|
3122 |
//SetCursor(); |
|
3123 |
|
|
3124 |
//canvasDrawingMouseDownPoint = e.GetPosition(drawingRotateCanvas); |
|
3125 | 2983 |
canvasZoomPanningMouseDownPoint = e.GetPosition(zoomAndPanCanvas); |
3126 | 2984 |
if(symbol_id != null) |
3127 | 2985 |
{ |
... | ... | |
3147 | 3005 |
this.cursor = new Cursor(MainWindow.CursorChange().StreamSource); |
3148 | 3006 |
SetCursor(); |
3149 | 3007 |
|
3150 |
if (!ViewerDataModel.Instance.IsPressCtrl) |
|
3151 |
{ |
|
3152 |
SelectionSet.Instance.UnSelect(this); |
|
3153 |
} |
|
3008 |
if (!ViewerDataModel.Instance.IsPressCtrl) SelectionSet.Instance.UnSelect(this); |
|
3154 | 3009 |
} |
3010 |
|
|
3155 | 3011 |
if (e.MiddleButton == MouseButtonState.Pressed) |
3156 | 3012 |
{ |
3157 | 3013 |
canvasZoommovingMouseDownPoint = e.GetPosition(zoomAndPanCanvas); |
... | ... | |
3182 | 3038 |
} |
3183 | 3039 |
} |
3184 | 3040 |
|
3185 |
//if (mouseButtonDown == MouseButton.Left && ViewerDataModel.Instance.MarkupControls_USER.Count > 0 && mouseHandlingMode != MouseHandlingMode.Drawing && currentControl == null) |
|
3186 | 3041 |
if (e.LeftButton == MouseButtonState.Pressed && mouseHandlingMode != MouseHandlingMode.Drawing && currentControl == null) |
3187 | 3042 |
{ |
3188 | 3043 |
if (mouseHandlingMode == MouseHandlingMode.Selecting) |
... | ... | |
3199 | 3054 |
} |
3200 | 3055 |
} |
3201 | 3056 |
|
3202 |
//캡쳐 모드 설정 |
|
3057 |
/// 캡쳐 모드 설정
|
|
3203 | 3058 |
if (mouseHandlingMode == MouseHandlingMode.Capture) |
3204 | 3059 |
{ |
3205 | 3060 |
dragCaptureBorder.Visibility = Visibility.Visible; |
3206 | 3061 |
isLeftMouseButtonDownOnWindow = true; |
3207 | 3062 |
} |
3208 | 3063 |
|
3209 |
//줌 모드 설정 |
|
3064 |
/// 줌 모드 설정
|
|
3210 | 3065 |
if (mouseHandlingMode == MouseHandlingMode.DragZoom) |
3211 | 3066 |
{ |
3212 |
//dragSelectionBorder.Visibility = Visibility.Visible; |
|
3213 | 3067 |
isLeftMouseButtonDownOnWindow = true; |
3214 | 3068 |
} |
3215 | 3069 |
|
... | ... | |
3225 | 3079 |
|
3226 | 3080 |
final = new AdornerFinal(control); |
3227 | 3081 |
|
3228 |
Control_Style(control); |
|
3082 |
this.Control_Style(control);
|
|
3229 | 3083 |
|
3230 | 3084 |
if ((control as IPath) != null) |
3231 | 3085 |
{ |
... | ... | |
3351 | 3205 |
final = new AdornerFinal(comment); |
3352 | 3206 |
} |
3353 | 3207 |
|
3354 |
if(final != null) this.SelectLayer.Children.Add(final); |
|
3208 |
if (final != null) |
|
3209 |
{ |
|
3210 |
this.SelectLayer.Children.Add(final); |
|
3211 |
} |
|
3355 | 3212 |
} |
3356 | 3213 |
} |
3357 | 3214 |
else if (mouseHandlingMode == MouseHandlingMode.Drawing) |
... | ... | |
3391 | 3248 |
} |
3392 | 3249 |
} |
3393 | 3250 |
|
3394 |
multi_Undo_Data = new Multi_Undo_data(); |
|
3395 |
//강인구 Undo/Redo 보류 |
|
3396 |
UndoData = new Undo_data() |
|
3397 |
{ |
|
3398 |
IsUndo = false, |
|
3399 |
Event = Event_Type.Create, |
|
3400 |
EventTime = DateTime.Now, |
|
3401 |
Markup_List = new List<Multi_Undo_data>() |
|
3402 |
}; |
|
3403 |
|
|
3404 | 3251 |
switch (controlType) |
3405 | 3252 |
{ |
3406 | 3253 |
case ControlType.Coordinate: |
... | ... | |
3414 | 3261 |
return; |
3415 | 3262 |
} |
3416 | 3263 |
|
3417 |
CreateControl();
|
|
3264 |
CreateCommand.Instance.Execute(currentControl);
|
|
3418 | 3265 |
|
3419 |
(currentControl as CoordinateControl).ApplyOverViewData(); |
|
3420 | 3266 |
currentControl = null; |
3421 | 3267 |
this.cursor = Cursors.Arrow; |
3422 | 3268 |
} |
... | ... | |
3462 | 3308 |
return; |
3463 | 3309 |
} |
3464 | 3310 |
|
3465 |
CreateControl();
|
|
3311 |
CreateCommand.Instance.Execute(currentControl);
|
|
3466 | 3312 |
|
3467 |
(currentControl as InsideWhiteControl).ApplyOverViewData(); |
|
3468 | 3313 |
currentControl = null; |
3469 | 3314 |
this.cursor = Cursors.Arrow; |
3470 | 3315 |
} |
... | ... | |
3497 | 3342 |
return; |
3498 | 3343 |
} |
3499 | 3344 |
|
3500 |
CreateControl();
|
|
3345 |
CreateCommand.Instance.Execute(currentControl);
|
|
3501 | 3346 |
|
3502 |
(currentControl as OverlapWhiteControl).ApplyOverViewData(); |
|
3503 | 3347 |
currentControl = null; |
3504 | 3348 |
this.cursor = Cursors.Arrow; |
3505 | 3349 |
} |
... | ... | |
3532 | 3376 |
return; |
3533 | 3377 |
} |
3534 | 3378 |
|
3535 |
CreateControl();
|
|
3379 |
CreateCommand.Instance.Execute(currentControl);
|
|
3536 | 3380 |
|
3537 |
(currentControl as ClipWhiteControl).ApplyOverViewData(); |
|
3538 | 3381 |
currentControl = null; |
3539 | 3382 |
this.cursor = Cursors.Arrow; |
3540 | 3383 |
} |
... | ... | |
3570 | 3413 |
return; |
3571 | 3414 |
} |
3572 | 3415 |
|
3573 |
CreateControl();
|
|
3416 |
CreateCommand.Instance.Execute(currentControl);
|
|
3574 | 3417 |
|
3575 |
(currentControl as RectangleControl).ApplyOverViewData(); |
|
3576 | 3418 |
currentControl = null; |
3577 | 3419 |
|
3578 | 3420 |
this.cursor = new Cursor(MainWindow.CursorChange().StreamSource); |
... | ... | |
3610 | 3452 |
return; |
3611 | 3453 |
} |
3612 | 3454 |
|
3613 |
CreateControl();
|
|
3455 |
CreateCommand.Instance.Execute(currentControl);
|
|
3614 | 3456 |
|
3615 |
(currentControl as RectCloudControl).ApplyOverViewData(); |
|
3616 | 3457 |
currentControl = null; |
3617 | 3458 |
|
3618 | 3459 |
this.cursor = new Cursor(MainWindow.CursorChange().StreamSource); |
... | ... | |
3647 | 3488 |
return; |
3648 | 3489 |
} |
3649 | 3490 |
|
3650 |
CreateControl();
|
|
3491 |
CreateCommand.Instance.Execute(currentControl);
|
|
3651 | 3492 |
|
3652 |
(currentControl as CircleControl).ApplyOverViewData(); |
|
3653 | 3493 |
currentControl = null; |
3654 | 3494 |
} |
3655 | 3495 |
else |
... | ... | |
3689 | 3529 |
return; |
3690 | 3530 |
} |
3691 | 3531 |
|
3692 |
CreateControl();
|
|
3532 |
CreateCommand.Instance.Execute(currentControl);
|
|
3693 | 3533 |
|
3694 |
(currentControl as TriControl).ApplyOverViewData(); |
|
3695 | 3534 |
currentControl = null; |
3696 | 3535 |
} |
3697 | 3536 |
} |
... | ... | |
3726 | 3565 |
return; |
3727 | 3566 |
} |
3728 | 3567 |
|
3729 |
CreateControl();
|
|
3568 |
CreateCommand.Instance.Execute(currentControl);
|
|
3730 | 3569 |
|
3731 |
(currentControl as LineControl).ApplyOverViewData(); |
|
3732 | 3570 |
currentControl = null; |
3733 | 3571 |
this.MainAngle.Visibility = Visibility.Collapsed; |
3734 | 3572 |
} |
... | ... | |
3763 | 3601 |
return; |
3764 | 3602 |
} |
3765 | 3603 |
|
3766 |
CreateControl();
|
|
3604 |
CreateCommand.Instance.Execute(currentControl);
|
|
3767 | 3605 |
|
3768 |
(currentControl as LineControl).ApplyOverViewData(); |
|
3769 | 3606 |
currentControl = null; |
3770 | 3607 |
this.MainAngle.Visibility = Visibility.Collapsed; |
3771 | 3608 |
} |
... | ... | |
3800 | 3637 |
return; |
3801 | 3638 |
} |
3802 | 3639 |
|
3803 |
CreateControl();
|
|
3640 |
CreateCommand.Instance.Execute(currentControl);
|
|
3804 | 3641 |
|
3805 |
(currentControl as LineControl).ApplyOverViewData(); |
|
3806 | 3642 |
currentControl = null; |
3807 | 3643 |
this.MainAngle.Visibility = Visibility.Collapsed; |
3808 | 3644 |
} |
... | ... | |
3837 | 3673 |
return; |
3838 | 3674 |
} |
3839 | 3675 |
|
3840 |
CreateControl();
|
|
3676 |
CreateCommand.Instance.Execute(currentControl);
|
|
3841 | 3677 |
|
3842 |
(currentControl as LineControl).ApplyOverViewData(); |
|
3843 | 3678 |
currentControl = null; |
3844 | 3679 |
this.MainAngle.Visibility = Visibility.Collapsed; |
3845 | 3680 |
} |
... | ... | |
3872 | 3707 |
{ |
3873 | 3708 |
return; |
3874 | 3709 |
} |
3875 |
CreateControl();
|
|
3710 |
CreateCommand.Instance.Execute(currentControl);
|
|
3876 | 3711 |
|
3877 |
(currentControl as LineControl).ApplyOverViewData(); |
|
3878 | 3712 |
currentControl = null; |
3879 | 3713 |
this.MainAngle.Visibility = Visibility.Collapsed; |
3880 | 3714 |
} |
... | ... | |
3908 | 3742 |
return; |
3909 | 3743 |
} |
3910 | 3744 |
|
3911 |
CreateControl();
|
|
3745 |
CreateCommand.Instance.Execute(currentControl);
|
|
3912 | 3746 |
|
3913 |
(currentControl as PolygonControl).ApplyOverViewData(); |
|
3914 | 3747 |
currentControl = null; |
3915 | 3748 |
this.MainAngle.Visibility = Visibility.Collapsed; |
3916 | 3749 |
return; |
... | ... | |
3968 | 3801 |
return; |
3969 | 3802 |
} |
3970 | 3803 |
|
3971 |
CreateControl();
|
|
3804 |
CreateCommand.Instance.Execute(currentControl);
|
|
3972 | 3805 |
|
3973 |
(currentControl as ArcControl).ApplyOverViewData(); |
|
3974 | 3806 |
currentControl = null; |
3975 | 3807 |
this.MainAngle.Visibility = Visibility.Collapsed; |
3976 | 3808 |
} |
... | ... | |
4013 | 3845 |
return; |
4014 | 3846 |
} |
4015 | 3847 |
|
4016 |
CreateControl();
|
|
3848 |
CreateCommand.Instance.Execute(currentControl);
|
|
4017 | 3849 |
|
4018 |
(currentControl as ArrowArcControl).ApplyOverViewData(); |
|
4019 | 3850 |
currentControl = null; |
4020 | 3851 |
this.MainAngle.Visibility = Visibility.Collapsed; |
4021 | 3852 |
} |
... | ... | |
4073 | 3904 |
return; |
4074 | 3905 |
} |
4075 | 3906 |
|
4076 |
CreateControl();
|
|
3907 |
CreateCommand.Instance.Execute(currentControl);
|
|
4077 | 3908 |
|
4078 |
(currentControl as ArrowControl_Multi).ApplyOverViewData(); |
|
4079 | 3909 |
currentControl = null; |
4080 | 3910 |
this.MainAngle.Visibility = Visibility.Collapsed; |
4081 | 3911 |
} |
... | ... | |
4119 | 3949 |
return; |
4120 | 3950 |
} |
4121 | 3951 |
|
4122 |
CreateControl();
|
|
3952 |
CreateCommand.Instance.Execute(currentControl);
|
|
4123 | 3953 |
|
4124 | 3954 |
control.isTransOn = true; |
4125 | 3955 |
var firstPoint = control.PointSet.First(); |
... | ... | |
4171 | 4001 |
return; |
4172 | 4002 |
} |
4173 | 4003 |
|
4174 |
CreateControl(); |
|
4175 |
(currentControl as ImgControl).ApplyOverViewData(); |
|
4004 |
CreateCommand.Instance.Execute(currentControl); |
|
4176 | 4005 |
controlType = ControlType.ImgControl; |
4177 | 4006 |
currentControl = null; |
4178 | 4007 |
} |
... | ... | |
4242 | 4071 |
return; |
4243 | 4072 |
} |
4244 | 4073 |
|
4245 |
CreateControl(); |
|
4246 |
(currentControl as DateControl).ApplyOverViewData(); |
|
4074 |
CreateCommand.Instance.Execute(currentControl); |
|
4247 | 4075 |
currentControl = null; |
4248 | 4076 |
|
4249 | 4077 |
if (Common.ViewerDataModel.Instance.SelectedControl == "Batch") |
... | ... | |
4305 | 4133 |
//System.Diagnostics.Debug.WriteLine("CanvasX" + (currentControl as TextControl).CanvasX); |
4306 | 4134 |
//System.Diagnostics.Debug.WriteLine("CanvasY" + (currentControl as TextControl).CanvasY); |
4307 | 4135 |
|
4308 |
CreateControl();
|
|
4136 |
CreateCommand.Instance.Execute(currentControl);
|
|
4309 | 4137 |
|
4310 | 4138 |
} |
4311 | 4139 |
} |
... | ... | |
4336 | 4164 |
(currentControl as TextControl).IsHighLight = ViewerDataModel.Instance.checkHighShape; |
4337 | 4165 |
(currentControl as TextControl).ApplyTemplate(); |
4338 | 4166 |
(currentControl as TextControl).Base_TextBox.Focus(); |
4339 |
CreateControl();
|
|
4167 |
CreateCommand.Instance.Execute(currentControl);
|
|
4340 | 4168 |
|
4341 | 4169 |
//currentControl = null; |
4342 | 4170 |
} |
... | ... | |
4369 | 4197 |
(currentControl as TextControl).IsHighLight = ViewerDataModel.Instance.checkHighShape; |
4370 | 4198 |
(currentControl as TextControl).ApplyTemplate(); |
4371 | 4199 |
(currentControl as TextControl).Base_TextBox.Focus(); |
4372 |
CreateControl();
|
|
4200 |
CreateCommand.Instance.Execute(currentControl);
|
|
4373 | 4201 |
//currentControl = null; |
4374 | 4202 |
} |
4375 | 4203 |
} |
... | ... | |
4385 | 4213 |
if (IsGetoutpoint((currentControl as ArrowTextControl).PointSet.Where(data => IsRotationDrawingEnable(data) == true).FirstOrDefault())) |
4386 | 4214 |
{ |
4387 | 4215 |
return; |
4388 |
}
|
|
4216 |
} |
|
4389 | 4217 |
|
4390 |
CreateControl();
|
|
4218 |
CreateCommand.Instance.Execute(currentControl);
|
|
4391 | 4219 |
|
4392 | 4220 |
(currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
4393 | 4221 |
(currentControl as ArrowTextControl).IsEditing = false; |
... | ... | |
4434 | 4262 |
if (IsGetoutpoint((currentControl as ArrowTextControl).PointSet.Where(data => IsRotationDrawingEnable(data) == true).FirstOrDefault())) |
4435 | 4263 |
{ |
4436 | 4264 |
return; |
4437 |
}
|
|
4265 |
} |
|
4438 | 4266 |
|
4439 |
CreateControl();
|
|
4267 |
CreateCommand.Instance.Execute(currentControl);
|
|
4440 | 4268 |
(currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
4441 | 4269 |
currentControl.IsNew = false; |
4442 | 4270 |
currentControl = null; |
... | ... | |
4480 | 4308 |
return; |
4481 | 4309 |
} |
4482 | 4310 |
|
4483 |
CreateControl();
|
|
4311 |
CreateCommand.Instance.Execute(currentControl);
|
|
4484 | 4312 |
(currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
4485 | 4313 |
currentControl.IsNew = false; |
4486 | 4314 |
currentControl = null; |
... | ... | |
4528 | 4356 |
{ |
4529 | 4357 |
return; |
4530 | 4358 |
} |
4531 |
CreateControl();
|
|
4359 |
CreateCommand.Instance.Execute(currentControl);
|
|
4532 | 4360 |
(currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
4533 | 4361 |
currentControl.IsNew = false; |
4534 | 4362 |
currentControl = null; |
... | ... | |
4584 | 4412 |
{ |
4585 | 4413 |
return; |
4586 | 4414 |
} |
4587 |
CreateControl();
|
|
4415 |
CreateCommand.Instance.Execute(currentControl);
|
|
4588 | 4416 |
(currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
4589 | 4417 |
currentControl.IsNew = false; |
4590 | 4418 |
currentControl = null; |
... | ... | |
4631 | 4459 |
{ |
4632 | 4460 |
return; |
4633 | 4461 |
} |
4634 |
CreateControl();
|
|
4462 |
CreateCommand.Instance.Execute(currentControl);
|
|
4635 | 4463 |
(currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
4636 | 4464 |
currentControl.IsNew = false; |
4637 | 4465 |
currentControl = null; |
... | ... | |
4701 | 4529 |
|
4702 | 4530 |
control.ApplyOverViewData(); |
4703 | 4531 |
|
4704 |
CreateControl();
|
|
4532 |
CreateCommand.Instance.Execute(currentControl);
|
|
4705 | 4533 |
control.updateControl(); |
4706 | 4534 |
currentControl = null; |
4707 | 4535 |
} |
... | ... | |
4758 | 4586 |
return; |
4759 | 4587 |
} |
4760 | 4588 |
|
4761 |
CreateControl();
|
|
4589 |
CreateCommand.Instance.Execute(currentControl);
|
|
4762 | 4590 |
currentControl = null; |
4763 | 4591 |
if (Common.ViewerDataModel.Instance.SelectedControl == "Batch") |
4764 | 4592 |
{ |
... | ... | |
4803 | 4631 |
return; |
4804 | 4632 |
} |
4805 | 4633 |
|
4806 |
CreateControl();
|
|
4634 |
CreateCommand.Instance.Execute(currentControl);
|
|
4807 | 4635 |
(currentControl as RectangleControl).ApplyOverViewData(); |
4808 | 4636 |
currentControl = null; |
4809 | 4637 |
|
... | ... | |
4846 | 4674 |
{ |
4847 | 4675 |
return; |
4848 | 4676 |
} |
4849 |
CreateControl();
|
|
4677 |
CreateCommand.Instance.Execute(currentControl);
|
|
4850 | 4678 |
currentControl = null; |
4851 | 4679 |
|
4852 | 4680 |
this.cursor = new Cursor(MainWindow.CursorChange().StreamSource); |
... | ... | |
4886 | 4714 |
return; |
4887 | 4715 |
} |
4888 | 4716 |
|
4889 |
CreateControl();
|
|
4717 |
CreateCommand.Instance.Execute(currentControl);
|
|
4890 | 4718 |
currentControl = null; |
4891 | 4719 |
|
4892 | 4720 |
|
... | ... | |
6242 | 6070 |
} |
6243 | 6071 |
#endregion |
6244 | 6072 |
|
6245 |
//MarkupInfoItem |
|
6246 |
public void CreateControl() |
|
6247 |
{ |
|
6248 |
|
|
6249 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
|
6250 |
{ |
|
6251 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
|
6252 |
}); |
|
6253 |
multi_Undo_Data.Markup = currentControl; |
|
6254 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
6255 |
|
|
6256 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
6257 |
|
|
6258 |
//List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); |
|
6259 |
} |
|
6260 |
|
|
6261 | 6073 |
public Multi_Undo_data Control_Style(CommentUserInfo control) |
6262 | 6074 |
{ |
6263 | 6075 |
multi_Undo_Data = new Multi_Undo_data(); |
MarkupToPDF/Common/CommentUserInfo.cs | ||
---|---|---|
81 | 81 |
public virtual void Move(double dx, double dy) { } |
82 | 82 |
|
83 | 83 |
/// <summary> |
84 |
/// |
|
85 |
/// </summary> |
|
86 |
public virtual void ApplyOverViewData() { } |
|
87 |
|
|
88 |
/// <summary> |
|
84 | 89 |
/// subclass has to override this method |
85 | 90 |
/// </summary> |
86 | 91 |
/// <returns>serialized string</returns> |
MarkupToPDF/Controls/Cad/ClipWhiteControlcs.cs | ||
---|---|---|
498 | 498 |
} |
499 | 499 |
} |
500 | 500 |
|
501 |
public void ApplyOverViewData() |
|
501 |
public override void ApplyOverViewData()
|
|
502 | 502 |
{ |
503 | 503 |
this.OverViewPathData = this.PathData; |
504 | 504 |
} |
MarkupToPDF/Controls/Cad/CoordinateControl.cs | ||
---|---|---|
497 | 497 |
} |
498 | 498 |
} |
499 | 499 |
|
500 |
public void ApplyOverViewData() |
|
500 |
public override void ApplyOverViewData()
|
|
501 | 501 |
{ |
502 | 502 |
this.OverViewPathData = this.PathData; |
503 | 503 |
} |
MarkupToPDF/Controls/Cad/InsideWhiteControlcs.cs | ||
---|---|---|
498 | 498 |
} |
499 | 499 |
} |
500 | 500 |
|
501 |
public void ApplyOverViewData() |
|
501 |
public override void ApplyOverViewData()
|
|
502 | 502 |
{ |
503 | 503 |
this.OverViewPathData = this.PathData; |
504 | 504 |
} |
MarkupToPDF/Controls/Cad/OverlapWhiteControl.cs | ||
---|---|---|
498 | 498 |
} |
499 | 499 |
} |
500 | 500 |
|
501 |
public void ApplyOverViewData() |
|
501 |
public override void ApplyOverViewData()
|
|
502 | 502 |
{ |
503 | 503 |
this.OverViewPathData = this.PathData; |
504 | 504 |
} |
MarkupToPDF/Controls/Etc/DateControl.cs | ||
---|---|---|
442 | 442 |
GC.SuppressFinalize(this); |
443 | 443 |
} |
444 | 444 |
|
445 |
public void ApplyOverViewData() |
|
445 |
public override void ApplyOverViewData()
|
|
446 | 446 |
{ |
447 | 447 |
//this.OverViewPathData = this.PathData; |
448 | 448 |
this.OverViewStartPoint = this.StartPoint; |
MarkupToPDF/Controls/Etc/ImgControl.cs | ||
---|---|---|
54 | 54 |
PropertyChanged(this, new PropertyChangedEventArgs(propName)); |
55 | 55 |
} |
56 | 56 |
|
57 |
public void ApplyOverViewData() |
|
57 |
public override void ApplyOverViewData()
|
|
58 | 58 |
{ |
59 | 59 |
this.OverViewPathData = this.PathData; |
60 | 60 |
} |
MarkupToPDF/Controls/Line/ArcControl.cs | ||
---|---|---|
517 | 517 |
return pathGeometry2; |
518 | 518 |
} |
519 | 519 |
|
520 |
public void ApplyOverViewData() |
|
520 |
public override void ApplyOverViewData()
|
|
521 | 521 |
{ |
522 | 522 |
this.OverViewPathData = this.PathData; |
523 | 523 |
} |
MarkupToPDF/Controls/Line/ArrowArcControl.cs | ||
---|---|---|
462 | 462 |
|
463 | 463 |
} |
464 | 464 |
|
465 |
public void ApplyOverViewData() |
|
465 |
public override void ApplyOverViewData()
|
|
466 | 466 |
{ |
467 | 467 |
this.OverViewPathData = this.PathData; |
468 | 468 |
} |
MarkupToPDF/Controls/Line/ArrowControl_Multi.cs | ||
---|---|---|
236 | 236 |
SetArrowMultiPath(); |
237 | 237 |
} |
238 | 238 |
|
239 |
public void ApplyOverViewData() |
|
239 |
public override void ApplyOverViewData()
|
|
240 | 240 |
{ |
241 | 241 |
this.OverViewPathData = this.PathData; |
242 | 242 |
} |
MarkupToPDF/Controls/Line/LineControl.cs | ||
---|---|---|
399 | 399 |
} |
400 | 400 |
|
401 | 401 |
|
402 |
public void ApplyOverViewData() |
|
402 |
public override void ApplyOverViewData()
|
|
403 | 403 |
{ |
404 | 404 |
this.OverViewPathData = this.PathData; |
405 | 405 |
} |
MarkupToPDF/Controls/Polygon/CloudControl.cs | ||
---|---|---|
913 | 913 |
} |
914 | 914 |
|
915 | 915 |
#region Method |
916 |
public void ApplyOverViewData() |
|
916 |
public override void ApplyOverViewData()
|
|
917 | 917 |
{ |
918 | 918 |
this.OverViewPathData = this.PathData; |
919 | 919 |
} |
MarkupToPDF/Controls/Polygon/InkControl.cs | ||
---|---|---|
59 | 59 |
|
60 | 60 |
#region Method |
61 | 61 |
|
62 |
public void ApplyOverViewData() |
|
62 |
public override void ApplyOverViewData()
|
|
63 | 63 |
{ |
64 | 64 |
this.OverViewPathData = this.PathData; |
65 | 65 |
} |
MarkupToPDF/Controls/Polygon/PolygonControl.cs | ||
---|---|---|
59 | 59 |
|
60 | 60 |
#region Method |
61 | 61 |
|
62 |
public void ApplyOverViewData() |
|
62 |
public override void ApplyOverViewData()
|
|
63 | 63 |
{ |
64 | 64 |
this.OverViewPathData = this.PathData; |
65 | 65 |
} |
MarkupToPDF/Controls/Shape/CircleControl.cs | ||
---|---|---|
426 | 426 |
CenterY = MathSet.getMiddlePoint(this.StartPoint, this.EndPoint).Y; |
427 | 427 |
} |
428 | 428 |
|
429 |
public void ApplyOverViewData() |
|
429 |
public override void ApplyOverViewData()
|
|
430 | 430 |
{ |
431 | 431 |
this.OverViewPathData = this.PathData; |
432 | 432 |
} |
MarkupToPDF/Controls/Shape/RectCloudControl.cs | ||
---|---|---|
501 | 501 |
this.PointSet[3] = this.TopRightPoint; |
502 | 502 |
} |
503 | 503 |
|
504 |
public void ApplyOverViewData() |
|
504 |
public override void ApplyOverViewData()
|
|
505 | 505 |
{ |
506 | 506 |
this.OverViewPathData = this.PathData; |
507 | 507 |
} |
MarkupToPDF/Controls/Shape/RectangleControl.cs | ||
---|---|---|
493 | 493 |
} |
494 | 494 |
} |
495 | 495 |
|
496 |
public void ApplyOverViewData() |
|
496 |
public override void ApplyOverViewData()
|
|
497 | 497 |
{ |
498 | 498 |
this.OverViewPathData = this.PathData; |
499 | 499 |
} |
MarkupToPDF/Controls/Shape/TriControl.cs | ||
---|---|---|
390 | 390 |
PropertyChanged(this, new PropertyChangedEventArgs(propName)); |
391 | 391 |
} |
392 | 392 |
|
393 |
public void ApplyOverViewData() |
|
393 |
public override void ApplyOverViewData()
|
|
394 | 394 |
{ |
395 | 395 |
this.OverViewPathData = this.PathData; |
396 | 396 |
} |
MarkupToPDF/Controls/Text/ArrowTextControl.cs | ||
---|---|---|
38 | 38 |
LineGeometry connectorSMGeometry = new LineGeometry(); |
39 | 39 |
LineGeometry connectorMEGeometry = new LineGeometry(); |
40 | 40 |
|
41 |
//안쓰고 있음 |
|
42 |
//LineGeometry connectorMCEGeometry = new LineGeometry(); |
|
43 |
|
|
44 | 41 |
public enum ArrowTextStyleSet { Normal, Cloud, Rect }; |
45 | 42 |
|
46 | 43 |
#endregion |
... | ... | |
64 | 61 |
Base_ArrowPath = GetTemplateChild(PART_ArrowPath) as Path; |
65 | 62 |
Base_ArrowSubPath = GetTemplateChild(PART_ArrowSubPath) as Path; |
66 | 63 |
Base_TextBox = GetTemplateChild(PART_TextBox) as TextBox; |
67 |
//Base_TextBlock = GetTemplateChild(PART_TextBlock) as TextBlock; |
|
68 |
|
|
69 |
//CustomText custom = new CustomText(); |
|
70 |
//Base_TextBox.Template = custom.T_Box.Template; |
|
71 |
//Base_TextBox.Style = custom.T_Box.Style; |
|
72 |
////Base_TextBox.Template = custom.T_Box.Template.Triggers; |
|
73 |
////TextBoxBackground = Brushes.Red; |
|
74 |
////Base_TextBox.Opacity = 0.5; |
|
75 | 64 |
|
76 | 65 |
Base_TextBox.SizeChanged += new SizeChangedEventHandler(Base_TextBox_SizeChanged); |
77 | 66 |
Base_TextBox.GotFocus += new RoutedEventHandler(Base_TextBox_GotFocus); |
78 | 67 |
Base_TextBox.LostFocus += new RoutedEventHandler(Base_TextBox_LostFocus); |
79 | 68 |
|
80 |
//Base_TextBlock.SizeChanged += Base_TextBlock_SizeChanged; |
|
81 | 69 |
SetArrowTextPath(); |
82 |
//Base_ArrowPath.Focus(); |
|
83 |
//Base_TextBox.Focus(); |
|
84 | 70 |
Base_TextBox.IsTabStop = true; |
85 |
//Base_TextBox.IsHitTestVisible = false; |
|
86 |
|
|
87 | 71 |
} |
88 | 72 |
|
89 | 73 |
void Base_TextBox_LostFocus(object sender, RoutedEventArgs e) |
... | ... | |
114 | 98 |
SetArrowTextPath(); |
115 | 99 |
} |
116 | 100 |
|
117 |
//void Base_TextBlock_SizeChanged(object sender, SizeChangedEventArgs e) |
|
118 |
//{ |
|
119 |
// Base_TextBlock.Text = Base_TextBox.Text; |
|
120 |
|
|
121 |
// BoxWidth = e.NewSize.Width; |
|
122 |
// BoxHeight = e.NewSize.Height; |
|
123 |
|
|
124 |
// this.ApplyTemplate(); |
|
125 |
// SetArrowTextPath(); |
|
126 |
//} |
|
127 |
|
|
128 | 101 |
#region Properties |
129 | 102 |
private bool _IsEditingMode; |
130 | 103 |
public bool IsEditingMode |
... | ... | |
884 | 857 |
Base_TextBox.Margin.Right + 4, Base_TextBox.Margin.Bottom + 4); |
885 | 858 |
} |
886 | 859 |
|
887 |
|
|
888 |
#region 주석 |
|
889 |
|
|
890 |
// public void SetArrowTextPath() |
|
891 |
// { |
|
892 |
// instanceGroup.Children.Clear(); |
|
893 |
|
|
894 |
// instanceSubGroup = new PathGeometry(); |
|
895 |
// connectorSMGeometry.StartPoint = this.StartPoint; |
|
896 |
// connectorSMGeometry.EndPoint = this.MidPoint; |
|
897 |
// connectorMEGeometry.StartPoint = this.MidPoint; //핵심 |
|
898 |
|
|
899 |
// //Canvas.SetLeft(Base_TextBox, this.EndPoint.X - BoxWidth / 2); |
|
900 |
// //Canvas.SetTop(Base_TextBox, this.EndPoint.Y - BoxHeight / 2); |
|
901 |
|
|
902 |
// Canvas.SetLeft(Base_TextBox, this.EndPoint.X); |
|
903 |
// Canvas.SetTop(Base_TextBox, this.EndPoint.Y); |
|
904 |
|
|
905 |
|
|
906 |
|
|
907 |
// List<Point> ps = new List<Point>(); |
|
908 |
// ps.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxWidth / 2, Canvas.GetTop(Base_TextBox))); //상단 |
|
909 |
|
|
910 |
// ps.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxWidth / 2, Canvas.GetTop(Base_TextBox) + this.BoxHeight)); // 하단 |
|
911 |
|
|
912 |
// ps.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + this.BoxHeight / 2)); //좌단 |
|
913 |
|
|
914 |
// ps.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxWidth, Canvas.GetTop(Base_TextBox) + this.BoxHeight / 2)); //우단 |
|
915 |
|
|
916 |
// //ps.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxWidth, Canvas.GetTop(Base_TextBox))); |
|
917 |
// //ps.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox))); |
|
918 |
// //ps.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + this.BoxHeight)); |
|
919 |
// //ps.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxWidth, Canvas.GetTop(Base_TextBox) + this.BoxHeight)); |
|
920 |
|
|
921 |
// if (isTrans) |
|
922 |
// { |
|
923 |
// switch (Math.Abs(this.Angle).ToString()) |
|
924 |
// { |
|
925 |
// case "90": |
|
926 |
// { |
|
927 |
// ps.Clear(); |
|
928 |
// ps.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox))); //위 왼쪽 |
|
929 |
// ps.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) - this.BoxWidth / 2)); // 위 중간 |
|
930 |
// ps.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) - this.BoxWidth)); // 위 오른쪽 |
내보내기 Unified diff