개정판 ef7ba61f
Fix: 선택한 객체가 화면 최상단에 올라오는 오류 수정
Change-Id: I3eb1adeb497bf6d2e7a09dbed185e57478bda0a2
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
151 | 151 |
|
152 | 152 |
public partial class AdornerFinal : UserControl |
153 | 153 |
{ |
154 |
public TextBox editTextBox { get; set; } |
|
155 | 154 |
#region 공용 인스턴스 |
156 | 155 |
public List<AdornerMember> Members { get; } = new List<AdornerMember>(); |
157 | 156 |
public Dictionary<Thumb, DragData> _dragData = new Dictionary<Thumb, DragData>(); |
... | ... | |
221 | 220 |
_dragData.Add(rotateTop, new DragData() { CursorAngle = 0, DragType = DragType.Rotate, RotateIsLeft = true, RotateIsTop = true }); |
222 | 221 |
} |
223 | 222 |
|
224 |
~AdornerFinal() |
|
225 |
{ |
|
226 |
this.Dispose(false); |
|
227 |
} |
|
228 |
|
|
229 |
public void Dispose() |
|
230 |
{ |
|
231 |
this.Dispose(true); |
|
232 |
GC.SuppressFinalize(this); |
|
233 |
} |
|
234 |
|
|
235 |
protected virtual void Dispose(bool disposing) |
|
236 |
{ |
|
237 |
if (this.disposed) return; |
|
238 |
if (disposing) |
|
239 |
{ |
|
240 |
foreach (var member in this.Members) |
|
241 |
{ |
|
242 |
if(!Common.ViewerDataModel.Instance.MarkupControls_USER.Contains(member.DrawingData)) |
|
243 |
Common.ViewerDataModel.Instance.MarkupControls_USER.Add(member.DrawingData as CommentUserInfo); |
|
244 |
} |
|
245 |
// IDisposable 인터페이스를 구현하는 멤버들을 여기서 정리합니다. |
|
246 |
} |
|
247 |
// .NET Framework에 의하여 관리되지 않는 외부 리소스들을 여기서 정리합니다. |
|
248 |
this.disposed = true; |
|
249 |
} |
|
250 |
|
|
251 |
void DragThumb_Loaded(object sender, RoutedEventArgs e) |
|
252 |
{ |
|
253 |
mainDragThumb = DragThumb; |
|
254 |
} |
|
255 |
|
|
256 | 223 |
public AdornerFinal(CommentUserInfo objectData) : this() |
257 | 224 |
{ |
258 | 225 |
InitializeComponent(); |
... | ... | |
266 | 233 |
///Canvas.SetZIndex(objectData, 84); |
267 | 234 |
try |
268 | 235 |
{ |
236 |
objectData.Index = ViewerDataModel.Instance.MarkupControls_USER.IndexOf(objectData); |
|
269 | 237 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(objectData); |
270 | 238 |
this.ContainerContent.Children.Add(objectData); |
271 | 239 |
} |
272 | 240 |
catch (Exception ex) |
273 | 241 |
{ |
274 |
|
|
242 |
throw new InvalidOperationException(ex.Message); |
|
275 | 243 |
} |
276 |
|
|
244 |
|
|
277 | 245 |
SetAdornerMember(objectData); |
278 | 246 |
this.Focus(); |
279 | 247 |
} |
... | ... | |
292 | 260 |
{ |
293 | 261 |
///Canvas.SetZIndex(item, 80); |
294 | 262 |
|
263 |
item.Index = ViewerDataModel.Instance.MarkupControls_USER.IndexOf(item); |
|
295 | 264 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item); |
296 | 265 |
this.ContainerContent.Children.Add(item); |
297 | 266 |
} |
298 |
catch //(Exception ex)
|
|
267 |
catch (Exception ex) |
|
299 | 268 |
{ |
269 |
throw new InvalidOperationException(ex.Message); |
|
300 | 270 |
} |
301 | 271 |
finally |
302 | 272 |
{ |
303 |
|
|
273 |
|
|
304 | 274 |
} |
305 | 275 |
} |
276 |
|
|
306 | 277 |
this.SetAdornerMember(objectData); |
307 | 278 |
this.Focus(); |
308 | 279 |
} |
309 | 280 |
|
281 |
~AdornerFinal() |
|
282 |
{ |
|
283 |
this.Dispose(false); |
|
284 |
} |
|
285 |
|
|
286 |
public void Dispose() |
|
287 |
{ |
|
288 |
this.Dispose(true); |
|
289 |
GC.SuppressFinalize(this); |
|
290 |
} |
|
291 |
|
|
292 |
protected virtual void Dispose(bool disposing) |
|
293 |
{ |
|
294 |
if (this.disposed) return; |
|
295 |
if (disposing) |
|
296 |
{ |
|
297 |
foreach (var member in this.Members) |
|
298 |
{ |
|
299 |
if(!Common.ViewerDataModel.Instance.MarkupControls_USER.Contains(member.DrawingData)) |
|
300 |
Common.ViewerDataModel.Instance.MarkupControls_USER.Add(member.DrawingData as CommentUserInfo); |
|
301 |
} |
|
302 |
// IDisposable 인터페이스를 구현하는 멤버들을 여기서 정리합니다. |
|
303 |
} |
|
304 |
// .NET Framework에 의하여 관리되지 않는 외부 리소스들을 여기서 정리합니다. |
|
305 |
this.disposed = true; |
|
306 |
} |
|
307 |
|
|
308 |
void DragThumb_Loaded(object sender, RoutedEventArgs e) |
|
309 |
{ |
|
310 |
mainDragThumb = DragThumb; |
|
311 |
} |
|
312 |
|
|
310 | 313 |
public Point Centeroid |
311 | 314 |
{ |
312 | 315 |
get |
내보내기 Unified diff