markus / MarkupToPDF_Old / Controls / Parsing / MarkupParse.cs @ 9fa712a5
이력 | 보기 | 이력해설 | 다운로드 (276 KB)
1 | 787a4489 | KangIngu | using System; |
---|---|---|---|
2 | using System.Net; |
||
3 | using System.Windows; |
||
4 | using System.Windows.Controls; |
||
5 | using System.Windows.Documents; |
||
6 | using System.Windows.Ink; |
||
7 | using System.Windows.Input; |
||
8 | using System.Windows.Media; |
||
9 | using System.Windows.Media.Animation; |
||
10 | using System.Windows.Shapes; |
||
11 | using System.Collections.Generic; |
||
12 | using MarkupToPDF.Serialize.S_Control; |
||
13 | using MarkupToPDF.Serialize.Core; |
||
14 | using System.Linq; |
||
15 | using MarkupToPDF.Controls.Line; |
||
16 | using MarkupToPDF.Controls.Text; |
||
17 | using MarkupToPDF.Controls.Shape; |
||
18 | using MarkupToPDF.Controls.Etc; |
||
19 | using MarkupToPDF.Controls.Polygon; |
||
20 | //using Telerik.Windows.Controls; |
||
21 | using System.IO; |
||
22 | using System.Windows.Media.Imaging; |
||
23 | //using MarkupToPDF.Common; |
||
24 | using System.Windows.Markup; |
||
25 | //using Telerik.Windows.Controls; |
||
26 | using System.Net.Cache; |
||
27 | using System.Collections.ObjectModel; |
||
28 | |||
29 | namespace MarkupToPDF.Controls.Parsing |
||
30 | { |
||
31 | public partial class LayerControl : Control |
||
32 | { |
||
33 | |||
34 | // public void markupParseConSolidate(string MarkupString, Canvas Layer, List<DisplayColorInfo> dc, string ToolTipMessage, string userID) |
||
35 | // { |
||
36 | // if (MarkupString != "False") |
||
37 | // { |
||
38 | // //SolidColorBrush _SetColor = new SolidColorBrush(StringToColorConverter.Parse(DisplayColor)); |
||
39 | // SolidColorBrush _SetColor = new SolidColorBrush(Colors.Blue); |
||
40 | // string[] delimiterChars = { "|DZ|" }; |
||
41 | // string[] delimiterChars2 = { "|" }; |
||
42 | // string[] data = MarkupString.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); |
||
43 | // List<string> dataSet = new List<string>(); |
||
44 | |||
45 | // foreach (var dataPease in data) |
||
46 | // { |
||
47 | // var item = JsonSerializerHelper.UnCompressString(dataPease); //언패킹작업 |
||
48 | // var unkownControl = JsonSerializerHelper.JsonDeserialize<S_BaseControl>(item); //복호화작업 |
||
49 | // switch (unkownControl.Name) |
||
50 | // { |
||
51 | // #region Arrow |
||
52 | // case "ArrowControl": |
||
53 | // using (S_ArrowControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl>(item)) |
||
54 | // { |
||
55 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
56 | // LineControl instance = new LineControl |
||
57 | // { |
||
58 | // LineSize = Convert.ToDouble(data2.First()), |
||
59 | // LineStyle = s.ArStyle, |
||
60 | // StartPoint = s.StartPoint, |
||
61 | // EndPoint = s.EndPoint, |
||
62 | // DimSize = s.DimSize, |
||
63 | // DashSize = s.DashSize, |
||
64 | // PointSet = s.PointSet, |
||
65 | // UserID = s.UserID, |
||
66 | // //StrokeColor = GetUserColor(dc, s.UserID), |
||
67 | // Opacity = s.Opac, |
||
68 | // }; |
||
69 | |||
70 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
71 | // Layer.Children.Add(instance); |
||
72 | // instance.ApplyTemplate(); |
||
73 | // instance.SetLinePath(); |
||
74 | // } |
||
75 | // break; |
||
76 | // #endregion |
||
77 | // #region ArrowText |
||
78 | // case "ArrowTextControl": |
||
79 | // using (S_ArrowTextControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowTextControl>(item)) |
||
80 | // { |
||
81 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
82 | // ArrowTextControl instance = new ArrowTextControl(); |
||
83 | // Layer.Children.Add(instance); |
||
84 | // instance.LineSize = Convert.ToDouble(data2.First()); |
||
85 | // instance.PointSet = s.PointSet; |
||
86 | // instance.StartPoint = s.StartPoint; |
||
87 | // instance.EndPoint = s.EndPoint; |
||
88 | // instance.isHighLight = s.isHighLight; |
||
89 | // //instance.StrokeColor = GetUserColor(dc, s.UserID); |
||
90 | // //instance.DashSize = s.DashSize; |
||
91 | // instance.ArrowTextStyle = s.ArrowStyle; |
||
92 | // instance.ArrowText = s.ArrowText; |
||
93 | // instance.Opacity = s.Opac; |
||
94 | // instance.isFixed = s.isFixed; |
||
95 | // instance.UserID = s.UserID; |
||
96 | // instance.BorderSize = s.BorderSize; |
||
97 | // instance.BoxWidth = s.BoxWidth; |
||
98 | // instance.BoxHeight = s.BoxHeight; |
||
99 | // instance.isTrans = s.isTrans; |
||
100 | // instance.Angle = s.Angle; |
||
101 | // instance.MidPoint = s.MP; |
||
102 | |||
103 | // if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
104 | // { |
||
105 | // s.fontConfig = new List<string>(); |
||
106 | |||
107 | // s.fontConfig.Add("Arial"); |
||
108 | // s.fontConfig.Add("Normal"); |
||
109 | // s.fontConfig.Add("Normal"); |
||
110 | // s.fontConfig.Add("30"); |
||
111 | // } |
||
112 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
113 | // //instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
114 | // //instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
115 | // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
116 | |||
117 | // instance.ApplyTemplate(); |
||
118 | // instance.SetArrowTextPath(); |
||
119 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
120 | // }; |
||
121 | // break; |
||
122 | // #endregion |
||
123 | // #region Arrow_Multi |
||
124 | // case "ArrowControl_Multi": |
||
125 | // using (S_ArrowControl_Multi s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(item)) |
||
126 | // { |
||
127 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
128 | // ArrowControl_Multi instance = new ArrowControl_Multi |
||
129 | // { |
||
130 | // LineSize = Convert.ToDouble(data2.First()), |
||
131 | // StartPoint = s.StartPoint, |
||
132 | // MiddlePoint = s.MP, |
||
133 | // DashSize = s.DashSize, |
||
134 | // EndPoint = s.EndPoint, |
||
135 | // PointSet = s.PointSet, |
||
136 | // Opacity = s.Opac, |
||
137 | // UserID = s.UserID, |
||
138 | // //StrokeColor = GetUserColor(dc, s.UserID), |
||
139 | // }; |
||
140 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
141 | // Layer.Children.Add(instance); |
||
142 | // instance.ApplyTemplate(); |
||
143 | // instance.SetArrowMultiPath(); |
||
144 | // //instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
145 | |||
146 | // } |
||
147 | // break; |
||
148 | // #endregion |
||
149 | // #region Rectangle |
||
150 | // case "RectagleControl": |
||
151 | // using (S_RectControl s = JsonSerializerHelper.JsonDeserialize<S_RectControl>(item)) |
||
152 | // { |
||
153 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
154 | |||
155 | |||
156 | // RectangleControl instance = new RectangleControl |
||
157 | // { |
||
158 | // LineSize = Convert.ToDouble(data2.First()), |
||
159 | // //Paint = s.PaintState, |
||
160 | // StartPoint = s.StartPoint, |
||
161 | // EndPoint = s.EndPoint, |
||
162 | // //Angle = s.Angle, |
||
163 | |||
164 | // //StrokeColor = GetUserColor(dc, s.UserID), |
||
165 | // //DashSize = s.DashSize, |
||
166 | // //UserID = s.UserID, |
||
167 | // Opacity = s.Opac, |
||
168 | // LeftBottomPoint = s.LB, |
||
169 | // TopRightPoint = s.TR, |
||
170 | // PointSet = s.PointSet |
||
171 | // }; |
||
172 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
173 | |||
174 | // Layer.Children.Add(instance); |
||
175 | // instance.ApplyTemplate(); |
||
176 | // //instance.SetRectPath(); |
||
177 | // instance.SetRectPath(null); |
||
178 | // } |
||
179 | // break; |
||
180 | // #endregion |
||
181 | // #region Triangle |
||
182 | // case "TriControl": |
||
183 | // using (S_TriControl s = JsonSerializerHelper.JsonDeserialize<S_TriControl>(item)) |
||
184 | // { |
||
185 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
186 | // TriControl instance = new TriControl |
||
187 | // { |
||
188 | // LineSize = Convert.ToDouble(data2.First()), |
||
189 | // MidPoint = s.MP, |
||
190 | // StartPoint = s.StartPoint, |
||
191 | // Paint = s.Paint, |
||
192 | // EndPoint = s.EndPoint, |
||
193 | // Opacity = s.Opac, |
||
194 | // UserID = s.UserID, |
||
195 | // Angle = s.Angle, |
||
196 | // DashSize = s.DashSize, |
||
197 | // PointSet = s.PointSet, |
||
198 | // //StrokeColor = GetUserColor(dc, s.UserID), |
||
199 | // }; |
||
200 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
201 | // Layer.Children.Add(instance); |
||
202 | // instance.ApplyTemplate(); |
||
203 | // instance.SetTri(); |
||
204 | // } |
||
205 | // break; |
||
206 | // #endregion |
||
207 | // #region Cicle |
||
208 | // case "CicleControl": |
||
209 | // using (S_CircleControl s = JsonSerializerHelper.JsonDeserialize<S_CircleControl>(item)) |
||
210 | // { |
||
211 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
212 | // CircleControl instance = new CircleControl |
||
213 | // { |
||
214 | // LineSize = Convert.ToDouble(data2.First()), |
||
215 | // Paint = s.PaintState, |
||
216 | // StartPoint = s.StartPoint, |
||
217 | // EndPoint = s.EndPoint, |
||
218 | // LeftBottomPoint = s.LBP, |
||
219 | // TopRightPoint = s.TRP, |
||
220 | // Opacity = s.Opac, |
||
221 | // Angle = s.Angle, |
||
222 | // DashSize = s.DashSize, |
||
223 | // PointSet = s.PointSet, |
||
224 | // UserID = s.UserID, |
||
225 | // //StrokeColor = GetUserColor(dc, s.UserID), |
||
226 | // }; |
||
227 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
228 | // Layer.Children.Add(instance); |
||
229 | // instance.ApplyTemplate(); |
||
230 | // instance.SetCircle(); |
||
231 | // } |
||
232 | // break; |
||
233 | // #endregion |
||
234 | // #region Cloud |
||
235 | // case "CloudControl": |
||
236 | // using (S_CloudControl s = JsonSerializerHelper.JsonDeserialize<S_CloudControl>(item)) |
||
237 | // { |
||
238 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
239 | // CloudControl instance = new CloudControl |
||
240 | // { |
||
241 | // LineSize = Convert.ToDouble(data2.First()), |
||
242 | // Toler = s.Toler, |
||
243 | // PointSet = new List<Point>(), |
||
244 | // ArcLength = s.ArcLength, |
||
245 | // Paint = s.PaintState, |
||
246 | // Opacity = s.Opac, |
||
247 | // UserID = s.UserID, |
||
248 | // isChain = s.IsChain, |
||
249 | // DashSize = s.DashSize, |
||
250 | // isTransOn = s.IsTrans, |
||
251 | // //StrokeColor = GetUserColor(dc, s.UserID), |
||
252 | // //Fill = s.CloudFill, |
||
253 | // }; |
||
254 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
255 | // Layer.Children.Add(instance); |
||
256 | // instance.ApplyTemplate(); |
||
257 | // instance.PointSet = s.PointSet; |
||
258 | // instance.ChangePaint(s.PaintState); |
||
259 | // } |
||
260 | // break; |
||
261 | // #endregion |
||
262 | // #region Line |
||
263 | // case "LineControl": |
||
264 | // using (S_LineControl s = JsonSerializerHelper.JsonDeserialize<S_LineControl>(item)) |
||
265 | // { |
||
266 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
267 | // LineControl instance = new LineControl() |
||
268 | // { |
||
269 | // LineStyle = s.LnSet, |
||
270 | // StartPoint = s.StartPoint, |
||
271 | // EndPoint = s.EndPoint, |
||
272 | // DashSize = s.DashSize, |
||
273 | // PointSet = s.PointSet, |
||
274 | // Opacity = s.Opac, |
||
275 | // UserID = s.UserID, |
||
276 | // Interval = s.Interval, |
||
277 | // //StrokeColor = GetUserColor(dc, s.UserID), |
||
278 | // LineSize = Convert.ToDouble(data2.First()), |
||
279 | // }; |
||
280 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
281 | // Layer.Children.Add(instance); |
||
282 | // instance.ApplyTemplate(); |
||
283 | // instance.SetLinePath(); |
||
284 | // } |
||
285 | // break; |
||
286 | // #endregion |
||
287 | // #region Text |
||
288 | // case "TextControl": |
||
289 | // using (S_TextControl s = JsonSerializerHelper.JsonDeserialize<S_TextControl>(item)) |
||
290 | // { |
||
291 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
292 | // TextControl instance = new TextControl() |
||
293 | // { |
||
294 | // Text = s.Text, |
||
295 | // StartPoint = s.StartPoint, |
||
296 | // EndPoint = s.EndPoint, |
||
297 | // Paint = s.PaintState, |
||
298 | // LineSize = new Thickness(Convert.ToDouble(data2.First())), |
||
299 | // TextSize = Convert.ToDouble(data2[1]), |
||
300 | // //FontColor = GetUserColor(dc, s.UserID), |
||
301 | // FontSize = 10, |
||
302 | // //isHighLight = s.isHighLight, |
||
303 | // Angle = s.Angle, |
||
304 | // PointSet = s.PointSet, |
||
305 | // Opacity = s.Opac, |
||
306 | // UserID = s.UserID, |
||
307 | // TextFamily = new FontFamily(s.fontConfig[0]), |
||
308 | // //TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]), |
||
309 | // //TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]), |
||
310 | // }; |
||
311 | // if (instance.Text != null && instance.Text != "") |
||
312 | // { |
||
313 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
314 | // Layer.Children.Add(instance); |
||
315 | |||
316 | // if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
317 | // { |
||
318 | // s.fontConfig = new List<string>(); |
||
319 | |||
320 | // s.fontConfig.Add("Arial"); |
||
321 | // s.fontConfig.Add("Normal"); |
||
322 | // s.fontConfig.Add("Normal"); |
||
323 | // s.fontConfig.Add("30"); |
||
324 | // } |
||
325 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
326 | // //instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
327 | // //instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
328 | |||
329 | // //if (s.fontConfig.Count == 3) |
||
330 | // //{ |
||
331 | // // instance.TextSize = 30; |
||
332 | // //} |
||
333 | // //else |
||
334 | // //{ |
||
335 | // // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
336 | // //} |
||
337 | |||
338 | |||
339 | // instance.ApplyTemplate(); |
||
340 | // if (s.fontConfig.Count() == 4) |
||
341 | // { |
||
342 | // instance.UnderLine = TextDecorations.Underline; |
||
343 | // instance.Base_TextBlock.TextDecorations = instance.UnderLine; |
||
344 | // } |
||
345 | // instance.Base_TextBlock.Margin = new Thickness(instance.Base_TextBox.Margin.Left + 4); |
||
346 | // instance.Base_TextBox.Visibility = Visibility.Collapsed; |
||
347 | // instance.DrawingCloud(); |
||
348 | // } |
||
349 | // } |
||
350 | // break; |
||
351 | // #endregion |
||
352 | // #region Arc |
||
353 | // case "ArcControl": |
||
354 | // using (S_ArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArcControl>(item)) |
||
355 | // { |
||
356 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
357 | // ArcControl instance = new ArcControl() |
||
358 | // { |
||
359 | // StartPoint = s.StartPoint, |
||
360 | // EndPoint = s.EndPoint, |
||
361 | // DashSize = s.DashSize, |
||
362 | // PointSet = s.PointSet, |
||
363 | // MidPoint = s.MP, |
||
364 | // UserID = s.UserID, |
||
365 | // isTransOn = s.IsTrans, |
||
366 | // //StrokeColor = GetUserColor(dc, s.UserID), |
||
367 | // LineSize = Convert.ToDouble(data2.First()), |
||
368 | // }; |
||
369 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
370 | // Layer.Children.Add(instance); |
||
371 | // instance.ApplyTemplate(); |
||
372 | // instance.SetArcPath(); |
||
373 | // } |
||
374 | // break; |
||
375 | // #endregion |
||
376 | // #region RectCloud |
||
377 | // case "RectCloudControl": |
||
378 | // using (S_RectCloudControl s = JsonSerializerHelper.JsonDeserialize<S_RectCloudControl>(item)) |
||
379 | // { |
||
380 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
381 | // RectCloudControl instance = new RectCloudControl() |
||
382 | // { |
||
383 | // StartPoint = s.StartPoint, |
||
384 | // EndPoint = s.EndPoint, |
||
385 | // LeftBottomPoint = s.LB, |
||
386 | // Paint = s.PaintState, |
||
387 | // Opacity = s.Opac, |
||
388 | // TopRightPoint = s.TR, |
||
389 | // UserID = s.UserID, |
||
390 | // PointSet = s.PointSet, |
||
391 | // DashSize = s.DashSize, |
||
392 | // //StrokeColor = GetUserColor(dc, s.UserID), |
||
393 | // LineSize = Convert.ToDouble(data2.First()), |
||
394 | // }; |
||
395 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
396 | // Layer.Children.Add(instance); |
||
397 | // instance.ApplyTemplate(); |
||
398 | // instance.SetRectCloud(); |
||
399 | // } |
||
400 | // break; |
||
401 | // #endregion |
||
402 | //// #region Sign |
||
403 | //// case "SignControl": |
||
404 | //// { |
||
405 | //// using (S_SignControl s = JsonSerializerHelper.JsonDeserialize<S_SignControl>(item)) |
||
406 | //// { |
||
407 | //// SignControl instance = new SignControl |
||
408 | //// { |
||
409 | //// Angle = s.Angle, |
||
410 | //// UserNumber = s.UserNumber, |
||
411 | //// StartPoint = s.StartPoint, |
||
412 | //// TopRightPoint = s.TR, |
||
413 | //// EndPoint = s.EndPoint, |
||
414 | //// UserID = s.UserID, |
||
415 | //// LeftBottomPoint = s.LB, |
||
416 | //// PointSet = s.PointSet, |
||
417 | //// SignImage = null, |
||
418 | //// }; |
||
419 | //// ToolTipService.SetToolTip(instance, s.UserID); |
||
420 | ////#if SILVERLIGHT |
||
421 | //// SignUserSet.Add(instance); |
||
422 | ////#endif |
||
423 | //// Layer.Children.Add(instance); |
||
424 | //// instance.ApplyTemplate(); |
||
425 | //// instance.SetImage(); |
||
426 | //// } |
||
427 | //// } |
||
428 | //// break; |
||
429 | //// #endregion |
||
430 | //// #region SymbolN |
||
431 | //// case "SymControlN": |
||
432 | //// using (S_SymControlN s = JsonSerializerHelper.JsonDeserialize<S_SymControlN>(item)) |
||
433 | //// { |
||
434 | //// SymControlN instance = new SymControlN() |
||
435 | //// { |
||
436 | //// PointSet = s.PointSet, |
||
437 | //// StartPoint = s.StartPoint, |
||
438 | //// EndPoint = s.EndPoint, |
||
439 | //// Angle = s.Angle, |
||
440 | //// LeftBottomPoint = s.LB, |
||
441 | //// UserID = s.UserID, |
||
442 | //// TopRightPoint = s.TR, |
||
443 | //// Opacity = s.Opac, |
||
444 | //// //PathXathData = s.DBData, |
||
445 | //// }; |
||
446 | //// Layer.Children.Add(instance); |
||
447 | //// instance.ApplyTemplate(); |
||
448 | //// ToolTipService.SetToolTip(instance, s.UserID); |
||
449 | ////#else |
||
450 | //// instance.PathXathData = JsonSerializerHelper.UnCompressString_NonPrefix(s.DBData); |
||
451 | //// MemoryStream memoryStream = new MemoryStream(Convert.FromBase64String(instance.PathXathData)); |
||
452 | //// object obj = XamlReader.Load(memoryStream); |
||
453 | ////#endif |
||
454 | //// instance.Base_ViewBox.Child = obj as UIElement; |
||
455 | //// instance.SetViewBox(); |
||
456 | //// } |
||
457 | //// break; |
||
458 | //// #endregion |
||
459 | // //#region Ink |
||
460 | // //case "InkPresenter": |
||
461 | // // using (S_PensilControl s = JsonSerializerHelper.JsonDeserialize<S_PensilControl>(item)) |
||
462 | // // { |
||
463 | |||
464 | // // if (((Layer as UIElement) as FrameworkElement).Name == "BaseLayer") |
||
465 | // // { |
||
466 | // // //this._InkBoard.Strokes = s.SCC; |
||
467 | // // foreach (var root in s.SCC) |
||
468 | // // { |
||
469 | // // if (s.UserID != null && data.Count() >1) |
||
470 | // // { |
||
471 | // // root.DrawingAttributes.Color = GetUserColor(dc, s.UserID).Color; |
||
472 | // // } |
||
473 | // // this._InkBoard.Strokes.Add(root); |
||
474 | // // } |
||
475 | // // } |
||
476 | // // else |
||
477 | // // { |
||
478 | // // InkPresenter instance = new InkPresenter(); |
||
479 | // // instance.Strokes = s.SCC; |
||
480 | // // if (s.UserID != null) |
||
481 | // // { |
||
482 | // // instance.Tag = s.UserID.ToString(); |
||
483 | // // } |
||
484 | // // foreach (var stroke in instance.Strokes) |
||
485 | // // { |
||
486 | // // if (s.UserID != null && data.Count() > 1) |
||
487 | // // { |
||
488 | // // stroke.DrawingAttributes.Color = GetUserColor(dc, s.UserID).Color; |
||
489 | // // } |
||
490 | |||
491 | // // if (stroke.DrawingAttributes.Color == StringToColorConverter.Parse("#FFFF0000")) |
||
492 | // // { |
||
493 | // // stroke.DrawingAttributes.Color = GetUserColor(dc, s.UserID).Color; |
||
494 | // // } |
||
495 | // // //stroke.DrawingAttributes.Color = GetUserColor(dc, userID).Color; |
||
496 | // // } |
||
497 | // // ToolTipService.SetToolTip(instance, s.UserID); |
||
498 | // // Layer.Children.Add(instance); |
||
499 | // // } |
||
500 | |||
501 | // // } |
||
502 | // // break; |
||
503 | // //#endregion |
||
504 | // #region Date |
||
505 | // case "DateControl": |
||
506 | // { |
||
507 | // using (S_DateControl s = JsonSerializerHelper.JsonDeserialize<S_DateControl>(item)) |
||
508 | // { |
||
509 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
510 | // DateControl instance = new DateControl |
||
511 | // { |
||
512 | // Angle = s.Angle, |
||
513 | // StartPoint = s.StartPoint, |
||
514 | // EndPoint = s.EndPoint, |
||
515 | // LeftBottomPoint = s.LB, |
||
516 | // TopRightPoint = s.TR, |
||
517 | // Opacity = s.Opac, |
||
518 | // //FontColor = GetUserColor(dc, s.UserID), |
||
519 | // UserID = s.UserID, |
||
520 | // LineSize = Convert.ToDouble(data2.First()), |
||
521 | // Text = s.Text, |
||
522 | // PointSet = s.PointSet, |
||
523 | // }; |
||
524 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
525 | // Layer.Children.Add(instance); |
||
526 | // instance.ApplyTemplate(); |
||
527 | // instance.SetDate(); |
||
528 | // } |
||
529 | // } |
||
530 | // break; |
||
531 | // #endregion |
||
532 | // //#region Symbol |
||
533 | // //case "SymControl": |
||
534 | // // using (S_SymControl s = JsonSerializerHelper.JsonDeserialize<S_SymControl>(item)) |
||
535 | // // { |
||
536 | // // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
537 | // // StringToPathConverter sm = new StringToPathConverter(); |
||
538 | // // SymControl instance = new SymControl() |
||
539 | // // { |
||
540 | // // LineSize = Convert.ToDouble(data2.First()), |
||
541 | // // PointSet = s.PointSet, |
||
542 | // // Paint = s.PaintState, |
||
543 | // // StartPoint = s.StartPoint, |
||
544 | // // StrokeColor = GetUserColor(dc, s.UserID), |
||
545 | // // EndPoint = s.EndPoint, |
||
546 | // // Angle = s.Angle, |
||
547 | // // UserID = s.UserID, |
||
548 | // // LeftBottomPoint = s.LB, |
||
549 | // // TopRightPoint = s.TR, |
||
550 | // // PathData = sm.Convert(s.PathInfo.ToString()), |
||
551 | // // Opacity = s.Opac, |
||
552 | // // }; |
||
553 | // // ToolTipService.SetToolTip(instance, s.UserID); |
||
554 | // // Layer.Children.Add(instance); |
||
555 | // // instance.ApplyTemplate(); |
||
556 | // // instance.SetSymPath(); |
||
557 | // // } |
||
558 | // // break; |
||
559 | // //#endregion |
||
560 | // #region Image |
||
561 | // case "ImgControl": |
||
562 | // using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item)) |
||
563 | // { |
||
564 | // ImgControl instance = new ImgControl |
||
565 | // { |
||
566 | // Angle = s.Angle, |
||
567 | // StartPoint = s.StartPoint, |
||
568 | // TopRightPoint = s.TR, |
||
569 | // EndPoint = s.EndPoint, |
||
570 | // LeftBottomPoint = s.LB, |
||
571 | // PointSet = s.PointSet, |
||
572 | // UserID = s.UserID, |
||
573 | // Opacity = s.Opac, |
||
574 | // FilePath = s.ImagePath, |
||
575 | // }; |
||
576 | // Layer.Children.Add(instance); |
||
577 | // instance.ApplyTemplate(); |
||
578 | // try |
||
579 | // { |
||
580 | // instance.ImageData = new BitmapImage(new Uri(s.ImagePath)); |
||
581 | // ToolTipService.SetToolTip(instance, s.UserID); |
||
582 | // instance.SetImage(); |
||
583 | // } |
||
584 | // catch (Exception) |
||
585 | // { |
||
586 | // break; |
||
587 | // } |
||
588 | |||
589 | |||
590 | // } |
||
591 | // break; |
||
592 | // #endregion |
||
593 | // default: |
||
594 | // break; |
||
595 | // }; |
||
596 | // } |
||
597 | // } |
||
598 | // } |
||
599 | // /// <summary> |
||
600 | // /// 복사전용 |
||
601 | // /// </summary> |
||
602 | // /// <param name="MarkupString"></param> |
||
603 | // /// <param name="Layer"></param> |
||
604 | // /// <param name="ToolTipMessage"></param> |
||
605 | // public void markupParse(string MarkupString, Canvas Layer, string ToolTipMessage) |
||
606 | // { |
||
607 | // if (MarkupString != "False") |
||
608 | // { |
||
609 | // SignUserSet = new List<SignControl>(); |
||
610 | // CopyDataSet = new List<UIElement>(); |
||
611 | // string[] delimiterChars = { "|DZ|" }; |
||
612 | // string[] delimiterChars2 = { "|" }; |
||
613 | // string[] data = MarkupString.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); |
||
614 | // //ServiceDeepViewClient client = new ServiceDeepViewClient(this._Basebinding, this._BaseEndPoint); |
||
615 | // List<string> dataSet = new List<string>(); |
||
616 | // foreach (var dataPease in data) |
||
617 | // { |
||
618 | // var item = JsonSerializerHelper.UnCompressString(dataPease); //언패킹작업 |
||
619 | // var unkownControl = JsonSerializerHelper.JsonDeserialize<S_BaseControl>(item); //복호화작업 |
||
620 | // switch (unkownControl.Name) |
||
621 | // { |
||
622 | // #region Arrow |
||
623 | // case "ArrowControl": |
||
624 | // using (S_ArrowControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl>(item)) |
||
625 | // { |
||
626 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
627 | // ArrowControl instance = new ArrowControl |
||
628 | // { |
||
629 | // LineSize = Convert.ToDouble(data2.First()), |
||
630 | // ArrowStyle = s.ArStyle, |
||
631 | // StartPoint = s.StartPoint, |
||
632 | // EndPoint = s.EndPoint, |
||
633 | // DimSize = s.DimSize, |
||
634 | // DashSize = s.DashSize, |
||
635 | // PointSet = s.PointSet, |
||
636 | |||
637 | // StrokeColor = new SolidColorBrush(Colors.Red) |
||
638 | // }; |
||
639 | // Layer.Children.Add(instance); |
||
640 | // CopyDataSet.Add(instance); |
||
641 | // instance.ApplyTemplate(); |
||
642 | // instance.SetArrowPath(); |
||
643 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
644 | |||
645 | // } |
||
646 | // break; |
||
647 | // #endregion |
||
648 | // #region RectCloud |
||
649 | // case "RectCloudControl": |
||
650 | // using (S_RectCloudControl s = JsonSerializerHelper.JsonDeserialize<S_RectCloudControl>(item)) |
||
651 | // { |
||
652 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
653 | // RectCloudControl instance = new RectCloudControl() |
||
654 | // { |
||
655 | // StartPoint = s.StartPoint, |
||
656 | // EndPoint = s.EndPoint, |
||
657 | // LeftBottomPoint = s.LB, |
||
658 | // Paint = s.PaintState, |
||
659 | // Opacity = s.Opac, |
||
660 | // TopRightPoint = s.TR, |
||
661 | // PointSet = s.PointSet, |
||
662 | // DashSize = s.DashSize, |
||
663 | // StrokeColor = new SolidColorBrush(Colors.Red), |
||
664 | // LineSize = Convert.ToDouble(data2.First()), |
||
665 | // }; |
||
666 | // Layer.Children.Add(instance); |
||
667 | // instance.ApplyTemplate(); |
||
668 | // CopyDataSet.Add(instance); |
||
669 | // instance.SetRectCloud(); |
||
670 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
671 | // } |
||
672 | // break; |
||
673 | // #endregion |
||
674 | // #region ArrowText |
||
675 | // case "ArrowTextControl": |
||
676 | // using (S_ArrowTextControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowTextControl>(item)) |
||
677 | // { |
||
678 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
679 | // ArrowTextControl instance = new ArrowTextControl(); |
||
680 | // Layer.Children.Add(instance); |
||
681 | // instance.LineSize = Convert.ToDouble(data2.First()); |
||
682 | // instance.PointSet = s.PointSet; |
||
683 | // instance.StartPoint = s.StartPoint; |
||
684 | // instance.EndPoint = s.EndPoint; |
||
685 | // instance.StrokeColor = new SolidColorBrush(Colors.Red); |
||
686 | // instance.DashSize = s.DashSize; |
||
687 | // instance.ArrowTextStyle = s.ArrowStyle; |
||
688 | // instance.ArrowText = s.ArrowText; |
||
689 | // instance.BorderSize = s.BorderSize; |
||
690 | // instance.BoxWidth = s.BoxWidth; |
||
691 | // instance.BoxHeight = s.BoxHeight; |
||
692 | // instance.isHighLight = s.isHighLight; |
||
693 | // instance.isFixed = s.isFixed; |
||
694 | // instance.ApplyTemplate(); |
||
695 | // instance.SetArrowTextPath(); |
||
696 | // instance.isTrans = s.isTrans; |
||
697 | // instance.MidPoint = s.MP; |
||
698 | // instance.Angle = s.Angle; |
||
699 | // if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
700 | // { |
||
701 | // s.fontConfig = new List<string>(); |
||
702 | |||
703 | // s.fontConfig.Add("Arial"); |
||
704 | // s.fontConfig.Add("Normal"); |
||
705 | // s.fontConfig.Add("Normal"); |
||
706 | // s.fontConfig.Add("30"); |
||
707 | // } |
||
708 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
709 | // instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
710 | // instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
711 | // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
712 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
713 | // CopyDataSet.Add(instance); |
||
714 | // instance.ApplyTemplate(); |
||
715 | // instance.SetArrowTextPath(); |
||
716 | // }; |
||
717 | |||
718 | // break; |
||
719 | // #endregion |
||
720 | // #region Arrow_Multi |
||
721 | // case "ArrowControl_Multi": |
||
722 | // using (S_ArrowControl_Multi s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(item)) |
||
723 | // { |
||
724 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
725 | // ArrowControl_Multi instance = new ArrowControl_Multi |
||
726 | // { |
||
727 | // LineSize = Convert.ToDouble(data2.First()), |
||
728 | // StartPoint = s.StartPoint, |
||
729 | // MiddlePoint = s.MP, |
||
730 | // DashSize = s.DashSize, |
||
731 | // EndPoint = s.EndPoint, |
||
732 | // PointSet = s.PointSet, |
||
733 | // StrokeColor = new SolidColorBrush(Colors.Red) |
||
734 | // }; |
||
735 | // Layer.Children.Add(instance); |
||
736 | // CopyDataSet.Add(instance); |
||
737 | // instance.ApplyTemplate(); |
||
738 | // instance.SetArrowMultiPath(); |
||
739 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
740 | |||
741 | // } |
||
742 | // break; |
||
743 | // #endregion |
||
744 | // #region Rectangle |
||
745 | // case "RectagleControl": |
||
746 | // using (S_RectControl s = JsonSerializerHelper.JsonDeserialize<S_RectControl>(item)) |
||
747 | // { |
||
748 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
749 | // RectagleControl instance = new RectagleControl |
||
750 | // { |
||
751 | // LineSize = Convert.ToDouble(data2.First()), |
||
752 | // Paint = s.PaintState, |
||
753 | // StartPoint = s.StartPoint, |
||
754 | // EndPoint = s.EndPoint, |
||
755 | // Angle = s.Angle, |
||
756 | // LeftBottomPoint = s.LB, |
||
757 | // TopRightPoint = s.TR, |
||
758 | // Opacity = s.Opac, |
||
759 | // PointSet = s.PointSet, |
||
760 | // DashSize = s.DashSize |
||
761 | // }; |
||
762 | // Layer.Children.Add(instance); |
||
763 | // CopyDataSet.Add(instance); |
||
764 | // instance.ApplyTemplate(); |
||
765 | // instance.SetRectPath(); |
||
766 | // } |
||
767 | // break; |
||
768 | // #endregion |
||
769 | // #region Triangle |
||
770 | // case "TriControl": |
||
771 | // using (S_TriControl s = JsonSerializerHelper.JsonDeserialize<S_TriControl>(item)) |
||
772 | // { |
||
773 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
774 | // TriControl instance = new TriControl |
||
775 | // { |
||
776 | // LineSize = Convert.ToDouble(data2.First()), |
||
777 | // MidPoint = s.MP, |
||
778 | // Paint = s.Paint, |
||
779 | // StartPoint = s.StartPoint, |
||
780 | // EndPoint = s.EndPoint, |
||
781 | // Angle = s.Angle, |
||
782 | // DashSize = s.DashSize, |
||
783 | // PointSet = s.PointSet |
||
784 | // }; |
||
785 | // Layer.Children.Add(instance); |
||
786 | // CopyDataSet.Add(instance); |
||
787 | // instance.ApplyTemplate(); |
||
788 | // instance.SetTri(); |
||
789 | // } |
||
790 | // break; |
||
791 | // #endregion |
||
792 | // #region Cicle |
||
793 | // case "CicleControl": |
||
794 | // using (S_CicleControl s = JsonSerializerHelper.JsonDeserialize<S_CicleControl>(item)) |
||
795 | // { |
||
796 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
797 | // CicleControl instance = new CicleControl |
||
798 | // { |
||
799 | // LineSize = Convert.ToDouble(data2.First()), |
||
800 | // Paint = s.PaintState, |
||
801 | // StartPoint = s.StartPoint, |
||
802 | // EndPoint = s.EndPoint, |
||
803 | // LeftBottomPoint = s.LBP, |
||
804 | // TopRightPoint = s.TRP, |
||
805 | // Angle = s.Angle, |
||
806 | // DashSize = s.DashSize, |
||
807 | // PointSet = s.PointSet, |
||
808 | // }; |
||
809 | // Layer.Children.Add(instance); |
||
810 | // CopyDataSet.Add(instance); |
||
811 | // instance.ApplyTemplate(); |
||
812 | // instance.SetCicle(); |
||
813 | // } |
||
814 | // break; |
||
815 | // #endregion |
||
816 | // #region Cloud |
||
817 | // case "CloudControl": |
||
818 | // using (S_CloudControl s = JsonSerializerHelper.JsonDeserialize<S_CloudControl>(item)) |
||
819 | // { |
||
820 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
821 | // CloudControl instance = new CloudControl |
||
822 | // { |
||
823 | // LineSize = Convert.ToDouble(data2.First()), |
||
824 | // Toler = s.Toler, |
||
825 | // PointSet = new List<Point>(), |
||
826 | // ArcLength = s.ArcLength, |
||
827 | // DashSize = s.DashSize, |
||
828 | // Paint = s.PaintState, |
||
829 | // isChain = s.IsChain, |
||
830 | // isTransOn = s.IsTrans, |
||
831 | // //Fill = s.CloudFill, |
||
832 | // }; |
||
833 | |||
834 | // Layer.Children.Add(instance); |
||
835 | // CopyDataSet.Add(instance); |
||
836 | // instance.ApplyTemplate(); |
||
837 | // instance.PointSet = s.pointSet; |
||
838 | // instance.ClosePath(); |
||
839 | // } |
||
840 | // break; |
||
841 | // #endregion |
||
842 | // #region Line |
||
843 | // case "LineControl": |
||
844 | // using (S_LineControl s = JsonSerializerHelper.JsonDeserialize<S_LineControl>(item)) |
||
845 | // { |
||
846 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
847 | // LineControl instance = new LineControl() |
||
848 | // { |
||
849 | // LineStyle = s.LnSet, |
||
850 | // StartPoint = s.StartPoint, |
||
851 | // EndPoint = s.EndPoint, |
||
852 | // DashSize = s.DashSize, |
||
853 | // Interval = s.Interval, |
||
854 | // PointSet = s.PointSet, |
||
855 | // StrokeColor = new SolidColorBrush(Colors.Red), |
||
856 | // LineSize = Convert.ToDouble(data2.First()), |
||
857 | // }; |
||
858 | // Layer.Children.Add(instance); |
||
859 | // CopyDataSet.Add(instance); |
||
860 | // instance.ApplyTemplate(); |
||
861 | // instance.SetLinePath(); |
||
862 | // } |
||
863 | // break; |
||
864 | // #endregion |
||
865 | // #region Text |
||
866 | // case "TextControl": |
||
867 | // using (S_TextControl s = JsonSerializerHelper.JsonDeserialize<S_TextControl>(item)) |
||
868 | // { |
||
869 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
870 | // TextControl instance = new TextControl() |
||
871 | // { |
||
872 | // Text = s.Text, |
||
873 | // StartPoint = s.StartPoint, |
||
874 | // EndPoint = s.EndPoint, |
||
875 | // LineSize = new Thickness(Convert.ToDouble(data2.First())), |
||
876 | // TextSize = Convert.ToDouble(data2[1]), |
||
877 | // FontColor = new SolidColorBrush(Colors.Red), |
||
878 | // FontSize = 10, |
||
879 | // Angle = s.Angle, |
||
880 | // PointSet = s.PointSet, |
||
881 | // Paint = s.PaintState, |
||
882 | // isHighLight = s.isHighLight, |
||
883 | // TextFamily = new FontFamily(s.fontConfig[0]), |
||
884 | // TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]), |
||
885 | // TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]), |
||
886 | // }; |
||
887 | // if (instance.Text == "" || instance.Text == null) |
||
888 | // { |
||
889 | |||
890 | // } |
||
891 | // else |
||
892 | // { |
||
893 | |||
894 | // instance.SetText(); |
||
895 | // CopyDataSet.Add(instance); |
||
896 | // Layer.Children.Add(instance); |
||
897 | // if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
898 | // { |
||
899 | // s.fontConfig = new List<string>(); |
||
900 | |||
901 | // s.fontConfig.Add("Arial"); |
||
902 | // s.fontConfig.Add("Normal"); |
||
903 | // s.fontConfig.Add("Normal"); |
||
904 | // s.fontConfig.Add("30"); |
||
905 | // } |
||
906 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
907 | // instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
908 | // instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
909 | |||
910 | // //if (s.fontConfig.Count == 3) |
||
911 | // //{ |
||
912 | // // if (true) |
||
913 | // // { |
||
914 | |||
915 | // // } |
||
916 | // // instance.TextSize = 30; |
||
917 | // //} |
||
918 | // //else |
||
919 | // //{ |
||
920 | // // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
921 | // //} |
||
922 | // instance.ApplyTemplate(); |
||
923 | // instance.DrawingCloud(); |
||
924 | // if (s.fontConfig.Count() == 4) |
||
925 | // { |
||
926 | // instance.UnderLine = TextDecorations.Underline; |
||
927 | // instance.Base_TextBlock.TextDecorations = instance.UnderLine; |
||
928 | // } |
||
929 | // instance.Base_TextBlock.Margin = new Thickness(instance.Base_TextBox.Margin.Left + 4); |
||
930 | // instance.Base_TextBox.Visibility = Visibility.Collapsed; |
||
931 | // } |
||
932 | // } |
||
933 | // break; |
||
934 | // #endregion |
||
935 | // #region Arc |
||
936 | // case "ArcControl": |
||
937 | // using (S_ArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArcControl>(item)) |
||
938 | // { |
||
939 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
940 | // ArcControl instance = new ArcControl() |
||
941 | // { |
||
942 | // StartPoint = s.StartPoint, |
||
943 | // MidPoint = s.MP, |
||
944 | // EndPoint = s.EndPoint, |
||
945 | // isTransOn = s.IsTrans, |
||
946 | // DashSize = s.DashSize, |
||
947 | // PointSet = s.PointSet, |
||
948 | // StrokeColor = new SolidColorBrush(Colors.Red), |
||
949 | // LineSize = Convert.ToDouble(data2.First()), |
||
950 | // }; |
||
951 | // Layer.Children.Add(instance); |
||
952 | // CopyDataSet.Add(instance); |
||
953 | // instance.ApplyTemplate(); |
||
954 | // instance.SetArcPath(); |
||
955 | // } |
||
956 | // break; |
||
957 | // #endregion |
||
958 | // #region Sign |
||
959 | // case "SignControl": |
||
960 | // { |
||
961 | // using (S_SignControl s = JsonSerializerHelper.JsonDeserialize<S_SignControl>(item)) |
||
962 | // { |
||
963 | // ImageSource img; |
||
964 | |||
965 | |||
966 | // SignControl instance_Sign = new SignControl |
||
967 | // { |
||
968 | // Angle = s.Angle, |
||
969 | // UserNumber = s.UserNumber, |
||
970 | // StartPoint = s.StartPoint, |
||
971 | // TopRightPoint = s.TR, |
||
972 | // EndPoint = s.EndPoint, |
||
973 | // LeftBottomPoint = s.LB, |
||
974 | // PointSet = s.PointSet, |
||
975 | // }; |
||
976 | |||
977 | |||
978 | // try |
||
979 | // { |
||
980 | // this.SignSet.TryGetValue(s.UserNumber, out img); |
||
981 | // instance_Sign.SignImage = img; |
||
982 | // } |
||
983 | // catch (Exception) |
||
984 | // { |
||
985 | // SignUserSet.Add(instance_Sign); |
||
986 | // this.GetSignImageLoaded(SignUserSet); |
||
987 | // } |
||
988 | // Layer.Children.Add(instance_Sign); |
||
989 | // CopyDataSet.Add(instance_Sign); |
||
990 | // instance_Sign.ApplyTemplate(); |
||
991 | // instance_Sign.SetImage(); |
||
992 | // } |
||
993 | // } |
||
994 | // break; |
||
995 | // #endregion |
||
996 | // #region Date |
||
997 | // case "DateControl": |
||
998 | // { |
||
999 | // using (S_DateControl s = JsonSerializerHelper.JsonDeserialize<S_DateControl>(item)) |
||
1000 | // { |
||
1001 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1002 | // DateControl instance = new DateControl |
||
1003 | // { |
||
1004 | // Angle = s.Angle, |
||
1005 | // StartPoint = s.StartPoint, |
||
1006 | // EndPoint = s.EndPoint, |
||
1007 | // LeftBottomPoint = s.LB, |
||
1008 | // TopRightPoint = s.TR, |
||
1009 | // Opacity = s.Opac, |
||
1010 | // FontColor = new SolidColorBrush(Colors.Red), |
||
1011 | // LineSize = Convert.ToDouble(data2.First()), |
||
1012 | // Text = s.Text, |
||
1013 | // PointSet = s.PointSet, |
||
1014 | // }; |
||
1015 | |||
1016 | // Layer.Children.Add(instance); |
||
1017 | // CopyDataSet.Add(instance); |
||
1018 | // instance.ApplyTemplate(); |
||
1019 | // instance.SetDate(); |
||
1020 | // } |
||
1021 | // } |
||
1022 | // break; |
||
1023 | // #endregion |
||
1024 | // #region Symbol |
||
1025 | // case "SymControl": |
||
1026 | // using (S_SymControl s = JsonSerializerHelper.JsonDeserialize<S_SymControl>(item)) |
||
1027 | // { |
||
1028 | |||
1029 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1030 | // StringToPathConverter sm = new StringToPathConverter(); |
||
1031 | // SymControl instance = new SymControl() |
||
1032 | // { |
||
1033 | // LineSize = Convert.ToDouble(data2.First()), |
||
1034 | // PointSet = s.PointSet, |
||
1035 | // Paint = s.PaintState, |
||
1036 | // StartPoint = s.StartPoint, |
||
1037 | // StrokeColor = new SolidColorBrush(Colors.Red), |
||
1038 | // EndPoint = s.EndPoint, |
||
1039 | // Angle = s.Angle, |
||
1040 | // LeftBottomPoint = s.LB, |
||
1041 | // TopRightPoint = s.TR, |
||
1042 | // PathData = sm.Convert(s.PathInfo.ToString()), |
||
1043 | // Opacity = s.Opac, |
||
1044 | // }; |
||
1045 | // Layer.Children.Add(instance); |
||
1046 | // CopyDataSet.Add(instance); |
||
1047 | // instance.ApplyTemplate(); |
||
1048 | // instance.SetSymPath(); |
||
1049 | // } |
||
1050 | // break; |
||
1051 | // #endregion |
||
1052 | // #region Image |
||
1053 | // case "ImgControl": |
||
1054 | // using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item)) |
||
1055 | // { |
||
1056 | // ImgControl instance = new ImgControl |
||
1057 | // { |
||
1058 | // Angle = s.Angle, |
||
1059 | // StartPoint = s.StartPoint, |
||
1060 | // TopRightPoint = s.TR, |
||
1061 | // EndPoint = s.EndPoint, |
||
1062 | // LeftBottomPoint = s.LB, |
||
1063 | // PointSet = s.PointSet, |
||
1064 | // Opacity = s.Opac, |
||
1065 | // FilePath = s.ImagePath, |
||
1066 | // }; |
||
1067 | // Layer.Children.Add(instance); |
||
1068 | // instance.ApplyTemplate(); |
||
1069 | // instance.ImageData = new BitmapImage(new Uri(s.ImagePath)); |
||
1070 | // CopyDataSet.Add(instance); |
||
1071 | // instance.SetImage(); |
||
1072 | // } |
||
1073 | // break; |
||
1074 | // #endregion |
||
1075 | // #region SymbolN |
||
1076 | // case "SymControlN": |
||
1077 | // using (S_SymControlN s = JsonSerializerHelper.JsonDeserialize<S_SymControlN>(item)) |
||
1078 | // { |
||
1079 | // SymControlN instance = new SymControlN() |
||
1080 | // { |
||
1081 | // PointSet = s.PointSet, |
||
1082 | // StartPoint = s.StartPoint, |
||
1083 | // EndPoint = s.EndPoint, |
||
1084 | // Angle = s.Angle, |
||
1085 | // LeftBottomPoint = s.LB, |
||
1086 | // TopRightPoint = s.TR, |
||
1087 | // Opacity = s.Opac, |
||
1088 | // //PathXathData = s.DBData, |
||
1089 | // }; |
||
1090 | // if (instance.PointSet.Count == 4) |
||
1091 | // { |
||
1092 | // Layer.Children.Add(instance); |
||
1093 | // CopyDataSet.Add(instance); |
||
1094 | // instance.ApplyTemplate(); |
||
1095 | // instance.PathXathData = JsonSerializerHelper.UnCompressString_NonPrefix(s.DBData); |
||
1096 | // object obj = XamlReader.Load(JsonSerializerHelper.UnCompressString_NonPrefix(instance.PathXathData)); |
||
1097 | // instance.Base_ViewBox.Child = obj as UIElement; |
||
1098 | // instance.SetViewBox(); |
||
1099 | // } |
||
1100 | |||
1101 | |||
1102 | // } |
||
1103 | // break; |
||
1104 | // #endregion |
||
1105 | // #region Ink |
||
1106 | // case "InkPresenter": |
||
1107 | // using (S_PensilControl s = JsonSerializerHelper.JsonDeserialize<S_PensilControl>(item)) |
||
1108 | // { |
||
1109 | // this._InkBoard.Strokes = s.SCC; |
||
1110 | // } |
||
1111 | // break; |
||
1112 | // #endregion |
||
1113 | // #region Poly |
||
1114 | // case "PolyControl": |
||
1115 | // using (S_PolyControl s = JsonSerializerHelper.JsonDeserialize<S_PolyControl>(item)) |
||
1116 | // { |
||
1117 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1118 | // PolyControl instance = new PolyControl() |
||
1119 | // { |
||
1120 | // //LineSize = Convert.ToDouble(data2.First()), |
||
1121 | // LineSize = LineSize, |
||
1122 | // PointSet = s.PointSet, |
||
1123 | // PointC = s.PointC, |
||
1124 | // StartPoint = s.StartPoint, |
||
1125 | // EndPoint = s.EndPoint, |
||
1126 | // Opacity = s.Opac, |
||
1127 | // }; |
||
1128 | // Layer.Children.Add(instance); |
||
1129 | // CopyDataSet.Add(instance); |
||
1130 | // instance.ApplyTemplate(); |
||
1131 | // instance.SetPolyPath(); |
||
1132 | // }; |
||
1133 | // break; |
||
1134 | // #endregion |
||
1135 | // default: |
||
1136 | // break; |
||
1137 | // }; |
||
1138 | |||
1139 | // foreach (var copyData in CopyDataSet) |
||
1140 | // { |
||
1141 | // Layer.Children.Remove(copyData); |
||
1142 | // } |
||
1143 | // } |
||
1144 | // } |
||
1145 | // } |
||
1146 | |||
1147 | // /// <summary> |
||
1148 | // /// Undo Redo 전용 |
||
1149 | // /// </summary> |
||
1150 | // /// <param name="MarkupString"></param> |
||
1151 | // /// <param name="Layer"></param> |
||
1152 | // /// <param name="ToolTipMessage"></param> |
||
1153 | // public void markupParseUndo(string MarkupString, Canvas Layer, string ToolTipMessage) |
||
1154 | // { |
||
1155 | // if (MarkupString != "False") |
||
1156 | // { |
||
1157 | // SignUserSet = new List<SignControl>(); |
||
1158 | // CopyDataSet = new List<UIElement>(); |
||
1159 | // string[] delimiterChars = { "|DZ|" }; |
||
1160 | // string[] delimiterChars2 = { "|" }; |
||
1161 | // string[] data = MarkupString.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); |
||
1162 | // //ServiceDeepViewClient client = new ServiceDeepViewClient(this._Basebinding, this._BaseEndPoint); |
||
1163 | // List<string> dataSet = new List<string>(); |
||
1164 | // foreach (var dataPease in data) |
||
1165 | // { |
||
1166 | // var item = JsonSerializerHelper.UnCompressString(dataPease); //언패킹작업 |
||
1167 | // var unkownControl = JsonSerializerHelper.JsonDeserialize<S_BaseControl>(item); //복호화작업 |
||
1168 | // switch (unkownControl.Name) |
||
1169 | // { |
||
1170 | // #region Arrow |
||
1171 | // case "ArrowControl": |
||
1172 | // using (S_ArrowControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl>(item)) |
||
1173 | // { |
||
1174 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1175 | // ArrowControl instance = new ArrowControl |
||
1176 | // { |
||
1177 | // LineSize = Convert.ToDouble(data2.First()), |
||
1178 | // ArrowStyle = s.ArStyle, |
||
1179 | // StartPoint = s.StartPoint, |
||
1180 | // EndPoint = s.EndPoint, |
||
1181 | // DashSize = s.DashSize, |
||
1182 | // PointSet = s.PointSet, |
||
1183 | // DimSize = s.DimSize, |
||
1184 | |||
1185 | // StrokeColor = new SolidColorBrush(Colors.Red) |
||
1186 | // }; |
||
1187 | // Layer.Children.Add(instance); |
||
1188 | // instance.ApplyTemplate(); |
||
1189 | // instance.SetArrowPath(); |
||
1190 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
1191 | |||
1192 | // } |
||
1193 | // break; |
||
1194 | // #endregion |
||
1195 | // #region RectCloud |
||
1196 | // case "RectCloudControl": |
||
1197 | // using (S_RectCloudControl s = JsonSerializerHelper.JsonDeserialize<S_RectCloudControl>(item)) |
||
1198 | // { |
||
1199 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1200 | // RectCloudControl instance = new RectCloudControl() |
||
1201 | // { |
||
1202 | // StartPoint = s.StartPoint, |
||
1203 | // EndPoint = s.EndPoint, |
||
1204 | // LeftBottomPoint = s.LB, |
||
1205 | // Paint = s.PaintState, |
||
1206 | // Opacity = s.Opac, |
||
1207 | // TopRightPoint = s.TR, |
||
1208 | // PointSet = s.PointSet, |
||
1209 | // DashSize = s.DashSize, |
||
1210 | // StrokeColor = new SolidColorBrush(Colors.Red), |
||
1211 | // LineSize = Convert.ToDouble(data2.First()), |
||
1212 | // }; |
||
1213 | // Layer.Children.Add(instance); |
||
1214 | // instance.ApplyTemplate(); |
||
1215 | // instance.SetRectCloud(); |
||
1216 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
1217 | // } |
||
1218 | // break; |
||
1219 | // #endregion |
||
1220 | // #region ArrowText |
||
1221 | // case "ArrowTextControl": |
||
1222 | // using (S_ArrowTextControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowTextControl>(item)) |
||
1223 | // { |
||
1224 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1225 | // ArrowTextControl instance = new ArrowTextControl(); |
||
1226 | // Layer.Children.Add(instance); |
||
1227 | // instance.LineSize = Convert.ToDouble(data2.First()); |
||
1228 | // instance.PointSet = s.PointSet; |
||
1229 | // instance.StartPoint = s.StartPoint; |
||
1230 | // instance.EndPoint = s.EndPoint; |
||
1231 | // instance.StrokeColor = new SolidColorBrush(Colors.Red); |
||
1232 | // instance.DashSize = s.DashSize; |
||
1233 | // instance.ArrowTextStyle = s.ArrowStyle; |
||
1234 | // instance.ArrowText = s.ArrowText; |
||
1235 | // instance.BorderSize = s.BorderSize; |
||
1236 | // instance.BoxWidth = s.BoxWidth; |
||
1237 | // instance.BoxHeight = s.BoxHeight; |
||
1238 | // instance.isHighLight = s.isHighLight; |
||
1239 | // instance.ApplyTemplate(); |
||
1240 | // instance.isFixed = s.isFixed; |
||
1241 | // instance.SetArrowTextPath(); |
||
1242 | // instance.isTrans = s.isTrans; |
||
1243 | // instance.Angle = s.Angle; |
||
1244 | // instance.MidPoint = s.MP; |
||
1245 | // if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
1246 | // { |
||
1247 | // s.fontConfig = new List<string>(); |
||
1248 | |||
1249 | // s.fontConfig.Add("Arial"); |
||
1250 | // s.fontConfig.Add("Normal"); |
||
1251 | // s.fontConfig.Add("Normal"); |
||
1252 | // s.fontConfig.Add("30"); |
||
1253 | // } |
||
1254 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
1255 | // instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
1256 | // instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
1257 | // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
1258 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
1259 | // instance.ApplyTemplate(); |
||
1260 | // instance.SetArrowTextPath(); |
||
1261 | // }; |
||
1262 | |||
1263 | // break; |
||
1264 | // #endregion |
||
1265 | // #region Arrow_Multi |
||
1266 | // case "ArrowControl_Multi": |
||
1267 | // using (S_ArrowControl_Multi s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(item)) |
||
1268 | // { |
||
1269 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1270 | // ArrowControl_Multi instance = new ArrowControl_Multi |
||
1271 | // { |
||
1272 | // LineSize = Convert.ToDouble(data2.First()), |
||
1273 | // StartPoint = s.StartPoint, |
||
1274 | // MiddlePoint = s.MP, |
||
1275 | // DashSize = s.DashSize, |
||
1276 | // EndPoint = s.EndPoint, |
||
1277 | // PointSet = s.PointSet, |
||
1278 | // StrokeColor = new SolidColorBrush(Colors.Red) |
||
1279 | // }; |
||
1280 | // Layer.Children.Add(instance); |
||
1281 | // instance.ApplyTemplate(); |
||
1282 | // instance.SetArrowMultiPath(); |
||
1283 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
1284 | |||
1285 | // } |
||
1286 | // break; |
||
1287 | // #endregion |
||
1288 | // #region Rectangle |
||
1289 | // case "RectagleControl": |
||
1290 | // using (S_RectControl s = JsonSerializerHelper.JsonDeserialize<S_RectControl>(item)) |
||
1291 | // { |
||
1292 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1293 | // RectagleControl instance = new RectagleControl |
||
1294 | // { |
||
1295 | // LineSize = Convert.ToDouble(data2.First()), |
||
1296 | // Paint = s.PaintState, |
||
1297 | // StartPoint = s.StartPoint, |
||
1298 | // EndPoint = s.EndPoint, |
||
1299 | // Angle = s.Angle, |
||
1300 | // LeftBottomPoint = s.LB, |
||
1301 | // TopRightPoint = s.TR, |
||
1302 | // Opacity = s.Opac, |
||
1303 | // PointSet = s.PointSet, |
||
1304 | // DashSize = s.DashSize |
||
1305 | // }; |
||
1306 | // Layer.Children.Add(instance); |
||
1307 | // instance.ApplyTemplate(); |
||
1308 | // instance.SetRectPath(); |
||
1309 | // } |
||
1310 | // break; |
||
1311 | // #endregion |
||
1312 | // #region Triangle |
||
1313 | // case "TriControl": |
||
1314 | // using (S_TriControl s = JsonSerializerHelper.JsonDeserialize<S_TriControl>(item)) |
||
1315 | // { |
||
1316 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1317 | // TriControl instance = new TriControl |
||
1318 | // { |
||
1319 | // LineSize = Convert.ToDouble(data2.First()), |
||
1320 | // MidPoint = s.MP, |
||
1321 | // Paint = s.Paint, |
||
1322 | // StartPoint = s.StartPoint, |
||
1323 | // EndPoint = s.EndPoint, |
||
1324 | // Angle = s.Angle, |
||
1325 | // DashSize = s.DashSize, |
||
1326 | // PointSet = s.PointSet |
||
1327 | // }; |
||
1328 | // Layer.Children.Add(instance); |
||
1329 | // instance.ApplyTemplate(); |
||
1330 | // instance.SetTri(); |
||
1331 | // } |
||
1332 | // break; |
||
1333 | // #endregion |
||
1334 | // #region Cicle |
||
1335 | // case "CicleControl": |
||
1336 | // using (S_CicleControl s = JsonSerializerHelper.JsonDeserialize<S_CicleControl>(item)) |
||
1337 | // { |
||
1338 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1339 | // CicleControl instance = new CicleControl |
||
1340 | // { |
||
1341 | // LineSize = Convert.ToDouble(data2.First()), |
||
1342 | // Paint = s.PaintState, |
||
1343 | // StartPoint = s.StartPoint, |
||
1344 | // EndPoint = s.EndPoint, |
||
1345 | // LeftBottomPoint = s.LBP, |
||
1346 | // TopRightPoint = s.TRP, |
||
1347 | // Angle = s.Angle, |
||
1348 | // DashSize = s.DashSize, |
||
1349 | // PointSet = s.PointSet, |
||
1350 | // }; |
||
1351 | // Layer.Children.Add(instance); |
||
1352 | // instance.ApplyTemplate(); |
||
1353 | // instance.SetCicle(); |
||
1354 | // } |
||
1355 | // break; |
||
1356 | // #endregion |
||
1357 | // #region Cloud |
||
1358 | // case "CloudControl": |
||
1359 | // using (S_CloudControl s = JsonSerializerHelper.JsonDeserialize<S_CloudControl>(item)) |
||
1360 | // { |
||
1361 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1362 | // CloudControl instance = new CloudControl |
||
1363 | // { |
||
1364 | // LineSize = Convert.ToDouble(data2.First()), |
||
1365 | // Toler = s.Toler, |
||
1366 | // PointSet = new List<Point>(), |
||
1367 | // ArcLength = s.ArcLength, |
||
1368 | // Paint = s.PaintState, |
||
1369 | // isTransOn = s.IsTrans, |
||
1370 | // DashSize = s.DashSize, |
||
1371 | // isChain = s.IsChain, |
||
1372 | // //Fill = s.CloudFill, |
||
1373 | // }; |
||
1374 | |||
1375 | // Layer.Children.Add(instance); |
||
1376 | // instance.ApplyTemplate(); |
||
1377 | // instance.PointSet = s.pointSet; |
||
1378 | // instance.ClosePath(); |
||
1379 | // instance.SetCloud(); |
||
1380 | // } |
||
1381 | // break; |
||
1382 | // #endregion |
||
1383 | // #region Line |
||
1384 | // case "LineControl": |
||
1385 | // using (S_LineControl s = JsonSerializerHelper.JsonDeserialize<S_LineControl>(item)) |
||
1386 | // { |
||
1387 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1388 | // LineControl instance = new LineControl() |
||
1389 | // { |
||
1390 | // LineStyle = s.LnSet, |
||
1391 | // StartPoint = s.StartPoint, |
||
1392 | // EndPoint = s.EndPoint, |
||
1393 | // DashSize = s.DashSize, |
||
1394 | // PointSet = s.PointSet, |
||
1395 | // Interval = s.Interval, |
||
1396 | // StrokeColor = new SolidColorBrush(Colors.Red), |
||
1397 | // LineSize = Convert.ToDouble(data2.First()), |
||
1398 | // }; |
||
1399 | // Layer.Children.Add(instance); |
||
1400 | // instance.ApplyTemplate(); |
||
1401 | // instance.SetLinePath(); |
||
1402 | // } |
||
1403 | // break; |
||
1404 | // #endregion |
||
1405 | // #region Text |
||
1406 | // case "TextControl": |
||
1407 | // using (S_TextControl s = JsonSerializerHelper.JsonDeserialize<S_TextControl>(item)) |
||
1408 | // { |
||
1409 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1410 | // TextControl instance = new TextControl() |
||
1411 | // { |
||
1412 | // Text = s.Text, |
||
1413 | // StartPoint = s.StartPoint, |
||
1414 | // EndPoint = s.EndPoint, |
||
1415 | // LineSize = new Thickness(Convert.ToDouble(data2.First())), |
||
1416 | // TextSize = Convert.ToDouble(data2[1]), |
||
1417 | // FontColor = new SolidColorBrush(StringToColorConverter.Parse(s.FontColor)), |
||
1418 | // FontSize = 10, |
||
1419 | // Angle = s.Angle, |
||
1420 | // PointSet = s.PointSet, |
||
1421 | // Paint = s.PaintState, |
||
1422 | // isHighLight = s.isHighLight, |
||
1423 | // TextFamily = new FontFamily(s.fontConfig[0]), |
||
1424 | // TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]), |
||
1425 | // TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]), |
||
1426 | // }; |
||
1427 | |||
1428 | // instance.SetText(); |
||
1429 | // Layer.Children.Add(instance); |
||
1430 | // if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
1431 | // { |
||
1432 | // s.fontConfig = new List<string>(); |
||
1433 | |||
1434 | // s.fontConfig.Add("Arial"); |
||
1435 | // s.fontConfig.Add("Normal"); |
||
1436 | // s.fontConfig.Add("Normal"); |
||
1437 | // s.fontConfig.Add("30"); |
||
1438 | // } |
||
1439 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
1440 | // instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
1441 | // instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
1442 | |||
1443 | // //if (s.fontConfig.Count == 3) |
||
1444 | // //{ |
||
1445 | // // instance.TextSize = 30; |
||
1446 | // //} |
||
1447 | // //else |
||
1448 | // //{ |
||
1449 | // // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
1450 | // //} |
||
1451 | // instance.ApplyTemplate(); |
||
1452 | // instance.DrawingCloud(); |
||
1453 | // if (s.fontConfig.Count() == 4) |
||
1454 | // { |
||
1455 | // instance.UnderLine = TextDecorations.Underline; |
||
1456 | // instance.Base_TextBlock.TextDecorations = instance.UnderLine; |
||
1457 | // } |
||
1458 | // instance.Base_TextBlock.Margin = new Thickness(instance.Base_TextBox.Margin.Left + 4); |
||
1459 | // instance.Base_TextBox.Visibility = Visibility.Collapsed; |
||
1460 | // } |
||
1461 | // break; |
||
1462 | // #endregion |
||
1463 | // #region Arc |
||
1464 | // case "ArcControl": |
||
1465 | // using (S_ArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArcControl>(item)) |
||
1466 | // { |
||
1467 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1468 | // ArcControl instance = new ArcControl() |
||
1469 | // { |
||
1470 | // StartPoint = s.StartPoint, |
||
1471 | // MidPoint = s.MP, |
||
1472 | // EndPoint = s.EndPoint, |
||
1473 | // isTransOn = s.IsTrans, |
||
1474 | // DashSize = s.DashSize, |
||
1475 | // PointSet = s.PointSet, |
||
1476 | // StrokeColor = new SolidColorBrush(Colors.Red), |
||
1477 | // LineSize = Convert.ToDouble(data2.First()), |
||
1478 | // }; |
||
1479 | // Layer.Children.Add(instance); |
||
1480 | // instance.ApplyTemplate(); |
||
1481 | // instance.SetArcPath(); |
||
1482 | // } |
||
1483 | // break; |
||
1484 | // #endregion |
||
1485 | // #region Sign |
||
1486 | // case "SignControl": |
||
1487 | // { |
||
1488 | // using (S_SignControl s = JsonSerializerHelper.JsonDeserialize<S_SignControl>(item)) |
||
1489 | // { |
||
1490 | // ImageSource img; |
||
1491 | |||
1492 | |||
1493 | // SignControl instance_Sign = new SignControl |
||
1494 | // { |
||
1495 | // Angle = s.Angle, |
||
1496 | // UserNumber = s.UserNumber, |
||
1497 | // StartPoint = s.StartPoint, |
||
1498 | // TopRightPoint = s.TR, |
||
1499 | // EndPoint = s.EndPoint, |
||
1500 | // LeftBottomPoint = s.LB, |
||
1501 | // PointSet = s.PointSet, |
||
1502 | // }; |
||
1503 | |||
1504 | |||
1505 | // try |
||
1506 | // { |
||
1507 | // this.SignSet.TryGetValue(s.UserNumber, out img); |
||
1508 | // instance_Sign.SignImage = img; |
||
1509 | // } |
||
1510 | // catch (Exception) |
||
1511 | // { |
||
1512 | // SignUserSet.Add(instance_Sign); |
||
1513 | // this.GetSignImageLoaded(SignUserSet); |
||
1514 | // } |
||
1515 | // Layer.Children.Add(instance_Sign); |
||
1516 | // instance_Sign.ApplyTemplate(); |
||
1517 | // instance_Sign.SetImage(); |
||
1518 | // } |
||
1519 | // } |
||
1520 | // break; |
||
1521 | // #endregion |
||
1522 | // #region Date |
||
1523 | // case "DateControl": |
||
1524 | // { |
||
1525 | // using (S_DateControl s = JsonSerializerHelper.JsonDeserialize<S_DateControl>(item)) |
||
1526 | // { |
||
1527 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1528 | // DateControl instance = new DateControl |
||
1529 | // { |
||
1530 | // Angle = s.Angle, |
||
1531 | // StartPoint = s.StartPoint, |
||
1532 | // EndPoint = s.EndPoint, |
||
1533 | // LeftBottomPoint = s.LB, |
||
1534 | // TopRightPoint = s.TR, |
||
1535 | // Opacity = s.Opac, |
||
1536 | // FontColor = new SolidColorBrush(Colors.Red), |
||
1537 | // LineSize = Convert.ToDouble(data2.First()), |
||
1538 | // Text = s.Text, |
||
1539 | // PointSet = s.PointSet, |
||
1540 | // }; |
||
1541 | |||
1542 | // Layer.Children.Add(instance); |
||
1543 | // instance.ApplyTemplate(); |
||
1544 | // instance.SetDate(); |
||
1545 | // } |
||
1546 | // } |
||
1547 | // break; |
||
1548 | // #endregion |
||
1549 | // #region Symbol |
||
1550 | // case "SymControl": |
||
1551 | // using (S_SymControl s = JsonSerializerHelper.JsonDeserialize<S_SymControl>(item)) |
||
1552 | // { |
||
1553 | |||
1554 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1555 | // StringToPathConverter sm = new StringToPathConverter(); |
||
1556 | // SymControl instance = new SymControl() |
||
1557 | // { |
||
1558 | // LineSize = Convert.ToDouble(data2.First()), |
||
1559 | // PointSet = s.PointSet, |
||
1560 | // Paint = s.PaintState, |
||
1561 | // StartPoint = s.StartPoint, |
||
1562 | // StrokeColor = new SolidColorBrush(Colors.Red), |
||
1563 | // EndPoint = s.EndPoint, |
||
1564 | // Angle = s.Angle, |
||
1565 | // LeftBottomPoint = s.LB, |
||
1566 | // TopRightPoint = s.TR, |
||
1567 | // PathData = sm.Convert(s.PathInfo.ToString()), |
||
1568 | // Opacity = s.Opac, |
||
1569 | // }; |
||
1570 | // Layer.Children.Add(instance); |
||
1571 | // instance.ApplyTemplate(); |
||
1572 | // instance.SetSymPath(); |
||
1573 | // } |
||
1574 | // break; |
||
1575 | // #endregion |
||
1576 | // #region Image |
||
1577 | // case "ImgControl": |
||
1578 | // using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item)) |
||
1579 | // { |
||
1580 | // ImgControl instance = new ImgControl |
||
1581 | // { |
||
1582 | // Angle = s.Angle, |
||
1583 | // StartPoint = s.StartPoint, |
||
1584 | // TopRightPoint = s.TR, |
||
1585 | // EndPoint = s.EndPoint, |
||
1586 | // LeftBottomPoint = s.LB, |
||
1587 | // PointSet = s.PointSet, |
||
1588 | // Opacity = s.Opac, |
||
1589 | // FilePath = s.ImagePath, |
||
1590 | // }; |
||
1591 | // Layer.Children.Add(instance); |
||
1592 | // instance.ApplyTemplate(); |
||
1593 | // instance.ImageData = new BitmapImage(new Uri(s.ImagePath)); |
||
1594 | // instance.SetImage(); |
||
1595 | // } |
||
1596 | // break; |
||
1597 | // #endregion |
||
1598 | // #region SymbolN |
||
1599 | // case "SymControlN": |
||
1600 | // using (S_SymControlN s = JsonSerializerHelper.JsonDeserialize<S_SymControlN>(item)) |
||
1601 | // { |
||
1602 | // SymControlN instance = new SymControlN() |
||
1603 | // { |
||
1604 | // PointSet = s.PointSet, |
||
1605 | // StartPoint = s.StartPoint, |
||
1606 | // EndPoint = s.EndPoint, |
||
1607 | // Angle = s.Angle, |
||
1608 | // LeftBottomPoint = s.LB, |
||
1609 | // TopRightPoint = s.TR, |
||
1610 | // Opacity = s.Opac, |
||
1611 | // //PathXathData = s.DBData, |
||
1612 | // }; |
||
1613 | |||
1614 | // Layer.Children.Add(instance); |
||
1615 | // instance.ApplyTemplate(); |
||
1616 | // instance.PathXathData = JsonSerializerHelper.UnCompressString_NonPrefix(s.DBData); |
||
1617 | // object obj = XamlReader.Load(JsonSerializerHelper.UnCompressString_NonPrefix(instance.PathXathData)); |
||
1618 | // instance.Base_ViewBox.Child = obj as UIElement; |
||
1619 | // instance.SetViewBox(); |
||
1620 | // } |
||
1621 | // break; |
||
1622 | // #endregion |
||
1623 | // #region Ink |
||
1624 | // case "InkPresenter": |
||
1625 | // using (S_PensilControl s = JsonSerializerHelper.JsonDeserialize<S_PensilControl>(item)) |
||
1626 | // { |
||
1627 | // this._InkBoard.Strokes = s.SCC; |
||
1628 | // } |
||
1629 | // break; |
||
1630 | // #endregion |
||
1631 | // #region Poly |
||
1632 | // case "PolyControl": |
||
1633 | // using (S_PolyControl s = JsonSerializerHelper.JsonDeserialize<S_PolyControl>(item)) |
||
1634 | // { |
||
1635 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1636 | // PolyControl instance = new PolyControl() |
||
1637 | // { |
||
1638 | // //LineSize = Convert.ToDouble(data2.First()), |
||
1639 | // LineSize = LineSize, |
||
1640 | // PointSet = s.PointSet, |
||
1641 | // PointC = s.PointC, |
||
1642 | // StartPoint = s.StartPoint, |
||
1643 | // EndPoint = s.EndPoint, |
||
1644 | // Opacity = s.Opac, |
||
1645 | // }; |
||
1646 | // Layer.Children.Add(instance); |
||
1647 | // instance.ApplyTemplate(); |
||
1648 | // instance.SetPolyPath(); |
||
1649 | // }; |
||
1650 | // break; |
||
1651 | // #endregion |
||
1652 | // default: |
||
1653 | // break; |
||
1654 | // }; |
||
1655 | |||
1656 | // foreach (var copyData in CopyDataSet) |
||
1657 | // { |
||
1658 | // Layer.Children.Remove(copyData); |
||
1659 | // } |
||
1660 | // } |
||
1661 | // } |
||
1662 | // } |
||
1663 | |||
1664 | |||
1665 | // /// <summary> |
||
1666 | // /// 복사전용 |
||
1667 | // /// </summary> |
||
1668 | // /// <param name="MarkupString"></param> |
||
1669 | // /// <param name="Layer"></param> |
||
1670 | // /// <param name="ToolTipMessage"></param> |
||
1671 | // public MarkupEditToolKit.Adorner.AdornerFinal markupParseToAdorner(string MarkupString, Canvas Layer, string ToolTipMessage) |
||
1672 | // { |
||
1673 | // MarkupEditToolKit.Adorner.AdornerFinal af = new Adorner.AdornerFinal(); |
||
1674 | // { |
||
1675 | // if (MarkupString != "False") |
||
1676 | // { |
||
1677 | // SignUserSet = new List<SignControl>(); |
||
1678 | // CopyDataSet = new List<UIElement>(); |
||
1679 | // string[] delimiterChars = { "|DZ|" }; |
||
1680 | // string[] delimiterChars2 = { "|" }; |
||
1681 | // string[] data = MarkupString.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); |
||
1682 | // //ServiceDeepViewClient client = new ServiceDeepViewClient(this._Basebinding, this._BaseEndPoint); |
||
1683 | // List<string> dataSet = new List<string>(); |
||
1684 | // foreach (var dataPease in data) |
||
1685 | // { |
||
1686 | // var item = JsonSerializerHelper.UnCompressString(dataPease); //언패킹작업 |
||
1687 | // var unkownControl = JsonSerializerHelper.JsonDeserialize<S_BaseControl>(item); //복호화작업 |
||
1688 | // switch (unkownControl.Name) |
||
1689 | // { |
||
1690 | // #region Arrow |
||
1691 | // case "ArrowControl": |
||
1692 | // using (S_ArrowControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl>(item)) |
||
1693 | // { |
||
1694 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1695 | // ArrowControl instance = new ArrowControl |
||
1696 | // { |
||
1697 | // LineSize = Convert.ToDouble(data2.First()), |
||
1698 | // ArrowStyle = s.ArStyle, |
||
1699 | // StartPoint = s.StartPoint, |
||
1700 | // DimSize = s.DimSize, |
||
1701 | // EndPoint = s.EndPoint, |
||
1702 | // DashSize = s.DashSize, |
||
1703 | // PointSet = s.PointSet, |
||
1704 | |||
1705 | // StrokeColor = new SolidColorBrush(Colors.Red) |
||
1706 | // }; |
||
1707 | // Layer.Children.Add(instance); |
||
1708 | // CopyDataSet.Add(instance); |
||
1709 | // instance.ApplyTemplate(); |
||
1710 | // instance.SetArrowPath(); |
||
1711 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
1712 | |||
1713 | // } |
||
1714 | // break; |
||
1715 | // #endregion |
||
1716 | // #region RectCloud |
||
1717 | // case "RectCloudControl": |
||
1718 | // using (S_RectCloudControl s = JsonSerializerHelper.JsonDeserialize<S_RectCloudControl>(item)) |
||
1719 | // { |
||
1720 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1721 | // RectCloudControl instance = new RectCloudControl() |
||
1722 | // { |
||
1723 | // StartPoint = s.StartPoint, |
||
1724 | // EndPoint = s.EndPoint, |
||
1725 | // LeftBottomPoint = s.LB, |
||
1726 | // Paint = s.PaintState, |
||
1727 | // Opacity = s.Opac, |
||
1728 | // TopRightPoint = s.TR, |
||
1729 | // PointSet = s.PointSet, |
||
1730 | // DashSize = s.DashSize, |
||
1731 | // StrokeColor = new SolidColorBrush(Colors.Red), |
||
1732 | // LineSize = Convert.ToDouble(data2.First()), |
||
1733 | // }; |
||
1734 | // Layer.Children.Add(instance); |
||
1735 | // instance.ApplyTemplate(); |
||
1736 | // CopyDataSet.Add(instance); |
||
1737 | // instance.SetRectCloud(); |
||
1738 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
1739 | // } |
||
1740 | // break; |
||
1741 | // #endregion |
||
1742 | // #region ArrowText |
||
1743 | // case "ArrowTextControl": |
||
1744 | // using (S_ArrowTextControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowTextControl>(item)) |
||
1745 | // { |
||
1746 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1747 | // ArrowTextControl instance = new ArrowTextControl(); |
||
1748 | // Layer.Children.Add(instance); |
||
1749 | // instance.LineSize = Convert.ToDouble(data2.First()); |
||
1750 | // instance.PointSet = s.PointSet; |
||
1751 | // instance.StartPoint = s.StartPoint; |
||
1752 | // instance.EndPoint = s.EndPoint; |
||
1753 | // instance.StrokeColor = new SolidColorBrush(Colors.Red); |
||
1754 | // instance.DashSize = s.DashSize; |
||
1755 | // instance.ArrowTextStyle = s.ArrowStyle; |
||
1756 | // instance.ArrowText = s.ArrowText; |
||
1757 | // instance.BorderSize = s.BorderSize; |
||
1758 | // instance.isFixed = s.isFixed; |
||
1759 | // instance.BoxWidth = s.BoxWidth; |
||
1760 | // instance.BoxHeight = s.BoxHeight; |
||
1761 | // instance.isHighLight = s.isHighLight; |
||
1762 | // instance.ApplyTemplate(); |
||
1763 | // instance.SetArrowTextPath(); |
||
1764 | // instance.isTrans = s.isTrans; |
||
1765 | // instance.MidPoint = s.MP; |
||
1766 | // instance.Angle = s.Angle; |
||
1767 | // if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
1768 | // { |
||
1769 | // s.fontConfig = new List<string>(); |
||
1770 | |||
1771 | // s.fontConfig.Add("Arial"); |
||
1772 | // s.fontConfig.Add("Normal"); |
||
1773 | // s.fontConfig.Add("Normal"); |
||
1774 | // s.fontConfig.Add("30"); |
||
1775 | // } |
||
1776 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
1777 | // instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
1778 | // instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
1779 | // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
1780 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
1781 | // CopyDataSet.Add(instance); |
||
1782 | // instance.ApplyTemplate(); |
||
1783 | // instance.SetArrowTextPath(); |
||
1784 | // }; |
||
1785 | |||
1786 | // break; |
||
1787 | // #endregion |
||
1788 | // #region Arrow_Multi |
||
1789 | // case "ArrowControl_Multi": |
||
1790 | // using (S_ArrowControl_Multi s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(item)) |
||
1791 | // { |
||
1792 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1793 | // ArrowControl_Multi instance = new ArrowControl_Multi |
||
1794 | // { |
||
1795 | // LineSize = Convert.ToDouble(data2.First()), |
||
1796 | // StartPoint = s.StartPoint, |
||
1797 | // MiddlePoint = s.MP, |
||
1798 | // DashSize = s.DashSize, |
||
1799 | // EndPoint = s.EndPoint, |
||
1800 | // PointSet = s.PointSet, |
||
1801 | // StrokeColor = new SolidColorBrush(Colors.Red) |
||
1802 | // }; |
||
1803 | // Layer.Children.Add(instance); |
||
1804 | // CopyDataSet.Add(instance); |
||
1805 | // instance.ApplyTemplate(); |
||
1806 | // instance.SetArrowMultiPath(); |
||
1807 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
1808 | |||
1809 | // } |
||
1810 | // break; |
||
1811 | // #endregion |
||
1812 | // #region Rectangle |
||
1813 | // case "RectagleControl": |
||
1814 | // using (S_RectControl s = JsonSerializerHelper.JsonDeserialize<S_RectControl>(item)) |
||
1815 | // { |
||
1816 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1817 | // RectagleControl instance = new RectagleControl |
||
1818 | // { |
||
1819 | // LineSize = Convert.ToDouble(data2.First()), |
||
1820 | // Paint = s.PaintState, |
||
1821 | // StartPoint = s.StartPoint, |
||
1822 | // EndPoint = s.EndPoint, |
||
1823 | // Angle = s.Angle, |
||
1824 | // LeftBottomPoint = s.LB, |
||
1825 | // TopRightPoint = s.TR, |
||
1826 | // Opacity = s.Opac, |
||
1827 | // PointSet = s.PointSet, |
||
1828 | // DashSize = s.DashSize |
||
1829 | // }; |
||
1830 | // Layer.Children.Add(instance); |
||
1831 | // CopyDataSet.Add(instance); |
||
1832 | // instance.ApplyTemplate(); |
||
1833 | // instance.SetRectPath(); |
||
1834 | // } |
||
1835 | // break; |
||
1836 | // #endregion |
||
1837 | // #region Triangle |
||
1838 | // case "TriControl": |
||
1839 | // using (S_TriControl s = JsonSerializerHelper.JsonDeserialize<S_TriControl>(item)) |
||
1840 | // { |
||
1841 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1842 | // TriControl instance = new TriControl |
||
1843 | // { |
||
1844 | // LineSize = Convert.ToDouble(data2.First()), |
||
1845 | // MidPoint = s.MP, |
||
1846 | // Paint = s.Paint, |
||
1847 | // StartPoint = s.StartPoint, |
||
1848 | // EndPoint = s.EndPoint, |
||
1849 | // Angle = s.Angle, |
||
1850 | // DashSize = s.DashSize, |
||
1851 | // PointSet = s.PointSet |
||
1852 | // }; |
||
1853 | // Layer.Children.Add(instance); |
||
1854 | // CopyDataSet.Add(instance); |
||
1855 | // instance.ApplyTemplate(); |
||
1856 | // instance.SetTri(); |
||
1857 | // } |
||
1858 | // break; |
||
1859 | // #endregion |
||
1860 | // #region Cicle |
||
1861 | // case "CicleControl": |
||
1862 | // using (S_CicleControl s = JsonSerializerHelper.JsonDeserialize<S_CicleControl>(item)) |
||
1863 | // { |
||
1864 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1865 | // CicleControl instance = new CicleControl |
||
1866 | // { |
||
1867 | // LineSize = Convert.ToDouble(data2.First()), |
||
1868 | // Paint = s.PaintState, |
||
1869 | // StartPoint = s.StartPoint, |
||
1870 | // EndPoint = s.EndPoint, |
||
1871 | // LeftBottomPoint = s.LBP, |
||
1872 | // TopRightPoint = s.TRP, |
||
1873 | // Angle = s.Angle, |
||
1874 | // DashSize = s.DashSize, |
||
1875 | // PointSet = s.PointSet, |
||
1876 | // }; |
||
1877 | // Layer.Children.Add(instance); |
||
1878 | // CopyDataSet.Add(instance); |
||
1879 | // instance.ApplyTemplate(); |
||
1880 | // instance.SetCicle(); |
||
1881 | // } |
||
1882 | // break; |
||
1883 | // #endregion |
||
1884 | // #region Cloud |
||
1885 | // case "CloudControl": |
||
1886 | // using (S_CloudControl s = JsonSerializerHelper.JsonDeserialize<S_CloudControl>(item)) |
||
1887 | // { |
||
1888 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1889 | // CloudControl instance = new CloudControl |
||
1890 | // { |
||
1891 | // LineSize = Convert.ToDouble(data2.First()), |
||
1892 | // Toler = s.Toler, |
||
1893 | // PointSet = new List<Point>(), |
||
1894 | // ArcLength = s.ArcLength, |
||
1895 | // Paint = s.PaintState, |
||
1896 | // isTransOn = s.IsTrans, |
||
1897 | // DashSize = s.DashSize, |
||
1898 | // isChain = s.IsChain, |
||
1899 | // //Fill = s.CloudFill, |
||
1900 | // }; |
||
1901 | |||
1902 | // Layer.Children.Add(instance); |
||
1903 | // CopyDataSet.Add(instance); |
||
1904 | // instance.ApplyTemplate(); |
||
1905 | // instance.PointSet = s.pointSet; |
||
1906 | // instance.ClosePath(); |
||
1907 | // } |
||
1908 | // break; |
||
1909 | // #endregion |
||
1910 | // #region Line |
||
1911 | // case "LineControl": |
||
1912 | // using (S_LineControl s = JsonSerializerHelper.JsonDeserialize<S_LineControl>(item)) |
||
1913 | // { |
||
1914 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1915 | // LineControl instance = new LineControl() |
||
1916 | // { |
||
1917 | // LineStyle = s.LnSet, |
||
1918 | // StartPoint = s.StartPoint, |
||
1919 | // EndPoint = s.EndPoint, |
||
1920 | // DashSize = s.DashSize, |
||
1921 | // Interval = s.Interval, |
||
1922 | // PointSet = s.PointSet, |
||
1923 | // StrokeColor = new SolidColorBrush(Colors.Red), |
||
1924 | // LineSize = Convert.ToDouble(data2.First()), |
||
1925 | // }; |
||
1926 | // Layer.Children.Add(instance); |
||
1927 | // CopyDataSet.Add(instance); |
||
1928 | // instance.ApplyTemplate(); |
||
1929 | // instance.SetLinePath(); |
||
1930 | // } |
||
1931 | // break; |
||
1932 | // #endregion |
||
1933 | // #region SymbolN |
||
1934 | // case "SymControlN": |
||
1935 | // using (S_SymControlN s = JsonSerializerHelper.JsonDeserialize<S_SymControlN>(item)) |
||
1936 | // { |
||
1937 | // SymControlN instance = new SymControlN() |
||
1938 | // { |
||
1939 | // PointSet = s.PointSet, |
||
1940 | // StartPoint = s.StartPoint, |
||
1941 | // EndPoint = s.EndPoint, |
||
1942 | // Angle = s.Angle, |
||
1943 | // LeftBottomPoint = s.LB, |
||
1944 | // TopRightPoint = s.TR, |
||
1945 | // Opacity = s.Opac, |
||
1946 | // //PathXathData = s.DBData, |
||
1947 | // }; |
||
1948 | // Layer.Children.Add(instance); |
||
1949 | // CopyDataSet.Add(instance); |
||
1950 | // instance.ApplyTemplate(); |
||
1951 | // instance.PathXathData = JsonSerializerHelper.UnCompressString_NonPrefix(s.DBData); |
||
1952 | // object obj = XamlReader.Load(instance.PathXathData); |
||
1953 | // instance.Base_ViewBox.Child = obj as UIElement; |
||
1954 | // instance.SetViewBox(); |
||
1955 | // } |
||
1956 | // break; |
||
1957 | // #endregion |
||
1958 | // #region Text |
||
1959 | // case "TextControl": |
||
1960 | // using (S_TextControl s = JsonSerializerHelper.JsonDeserialize<S_TextControl>(item)) |
||
1961 | // { |
||
1962 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
1963 | // TextControl instance = new TextControl() |
||
1964 | // { |
||
1965 | // Text = s.Text, |
||
1966 | // StartPoint = s.StartPoint, |
||
1967 | // EndPoint = s.EndPoint, |
||
1968 | // LineSize = new Thickness(Convert.ToDouble(data2.First())), |
||
1969 | // TextSize = Convert.ToDouble(data2[1]), |
||
1970 | // FontColor = new SolidColorBrush(StringToColorConverter.Parse(s.FontColor)), |
||
1971 | // FontSize = 10, |
||
1972 | // Angle = s.Angle, |
||
1973 | // Paint = s.PaintState, |
||
1974 | // PointSet = s.PointSet, |
||
1975 | // isHighLight = s.isHighLight, |
||
1976 | // TextFamily = new FontFamily(s.fontConfig[0]), |
||
1977 | // TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]), |
||
1978 | // TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]), |
||
1979 | // }; |
||
1980 | |||
1981 | // instance.SetText(); |
||
1982 | // CopyDataSet.Add(instance); |
||
1983 | // Layer.Children.Add(instance); |
||
1984 | // if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
1985 | // { |
||
1986 | // s.fontConfig = new List<string>(); |
||
1987 | |||
1988 | // s.fontConfig.Add("Arial"); |
||
1989 | // s.fontConfig.Add("Normal"); |
||
1990 | // s.fontConfig.Add("Normal"); |
||
1991 | // s.fontConfig.Add("30"); |
||
1992 | // } |
||
1993 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
1994 | // instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
1995 | // instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
1996 | |||
1997 | // if (s.fontConfig.Count == 3) |
||
1998 | // { |
||
1999 | // instance.TextSize = 30; |
||
2000 | // } |
||
2001 | // else |
||
2002 | // { |
||
2003 | // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
2004 | // } |
||
2005 | // instance.ApplyTemplate(); |
||
2006 | // if (s.fontConfig.Count() == 4) |
||
2007 | // { |
||
2008 | // instance.UnderLine = TextDecorations.Underline; |
||
2009 | // instance.Base_TextBlock.TextDecorations = instance.UnderLine; |
||
2010 | // } |
||
2011 | // instance.Base_TextBlock.Margin = new Thickness(instance.Base_TextBox.Margin.Left + 4); |
||
2012 | // instance.Base_TextBox.Visibility = Visibility.Collapsed; |
||
2013 | // } |
||
2014 | // break; |
||
2015 | // #endregion |
||
2016 | // #region Arc |
||
2017 | // case "ArcControl": |
||
2018 | // using (S_ArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArcControl>(item)) |
||
2019 | // { |
||
2020 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2021 | // ArcControl instance = new ArcControl() |
||
2022 | // { |
||
2023 | // StartPoint = s.StartPoint, |
||
2024 | // MidPoint = s.MP, |
||
2025 | // EndPoint = s.EndPoint, |
||
2026 | // DashSize = s.DashSize, |
||
2027 | // isTransOn = s.IsTrans, |
||
2028 | // PointSet = s.PointSet, |
||
2029 | // StrokeColor = new SolidColorBrush(Colors.Red), |
||
2030 | // LineSize = Convert.ToDouble(data2.First()), |
||
2031 | // }; |
||
2032 | // Layer.Children.Add(instance); |
||
2033 | // CopyDataSet.Add(instance); |
||
2034 | // instance.ApplyTemplate(); |
||
2035 | // instance.SetArcPath(); |
||
2036 | // } |
||
2037 | // break; |
||
2038 | // #endregion |
||
2039 | // #region Sign |
||
2040 | // case "SignControl": |
||
2041 | // { |
||
2042 | // using (S_SignControl s = JsonSerializerHelper.JsonDeserialize<S_SignControl>(item)) |
||
2043 | // { |
||
2044 | // ImageSource img; |
||
2045 | |||
2046 | |||
2047 | // SignControl instance_Sign = new SignControl |
||
2048 | // { |
||
2049 | // Angle = s.Angle, |
||
2050 | // UserNumber = s.UserNumber, |
||
2051 | // StartPoint = s.StartPoint, |
||
2052 | // TopRightPoint = s.TR, |
||
2053 | // EndPoint = s.EndPoint, |
||
2054 | // LeftBottomPoint = s.LB, |
||
2055 | // PointSet = s.PointSet, |
||
2056 | // }; |
||
2057 | |||
2058 | |||
2059 | // try |
||
2060 | // { |
||
2061 | // this.SignSet.TryGetValue(s.UserNumber, out img); |
||
2062 | // instance_Sign.SignImage = img; |
||
2063 | // } |
||
2064 | // catch (Exception) |
||
2065 | // { |
||
2066 | // SignUserSet.Add(instance_Sign); |
||
2067 | // this.GetSignImageLoaded(SignUserSet); |
||
2068 | // } |
||
2069 | // Layer.Children.Add(instance_Sign); |
||
2070 | // CopyDataSet.Add(instance_Sign); |
||
2071 | // instance_Sign.ApplyTemplate(); |
||
2072 | // instance_Sign.SetImage(); |
||
2073 | // } |
||
2074 | // } |
||
2075 | // break; |
||
2076 | // #endregion |
||
2077 | // #region Date |
||
2078 | // case "DateControl": |
||
2079 | // { |
||
2080 | // using (S_DateControl s = JsonSerializerHelper.JsonDeserialize<S_DateControl>(item)) |
||
2081 | // { |
||
2082 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2083 | // DateControl instance = new DateControl |
||
2084 | // { |
||
2085 | // Angle = s.Angle, |
||
2086 | // StartPoint = s.StartPoint, |
||
2087 | // EndPoint = s.EndPoint, |
||
2088 | // LeftBottomPoint = s.LB, |
||
2089 | // TopRightPoint = s.TR, |
||
2090 | // Opacity = s.Opac, |
||
2091 | // FontColor = new SolidColorBrush(Colors.Red), |
||
2092 | // LineSize = Convert.ToDouble(data2.First()), |
||
2093 | // Text = s.Text, |
||
2094 | // PointSet = s.PointSet, |
||
2095 | // }; |
||
2096 | |||
2097 | // Layer.Children.Add(instance); |
||
2098 | // CopyDataSet.Add(instance); |
||
2099 | // instance.ApplyTemplate(); |
||
2100 | // instance.SetDate(); |
||
2101 | // } |
||
2102 | // } |
||
2103 | // break; |
||
2104 | // #endregion |
||
2105 | // #region Symbol |
||
2106 | // case "SymControl": |
||
2107 | // using (S_SymControl s = JsonSerializerHelper.JsonDeserialize<S_SymControl>(item)) |
||
2108 | // { |
||
2109 | |||
2110 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2111 | // StringToPathConverter sm = new StringToPathConverter(); |
||
2112 | // SymControl instance = new SymControl() |
||
2113 | // { |
||
2114 | // LineSize = Convert.ToDouble(data2.First()), |
||
2115 | // PointSet = s.PointSet, |
||
2116 | // Paint = s.PaintState, |
||
2117 | // StartPoint = s.StartPoint, |
||
2118 | // StrokeColor = new SolidColorBrush(Colors.Red), |
||
2119 | // EndPoint = s.EndPoint, |
||
2120 | // Angle = s.Angle, |
||
2121 | // LeftBottomPoint = s.LB, |
||
2122 | // TopRightPoint = s.TR, |
||
2123 | // PathData = sm.Convert(s.PathInfo.ToString()), |
||
2124 | // Opacity = s.Opac, |
||
2125 | // }; |
||
2126 | // Layer.Children.Add(instance); |
||
2127 | // CopyDataSet.Add(instance); |
||
2128 | // instance.ApplyTemplate(); |
||
2129 | // instance.SetSymPath(); |
||
2130 | // } |
||
2131 | // break; |
||
2132 | // #endregion |
||
2133 | // #region Ink |
||
2134 | // case "InkPresenter": |
||
2135 | // using (S_PensilControl s = JsonSerializerHelper.JsonDeserialize<S_PensilControl>(item)) |
||
2136 | // { |
||
2137 | // this._InkBoard.Strokes = s.SCC; |
||
2138 | // } |
||
2139 | // break; |
||
2140 | // #endregion |
||
2141 | // #region Poly |
||
2142 | // case "PolyControl": |
||
2143 | // using (S_PolyControl s = JsonSerializerHelper.JsonDeserialize<S_PolyControl>(item)) |
||
2144 | // { |
||
2145 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2146 | // PolyControl instance = new PolyControl() |
||
2147 | // { |
||
2148 | // //LineSize = Convert.ToDouble(data2.First()), |
||
2149 | // LineSize = LineSize, |
||
2150 | // PointSet = s.PointSet, |
||
2151 | // PointC = s.PointC, |
||
2152 | // StartPoint = s.StartPoint, |
||
2153 | // EndPoint = s.EndPoint, |
||
2154 | // Opacity = s.Opac, |
||
2155 | // }; |
||
2156 | // Layer.Children.Add(instance); |
||
2157 | // CopyDataSet.Add(instance); |
||
2158 | // instance.ApplyTemplate(); |
||
2159 | // instance.SetPolyPath(); |
||
2160 | // }; |
||
2161 | // break; |
||
2162 | // #endregion |
||
2163 | // #region Image |
||
2164 | // case "ImgControl": |
||
2165 | // using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item)) |
||
2166 | // { |
||
2167 | // ImgControl instance = new ImgControl |
||
2168 | // { |
||
2169 | // Angle = s.Angle, |
||
2170 | // StartPoint = s.StartPoint, |
||
2171 | // TopRightPoint = s.TR, |
||
2172 | // EndPoint = s.EndPoint, |
||
2173 | // LeftBottomPoint = s.LB, |
||
2174 | // PointSet = s.PointSet, |
||
2175 | // Opacity = s.Opac, |
||
2176 | // FilePath = s.ImagePath, |
||
2177 | // }; |
||
2178 | // Layer.Children.Add(instance); |
||
2179 | // instance.ApplyTemplate(); |
||
2180 | // instance.ImageData = new BitmapImage(new Uri(s.ImagePath)); |
||
2181 | // CopyDataSet.Add(instance); |
||
2182 | // instance.SetImage(); |
||
2183 | // } |
||
2184 | // break; |
||
2185 | // #endregion |
||
2186 | |||
2187 | // default: |
||
2188 | // break; |
||
2189 | // }; |
||
2190 | // } |
||
2191 | // } |
||
2192 | |||
2193 | |||
2194 | // foreach (var item in CopyDataSet) |
||
2195 | // { |
||
2196 | // Layer.Children.Remove(item); |
||
2197 | // af.addMemberControl(item); |
||
2198 | // } |
||
2199 | // } |
||
2200 | // return af; |
||
2201 | // } |
||
2202 | |||
2203 | // public SolidColorBrush GetUserColor_KCOM(List<CommonLib.DisplayColorInfo> dc, string UserID) |
||
2204 | // { |
||
2205 | // var item = dc.Where(p => p.UserID == UserID).FirstOrDefault(); |
||
2206 | // if (item != null) |
||
2207 | // { |
||
2208 | // return new SolidColorBrush(StringToColorConverter.Parse(item.DisplayColor)); |
||
2209 | // } |
||
2210 | // else |
||
2211 | // { |
||
2212 | // return new SolidColorBrush(Colors.Red); |
||
2213 | // } |
||
2214 | |||
2215 | // } |
||
2216 | |||
2217 | // /// <summary> |
||
2218 | // /// 데이터베이스의 마크업데이터를 컨트롤로 변환한다. |
||
2219 | // /// </summary> |
||
2220 | // /// <param name="MarkupString"></param> |
||
2221 | // public void markupParsePrint(string MarkupString, Canvas Layer, string DisplayColor,List<CommonLib.DisplayColorInfo> dc,string ToolTipMessage) |
||
2222 | // { |
||
2223 | // if (MarkupString != "False") |
||
2224 | // { |
||
2225 | |||
2226 | // SolidColorBrush _SetColor = new SolidColorBrush(StringToColorConverter.Parse(DisplayColor)); |
||
2227 | // //SolidColorBrush _SetColor = new SolidColorBrush(Colors.Red); |
||
2228 | // string[] delimiterChars = { "|DZ|" }; |
||
2229 | // string[] delimiterChars2 = { "|" }; |
||
2230 | // string[] data = MarkupString.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); |
||
2231 | // List<string> dataSet = new List<string>(); |
||
2232 | |||
2233 | // foreach (var dataPease in data) |
||
2234 | // { |
||
2235 | // var item = JsonSerializerHelper.UnCompressString(dataPease); //언패킹작업 |
||
2236 | // var unkownControl = JsonSerializerHelper.JsonDeserialize<S_BaseControl>(item); //복호화작업 |
||
2237 | // switch (unkownControl.Name) |
||
2238 | // { |
||
2239 | // #region Arrow |
||
2240 | // case "ArrowControl": |
||
2241 | // using (S_ArrowControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl>(item)) |
||
2242 | // { |
||
2243 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2244 | // ArrowControl instance = new ArrowControl |
||
2245 | // { |
||
2246 | // LineSize = Convert.ToDouble(data2.First()), |
||
2247 | // ArrowStyle = s.ArStyle, |
||
2248 | // DimSize = s.DimSize, |
||
2249 | // StartPoint = s.StartPoint, |
||
2250 | // EndPoint = s.EndPoint, |
||
2251 | // DashSize = s.DashSize, |
||
2252 | // UserID = s.UserID, |
||
2253 | // PointSet = s.PointSet, |
||
2254 | // //StrokeColor = _SetColor, |
||
2255 | // StrokeColor = GetUserColor_KCOM(dc, s.UserID), |
||
2256 | // Opacity = s.Opac, |
||
2257 | // }; |
||
2258 | //#if SILVERLIGHT |
||
2259 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2260 | //#endif |
||
2261 | |||
2262 | // Layer.Children.Add(instance); |
||
2263 | // instance.ApplyTemplate(); |
||
2264 | // instance.SetArrowPath(); |
||
2265 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
2266 | |||
2267 | // } |
||
2268 | // break; |
||
2269 | // #endregion |
||
2270 | // #region ArrowText |
||
2271 | // case "ArrowTextControl": |
||
2272 | // using (S_ArrowTextControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowTextControl>(item)) |
||
2273 | // { |
||
2274 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2275 | // ArrowTextControl instance = new ArrowTextControl(); |
||
2276 | // Layer.Children.Add(instance); |
||
2277 | // instance.LineSize = Convert.ToDouble(data2.First()); |
||
2278 | // instance.PointSet = s.PointSet; |
||
2279 | // instance.StartPoint = s.StartPoint; |
||
2280 | // instance.EndPoint = s.EndPoint; |
||
2281 | // instance.StrokeColor = new SolidColorBrush(Colors.Red); |
||
2282 | // instance.DashSize = s.DashSize; |
||
2283 | // instance.ArrowTextStyle = s.ArrowStyle; |
||
2284 | // instance.isHighLight = s.isHighLight; |
||
2285 | // instance.ArrowText = s.ArrowText; |
||
2286 | // instance.Opacity = s.Opac; |
||
2287 | // instance.BorderSize = s.BorderSize; |
||
2288 | // instance.BoxWidth = s.BoxWidth; |
||
2289 | // instance.BoxHeight = s.BoxHeight; |
||
2290 | // instance.isFixed = s.isFixed; |
||
2291 | // instance.Angle = s.Angle; |
||
2292 | // instance.StrokeColor = _SetColor; |
||
2293 | // instance.isTrans = s.isTrans; |
||
2294 | // instance.UserID = s.UserID; |
||
2295 | // instance.MidPoint = s.MP; |
||
2296 | // if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
2297 | // { |
||
2298 | // s.fontConfig = new List<string>(); |
||
2299 | |||
2300 | // s.fontConfig.Add("Arial"); |
||
2301 | // s.fontConfig.Add("Normal"); |
||
2302 | // s.fontConfig.Add("Normal"); |
||
2303 | // s.fontConfig.Add("30"); |
||
2304 | // } |
||
2305 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
2306 | // instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
2307 | // instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
2308 | // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
2309 | // instance.ApplyTemplate(); |
||
2310 | // instance.SetArrowTextPath(); |
||
2311 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
2312 | // }; |
||
2313 | // break; |
||
2314 | // #endregion |
||
2315 | // #region Arrow_Multi |
||
2316 | // case "ArrowControl_Multi": |
||
2317 | // using (S_ArrowControl_Multi s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(item)) |
||
2318 | // { |
||
2319 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2320 | // ArrowControl_Multi instance = new ArrowControl_Multi |
||
2321 | // { |
||
2322 | // LineSize = Convert.ToDouble(data2.First()), |
||
2323 | // StartPoint = s.StartPoint, |
||
2324 | // MiddlePoint = s.MP, |
||
2325 | // DashSize = s.DashSize, |
||
2326 | // EndPoint = s.EndPoint, |
||
2327 | // UserID = s.UserID, |
||
2328 | // PointSet = s.PointSet, |
||
2329 | // Opacity = s.Opac, |
||
2330 | // StrokeColor = GetUserColor_KCOM(dc, s.UserID), |
||
2331 | // }; |
||
2332 | //#if SILVERLIGHT |
||
2333 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2334 | //#endif |
||
2335 | // Layer.Children.Add(instance); |
||
2336 | // instance.ApplyTemplate(); |
||
2337 | // instance.SetArrowMultiPath(); |
||
2338 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
2339 | |||
2340 | // } |
||
2341 | // break; |
||
2342 | // #endregion |
||
2343 | // #region Rectangle |
||
2344 | // case "RectagleControl": |
||
2345 | // using (S_RectControl s = JsonSerializerHelper.JsonDeserialize<S_RectControl>(item)) |
||
2346 | // { |
||
2347 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2348 | // RectagleControl instance = new RectagleControl |
||
2349 | // { |
||
2350 | // LineSize = Convert.ToDouble(data2.First()), |
||
2351 | // Paint = s.PaintState, |
||
2352 | // StartPoint = s.StartPoint, |
||
2353 | // EndPoint = s.EndPoint, |
||
2354 | // Angle = s.Angle, |
||
2355 | // UserID = s.UserID, |
||
2356 | // StrokeColor = _SetColor, |
||
2357 | // DashSize = s.DashSize, |
||
2358 | // Opacity = s.Opac, |
||
2359 | // LeftBottomPoint = s.LB, |
||
2360 | // TopRightPoint = s.TR, |
||
2361 | // PointSet = s.PointSet |
||
2362 | // }; |
||
2363 | // if (ToolTipService.GetToolTip(instance) == null) |
||
2364 | // { |
||
2365 | //#if SILVERLIGHT |
||
2366 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2367 | //#endif |
||
2368 | // } |
||
2369 | |||
2370 | // Layer.Children.Add(instance); |
||
2371 | // instance.ApplyTemplate(); |
||
2372 | // instance.SetRectPath(); |
||
2373 | // } |
||
2374 | // break; |
||
2375 | // #endregion |
||
2376 | // #region Triangle |
||
2377 | // case "TriControl": |
||
2378 | // using (S_TriControl s = JsonSerializerHelper.JsonDeserialize<S_TriControl>(item)) |
||
2379 | // { |
||
2380 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2381 | // TriControl instance = new TriControl |
||
2382 | // { |
||
2383 | // LineSize = Convert.ToDouble(data2.First()), |
||
2384 | // MidPoint = s.MP, |
||
2385 | // StartPoint = s.StartPoint, |
||
2386 | // Paint = s.Paint, |
||
2387 | // EndPoint = s.EndPoint, |
||
2388 | // Opacity = s.Opac, |
||
2389 | // UserID = s.UserID, |
||
2390 | // Angle = s.Angle, |
||
2391 | // DashSize = s.DashSize, |
||
2392 | // PointSet = s.PointSet, |
||
2393 | // StrokeColor = _SetColor, |
||
2394 | // }; |
||
2395 | //#if SILVERLIGHT |
||
2396 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2397 | //#endif |
||
2398 | // Layer.Children.Add(instance); |
||
2399 | // instance.ApplyTemplate(); |
||
2400 | // instance.SetTri(); |
||
2401 | // } |
||
2402 | // break; |
||
2403 | // #endregion |
||
2404 | // #region Cicle |
||
2405 | // case "CicleControl": |
||
2406 | // using (S_CicleControl s = JsonSerializerHelper.JsonDeserialize<S_CicleControl>(item)) |
||
2407 | // { |
||
2408 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2409 | // CicleControl instance = new CicleControl |
||
2410 | // { |
||
2411 | // LineSize = Convert.ToDouble(data2.First()), |
||
2412 | // Paint = s.PaintState, |
||
2413 | // StartPoint = s.StartPoint, |
||
2414 | // EndPoint = s.EndPoint, |
||
2415 | // LeftBottomPoint = s.LBP, |
||
2416 | // TopRightPoint = s.TRP, |
||
2417 | // UserID = s.UserID, |
||
2418 | // Opacity = s.Opac, |
||
2419 | // Angle = s.Angle, |
||
2420 | // DashSize = s.DashSize, |
||
2421 | // PointSet = s.PointSet, |
||
2422 | // StrokeColor = _SetColor, |
||
2423 | // }; |
||
2424 | //#if SILVERLIGHT |
||
2425 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2426 | //#endif |
||
2427 | // Layer.Children.Add(instance); |
||
2428 | // instance.ApplyTemplate(); |
||
2429 | // instance.SetCicle(); |
||
2430 | // } |
||
2431 | // break; |
||
2432 | // #endregion |
||
2433 | // #region Cloud |
||
2434 | // case "CloudControl": |
||
2435 | // using (S_CloudControl s = JsonSerializerHelper.JsonDeserialize<S_CloudControl>(item)) |
||
2436 | // { |
||
2437 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2438 | // CloudControl instance = new CloudControl |
||
2439 | // { |
||
2440 | // LineSize = Convert.ToDouble(data2.First()), |
||
2441 | // Toler = s.Toler, |
||
2442 | // PointSet = new List<Point>(), |
||
2443 | // ArcLength = s.ArcLength, |
||
2444 | // Paint = s.PaintState, |
||
2445 | // Opacity = s.Opac, |
||
2446 | // UserID = s.UserID, |
||
2447 | // StrokeColor = _SetColor, |
||
2448 | // isTransOn = s.IsTrans, |
||
2449 | // isChain = s.IsChain, |
||
2450 | // DashSize = s.DashSize, |
||
2451 | // //Fill = s.CloudFill, |
||
2452 | // }; |
||
2453 | //#if SILVERLIGHT |
||
2454 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2455 | //#endif |
||
2456 | // Layer.Children.Add(instance); |
||
2457 | // instance.ApplyTemplate(); |
||
2458 | // instance.PointSet = s.pointSet; |
||
2459 | // instance.ClosePath(); |
||
2460 | // instance.ChangePaint(s.PaintState); |
||
2461 | // } |
||
2462 | // break; |
||
2463 | // #endregion |
||
2464 | // #region Line |
||
2465 | // case "LineControl": |
||
2466 | // using (S_LineControl s = JsonSerializerHelper.JsonDeserialize<S_LineControl>(item)) |
||
2467 | // { |
||
2468 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2469 | // LineControl instance = new LineControl() |
||
2470 | // { |
||
2471 | // LineStyle = s.LnSet, |
||
2472 | // StartPoint = s.StartPoint, |
||
2473 | // EndPoint = s.EndPoint, |
||
2474 | // DashSize = s.DashSize, |
||
2475 | // Interval = s.Interval, |
||
2476 | // PointSet = s.PointSet, |
||
2477 | // Opacity = s.Opac, |
||
2478 | // UserID = s.UserID, |
||
2479 | // StrokeColor = GetUserColor_KCOM(dc, s.UserID), |
||
2480 | // LineSize = Convert.ToDouble(data2.First()), |
||
2481 | // }; |
||
2482 | //#if SILVERLIGHT |
||
2483 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2484 | //#endif |
||
2485 | // Layer.Children.Add(instance); |
||
2486 | // instance.ApplyTemplate(); |
||
2487 | // instance.SetLinePath(); |
||
2488 | // } |
||
2489 | // break; |
||
2490 | // #endregion |
||
2491 | // #region Text |
||
2492 | // case "TextControl": |
||
2493 | // using (S_TextControl s = JsonSerializerHelper.JsonDeserialize<S_TextControl>(item)) |
||
2494 | // { |
||
2495 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2496 | // TextControl instance = new TextControl() |
||
2497 | // { |
||
2498 | // Text = s.Text, |
||
2499 | // StartPoint = s.StartPoint, |
||
2500 | // EndPoint = s.EndPoint, |
||
2501 | // Paint = s.PaintState, |
||
2502 | // LineSize = new Thickness(Convert.ToDouble(data2.First())), |
||
2503 | // TextSize = Convert.ToDouble(data2[1]), |
||
2504 | // FontColor = _SetColor, |
||
2505 | // FontSize = 10, |
||
2506 | // UserID = s.UserID, |
||
2507 | // isHighLight = s.isHighLight, |
||
2508 | // Angle = s.Angle, |
||
2509 | // PointSet = s.PointSet, |
||
2510 | // Opacity = s.Opac, |
||
2511 | // TextFamily = new FontFamily(s.fontConfig[0]), |
||
2512 | // TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]), |
||
2513 | // TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]), |
||
2514 | // }; |
||
2515 | //#if SILVERLIGHT |
||
2516 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2517 | //#endif |
||
2518 | // if (instance.Text != null) |
||
2519 | // { |
||
2520 | // Layer.Children.Add(instance); |
||
2521 | // System.Diagnostics.Debug.WriteLine(instance.Angle); |
||
2522 | // if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
2523 | // { |
||
2524 | // s.fontConfig = new List<string>(); |
||
2525 | |||
2526 | // s.fontConfig.Add("Arial"); |
||
2527 | // s.fontConfig.Add("Normal"); |
||
2528 | // s.fontConfig.Add("Normal"); |
||
2529 | // s.fontConfig.Add("30"); |
||
2530 | // } |
||
2531 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
2532 | // instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
2533 | // instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
2534 | |||
2535 | // //if (s.fontConfig.Count == 3) |
||
2536 | // //{ |
||
2537 | // // instance.TextSize = 30; |
||
2538 | // //} |
||
2539 | // //else |
||
2540 | // //{ |
||
2541 | // // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
2542 | // //} |
||
2543 | // instance.ApplyTemplate(); |
||
2544 | // if (s.fontConfig.Count() == 4) |
||
2545 | // { |
||
2546 | // instance.UnderLine = TextDecorations.Underline; |
||
2547 | // instance.Base_TextBlock.TextDecorations = instance.UnderLine; |
||
2548 | // } |
||
2549 | // instance.Base_TextBlock.Margin = new Thickness(instance.Base_TextBox.Margin.Left + 4); |
||
2550 | // instance.Base_TextBox.Visibility = Visibility.Collapsed; |
||
2551 | |||
2552 | // instance.DrawingCloud(); |
||
2553 | // } |
||
2554 | // } |
||
2555 | // break; |
||
2556 | // #endregion |
||
2557 | // #region Arc |
||
2558 | // case "ArcControl": |
||
2559 | // using (S_ArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArcControl>(item)) |
||
2560 | // { |
||
2561 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2562 | // ArcControl instance = new ArcControl() |
||
2563 | // { |
||
2564 | // StartPoint = s.StartPoint, |
||
2565 | // EndPoint = s.EndPoint, |
||
2566 | // DashSize = s.DashSize, |
||
2567 | // PointSet = s.PointSet, |
||
2568 | // isTransOn = s.IsTrans, |
||
2569 | // MidPoint = s.MP, |
||
2570 | // StrokeColor = _SetColor, |
||
2571 | // UserID = s.UserID, |
||
2572 | // LineSize = Convert.ToDouble(data2.First()), |
||
2573 | // }; |
||
2574 | //#if SILVERLIGHT |
||
2575 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2576 | //#endif |
||
2577 | // Layer.Children.Add(instance); |
||
2578 | // instance.ApplyTemplate(); |
||
2579 | // instance.SetArcPath(); |
||
2580 | // } |
||
2581 | // break; |
||
2582 | // #endregion |
||
2583 | // #region RectCloud |
||
2584 | // case "RectCloudControl": |
||
2585 | // using (S_RectCloudControl s = JsonSerializerHelper.JsonDeserialize<S_RectCloudControl>(item)) |
||
2586 | // { |
||
2587 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2588 | // RectCloudControl instance = new RectCloudControl() |
||
2589 | // { |
||
2590 | // StartPoint = s.StartPoint, |
||
2591 | // EndPoint = s.EndPoint, |
||
2592 | // LeftBottomPoint = s.LB, |
||
2593 | // UserID = s.UserID, |
||
2594 | // Paint = s.PaintState, |
||
2595 | // Opacity = s.Opac, |
||
2596 | // DashSize = s.DashSize, |
||
2597 | // TopRightPoint = s.TR, |
||
2598 | // PointSet = s.PointSet, |
||
2599 | // StrokeColor = _SetColor, |
||
2600 | // LineSize = Convert.ToDouble(data2.First()), |
||
2601 | // }; |
||
2602 | //#if SILVERLIGHT |
||
2603 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2604 | //#endif |
||
2605 | // Layer.Children.Add(instance); |
||
2606 | // instance.ApplyTemplate(); |
||
2607 | // instance.SetRectCloud(); |
||
2608 | // } |
||
2609 | // break; |
||
2610 | // #endregion |
||
2611 | // #region Sign |
||
2612 | // case "SignControl": |
||
2613 | // { |
||
2614 | // using (S_SignControl s = JsonSerializerHelper.JsonDeserialize<S_SignControl>(item)) |
||
2615 | // { |
||
2616 | // SignControl instance = new SignControl |
||
2617 | // { |
||
2618 | // Angle = s.Angle, |
||
2619 | // UserNumber = s.UserNumber, |
||
2620 | // StartPoint = s.StartPoint, |
||
2621 | // UserID = s.UserID, |
||
2622 | // TopRightPoint = s.TR, |
||
2623 | // EndPoint = s.EndPoint, |
||
2624 | // LeftBottomPoint = s.LB, |
||
2625 | // PointSet = s.PointSet, |
||
2626 | // SignImage = null, |
||
2627 | // }; |
||
2628 | //#if SILVERLIGHT |
||
2629 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2630 | //#endif |
||
2631 | //#if SILVERLIGHT |
||
2632 | // SignUserSet.Add(instance); |
||
2633 | //#endif |
||
2634 | // Layer.Children.Add(instance); |
||
2635 | // instance.ApplyTemplate(); |
||
2636 | // instance.SetImage(); |
||
2637 | // } |
||
2638 | // } |
||
2639 | // break; |
||
2640 | // #endregion |
||
2641 | // #region Ink |
||
2642 | // case "InkPresenter": |
||
2643 | // using (S_PensilControl s = JsonSerializerHelper.JsonDeserialize<S_PensilControl>(item)) |
||
2644 | // { |
||
2645 | //#if SILVERLIGHT |
||
2646 | // this._InkBoard.Strokes = s.SCC; |
||
2647 | //#endif |
||
2648 | // } |
||
2649 | // break; |
||
2650 | // #endregion |
||
2651 | // #region Date |
||
2652 | // case "DateControl": |
||
2653 | // { |
||
2654 | // using (S_DateControl s = JsonSerializerHelper.JsonDeserialize<S_DateControl>(item)) |
||
2655 | // { |
||
2656 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2657 | // DateControl instance = new DateControl |
||
2658 | // { |
||
2659 | // Angle = s.Angle, |
||
2660 | // StartPoint = s.StartPoint, |
||
2661 | // UserID = s.UserID, |
||
2662 | // EndPoint = s.EndPoint, |
||
2663 | // LeftBottomPoint = s.LB, |
||
2664 | // TopRightPoint = s.TR, |
||
2665 | // Opacity = s.Opac, |
||
2666 | // FontColor = _SetColor, |
||
2667 | // LineSize = Convert.ToDouble(data2.First()), |
||
2668 | // Text = s.Text, |
||
2669 | // PointSet = s.PointSet, |
||
2670 | // }; |
||
2671 | //#if SILVERLIGHT |
||
2672 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2673 | //#endif |
||
2674 | // Layer.Children.Add(instance); |
||
2675 | // instance.ApplyTemplate(); |
||
2676 | // instance.SetDate(); |
||
2677 | // } |
||
2678 | // } |
||
2679 | // break; |
||
2680 | // #endregion |
||
2681 | // #region Symbol |
||
2682 | // case "SymControl": |
||
2683 | // using (S_SymControl s = JsonSerializerHelper.JsonDeserialize<S_SymControl>(item)) |
||
2684 | // { |
||
2685 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2686 | // StringToPathConverter sm = new StringToPathConverter(); |
||
2687 | // SymControl instance = new SymControl() |
||
2688 | // { |
||
2689 | // LineSize = Convert.ToDouble(data2.First()), |
||
2690 | // PointSet = s.PointSet, |
||
2691 | // Paint = s.PaintState, |
||
2692 | // StartPoint = s.StartPoint, |
||
2693 | // StrokeColor = _SetColor, |
||
2694 | // EndPoint = s.EndPoint, |
||
2695 | // Angle = s.Angle, |
||
2696 | // UserID = s.UserID, |
||
2697 | // LeftBottomPoint = s.LB, |
||
2698 | // TopRightPoint = s.TR, |
||
2699 | // PathData = sm.Convert(s.PathInfo.ToString()), |
||
2700 | // Opacity = s.Opac, |
||
2701 | // }; |
||
2702 | // //if (ToolTipService.GetToolTip(instance).ToString() == "") |
||
2703 | // //{ |
||
2704 | //#if SILVERLIGHT |
||
2705 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
2706 | //#endif |
||
2707 | // //} //조장원 |
||
2708 | // Layer.Children.Add(instance); |
||
2709 | // instance.ApplyTemplate(); |
||
2710 | // instance.SetSymPath(); |
||
2711 | // } |
||
2712 | // break; |
||
2713 | // #endregion |
||
2714 | // #region Image |
||
2715 | // case "ImgControl": |
||
2716 | // using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item)) |
||
2717 | // { |
||
2718 | // ImgControl instance = new ImgControl |
||
2719 | // { |
||
2720 | // Angle = s.Angle, |
||
2721 | // StartPoint = s.StartPoint, |
||
2722 | // TopRightPoint = s.TR, |
||
2723 | // EndPoint = s.EndPoint, |
||
2724 | // LeftBottomPoint = s.LB, |
||
2725 | // PointSet = s.PointSet, |
||
2726 | // Opacity = s.Opac, |
||
2727 | // UserID = s.UserID, |
||
2728 | // FilePath = s.ImagePath, |
||
2729 | // }; |
||
2730 | // Layer.Children.Add(instance); |
||
2731 | // instance.ApplyTemplate(); |
||
2732 | |||
2733 | // instance.ImageData = new BitmapImage(new Uri(s.ImagePath)); |
||
2734 | // instance.SetImage(); |
||
2735 | // // if (ToolTipService.GetToolTip(instance).ToString() == "") |
||
2736 | // // { |
||
2737 | // //#if SILVERLIGHT |
||
2738 | // // ToolTipService.SetToolTip(instance, UserNumber); |
||
2739 | // //#endif |
||
2740 | // // } |
||
2741 | // } |
||
2742 | // break; |
||
2743 | // #endregion |
||
2744 | // #region SymbolN |
||
2745 | // case "SymControlN": |
||
2746 | // using (S_SymControlN s = JsonSerializerHelper.JsonDeserialize<S_SymControlN>(item)) |
||
2747 | // { |
||
2748 | // SymControlN instance = new SymControlN() |
||
2749 | // { |
||
2750 | // PointSet = s.PointSet, |
||
2751 | // StartPoint = s.StartPoint, |
||
2752 | // EndPoint = s.EndPoint, |
||
2753 | // Angle = s.Angle, |
||
2754 | // LeftBottomPoint = s.LB, |
||
2755 | // TopRightPoint = s.TR, |
||
2756 | // Opacity = s.Opac, |
||
2757 | // UserID = s.UserID, |
||
2758 | // //PathXathData = s.DBData, |
||
2759 | // }; |
||
2760 | |||
2761 | // //if (ToolTipService.GetToolTip(instance).ToString() == "") |
||
2762 | // //{ |
||
2763 | //#if SILVERLIGHT |
||
2764 | // //ToolTipService.SetToolTip(instance, UserNumber); |
||
2765 | //#endif |
||
2766 | // //} |
||
2767 | // Layer.Children.Add(instance); |
||
2768 | // instance.ApplyTemplate(); |
||
2769 | //#if SILVERLIGHT |
||
2770 | |||
2771 | // instance.PathXathData = JsonSerializerHelper.UnCompressString_NonPrefix(s.DBData); |
||
2772 | // object obj = XamlReader.Load(JsonSerializerHelper.UnCompressString_NonPrefix(instance.PathXathData)); |
||
2773 | // //object obj = XamlReader.Load(instance.PathXathData); |
||
2774 | // instance.Base_ViewBox.Child = obj as UIElement; |
||
2775 | //#else |
||
2776 | // MemoryStream memoryStream = new MemoryStream(Convert.FromBase64String(instance.PathXathData)); |
||
2777 | // object obj = XamlReader.Load(memoryStream); |
||
2778 | //#endif |
||
2779 | // instance.SetViewBox(); |
||
2780 | // } |
||
2781 | // break; |
||
2782 | // #endregion |
||
2783 | // default: |
||
2784 | // break; |
||
2785 | // }; |
||
2786 | // } |
||
2787 | // } |
||
2788 | //#if SILVERLIGHT |
||
2789 | // this.GetSignImageLoaded(SignUserSet); |
||
2790 | //#endif |
||
2791 | // } |
||
2792 | |||
2793 | /// <summary> |
||
2794 | /// 데이터베이스의 마크업데이터를 컨트롤로 변환한다. |
||
2795 | /// </summary> |
||
2796 | /// <param name="MarkupString"></param> |
||
2797 | public void markupParse(string MarkupString, ObservableCollection<Control> baseLayer, string DisplayColor, string ToolTipMessage) |
||
2798 | { |
||
2799 | if (MarkupString != "False") |
||
2800 | { |
||
2801 | //SolidColorBrush _SetColor = new SolidColorBrush(StringToColorConverter.Parse(DisplayColor)); |
||
2802 | SolidColorBrush _SetColor = new SolidColorBrush(Colors.Red); |
||
2803 | string[] delimiterChars = { "|DZ|" }; |
||
2804 | string[] delimiterChars2 = { "|" }; |
||
2805 | string[] data = MarkupString.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); |
||
2806 | List<string> dataSet = new List<string>(); |
||
2807 | |||
2808 | foreach (var dataPease in data) |
||
2809 | { |
||
2810 | var item = JsonSerializerHelper.UnCompressString(dataPease); //언패킹작업 |
||
2811 | var unkownControl = JsonSerializerHelper.JsonDeserialize<S_BaseControl>(item); //복호화작업 |
||
2812 | switch (unkownControl.Name) |
||
2813 | { |
||
2814 | #region Arrow |
||
2815 | case "ArrowControl": |
||
2816 | using (S_ArrowControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl>(item)) |
||
2817 | { |
||
2818 | string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2819 | LineControl instance = new LineControl |
||
2820 | { |
||
2821 | LineSize = Convert.ToDouble(data2.First()), |
||
2822 | LineStyle = s.ArStyle, |
||
2823 | DimSize = s.DimSize, |
||
2824 | StartPoint = s.StartPoint, |
||
2825 | EndPoint = s.EndPoint, |
||
2826 | DashSize = s.DashSize, |
||
2827 | PointSet = s.PointSet, |
||
2828 | StrokeColor = _SetColor, |
||
2829 | Opacity = s.Opac, |
||
2830 | }; |
||
2831 | |||
2832 | baseLayer.Add(instance); |
||
2833 | //Layer.Children.Add(instance); |
||
2834 | instance.ApplyTemplate(); |
||
2835 | instance.SetLinePath(); |
||
2836 | instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
2837 | |||
2838 | } |
||
2839 | break; |
||
2840 | #endregion |
||
2841 | #region ArrowText |
||
2842 | case "ArrowTextControl": |
||
2843 | using (S_ArrowTextControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowTextControl>(item)) |
||
2844 | { |
||
2845 | //string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2846 | ArrowTextControl instance = new ArrowTextControl(); |
||
2847 | //Layer.Children.Add(instance); |
||
2848 | baseLayer.Add(instance); |
||
2849 | //instance.LineSize = Convert.ToDouble(data2.First()); |
||
2850 | instance.PointSet = s.PointSet; |
||
2851 | instance.StartPoint = s.StartPoint; |
||
2852 | instance.EndPoint = s.EndPoint; |
||
2853 | instance.StrokeColor = new SolidColorBrush(Colors.Red); |
||
2854 | //instance.DashSize = s.DashSize; |
||
2855 | instance.ArrowTextStyle = s.ArrowStyle; |
||
2856 | instance.isHighLight = s.isHighLight; |
||
2857 | instance.ArrowText = s.ArrowText; |
||
2858 | instance.Opacity = s.Opac; |
||
2859 | instance.BorderSize = s.BorderSize; |
||
2860 | instance.BoxWidth = s.BoxWidth; |
||
2861 | instance.BoxHeight = s.BoxHeight; |
||
2862 | instance.isFixed = s.isFixed; |
||
2863 | instance.Angle = s.Angle; |
||
2864 | instance.StrokeColor = _SetColor; |
||
2865 | instance.isTrans = s.isTrans; |
||
2866 | instance.MidPoint = s.MidPoint; |
||
2867 | if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
2868 | { |
||
2869 | s.fontConfig = new List<string>(); |
||
2870 | |||
2871 | s.fontConfig.Add("Arial"); |
||
2872 | s.fontConfig.Add("Normal"); |
||
2873 | s.fontConfig.Add("Normal"); |
||
2874 | s.fontConfig.Add("30"); |
||
2875 | } |
||
2876 | instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
2877 | //instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
2878 | //instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
2879 | instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
2880 | instance.ApplyTemplate(); |
||
2881 | instance.SetArrowTextPath(); |
||
2882 | instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
2883 | }; |
||
2884 | break; |
||
2885 | #endregion |
||
2886 | #region Arrow_Multi |
||
2887 | case "ArrowControl_Multi": |
||
2888 | using (S_ArrowControl_Multi s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(item)) |
||
2889 | { |
||
2890 | string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2891 | ArrowControl_Multi instance = new ArrowControl_Multi |
||
2892 | { |
||
2893 | LineSize = Convert.ToDouble(data2.First()), |
||
2894 | StartPoint = s.StartPoint, |
||
2895 | MiddlePoint = s.MidPoint, |
||
2896 | DashSize = s.DashSize, |
||
2897 | EndPoint = s.EndPoint, |
||
2898 | PointSet = s.PointSet, |
||
2899 | Opacity = s.Opac, |
||
2900 | StrokeColor = _SetColor |
||
2901 | }; |
||
2902 | |||
2903 | //Layer.Children.Add(instance); |
||
2904 | baseLayer.Add(instance); |
||
2905 | instance.ApplyTemplate(); |
||
2906 | instance.SetArrowMultiPath(); |
||
2907 | instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
2908 | |||
2909 | } |
||
2910 | break; |
||
2911 | #endregion |
||
2912 | #region Rectangle |
||
2913 | case "RectangleControl": |
||
2914 | using (S_RectControl s = JsonSerializerHelper.JsonDeserialize<S_RectControl>(item)) |
||
2915 | { |
||
2916 | string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2917 | RectangleControl instance = new RectangleControl |
||
2918 | { |
||
2919 | LineSize = Convert.ToDouble(data2.First()), |
||
2920 | //Paint = s.PaintState, |
||
2921 | StartPoint = s.StartPoint, |
||
2922 | EndPoint = s.EndPoint, |
||
2923 | //Angle = s.Angle, |
||
2924 | StrokeColor = _SetColor, |
||
2925 | //DashSize = s.DashSize, |
||
2926 | Opacity = s.Opac, |
||
2927 | LeftBottomPoint = s.LB, |
||
2928 | TopRightPoint = s.TR, |
||
2929 | PointSet = s.PointSet |
||
2930 | }; |
||
2931 | |||
2932 | |||
2933 | //Layer.Children.Add(instance); |
||
2934 | baseLayer.Add(instance); |
||
2935 | instance.ApplyTemplate(); |
||
2936 | instance.SetRectPath(null); |
||
2937 | } |
||
2938 | break; |
||
2939 | #endregion |
||
2940 | #region Triangle |
||
2941 | case "TriControl": |
||
2942 | using (S_TriControl s = JsonSerializerHelper.JsonDeserialize<S_TriControl>(item)) |
||
2943 | { |
||
2944 | string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2945 | TriControl instance = new TriControl |
||
2946 | { |
||
2947 | LineSize = Convert.ToDouble(data2.First()), |
||
2948 | MidPoint = s.MidPoint, |
||
2949 | StartPoint = s.StartPoint, |
||
2950 | Paint = s.Paint, |
||
2951 | EndPoint = s.EndPoint, |
||
2952 | Opacity = s.Opac, |
||
2953 | Angle = s.Angle, |
||
2954 | DashSize = s.DashSize, |
||
2955 | PointSet = s.PointSet, |
||
2956 | StrokeColor = _SetColor, |
||
2957 | }; |
||
2958 | |||
2959 | //Layer.Children.Add(instance); |
||
2960 | baseLayer.Add(instance); |
||
2961 | instance.ApplyTemplate(); |
||
2962 | instance.SetTri(); |
||
2963 | } |
||
2964 | break; |
||
2965 | #endregion |
||
2966 | #region Cicle |
||
2967 | case "CircleControl": |
||
2968 | using (S_CircleControl s = JsonSerializerHelper.JsonDeserialize<S_CircleControl>(item)) |
||
2969 | { |
||
2970 | string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2971 | CircleControl instance = new CircleControl |
||
2972 | { |
||
2973 | LineSize = Convert.ToDouble(data2.First()), |
||
2974 | Paint = s.PaintState, |
||
2975 | StartPoint = s.StartPoint, |
||
2976 | EndPoint = s.EndPoint, |
||
2977 | LeftBottomPoint = s.LBP, |
||
2978 | TopRightPoint = s.TRP, |
||
2979 | Opacity = s.Opac, |
||
2980 | Angle = s.Angle, |
||
2981 | DashSize = s.DashSize, |
||
2982 | PointSet = s.PointSet, |
||
2983 | StrokeColor = _SetColor, |
||
2984 | }; |
||
2985 | |||
2986 | //Layer.Children.Add(instance); |
||
2987 | baseLayer.Add(instance); |
||
2988 | instance.ApplyTemplate(); |
||
2989 | instance.SetCircle(); |
||
2990 | } |
||
2991 | break; |
||
2992 | #endregion |
||
2993 | #region Poly |
||
2994 | case "PolygonControl": |
||
2995 | using (S_PolyControl s = JsonSerializerHelper.JsonDeserialize<S_PolyControl>(item)) |
||
2996 | { |
||
2997 | string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
2998 | PolygonControl instance = new PolygonControl |
||
2999 | { |
||
3000 | LineSize = Convert.ToDouble(data2.First()), |
||
3001 | //Toler = s.Toler, |
||
3002 | IsCompleted = s.IsCompleted, |
||
3003 | //PointSet = new List<Point>(), |
||
3004 | Opacity = s.Opac, |
||
3005 | StrokeColor = _SetColor, |
||
3006 | StartPoint = s.StartPoint, |
||
3007 | PointSet = s.PointSet |
||
3008 | //PointC = s.PointC, |
||
3009 | }; |
||
3010 | //Layer.Children.Add(instance); |
||
3011 | baseLayer.Add(instance); |
||
3012 | |||
3013 | instance.ApplyTemplate(); |
||
3014 | instance.SetPolyPath(); |
||
3015 | |||
3016 | //instance.PointSet = s.PointSet; |
||
3017 | //instance.ClosePath(); |
||
3018 | //instance.ChangePaint(s.PaintState); |
||
3019 | } |
||
3020 | break; |
||
3021 | #endregion |
||
3022 | #region Cloud |
||
3023 | case "CloudControl": |
||
3024 | using (S_CloudControl s = JsonSerializerHelper.JsonDeserialize<S_CloudControl>(item)) |
||
3025 | { |
||
3026 | string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3027 | CloudControl instance = new CloudControl |
||
3028 | { |
||
3029 | LineSize = Convert.ToDouble(data2.First()), |
||
3030 | Toler = s.Toler, |
||
3031 | PointSet = new List<Point>(), |
||
3032 | ArcLength = s.ArcLength, |
||
3033 | Paint = s.PaintState, |
||
3034 | Opacity = s.Opac, |
||
3035 | StrokeColor = _SetColor, |
||
3036 | isTransOn = s.IsTrans, |
||
3037 | isChain = s.IsChain, |
||
3038 | DashSize = s.DashSize, |
||
3039 | //Fill = s.CloudFill, |
||
3040 | }; |
||
3041 | //Layer.Children.Add(instance); |
||
3042 | baseLayer.Add(instance); |
||
3043 | instance.ApplyTemplate(); |
||
3044 | instance.PointSet = s.PointSet; |
||
3045 | instance.ClosePath(); |
||
3046 | instance.ChangePaint(s.PaintState); |
||
3047 | } |
||
3048 | break; |
||
3049 | #endregion |
||
3050 | #region Line |
||
3051 | case "LineControl": |
||
3052 | using (S_LineControl s = JsonSerializerHelper.JsonDeserialize<S_LineControl>(item)) |
||
3053 | { |
||
3054 | string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3055 | LineControl instance = new LineControl() |
||
3056 | { |
||
3057 | ControlType = s.LineStyleSet, |
||
3058 | StartPoint = s.StartPoint, |
||
3059 | EndPoint = s.EndPoint, |
||
3060 | DashSize = s.DashSize, |
||
3061 | Interval = s.Interval, |
||
3062 | PointSet = s.PointSet, |
||
3063 | Opacity = s.Opac, |
||
3064 | StrokeColor = _SetColor, |
||
3065 | LineSize = Convert.ToDouble(data2.First()), |
||
3066 | }; |
||
3067 | //Layer.Children.Add(instance); |
||
3068 | baseLayer.Add(instance); |
||
3069 | instance.ApplyTemplate(); |
||
3070 | instance.SetLinePath(); |
||
3071 | } |
||
3072 | break; |
||
3073 | #endregion |
||
3074 | #region Text |
||
3075 | case "TextControl": |
||
3076 | using (S_TextControl s = JsonSerializerHelper.JsonDeserialize<S_TextControl>(item)) |
||
3077 | { |
||
3078 | string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3079 | TextControl instance = new TextControl() |
||
3080 | { |
||
3081 | Text = s.Text, |
||
3082 | StartPoint = s.StartPoint, |
||
3083 | EndPoint = s.EndPoint, |
||
3084 | CanvasX = s.StartPoint.X, |
||
3085 | CanvasY = s.StartPoint.Y, |
||
3086 | BoxWidth = s.BoxW, |
||
3087 | BoxHeight = s.BoxH, |
||
3088 | ControlType_No = s.paintMethod, |
||
3089 | LineSize = new Thickness(Convert.ToDouble(data2.First())), |
||
3090 | TextSize = Convert.ToDouble(data2[1]), |
||
3091 | FontColor = _SetColor, |
||
3092 | FontSize = 10, |
||
3093 | //isHighLight = s.isHighLight, |
||
3094 | Angle = s.Angle, |
||
3095 | PointSet = s.PointSet, |
||
3096 | Opacity = s.Opac, |
||
3097 | TextFamily = new FontFamily(s.fontConfig[0]), |
||
3098 | //TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]), |
||
3099 | //TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]), |
||
3100 | }; |
||
3101 | |||
3102 | if (instance.Text != null) |
||
3103 | { |
||
3104 | //Layer.Children.Add(instance); |
||
3105 | baseLayer.Add(instance); |
||
3106 | System.Diagnostics.Debug.WriteLine(instance.Angle); |
||
3107 | instance.ApplyTemplate(); |
||
3108 | if (s.fontConfig.Count() == 4) |
||
3109 | { |
||
3110 | instance.UnderLine = TextDecorations.Underline; |
||
3111 | instance.Base_TextBlock.TextDecorations = instance.UnderLine; |
||
3112 | } |
||
3113 | instance.Base_TextBlock.Margin = new Thickness(instance.Base_TextBox.Margin.Left + 4); |
||
3114 | instance.Base_TextBox.Visibility = Visibility.Collapsed; |
||
3115 | instance.DrawingCloud(); |
||
3116 | instance.SetText(); |
||
3117 | } |
||
3118 | } |
||
3119 | break; |
||
3120 | #endregion |
||
3121 | #region Arc |
||
3122 | case "ArcControl": |
||
3123 | using (S_ArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArcControl>(item)) |
||
3124 | { |
||
3125 | string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3126 | ArcControl instance = new ArcControl() |
||
3127 | { |
||
3128 | StartPoint = s.StartPoint, |
||
3129 | EndPoint = s.EndPoint, |
||
3130 | DashSize = s.DashSize, |
||
3131 | PointSet = s.PointSet, |
||
3132 | isTransOn = s.IsTransOn, |
||
3133 | MidPoint = s.MidPoint, |
||
3134 | StrokeColor = _SetColor, |
||
3135 | Clock = s.Clock, |
||
3136 | LineSize = Convert.ToDouble(data2.First()), |
||
3137 | }; |
||
3138 | |||
3139 | //Layer.Children.Add(instance); |
||
3140 | baseLayer.Add(instance); |
||
3141 | instance.ApplyTemplate(); |
||
3142 | instance.SetArcPath(); |
||
3143 | } |
||
3144 | break; |
||
3145 | #endregion |
||
3146 | #region RectCloud |
||
3147 | case "RectCloudControl": |
||
3148 | using (S_RectCloudControl s = JsonSerializerHelper.JsonDeserialize<S_RectCloudControl>(item)) |
||
3149 | { |
||
3150 | string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3151 | RectCloudControl instance = new RectCloudControl() |
||
3152 | { |
||
3153 | StartPoint = s.StartPoint, |
||
3154 | EndPoint = s.EndPoint, |
||
3155 | LeftBottomPoint = s.LB, |
||
3156 | Paint = s.PaintState, |
||
3157 | Opacity = s.Opac, |
||
3158 | DashSize = s.DashSize, |
||
3159 | TopRightPoint = s.TR, |
||
3160 | PointSet = s.PointSet, |
||
3161 | StrokeColor = _SetColor, |
||
3162 | LineSize = Convert.ToDouble(data2.First()), |
||
3163 | }; |
||
3164 | |||
3165 | //Layer.Children.Add(instance); |
||
3166 | baseLayer.Add(instance); |
||
3167 | instance.ApplyTemplate(); |
||
3168 | instance.SetRectCloud(); |
||
3169 | } |
||
3170 | break; |
||
3171 | #endregion |
||
3172 | #region Sign |
||
3173 | // case "SignControl": |
||
3174 | // { |
||
3175 | // using (S_SignControl s = JsonSerializerHelper.JsonDeserialize<S_SignControl>(item)) |
||
3176 | // { |
||
3177 | // SignControl instance = new SignControl |
||
3178 | // { |
||
3179 | // Angle = s.Angle, |
||
3180 | // UserNumber = s.UserNumber, |
||
3181 | // StartPoint = s.StartPoint, |
||
3182 | // TopRightPoint = s.TR, |
||
3183 | // EndPoint = s.EndPoint, |
||
3184 | // LeftBottomPoint = s.LB, |
||
3185 | // PointSet = s.PointSet, |
||
3186 | // SignImage = null, |
||
3187 | // }; |
||
3188 | //#if SILVERLIGHT |
||
3189 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
3190 | //#endif |
||
3191 | //#if SILVERLIGHT |
||
3192 | // SignUserSet.Add(instance); |
||
3193 | //#endif |
||
3194 | // Layer.Children.Add(instance); |
||
3195 | // instance.ApplyTemplate(); |
||
3196 | // instance.SetImage(); |
||
3197 | // } |
||
3198 | // } |
||
3199 | // break; |
||
3200 | #endregion |
||
3201 | #region Ink |
||
3202 | case "InkPresenter": |
||
3203 | using (S_PensilControl s = JsonSerializerHelper.JsonDeserialize<S_PensilControl>(item)) |
||
3204 | { |
||
3205 | #if SILVERLIGHT |
||
3206 | this._InkBoard.Strokes = s.SCC; |
||
3207 | #endif |
||
3208 | } |
||
3209 | break; |
||
3210 | #endregion |
||
3211 | #region Date |
||
3212 | case "DateControl": |
||
3213 | { |
||
3214 | using (S_DateControl s = JsonSerializerHelper.JsonDeserialize<S_DateControl>(item)) |
||
3215 | { |
||
3216 | string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3217 | DateControl instance = new DateControl |
||
3218 | { |
||
3219 | Angle = s.Angle, |
||
3220 | StartPoint = s.StartPoint, |
||
3221 | EndPoint = s.EndPoint, |
||
3222 | LeftBottomPoint = s.LB, |
||
3223 | TopRightPoint = s.TR, |
||
3224 | Opacity = s.Opac, |
||
3225 | FontColor = _SetColor, |
||
3226 | LineSize = Convert.ToDouble(data2.First()), |
||
3227 | Text = s.Text, |
||
3228 | PointSet = s.PointSet, |
||
3229 | }; |
||
3230 | |||
3231 | //Layer.Children.Add(instance); |
||
3232 | baseLayer.Add(instance); |
||
3233 | instance.ApplyTemplate(); |
||
3234 | instance.SetDate(); |
||
3235 | } |
||
3236 | } |
||
3237 | break; |
||
3238 | #endregion |
||
3239 | #region Symbol |
||
3240 | // case "SymControl": |
||
3241 | // using (S_SymControl s = JsonSerializerHelper.JsonDeserialize<S_SymControl>(item)) |
||
3242 | // { |
||
3243 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3244 | // StringToPathConverter sm = new StringToPathConverter(); |
||
3245 | // SymControl instance = new SymControl() |
||
3246 | // { |
||
3247 | // LineSize = Convert.ToDouble(data2.First()), |
||
3248 | // PointSet = s.PointSet, |
||
3249 | // Paint = s.PaintState, |
||
3250 | // StartPoint = s.StartPoint, |
||
3251 | // StrokeColor = _SetColor, |
||
3252 | // EndPoint = s.EndPoint, |
||
3253 | // Angle = s.Angle, |
||
3254 | // LeftBottomPoint = s.LB, |
||
3255 | // TopRightPoint = s.TR, |
||
3256 | // PathData = sm.Convert(s.PathInfo.ToString()), |
||
3257 | // Opacity = s.Opac, |
||
3258 | // }; |
||
3259 | // //if (ToolTipService.GetToolTip(instance).ToString() == "") |
||
3260 | // //{ |
||
3261 | //#if SILVERLIGHT |
||
3262 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
3263 | //#endif |
||
3264 | // //} //조장원 |
||
3265 | // Layer.Children.Add(instance); |
||
3266 | // instance.ApplyTemplate(); |
||
3267 | // instance.SetSymPath(); |
||
3268 | // } |
||
3269 | // break; |
||
3270 | #endregion |
||
3271 | #region Image |
||
3272 | case "ImgControl": |
||
3273 | using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item)) |
||
3274 | { |
||
3275 | ImgControl instance = new ImgControl |
||
3276 | { |
||
3277 | Angle = s.Angle, |
||
3278 | StartPoint = s.StartPoint, |
||
3279 | TopRightPoint = s.TR, |
||
3280 | EndPoint = s.EndPoint, |
||
3281 | LeftBottomPoint = s.LB, |
||
3282 | PointSet = s.PointSet, |
||
3283 | Opacity = s.Opac, |
||
3284 | FilePath = s.ImagePath, |
||
3285 | }; |
||
3286 | //Layer.Children.Add(instance); |
||
3287 | baseLayer.Add(instance); |
||
3288 | instance.ApplyTemplate(); |
||
3289 | instance.ImageData = new BitmapImage(new Uri(s.ImagePath)); |
||
3290 | instance.SetImage(); |
||
3291 | |||
3292 | } |
||
3293 | break; |
||
3294 | #endregion |
||
3295 | #region SymbolN |
||
3296 | // case "SymControlN": |
||
3297 | // using (S_SymControlN s = JsonSerializerHelper.JsonDeserialize<S_SymControlN>(item)) |
||
3298 | // { |
||
3299 | // SymControlN instance = new SymControlN() |
||
3300 | // { |
||
3301 | // PointSet = s.PointSet, |
||
3302 | // StartPoint = s.StartPoint, |
||
3303 | // EndPoint = s.EndPoint, |
||
3304 | // Angle = s.Angle, |
||
3305 | // LeftBottomPoint = s.LB, |
||
3306 | // TopRightPoint = s.TR, |
||
3307 | // Opacity = s.Opac, |
||
3308 | // //PathXathData = s.DBData, |
||
3309 | // }; |
||
3310 | // //if (ToolTipService.GetToolTip(instance).ToString() == "") |
||
3311 | // //{ |
||
3312 | //#if SILVERLIGHT |
||
3313 | // //ToolTipService.SetToolTip(instance, UserNumber); |
||
3314 | //#endif |
||
3315 | // //} |
||
3316 | // Layer.Children.Add(instance); |
||
3317 | // instance.ApplyTemplate(); |
||
3318 | //#if SILVERLIGHT |
||
3319 | |||
3320 | // instance.PathXathData = JsonSerializerHelper.UnCompressString_NonPrefix(s.DBData); |
||
3321 | // object obj = XamlReader.Load(JsonSerializerHelper.UnCompressString_NonPrefix(instance.PathXathData)); |
||
3322 | // //object obj = XamlReader.Load(instance.PathXathData); |
||
3323 | // instance.Base_ViewBox.Child = obj as UIElement; |
||
3324 | //#else |
||
3325 | // MemoryStream memoryStream = new MemoryStream(Convert.FromBase64String(instance.PathXathData)); |
||
3326 | // object obj = XamlReader.Load(memoryStream); |
||
3327 | //#endif |
||
3328 | // instance.SetViewBox(); |
||
3329 | // } |
||
3330 | // break; |
||
3331 | #endregion |
||
3332 | default: |
||
3333 | break; |
||
3334 | }; |
||
3335 | } |
||
3336 | } |
||
3337 | } |
||
3338 | |||
3339 | /// <summary> |
||
3340 | /// 데이터베이스의 마크업데이터를 컨트롤로 변환한다. |
||
3341 | /// </summary> |
||
3342 | /// <param name="MarkupString"></param> |
||
3343 | // public void markupParse(string MarkupString, Canvas Layer, string DisplayColor, string ToolTipMessage, string userID, bool isConsolidate, List<CommonLib.DisplayColorInfo> anotherUserColor) |
||
3344 | // { |
||
3345 | |||
3346 | // if (MarkupString != "False") |
||
3347 | // { |
||
3348 | // #if SILVERLIGHT |
||
3349 | // SignUserSet = new List<SignControl>(); |
||
3350 | // #endif |
||
3351 | // SolidColorBrush _SetColor = new SolidColorBrush(StringToColorConverter.Parse(DisplayColor)); |
||
3352 | // string[] delimiterChars = { "|DZ|" }; |
||
3353 | // string[] delimiterChars2 = { "|" }; |
||
3354 | // string[] data = MarkupString.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); |
||
3355 | // List<string> dataSet = new List<string>(); |
||
3356 | |||
3357 | // foreach (var dataPease in data) |
||
3358 | // { |
||
3359 | // var item = JsonSerializerHelper.UnCompressString(dataPease); //언패킹작업 |
||
3360 | // var unkownControl = JsonSerializerHelper.JsonDeserialize<S_BaseControl>(item); //복호화작업 |
||
3361 | // try |
||
3362 | // { |
||
3363 | |||
3364 | |||
3365 | // switch (unkownControl.Name) |
||
3366 | // { |
||
3367 | // #region Arrow |
||
3368 | // case "ArrowControl": |
||
3369 | // using (S_ArrowControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl>(item)) |
||
3370 | // { |
||
3371 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3372 | // ArrowControl instance = new ArrowControl |
||
3373 | // { |
||
3374 | // LineSize = Convert.ToDouble(data2.First()), |
||
3375 | // ArrowStyle = s.ArStyle, |
||
3376 | // StartPoint = s.StartPoint, |
||
3377 | // EndPoint = s.EndPoint, |
||
3378 | // DimSize = s.DimSize, |
||
3379 | // DashSize = s.DashSize, |
||
3380 | // PointSet = s.PointSet, |
||
3381 | // StrokeColor = _SetColor, |
||
3382 | // UserID = s.UserID, |
||
3383 | // Opacity = s.Opac, |
||
3384 | // }; |
||
3385 | // if (isConsolidate) |
||
3386 | // { |
||
3387 | // instance.StrokeColor = new SolidColorBrush(StringToColorConverter.Parse(s.StrokeColor)); |
||
3388 | // } |
||
3389 | // ToolTipService.SetToolTip(instance, userID); |
||
3390 | // Layer.Children.Add(instance); |
||
3391 | // instance.ApplyTemplate(); |
||
3392 | // instance.SetArrowPath(); |
||
3393 | // } |
||
3394 | // break; |
||
3395 | // #endregion |
||
3396 | // #region ArrowText |
||
3397 | // case "ArrowTextControl": |
||
3398 | // using (S_ArrowTextControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowTextControl>(item)) |
||
3399 | // { |
||
3400 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3401 | // ArrowTextControl instance = new ArrowTextControl(); |
||
3402 | // Layer.Children.Add(instance); |
||
3403 | // instance.LineSize = Convert.ToDouble(data2.First()); |
||
3404 | // instance.PointSet = s.PointSet; |
||
3405 | // instance.StartPoint = s.StartPoint; |
||
3406 | // instance.EndPoint = s.EndPoint; |
||
3407 | // instance.isHighLight = s.isHighLight; |
||
3408 | // instance.StrokeColor = new SolidColorBrush(Colors.Red); |
||
3409 | // instance.DashSize = s.DashSize; |
||
3410 | // instance.ArrowTextStyle = s.ArrowStyle; |
||
3411 | // instance.ArrowText = s.ArrowText; |
||
3412 | // instance.Opacity = s.Opac; |
||
3413 | // instance.BorderSize = s.BorderSize; |
||
3414 | // instance.BoxWidth = s.BoxWidth; |
||
3415 | // instance.UserID = s.UserID; |
||
3416 | // instance.isFixed = s.isFixed; |
||
3417 | // instance.BoxHeight = s.BoxHeight; |
||
3418 | // instance.StrokeColor = _SetColor; |
||
3419 | // instance.isTrans = s.isTrans; |
||
3420 | // instance.Angle = s.Angle; |
||
3421 | // instance.MidPoint = s.MP; |
||
3422 | // if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
3423 | // { |
||
3424 | // s.fontConfig = new List<string>(); |
||
3425 | |||
3426 | // s.fontConfig.Add("Arial"); |
||
3427 | // s.fontConfig.Add("Normal"); |
||
3428 | // s.fontConfig.Add("Normal"); |
||
3429 | // s.fontConfig.Add("30"); |
||
3430 | // } |
||
3431 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
3432 | // instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
3433 | // instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
3434 | // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
3435 | // instance.ApplyTemplate(); |
||
3436 | // instance.SetArrowTextPath(); |
||
3437 | |||
3438 | // if (isConsolidate) |
||
3439 | // { |
||
3440 | // instance.StrokeColor = new SolidColorBrush(StringToColorConverter.Parse(s.StrokeColor)); |
||
3441 | // } |
||
3442 | // ToolTipService.SetToolTip(instance, userID); |
||
3443 | // }; |
||
3444 | // break; |
||
3445 | // #endregion |
||
3446 | // #region Arrow_Multi |
||
3447 | // case "ArrowControl_Multi": |
||
3448 | // using (S_ArrowControl_Multi s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(item)) |
||
3449 | // { |
||
3450 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3451 | // ArrowControl_Multi instance = new ArrowControl_Multi |
||
3452 | // { |
||
3453 | // LineSize = Convert.ToDouble(data2.First()), |
||
3454 | // StartPoint = s.StartPoint, |
||
3455 | // MiddlePoint = s.MP, |
||
3456 | // DashSize = s.DashSize, |
||
3457 | // EndPoint = s.EndPoint, |
||
3458 | // PointSet = s.PointSet, |
||
3459 | // Opacity = s.Opac, |
||
3460 | // UserID = s.UserID, |
||
3461 | // StrokeColor = _SetColor |
||
3462 | // }; |
||
3463 | // if (isConsolidate) |
||
3464 | // { |
||
3465 | // instance.StrokeColor = new SolidColorBrush(StringToColorConverter.Parse(s.StrokeColor)); |
||
3466 | // } |
||
3467 | // ToolTipService.SetToolTip(instance, userID); |
||
3468 | // Layer.Children.Add(instance); |
||
3469 | // instance.ApplyTemplate(); |
||
3470 | // instance.SetArrowMultiPath(); |
||
3471 | // //instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
3472 | |||
3473 | // } |
||
3474 | // break; |
||
3475 | // #endregion |
||
3476 | // #region Rectangle |
||
3477 | // case "RectagleControl": |
||
3478 | // using (S_RectControl s = JsonSerializerHelper.JsonDeserialize<S_RectControl>(item)) |
||
3479 | // { |
||
3480 | |||
3481 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3482 | // RectagleControl instance = new RectagleControl |
||
3483 | // { |
||
3484 | // LineSize = Convert.ToDouble(data2.First()), |
||
3485 | // Paint = s.PaintState, |
||
3486 | // StartPoint = s.StartPoint, |
||
3487 | // EndPoint = s.EndPoint, |
||
3488 | // Angle = s.Angle, |
||
3489 | // StrokeColor = _SetColor, |
||
3490 | // DashSize = s.DashSize, |
||
3491 | // Opacity = s.Opac, |
||
3492 | // LeftBottomPoint = s.LB, |
||
3493 | // TopRightPoint = s.TR, |
||
3494 | // PointSet = s.PointSet, |
||
3495 | // UserID = s.UserID, |
||
3496 | // }; |
||
3497 | |||
3498 | // if (isConsolidate) |
||
3499 | // { |
||
3500 | // instance.StrokeColor = new SolidColorBrush(StringToColorConverter.Parse(s.StrokeColor)); |
||
3501 | // } |
||
3502 | // ToolTipService.SetToolTip(instance, userID); |
||
3503 | |||
3504 | // Layer.Children.Add(instance); |
||
3505 | // instance.ApplyTemplate(); |
||
3506 | // instance.SetRectPath(); |
||
3507 | // } |
||
3508 | // break; |
||
3509 | // #endregion |
||
3510 | // #region Triangle |
||
3511 | // case "TriControl": |
||
3512 | // using (S_TriControl s = JsonSerializerHelper.JsonDeserialize<S_TriControl>(item)) |
||
3513 | // { |
||
3514 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3515 | // TriControl instance = new TriControl |
||
3516 | // { |
||
3517 | // LineSize = Convert.ToDouble(data2.First()), |
||
3518 | // MidPoint = s.MP, |
||
3519 | // StartPoint = s.StartPoint, |
||
3520 | // Paint = s.Paint, |
||
3521 | // EndPoint = s.EndPoint, |
||
3522 | // Opacity = s.Opac, |
||
3523 | // Angle = s.Angle, |
||
3524 | // DashSize = s.DashSize, |
||
3525 | // PointSet = s.PointSet, |
||
3526 | // UserID = s.UserID, |
||
3527 | // StrokeColor = _SetColor, |
||
3528 | // }; |
||
3529 | // if (isConsolidate) |
||
3530 | // { |
||
3531 | // instance.StrokeColor = new SolidColorBrush(StringToColorConverter.Parse(s.StrokeColor)); |
||
3532 | // } |
||
3533 | // ToolTipService.SetToolTip(instance, userID); |
||
3534 | // Layer.Children.Add(instance); |
||
3535 | // instance.ApplyTemplate(); |
||
3536 | // instance.SetTri(); |
||
3537 | // } |
||
3538 | // break; |
||
3539 | // #endregion |
||
3540 | // #region Cicle |
||
3541 | // case "CicleControl": |
||
3542 | // using (S_CicleControl s = JsonSerializerHelper.JsonDeserialize<S_CicleControl>(item)) |
||
3543 | // { |
||
3544 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3545 | // CicleControl instance = new CicleControl |
||
3546 | // { |
||
3547 | // LineSize = Convert.ToDouble(data2.First()), |
||
3548 | // Paint = s.PaintState, |
||
3549 | // StartPoint = s.StartPoint, |
||
3550 | // EndPoint = s.EndPoint, |
||
3551 | // LeftBottomPoint = s.LBP, |
||
3552 | // TopRightPoint = s.TRP, |
||
3553 | // Opacity = s.Opac, |
||
3554 | // Angle = s.Angle, |
||
3555 | // DashSize = s.DashSize, |
||
3556 | // PointSet = s.PointSet, |
||
3557 | // UserID = s.UserID, |
||
3558 | // StrokeColor = _SetColor, |
||
3559 | // }; |
||
3560 | // if (isConsolidate) |
||
3561 | // { |
||
3562 | // instance.StrokeColor = new SolidColorBrush(StringToColorConverter.Parse(s.StokeColor)); |
||
3563 | // } |
||
3564 | // ToolTipService.SetToolTip(instance, userID); |
||
3565 | // Layer.Children.Add(instance); |
||
3566 | // instance.ApplyTemplate(); |
||
3567 | // instance.SetCicle(); |
||
3568 | // } |
||
3569 | // break; |
||
3570 | // #endregion |
||
3571 | // #region Cloud |
||
3572 | // case "CloudControl": |
||
3573 | // using (S_CloudControl s = JsonSerializerHelper.JsonDeserialize<S_CloudControl>(item)) |
||
3574 | // { |
||
3575 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3576 | // CloudControl instance = new CloudControl |
||
3577 | // { |
||
3578 | // LineSize = Convert.ToDouble(data2.First()), |
||
3579 | // Toler = s.Toler, |
||
3580 | // PointSet = new List<Point>(), |
||
3581 | // ArcLength = s.ArcLength, |
||
3582 | // Paint = s.PaintState, |
||
3583 | // Opacity = s.Opac, |
||
3584 | // StrokeColor = _SetColor, |
||
3585 | // UserID = s.UserID, |
||
3586 | // isChain = s.IsChain, |
||
3587 | // DashSize = s.DashSize, |
||
3588 | // isTransOn = s.IsTrans, |
||
3589 | // //Fill = s.CloudFill, |
||
3590 | // }; |
||
3591 | // if (isConsolidate) |
||
3592 | // { |
||
3593 | // instance.StrokeColor = new SolidColorBrush(StringToColorConverter.Parse(s.StrokeColor)); |
||
3594 | // } |
||
3595 | // ToolTipService.SetToolTip(instance, userID); |
||
3596 | // Layer.Children.Add(instance); |
||
3597 | // instance.ApplyTemplate(); |
||
3598 | // instance.PointSet = s.pointSet; |
||
3599 | // instance.ChangePaint(s.PaintState); |
||
3600 | // } |
||
3601 | // break; |
||
3602 | // #endregion |
||
3603 | // #region Line |
||
3604 | // case "LineControl": |
||
3605 | // using (S_LineControl s = JsonSerializerHelper.JsonDeserialize<S_LineControl>(item)) |
||
3606 | // { |
||
3607 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3608 | // LineControl instance = new LineControl() |
||
3609 | // { |
||
3610 | // LineStyle = s.LnSet, |
||
3611 | // StartPoint = s.StartPoint, |
||
3612 | // EndPoint = s.EndPoint, |
||
3613 | // DashSize = s.DashSize, |
||
3614 | // PointSet = s.PointSet, |
||
3615 | // Opacity = s.Opac, |
||
3616 | // StrokeColor = _SetColor, |
||
3617 | // UserID = s.UserID, |
||
3618 | // Interval = s.Interval, |
||
3619 | // LineSize = Convert.ToDouble(data2.First()), |
||
3620 | // }; |
||
3621 | // if (isConsolidate) |
||
3622 | // { |
||
3623 | // instance.StrokeColor = new SolidColorBrush(StringToColorConverter.Parse(s.StokeColor)); |
||
3624 | // } |
||
3625 | // ToolTipService.SetToolTip(instance, userID); |
||
3626 | // Layer.Children.Add(instance); |
||
3627 | // instance.ApplyTemplate(); |
||
3628 | // instance.SetLinePath(); |
||
3629 | // } |
||
3630 | // break; |
||
3631 | // #endregion |
||
3632 | // #region Text |
||
3633 | // case "TextControl": |
||
3634 | // using (S_TextControl s = JsonSerializerHelper.JsonDeserialize<S_TextControl>(item)) |
||
3635 | // { |
||
3636 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3637 | // TextControl instance = new TextControl() |
||
3638 | // { |
||
3639 | // Text = s.Text, |
||
3640 | // StartPoint = s.StartPoint, |
||
3641 | // EndPoint = s.EndPoint, |
||
3642 | // Paint = s.PaintState, |
||
3643 | // LineSize = new Thickness(Convert.ToDouble(data2.First())), |
||
3644 | // TextSize = Convert.ToDouble(data2[1]), |
||
3645 | // FontColor = _SetColor, |
||
3646 | // FontSize = 10, |
||
3647 | // isHighLight = s.isHighLight, |
||
3648 | // Angle = s.Angle, |
||
3649 | // PointSet = s.PointSet, |
||
3650 | // Opacity = s.Opac, |
||
3651 | // UserID = s.UserID, |
||
3652 | // TextFamily = new FontFamily(s.fontConfig[0]), |
||
3653 | // TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]), |
||
3654 | // TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]), |
||
3655 | // }; |
||
3656 | // if (instance.Text != null) |
||
3657 | // { |
||
3658 | // if (isConsolidate) |
||
3659 | // { |
||
3660 | // instance.FontColor = new SolidColorBrush(StringToColorConverter.Parse(s.FontColor)); |
||
3661 | // } |
||
3662 | |||
3663 | // ToolTipService.SetToolTip(instance, userID); |
||
3664 | // Layer.Children.Add(instance); |
||
3665 | // if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
3666 | // { |
||
3667 | // s.fontConfig = new List<string>(); |
||
3668 | |||
3669 | // s.fontConfig.Add("Arial"); |
||
3670 | // s.fontConfig.Add("Normal"); |
||
3671 | // s.fontConfig.Add("Normal"); |
||
3672 | // s.fontConfig.Add("30"); |
||
3673 | // } |
||
3674 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
3675 | // instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
3676 | // instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
3677 | |||
3678 | // //if (s.fontConfig.Count == 3) |
||
3679 | // //{ |
||
3680 | // // instance.TextSize = 30; |
||
3681 | // //} |
||
3682 | // //else |
||
3683 | // //{ |
||
3684 | // // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
3685 | // //} |
||
3686 | |||
3687 | // instance.ApplyTemplate(); |
||
3688 | // if (s.fontConfig.Count() == 4) |
||
3689 | // { |
||
3690 | // instance.UnderLine = TextDecorations.Underline; |
||
3691 | // instance.Base_TextBlock.TextDecorations = instance.UnderLine; |
||
3692 | // } |
||
3693 | // instance.Base_TextBlock.Margin = new Thickness(instance.Base_TextBox.Margin.Left + 4); |
||
3694 | // instance.Base_TextBox.Visibility = Visibility.Collapsed; |
||
3695 | // instance.DrawingCloud(); |
||
3696 | |||
3697 | // } |
||
3698 | // } |
||
3699 | // break; |
||
3700 | // #endregion |
||
3701 | // #region Arc |
||
3702 | // case "ArcControl": |
||
3703 | // using (S_ArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArcControl>(item)) |
||
3704 | // { |
||
3705 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3706 | // ArcControl instance = new ArcControl() |
||
3707 | // { |
||
3708 | // StartPoint = s.StartPoint, |
||
3709 | // EndPoint = s.EndPoint, |
||
3710 | // DashSize = s.DashSize, |
||
3711 | // PointSet = s.PointSet, |
||
3712 | // MidPoint = s.MP, |
||
3713 | // UserID = s.UserID, |
||
3714 | // isTransOn = s.IsTrans, |
||
3715 | // StrokeColor = _SetColor, |
||
3716 | // LineSize = Convert.ToDouble(data2.First()), |
||
3717 | // }; |
||
3718 | // if (isConsolidate) |
||
3719 | // { |
||
3720 | // instance.StrokeColor = new SolidColorBrush(StringToColorConverter.Parse(s.StokeColor)); |
||
3721 | // } |
||
3722 | // ToolTipService.SetToolTip(instance, userID); |
||
3723 | // Layer.Children.Add(instance); |
||
3724 | // instance.ApplyTemplate(); |
||
3725 | // instance.SetArcPath(); |
||
3726 | // } |
||
3727 | // break; |
||
3728 | // #endregion |
||
3729 | // #region RectCloud |
||
3730 | // case "RectCloudControl": |
||
3731 | // using (S_RectCloudControl s = JsonSerializerHelper.JsonDeserialize<S_RectCloudControl>(item)) |
||
3732 | // { |
||
3733 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3734 | // RectCloudControl instance = new RectCloudControl() |
||
3735 | // { |
||
3736 | // StartPoint = s.StartPoint, |
||
3737 | // EndPoint = s.EndPoint, |
||
3738 | // LeftBottomPoint = s.LB, |
||
3739 | // Paint = s.PaintState, |
||
3740 | // Opacity = s.Opac, |
||
3741 | // TopRightPoint = s.TR, |
||
3742 | // PointSet = s.PointSet, |
||
3743 | // UserID = s.UserID, |
||
3744 | // StrokeColor = _SetColor, |
||
3745 | // DashSize = s.DashSize, |
||
3746 | // LineSize = Convert.ToDouble(data2.First()), |
||
3747 | // }; |
||
3748 | // if (isConsolidate) |
||
3749 | // { |
||
3750 | // instance.StrokeColor = new SolidColorBrush(StringToColorConverter.Parse(s.StrokeColor)); |
||
3751 | // } |
||
3752 | // ToolTipService.SetToolTip(instance, userID); |
||
3753 | // Layer.Children.Add(instance); |
||
3754 | // instance.ApplyTemplate(); |
||
3755 | // instance.SetRectCloud(); |
||
3756 | // } |
||
3757 | // break; |
||
3758 | // #endregion |
||
3759 | // #region Sign |
||
3760 | // case "SignControl": |
||
3761 | // { |
||
3762 | // using (S_SignControl s = JsonSerializerHelper.JsonDeserialize<S_SignControl>(item)) |
||
3763 | // { |
||
3764 | // SignControl instance = new SignControl |
||
3765 | // { |
||
3766 | // Angle = s.Angle, |
||
3767 | // UserNumber = s.UserNumber, |
||
3768 | // StartPoint = s.StartPoint, |
||
3769 | // TopRightPoint = s.TR, |
||
3770 | // EndPoint = s.EndPoint, |
||
3771 | // LeftBottomPoint = s.LB, |
||
3772 | // PointSet = s.PointSet, |
||
3773 | // SignImage = null, |
||
3774 | // UserID = s.UserID, |
||
3775 | // }; |
||
3776 | // ToolTipService.SetToolTip(instance, userID); |
||
3777 | |||
3778 | //#if SILVERLIGHT |
||
3779 | // SignUserSet.Add(instance); |
||
3780 | //#else |
||
3781 | // if (s.UserNumber != null) |
||
3782 | // { |
||
3783 | // var _sign = ExtensionParse.GetUserSign(s.UserNumber); |
||
3784 | // if (_sign != null) |
||
3785 | // { |
||
3786 | // byte[] imageBytes = System.Convert.FromBase64String(_sign); |
||
3787 | // BitmapImage im = ConvertSet.byteArrayToImage(imageBytes); |
||
3788 | // instance.SignImage = im; |
||
3789 | // } |
||
3790 | // } |
||
3791 | //#endif |
||
3792 | |||
3793 | // Layer.Children.Add(instance); |
||
3794 | // instance.ApplyTemplate(); |
||
3795 | // instance.SetImage(); |
||
3796 | // } |
||
3797 | // } |
||
3798 | // break; |
||
3799 | // #endregion |
||
3800 | // #region SymbolN |
||
3801 | // case "SymControlN": |
||
3802 | // using (S_SymControlN s = JsonSerializerHelper.JsonDeserialize<S_SymControlN>(item)) |
||
3803 | // { |
||
3804 | // SymControlN instance = new SymControlN() |
||
3805 | // { |
||
3806 | // PointSet = s.PointSet, |
||
3807 | // StartPoint = s.StartPoint, |
||
3808 | // EndPoint = s.EndPoint, |
||
3809 | // Angle = s.Angle, |
||
3810 | // LeftBottomPoint = s.LB, |
||
3811 | // TopRightPoint = s.TR, |
||
3812 | // Opacity = s.Opac, |
||
3813 | // UserID = s.UserID, |
||
3814 | // //PathXathData = s.DBData, |
||
3815 | // }; |
||
3816 | // Layer.Children.Add(instance); |
||
3817 | // instance.ApplyTemplate(); |
||
3818 | //#if SILVERLIGHT |
||
3819 | // instance.PathXathData = JsonSerializerHelper.UnCompressString_NonPrefix(s.DBData); |
||
3820 | // object obj = XamlReader.Load(JsonSerializerHelper.UnCompressString_NonPrefix(instance.PathXathData)); |
||
3821 | //#else |
||
3822 | // instance.PathXathData = JsonSerializerHelper.UnCompressString_NonPrefix(s.DBData); |
||
3823 | // MemoryStream memoryStream = new MemoryStream(Convert.FromBase64String(instance.PathXathData)); |
||
3824 | // object obj = XamlReader.Load(memoryStream); |
||
3825 | //#endif |
||
3826 | // instance.Base_ViewBox.Child = obj as UIElement; |
||
3827 | |||
3828 | //#if SILVERLIGHT |
||
3829 | // try |
||
3830 | // { //조장원 |
||
3831 | // if ((instance.Base_ViewBox.Child as Grid).FindChildByType<System.Windows.Shapes.Path>() !=null) |
||
3832 | // { |
||
3833 | // (instance.Base_ViewBox.Child as Grid).FindChildByType<System.Windows.Shapes.Path>().Fill = GetUserColor(anotherUserColor, userID); |
||
3834 | // } |
||
3835 | // if ((instance.Base_ViewBox.Child as Grid).FindChildByType<System.Windows.Shapes.Rectangle>() != null) |
||
3836 | // { |
||
3837 | // (instance.Base_ViewBox.Child as Grid).FindChildByType<System.Windows.Shapes.Rectangle>().Stroke = GetUserColor(anotherUserColor, userID); |
||
3838 | // } |
||
3839 | // if ((instance.Base_ViewBox.Child as Grid).FindChildByType<TextBox>() != null) |
||
3840 | // { |
||
3841 | // (instance.Base_ViewBox.Child as Grid).FindChildByType<TextBox>().BorderBrush = GetUserColor(anotherUserColor, userID); |
||
3842 | // (instance.Base_ViewBox.Child as Grid).FindChildByType<TextBox>().Foreground = GetUserColor(anotherUserColor, userID); |
||
3843 | // } |
||
3844 | // if ((instance.Base_ViewBox.Child as Grid).FindChildByType<TextBlock>() != null) |
||
3845 | // { |
||
3846 | // //(instance.Base_ViewBox.Child as Grid).FindChildByType<TextBlock>().Foreground = GetUserColor(anotherUserColor, userID); |
||
3847 | // //(instance.Base_ViewBox.Child as Grid).ChildrenOfType<TextBlock>().FindChildByType<TextBlock>().Foreground = GetUserColor(anotherUserColor, userID); |
||
3848 | // foreach (var textbl in (instance.Base_ViewBox.Child as Grid).ChildrenOfType<TextBlock>()) |
||
3849 | // { |
||
3850 | // textbl.Foreground = GetUserColor(anotherUserColor, userID); |
||
3851 | // } |
||
3852 | // } |
||
3853 | // } |
||
3854 | // catch (Exception) |
||
3855 | // { |
||
3856 | |||
3857 | |||
3858 | // } |
||
3859 | |||
3860 | //#endif |
||
3861 | |||
3862 | // instance.SetViewBox(); |
||
3863 | // } |
||
3864 | // break; |
||
3865 | // #endregion |
||
3866 | // #region Ink |
||
3867 | // case "InkPresenter": |
||
3868 | // using (S_PensilControl s = JsonSerializerHelper.JsonDeserialize<S_PensilControl>(item)) |
||
3869 | // { |
||
3870 | //#if SILVERLIGHT |
||
3871 | // if (((Layer as UIElement) as FrameworkElement).Name == "BaseLayer") |
||
3872 | // { |
||
3873 | // this._InkBoard.Strokes = s.SCC; |
||
3874 | // } |
||
3875 | // else |
||
3876 | // { |
||
3877 | // InkPresenter instance = new InkPresenter(); |
||
3878 | // instance.Strokes = s.SCC; |
||
3879 | // instance.Tag = userID.ToString(); |
||
3880 | // foreach (var stroke in instance.Strokes) |
||
3881 | // { |
||
3882 | // stroke.DrawingAttributes.Color = StringToColorConverter.Parse(DisplayColor); |
||
3883 | // } |
||
3884 | // ToolTipService.SetToolTip(instance, userID); |
||
3885 | // Layer.Children.Add(instance); |
||
3886 | // } |
||
3887 | |||
3888 | // // |
||
3889 | //#endif |
||
3890 | |||
3891 | // } |
||
3892 | // break; |
||
3893 | // #endregion |
||
3894 | // #region Date |
||
3895 | // case "DateControl": |
||
3896 | // { |
||
3897 | // using (S_DateControl s = JsonSerializerHelper.JsonDeserialize<S_DateControl>(item)) |
||
3898 | // { |
||
3899 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3900 | // DateControl instance = new DateControl |
||
3901 | // { |
||
3902 | // Angle = s.Angle, |
||
3903 | // StartPoint = s.StartPoint, |
||
3904 | // EndPoint = s.EndPoint, |
||
3905 | // LeftBottomPoint = s.LB, |
||
3906 | // TopRightPoint = s.TR, |
||
3907 | // Opacity = s.Opac, |
||
3908 | // FontColor = _SetColor, |
||
3909 | // LineSize = Convert.ToDouble(data2.First()), |
||
3910 | // Text = s.Text, |
||
3911 | // UserID = s.UserID, |
||
3912 | // PointSet = s.PointSet, |
||
3913 | // }; |
||
3914 | // if (isConsolidate) |
||
3915 | // { |
||
3916 | // instance.FontColor = new SolidColorBrush(StringToColorConverter.Parse(s.FontColor)); |
||
3917 | // } |
||
3918 | // ToolTipService.SetToolTip(instance, userID); |
||
3919 | // Layer.Children.Add(instance); |
||
3920 | // instance.ApplyTemplate(); |
||
3921 | // instance.SetDate(); |
||
3922 | // } |
||
3923 | // } |
||
3924 | // break; |
||
3925 | // #endregion |
||
3926 | // #region Symbol |
||
3927 | // case "SymControl": |
||
3928 | // using (S_SymControl s = JsonSerializerHelper.JsonDeserialize<S_SymControl>(item)) |
||
3929 | // { |
||
3930 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
3931 | // StringToPathConverter sm = new StringToPathConverter(); |
||
3932 | // SymControl instance = new SymControl() |
||
3933 | // { |
||
3934 | // LineSize = Convert.ToDouble(data2.First()), |
||
3935 | // PointSet = s.PointSet, |
||
3936 | // Paint = s.PaintState, |
||
3937 | // StartPoint = s.StartPoint, |
||
3938 | // StrokeColor = _SetColor, |
||
3939 | // EndPoint = s.EndPoint, |
||
3940 | // Angle = s.Angle, |
||
3941 | // UserID = s.UserID, |
||
3942 | // LeftBottomPoint = s.LB, |
||
3943 | // TopRightPoint = s.TR, |
||
3944 | // PathData = sm.Convert(s.PathInfo.ToString()), |
||
3945 | // Opacity = s.Opac, |
||
3946 | // }; |
||
3947 | // if (isConsolidate) |
||
3948 | // { |
||
3949 | // instance.StrokeColor = new SolidColorBrush(StringToColorConverter.Parse(s.StrokeColor)); |
||
3950 | // } |
||
3951 | // ToolTipService.SetToolTip(instance, userID); |
||
3952 | // Layer.Children.Add(instance); |
||
3953 | // instance.ApplyTemplate(); |
||
3954 | // instance.SetSymPath(); |
||
3955 | // } |
||
3956 | // break; |
||
3957 | // #endregion |
||
3958 | // #region Image |
||
3959 | // case "ImgControl": |
||
3960 | // using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item)) |
||
3961 | // { |
||
3962 | // ImageSource img; |
||
3963 | // ImgControl instance = new ImgControl |
||
3964 | // { |
||
3965 | // Angle = s.Angle, |
||
3966 | // StartPoint = s.StartPoint, |
||
3967 | // TopRightPoint = s.TR, |
||
3968 | // EndPoint = s.EndPoint, |
||
3969 | // LeftBottomPoint = s.LB, |
||
3970 | // UserID = s.UserID, |
||
3971 | // PointSet = s.PointSet, |
||
3972 | // Opacity = s.Opac, |
||
3973 | // FilePath = s.ImagePath, |
||
3974 | // }; |
||
3975 | // Layer.Children.Add(instance); |
||
3976 | // instance.ApplyTemplate(); |
||
3977 | // if (!s.ImagePath.Contains("http://")) |
||
3978 | // { |
||
3979 | // s.ImagePath = "http://"+s.ImagePath; |
||
3980 | // } |
||
3981 | // instance.ImageData = new BitmapImage(new Uri(s.ImagePath)); |
||
3982 | |||
3983 | // ToolTipService.SetToolTip(instance, userID); |
||
3984 | // instance.SetImage(); |
||
3985 | // } |
||
3986 | // break; |
||
3987 | // #endregion |
||
3988 | // default: |
||
3989 | // break; |
||
3990 | // }; |
||
3991 | // } |
||
3992 | // catch (Exception) |
||
3993 | // { |
||
3994 | |||
3995 | // } |
||
3996 | // } |
||
3997 | // } |
||
3998 | // #if SILVERLIGHT |
||
3999 | // if (SignUserSet.Count >= 0) |
||
4000 | // { |
||
4001 | // this.GetSignImageLoaded(SignUserSet); |
||
4002 | // } |
||
4003 | // #endif |
||
4004 | // } |
||
4005 | |||
4006 | //#if !SILVERLIGHT |
||
4007 | // /// <summary> |
||
4008 | // /// 데이터베이스의 마크업데이터를 컨트롤로 변환한다. |
||
4009 | // /// </summary> |
||
4010 | // /// <param name="MarkupString"></param> |
||
4011 | // public Canvas markupParseToCanvas(string MarkupString, Canvas Layer, string DisplayColor, string ToolTipMessage) |
||
4012 | // { |
||
4013 | // if (MarkupString != "False") |
||
4014 | // { |
||
4015 | //#if SILVERLIGHT |
||
4016 | // SignUserSet = new List<SignControl>(); |
||
4017 | //#endif |
||
4018 | // SolidColorBrush _SetColor = new SolidColorBrush(StringToColorConverter.Parse(DisplayColor)); |
||
4019 | // string[] delimiterChars = { "|DZ|" }; |
||
4020 | // string[] delimiterChars2 = { "|" }; |
||
4021 | // string[] data = MarkupString.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); |
||
4022 | // List<string> dataSet = new List<string>(); |
||
4023 | |||
4024 | // foreach (var dataPease in data) |
||
4025 | // { |
||
4026 | // var item = JsonSerializerHelper.UnCompressString(dataPease); //언패킹작업 |
||
4027 | // var unkownControl = JsonSerializerHelper.JsonDeserialize<S_BaseControl>(item); //복호화작업 |
||
4028 | // switch (unkownControl.Name) |
||
4029 | // { |
||
4030 | // #region Arrow |
||
4031 | // case "ArrowControl": |
||
4032 | // using (S_ArrowControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl>(item)) |
||
4033 | // { |
||
4034 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4035 | // ArrowControl instance = new ArrowControl |
||
4036 | // { |
||
4037 | // LineSize = Convert.ToDouble(data2.First()), |
||
4038 | // ArrowStyle = s.ArStyle, |
||
4039 | // StartPoint = s.StartPoint, |
||
4040 | // EndPoint = s.EndPoint, |
||
4041 | // DashSize = s.DashSize, |
||
4042 | // DimSize = s.DimSize, |
||
4043 | // PointSet = s.PointSet, |
||
4044 | // StrokeColor = _SetColor, |
||
4045 | // //StrokeColor = new SolidColorBrush(Colors.Red), |
||
4046 | // Opacity = s.Opac, |
||
4047 | // }; |
||
4048 | //#if SILVERLIGHT |
||
4049 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
4050 | //#endif |
||
4051 | |||
4052 | // Layer.Children.Add(instance); |
||
4053 | // instance.ApplyTemplate(); |
||
4054 | // instance.SetArrowPath(); |
||
4055 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
4056 | |||
4057 | // } |
||
4058 | // break; |
||
4059 | // #endregion |
||
4060 | // #region ArrowText |
||
4061 | // case "ArrowTextControl": |
||
4062 | // using (S_ArrowTextControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowTextControl>(item)) |
||
4063 | // { |
||
4064 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4065 | // ArrowTextControl instance = new ArrowTextControl(); |
||
4066 | // Layer.Children.Add(instance); |
||
4067 | // instance.LineSize = Convert.ToDouble(data2.First()); |
||
4068 | // instance.PointSet = s.PointSet; |
||
4069 | // instance.StartPoint = s.StartPoint; |
||
4070 | // instance.EndPoint = s.EndPoint; |
||
4071 | // instance.isHighLight = s.isHighLight; |
||
4072 | // instance.DashSize = s.DashSize; |
||
4073 | // instance.ArrowTextStyle = s.ArrowStyle; |
||
4074 | // instance.ArrowText = s.ArrowText; |
||
4075 | // instance.Opacity = s.Opac; |
||
4076 | // instance.ArrowText = s.ArrowText.Replace("_x", "X"); |
||
4077 | // instance.ArrowText = s.ArrowText.Replace("_y", "Y"); |
||
4078 | // instance.isFixed = s.isFixed; |
||
4079 | // instance.BorderSize = s.BorderSize; |
||
4080 | // instance.BoxWidth = s.BoxWidth; |
||
4081 | // instance.Angle = s.Angle; |
||
4082 | // instance.BoxHeight = s.BoxHeight; |
||
4083 | // //instance.StrokeColor = new SolidColorBrush(Colors.Red); |
||
4084 | // instance.StrokeColor = _SetColor; |
||
4085 | // instance.isTrans = s.isTrans; |
||
4086 | // instance.MidPoint = s.MP; |
||
4087 | // //if (s.fontConfig == null || s.fontConfig.ToList().Count == 0) |
||
4088 | // //{ |
||
4089 | // // s.fontConfig = new List<string>(); |
||
4090 | |||
4091 | // // s.fontConfig.Add("Arial"); |
||
4092 | // // s.fontConfig.Add("Normal"); |
||
4093 | // // s.fontConfig.Add("Normal"); |
||
4094 | // // s.fontConfig.Add("30"); |
||
4095 | // //} |
||
4096 | // //instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
4097 | // //instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
4098 | // //instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
4099 | // //instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
4100 | |||
4101 | // if (s.fontConfig != null || s.fontConfig.ToList().Count() == 4) |
||
4102 | // { |
||
4103 | // instance.TextFamily = new FontFamily(s.fontConfig[0]); |
||
4104 | // instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
||
4105 | // instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
||
4106 | // instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
||
4107 | // } |
||
4108 | |||
4109 | |||
4110 | // instance.ApplyTemplate(); |
||
4111 | // instance.SetArrowTextPath(); |
||
4112 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
4113 | // }; |
||
4114 | // break; |
||
4115 | // #endregion |
||
4116 | // #region Arrow_Multi |
||
4117 | // case "ArrowControl_Multi": |
||
4118 | // using (S_ArrowControl_Multi s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(item)) |
||
4119 | // { |
||
4120 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4121 | // ArrowControl_Multi instance = new ArrowControl_Multi |
||
4122 | // { |
||
4123 | // LineSize = Convert.ToDouble(data2.First()), |
||
4124 | // StartPoint = s.StartPoint, |
||
4125 | // MiddlePoint = s.MP, |
||
4126 | // DashSize = s.DashSize, |
||
4127 | // EndPoint = s.EndPoint, |
||
4128 | // PointSet = s.PointSet, |
||
4129 | // Opacity = s.Opac, |
||
4130 | // //StrokeColor = new SolidColorBrush(Colors.Red) |
||
4131 | // StrokeColor = _SetColor, |
||
4132 | // }; |
||
4133 | //#if SILVERLIGHT |
||
4134 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
4135 | //#endif |
||
4136 | // Layer.Children.Add(instance); |
||
4137 | // instance.ApplyTemplate(); |
||
4138 | // instance.SetArrowMultiPath(); |
||
4139 | // instance.SetValue(ToolTipService.ToolTipProperty, ToolTipMessage); |
||
4140 | |||
4141 | // } |
||
4142 | // break; |
||
4143 | // #endregion |
||
4144 | // #region Rectangle |
||
4145 | // case "RectagleControl": |
||
4146 | // using (S_RectControl s = JsonSerializerHelper.JsonDeserialize<S_RectControl>(item)) |
||
4147 | // { |
||
4148 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4149 | // RectagleControl instance = new RectagleControl |
||
4150 | // { |
||
4151 | // LineSize = Convert.ToDouble(data2.First()), |
||
4152 | // Paint = s.PaintState, |
||
4153 | // StartPoint = s.StartPoint, |
||
4154 | // EndPoint = s.EndPoint, |
||
4155 | // Angle = s.Angle, |
||
4156 | // //StrokeColor = new SolidColorBrush(Colors.Red), |
||
4157 | // StrokeColor = _SetColor, |
||
4158 | // DashSize = s.DashSize, |
||
4159 | // Opacity = s.Opac, |
||
4160 | // LeftBottomPoint = s.LB, |
||
4161 | // TopRightPoint = s.TR, |
||
4162 | // PointSet = s.PointSet |
||
4163 | // }; |
||
4164 | |||
4165 | |||
4166 | |||
4167 | // if (ToolTipService.GetToolTip(instance) == null) |
||
4168 | // { |
||
4169 | //#if SILVERLIGHT |
||
4170 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
4171 | //#endif |
||
4172 | // } |
||
4173 | |||
4174 | // Layer.Children.Add(instance); |
||
4175 | // instance.ApplyTemplate(); |
||
4176 | // instance.SetRectPath(); |
||
4177 | // } |
||
4178 | // break; |
||
4179 | // #endregion |
||
4180 | // #region Triangle |
||
4181 | // case "TriControl": |
||
4182 | // using (S_TriControl s = JsonSerializerHelper.JsonDeserialize<S_TriControl>(item)) |
||
4183 | // { |
||
4184 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4185 | // TriControl instance = new TriControl |
||
4186 | // { |
||
4187 | // LineSize = Convert.ToDouble(data2.First()), |
||
4188 | // MidPoint = s.MP, |
||
4189 | // StartPoint = s.StartPoint, |
||
4190 | // Paint = s.Paint, |
||
4191 | // EndPoint = s.EndPoint, |
||
4192 | // Opacity = s.Opac, |
||
4193 | // Angle = s.Angle, |
||
4194 | // DashSize = s.DashSize, |
||
4195 | // PointSet = s.PointSet, |
||
4196 | // //StrokeColor = new SolidColorBrush(Colors.Red), |
||
4197 | // StrokeColor = _SetColor, |
||
4198 | // }; |
||
4199 | //#if SILVERLIGHT |
||
4200 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
4201 | //#endif |
||
4202 | // Layer.Children.Add(instance); |
||
4203 | // instance.ApplyTemplate(); |
||
4204 | // instance.SetTri(); |
||
4205 | // } |
||
4206 | // break; |
||
4207 | // #endregion |
||
4208 | // #region Cicle |
||
4209 | // case "CicleControl": |
||
4210 | // using (S_CicleControl s = JsonSerializerHelper.JsonDeserialize<S_CicleControl>(item)) |
||
4211 | // { |
||
4212 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4213 | // CicleControl instance = new CicleControl |
||
4214 | // { |
||
4215 | // LineSize = Convert.ToDouble(data2.First()), |
||
4216 | // Paint = s.PaintState, |
||
4217 | // StartPoint = s.StartPoint, |
||
4218 | // EndPoint = s.EndPoint, |
||
4219 | // LeftBottomPoint = s.LBP, |
||
4220 | // TopRightPoint = s.TRP, |
||
4221 | // Opacity = s.Opac, |
||
4222 | // Angle = s.Angle, |
||
4223 | // DashSize = s.DashSize, |
||
4224 | // PointSet = s.PointSet, |
||
4225 | // //StrokeColor = new SolidColorBrush(Colors.Red), |
||
4226 | // StrokeColor = _SetColor, |
||
4227 | // }; |
||
4228 | //#if SILVERLIGHT |
||
4229 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
4230 | //#endif |
||
4231 | // Layer.Children.Add(instance); |
||
4232 | // instance.ApplyTemplate(); |
||
4233 | // instance.SetCicle(); |
||
4234 | // } |
||
4235 | // break; |
||
4236 | // #endregion |
||
4237 | // #region Cloud |
||
4238 | // case "CloudControl": |
||
4239 | // using (S_CloudControl s = JsonSerializerHelper.JsonDeserialize<S_CloudControl>(item)) |
||
4240 | // { |
||
4241 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4242 | // CloudControl instance = new CloudControl |
||
4243 | // { |
||
4244 | // LineSize = Convert.ToDouble(data2.First()), |
||
4245 | // Toler = s.Toler, |
||
4246 | // PointSet = new List<Point>(), |
||
4247 | // ArcLength = s.ArcLength, |
||
4248 | // Paint = s.PaintState, |
||
4249 | // Opacity = s.Opac, |
||
4250 | // DashSize = s.DashSize, |
||
4251 | // isTransOn = s.IsTrans, |
||
4252 | // isChain = s.IsChain, |
||
4253 | // //StrokeColor = new SolidColorBrush(Colors.Red), |
||
4254 | // StrokeColor = _SetColor, |
||
4255 | // //Fill = s.CloudFill, |
||
4256 | // }; |
||
4257 | //#if SILVERLIGHT |
||
4258 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
4259 | //#endif |
||
4260 | // Layer.Children.Add(instance); |
||
4261 | // instance.ApplyTemplate(); |
||
4262 | // instance.PointSet = s.pointSet; |
||
4263 | // instance.ChangePaint(s.PaintState); |
||
4264 | // } |
||
4265 | // break; |
||
4266 | // #endregion |
||
4267 | // #region Line |
||
4268 | // case "LineControl": |
||
4269 | // using (S_LineControl s = JsonSerializerHelper.JsonDeserialize<S_LineControl>(item)) |
||
4270 | // { |
||
4271 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4272 | // LineControl instance = new LineControl() |
||
4273 | // { |
||
4274 | // LineStyle = s.LnSet, |
||
4275 | // StartPoint = s.StartPoint, |
||
4276 | // EndPoint = s.EndPoint, |
||
4277 | // DashSize = s.DashSize, |
||
4278 | // Interval = s.Interval, |
||
4279 | // PointSet = s.PointSet, |
||
4280 | // Opacity = s.Opac, |
||
4281 | // //StrokeColor = new SolidColorBrush(Colors.Red), |
||
4282 | // StrokeColor = _SetColor, |
||
4283 | // LineSize = Convert.ToDouble(data2.First()), |
||
4284 | // }; |
||
4285 | //#if SILVERLIGHT |
||
4286 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
4287 | //#endif |
||
4288 | // Layer.Children.Add(instance); |
||
4289 | // instance.ApplyTemplate(); |
||
4290 | // instance.SetLinePath(); |
||
4291 | // } |
||
4292 | // break; |
||
4293 | // #endregion |
||
4294 | // #region Text |
||
4295 | // case "TextControl": |
||
4296 | // using (S_TextControl s = JsonSerializerHelper.JsonDeserialize<S_TextControl>(item)) |
||
4297 | // { |
||
4298 | // try |
||
4299 | // { |
||
4300 | // #region Test |
||
4301 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4302 | // TextControl instance = new TextControl() |
||
4303 | // { |
||
4304 | // Text = s.Text, |
||
4305 | // StartPoint = s.StartPoint, |
||
4306 | // EndPoint = s.EndPoint, |
||
4307 | // Paint = s.PaintState, |
||
4308 | // LineSize = new Thickness(Convert.ToDouble(data2.First())), |
||
4309 | // TextSize = Convert.ToDouble(data2[1]), |
||
4310 | // //FontColor = new SolidColorBrush(Colors.Red), |
||
4311 | // FontColor =_SetColor, |
||
4312 | // FontSize = 10, |
||
4313 | // isHighLight = s.isHighLight, |
||
4314 | // Angle = s.Angle, |
||
4315 | // PointSet = s.PointSet, |
||
4316 | // Opacity = s.Opac, |
||
4317 | // TextFamily = new FontFamily(s.fontConfig[0]), |
||
4318 | // TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]), |
||
4319 | // TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]), |
||
4320 | // }; |
||
4321 | //#if SILVERLIGHT |
||
4322 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
4323 | //#endif |
||
4324 | // if (instance.Text != null) |
||
4325 | // { |
||
4326 | // instance.Text = s.Text; |
||
4327 | // instance.Text = s.Text.Replace("_x", "X"); |
||
4328 | // instance.Text = s.Text.Replace("_y", "Y"); |
||
4329 | // Layer.Children.Add(instance); |
||
4330 | // instance.ApplyTemplate(); |
||
4331 | // if (s.fontConfig.Count() == 4) |
||
4332 | // { |
||
4333 | // instance.UnderLine = TextDecorations.Underline; |
||
4334 | // instance.Base_TextBlock.TextDecorations = instance.UnderLine; |
||
4335 | // } |
||
4336 | // instance.Base_TextBlock.Margin = new Thickness(instance.Base_TextBox.Margin.Left + 4); |
||
4337 | // instance.Base_TextBox.Visibility = Visibility.Collapsed; |
||
4338 | |||
4339 | // instance.SetBoxData(s.BoxW, s.BoxH); |
||
4340 | // instance.DrawingCloud(); |
||
4341 | // } |
||
4342 | // #endregion |
||
4343 | // } |
||
4344 | // catch (Exception ex) |
||
4345 | // { |
||
4346 | // System.Diagnostics.Debug.WriteLine("Text에러 발생 : " + ex.Message); |
||
4347 | // } |
||
4348 | // } |
||
4349 | // break; |
||
4350 | // #endregion |
||
4351 | // #region Arc |
||
4352 | // case "ArcControl": |
||
4353 | // using (S_ArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArcControl>(item)) |
||
4354 | // { |
||
4355 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4356 | // ArcControl instance = new ArcControl() |
||
4357 | // { |
||
4358 | // StartPoint = s.StartPoint, |
||
4359 | // EndPoint = s.EndPoint, |
||
4360 | // DashSize = s.DashSize, |
||
4361 | // PointSet = s.PointSet, |
||
4362 | // MidPoint = s.MP, |
||
4363 | // //StrokeColor = new SolidColorBrush(Colors.Red), |
||
4364 | // StrokeColor = _SetColor, |
||
4365 | // isTransOn = s.IsTrans, |
||
4366 | // LineSize = Convert.ToDouble(data2.First()), |
||
4367 | // }; |
||
4368 | //#if SILVERLIGHT |
||
4369 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
4370 | //#endif |
||
4371 | // Layer.Children.Add(instance); |
||
4372 | // instance.ApplyTemplate(); |
||
4373 | // instance.SetArcPath(); |
||
4374 | // } |
||
4375 | // break; |
||
4376 | // #endregion |
||
4377 | // #region RectCloud |
||
4378 | // case "RectCloudControl": |
||
4379 | // using (S_RectCloudControl s = JsonSerializerHelper.JsonDeserialize<S_RectCloudControl>(item)) |
||
4380 | // { |
||
4381 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4382 | // RectCloudControl instance = new RectCloudControl() |
||
4383 | // { |
||
4384 | // StartPoint = s.StartPoint, |
||
4385 | // EndPoint = s.EndPoint, |
||
4386 | // LeftBottomPoint = s.LB, |
||
4387 | // Paint = s.PaintState, |
||
4388 | // Opacity = s.Opac, |
||
4389 | // TopRightPoint = s.TR, |
||
4390 | // PointSet = s.PointSet, |
||
4391 | // DashSize = s.DashSize, |
||
4392 | // //StrokeColor = new SolidColorBrush(Colors.Red), |
||
4393 | // StrokeColor = _SetColor, |
||
4394 | // LineSize = Convert.ToDouble(data2.First()), |
||
4395 | // }; |
||
4396 | //#if SILVERLIGHT |
||
4397 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
4398 | //#endif |
||
4399 | // Layer.Children.Add(instance); |
||
4400 | // instance.ApplyTemplate(); |
||
4401 | // instance.SetRectCloud(); |
||
4402 | // } |
||
4403 | // break; |
||
4404 | // #endregion |
||
4405 | // #region Sign |
||
4406 | // case "SignControl": |
||
4407 | // { |
||
4408 | // using (S_SignControl s = JsonSerializerHelper.JsonDeserialize<S_SignControl>(item)) |
||
4409 | // { |
||
4410 | // SignControl instance = new SignControl |
||
4411 | // { |
||
4412 | // Angle = s.Angle, |
||
4413 | // UserNumber = s.UserNumber, |
||
4414 | // StartPoint = s.StartPoint, |
||
4415 | // TopRightPoint = s.TR, |
||
4416 | // EndPoint = s.EndPoint, |
||
4417 | // LeftBottomPoint = s.LB, |
||
4418 | // PointSet = s.PointSet, |
||
4419 | // SignImage = null, |
||
4420 | // }; |
||
4421 | //#if SILVERLIGHT |
||
4422 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
4423 | //#endif |
||
4424 | //#if SILVERLIGHT |
||
4425 | // SignUserSet.Add(instance); |
||
4426 | //#else |
||
4427 | // if (s.UserNumber!=null) |
||
4428 | // { |
||
4429 | // var _sign = ExtensionParse.GetUserSign(s.UserNumber); |
||
4430 | // if (_sign != null) |
||
4431 | // { |
||
4432 | // byte[] imageBytes = System.Convert.FromBase64String(_sign); |
||
4433 | // using(Stream stream = new MemoryStream(imageBytes)) |
||
4434 | // { |
||
4435 | // BitmapImage diagramBitMap= new BitmapImage(); |
||
4436 | // diagramBitMap.BeginInit(); |
||
4437 | // diagramBitMap.CacheOption = BitmapCacheOption.OnLoad; |
||
4438 | // diagramBitMap.StreamSource = stream; |
||
4439 | // diagramBitMap.EndInit(); |
||
4440 | // diagramBitMap.Freeze(); |
||
4441 | // stream.Close(); |
||
4442 | // instance.SignImage = diagramBitMap; |
||
4443 | // } |
||
4444 | // //BitmapImage im = ConvertSet.byteArrayToImage(imageBytes); |
||
4445 | // //instance.SignImage = im; |
||
4446 | // } |
||
4447 | // } |
||
4448 | //#endif |
||
4449 | |||
4450 | // Layer.Children.Add(instance); |
||
4451 | // instance.ApplyTemplate(); |
||
4452 | // instance.OnApplyTemplate(); |
||
4453 | // instance.SetImage(); |
||
4454 | // } |
||
4455 | // } |
||
4456 | // break; |
||
4457 | // #endregion |
||
4458 | // #region Ink |
||
4459 | // case "InkPresenter": |
||
4460 | //#if SILVERLIGHT |
||
4461 | // using (S_PensilControl s = JsonSerializerHelper.JsonDeserialize<S_PensilControl>(item)) |
||
4462 | // { |
||
4463 | |||
4464 | // this._InkBoard.Strokes = s.SCC; |
||
4465 | // } |
||
4466 | // break; |
||
4467 | //#else |
||
4468 | // using (S_PensilControl s = JsonSerializerHelper.JsonDeserialize<S_PensilControl>(item)) |
||
4469 | // { |
||
4470 | // StrokeCollection sc = new StrokeCollection(); |
||
4471 | // foreach (var wpfStroke in s.SCC) |
||
4472 | // { |
||
4473 | // if (wpfStroke.StylusPoints.Count == 0) |
||
4474 | // { |
||
4475 | |||
4476 | // } |
||
4477 | // else |
||
4478 | // { |
||
4479 | // wpfStroke.Color = StringToColorConverter.Parse(DisplayColor); |
||
4480 | // sc.Add(new Stroke(wpfStroke.StylusPoints, wpfStroke)); |
||
4481 | // } |
||
4482 | // } |
||
4483 | // if (sc.Count > 0) |
||
4484 | // { |
||
4485 | // InkPresenter temp = new InkPresenter(); |
||
4486 | // temp.Strokes = sc; |
||
4487 | // temp.Opacity = s.Opac; |
||
4488 | // Layer.Children.Add(temp); |
||
4489 | // } |
||
4490 | // else |
||
4491 | // { |
||
4492 | |||
4493 | // } |
||
4494 | // } |
||
4495 | // break; |
||
4496 | //#endif |
||
4497 | |||
4498 | // #endregion |
||
4499 | // #region Date |
||
4500 | // case "DateControl": |
||
4501 | // { |
||
4502 | // using (S_DateControl s = JsonSerializerHelper.JsonDeserialize<S_DateControl>(item)) |
||
4503 | // { |
||
4504 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4505 | // DateControl instance = new DateControl |
||
4506 | // { |
||
4507 | // Angle = s.Angle, |
||
4508 | // StartPoint = s.StartPoint, |
||
4509 | // EndPoint = s.EndPoint, |
||
4510 | // LeftBottomPoint = s.LB, |
||
4511 | // TopRightPoint = s.TR, |
||
4512 | // Opacity = s.Opac, |
||
4513 | // //FontColor = new SolidColorBrush(Colors.Red), |
||
4514 | // FontColor = _SetColor, |
||
4515 | // LineSize = Convert.ToDouble(data2.First()), |
||
4516 | // Text = s.Text, |
||
4517 | // PointSet = s.PointSet, |
||
4518 | // }; |
||
4519 | //#if SILVERLIGHT |
||
4520 | // ToolTipService.SetToolTip(instance, UserNumber); |
||
4521 | //#endif |
||
4522 | // Layer.Children.Add(instance); |
||
4523 | // instance.ApplyTemplate(); |
||
4524 | // instance.SetDate(); |
||
4525 | // } |
||
4526 | // } |
||
4527 | // break; |
||
4528 | // #endregion |
||
4529 | // #region Symbol |
||
4530 | // case "SymControl": |
||
4531 | // using (S_SymControl s = JsonSerializerHelper.JsonDeserialize<S_SymControl>(item)) |
||
4532 | // { |
||
4533 | // string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
||
4534 | // StringToPathConverter sm = new StringToPathConverter(); |
||
4535 | // SymControl instance = new SymControl() |
||
4536 | // { |
||
4537 | // LineSize = Convert.ToDouble(data2.First()), |
||
4538 | // PointSet = s.PointSet, |
||
4539 | // Paint = s.PaintState, |
||
4540 | // StartPoint = s.StartPoint, |
||
4541 | // StrokeColor = _SetColor, |
||
4542 | // EndPoint = s.EndPoint, |
||
4543 | // Angle = s.Angle, |
||
4544 | // LeftBottomPoint = s.LB, |
||
4545 | // TopRightPoint = s.TR, |
||
4546 | // PathData = sm.Convert(s.PathInfo.ToString()), |
||
4547 | // Opacity = s.Opac, |
||
4548 | // }; |
||
4549 | // Layer.Children.Add(instance); |
||
4550 | // instance.ApplyTemplate(); |
||
4551 | // instance.SetSymPath(); |
||
4552 | // } |
||
4553 | // break; |
||
4554 | // #endregion |
||
4555 | // #region SymbolN |
||
4556 | // case "SymControlN": |
||
4557 | // using (MarkupEditToolKit.Serialize.S_Control.S_SymControlN s = JsonSerializerHelper.JsonDeserialize<MarkupEditToolKit.Serialize.S_Control.S_SymControlN>(item)) |
||
4558 | // { |
||
4559 | // SymControlN instance = new SymControlN() |
||
4560 | // { |
||
4561 | // PointSet = s.PointSet, |
||
4562 | // StartPoint = s.StartPoint, |
||
4563 | // EndPoint = s.EndPoint, |
||
4564 | // Angle = s.Angle, |
||
4565 | // LeftBottomPoint = s.LB, |
||
4566 | // TopRightPoint = s.TR, |
||
4567 | // Opacity = s.Opac, |
||
4568 | // //PathXathData = s.XamlData, |
||
4569 | // }; |
||
4570 | // Layer.Children.Add(instance); |
||
4571 | // instance.ApplyTemplate(); |
||
4572 | // //s.StrokeColor = "; |
||
4573 | // s.DBData = s.DBData.Replace("_x", "X"); |
||
4574 | // s.DBData = s.DBData.Replace("_y", "Y"); |
||
4575 | // instance.PathXathData = JsonSerializerHelper.UnCompressString_NonPrefix(s.DBData); |
||
4576 | //#if SILVERLIGHT |
||
4577 | // object obj = XamlReader.Load(instance.PathXathData); |
||
4578 | //#else |
||
4579 | // //MemoryStream memoryStream = new MemoryStream(Convert.FromBase64String(instance.PathXathData)); |
||
4580 | // string abss = JsonSerializerHelper.UnCompressString_NonPrefix(instance.PathXathData); |
||
4581 | // abss = abss.Replace("daelim", "DAELIM"); |
||
4582 | // abss = abss.Replace("FFFF0000", DisplayColor.Replace("#", "")); |
||
4583 | // byte[] byteArray = System.Text.Encoding.ASCII.GetBytes(abss); |
||
4584 | |||
4585 | // using(MemoryStream memoryStream = new MemoryStream(byteArray)) |
||
4586 | // { |
||
4587 | // object obj = XamlReader.Load(memoryStream); |
||
4588 | // instance.OnApplyTemplate(); |
||
4589 | // instance.Base_ViewBox.Child = obj as UIElement; |
||
4590 | |||
4591 | // memoryStream.Close(); |
||
4592 | // } |
||
4593 | //#endif |
||
4594 | // instance.SetViewBox(); |
||
4595 | // } |
||
4596 | // break; |
||
4597 | // #endregion |
||
4598 | // // #region Image |
||
4599 | // // case "ImgControl": |
||
4600 | // // { |
||
4601 | // // using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item)) |
||
4602 | // // { |
||
4603 | // // ImgControl instance = new ImgControl |
||
4604 | // // { |
||
4605 | // // Angle = s.Angle, |
||
4606 | // // StartPoint = s.StartPoint, |
||
4607 | // // TopRightPoint = s.TR, |
||
4608 | // // EndPoint = s.EndPoint, |
||
4609 | // // LeftBottomPoint = s.LB, |
||
4610 | // // PointSet = s.PointSet, |
||
4611 | // // Opacity = s.Opac, |
||
4612 | // // FilePath = s.ImagePath, |
||
4613 | // // }; |
||
4614 | // // Layer.Children.Add(instance); |
||
4615 | // // instance.ApplyTemplate(); |
||
4616 | // // WebClient wc = new System.Net.WebClient(); |
||
4617 | |||
4618 | // // string temp = System.IO.Path.GetTempFileName(); |
||
4619 | // // var result = System.IO.Path.ChangeExtension(temp, "_Image.tmp"); |
||
4620 | |||
4621 | // // //string temp = System.IO.Path.GetTempFileName().Replace(".tmp", "_Image.tmp"); //조장원 |
||
4622 | // // wc.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials; |
||
4623 | // // wc.DownloadFile(new Uri(s.ImagePath), result); |
||
4624 | // // //var imageData = new BitmapImage(new Uri(temp)); |
||
4625 | // // //instance.ImageData = imageData; |
||
4626 | |||
4627 | // // BitmapImage diagramBitMap = new BitmapImage(); |
||
4628 | // // using (System.IO.FileStream fs = System.IO.File.OpenRead(result)) |
||
4629 | // // { |
||
4630 | // // diagramBitMap.BeginInit(); |
||
4631 | // // diagramBitMap.CacheOption = BitmapCacheOption.OnLoad; |
||
4632 | // // diagramBitMap.StreamSource = fs; |
||
4633 | // // diagramBitMap.EndInit(); |
||
4634 | |||
4635 | // // diagramBitMap.Freeze(); |
||
4636 | // // fs.Dispose(); |
||
4637 | // // fs.Close(); |
||
4638 | // // } |
||
4639 | // // instance.ImageData = diagramBitMap; |
||
4640 | // // instance.Background = new ImageBrush(diagramBitMap); |
||
4641 | // // instance.ApplyTemplate(); |
||
4642 | // // instance.SetImage(); |
||
4643 | // // Layer.UpdateLayout(); |
||
4644 | // // if (File.Exists(temp)) |
||
4645 | // // { |
||
4646 | // // try |
||
4647 | // // { |
||
4648 | // // File.Delete(temp); |
||
4649 | // // } |
||
4650 | // // catch (Exception ea) |
||
4651 | // // { |
||
4652 | // // System.Diagnostics.Debug.WriteLine(ea.Message); |
||
4653 | // // } |
||
4654 | |||
4655 | // // } |
||
4656 | // // if (File.Exists(result)) |
||
4657 | // // { |
||
4658 | // // try |
||
4659 | // // { |
||
4660 | // // File.Delete(result); |
||
4661 | // // } |
||
4662 | // // catch (Exception ea) |
||
4663 | // // { |
||
4664 | // // System.Diagnostics.Debug.WriteLine(ea.Message); |
||
4665 | // // } |
||
4666 | |||
4667 | // // } |
||
4668 | // // GC.Collect(1); |
||
4669 | // // GC.SuppressFinalize(diagramBitMap); |
||
4670 | // // GC.SuppressFinalize(wc); |
||
4671 | |||
4672 | // // } |
||
4673 | // // break; |
||
4674 | // // } |
||
4675 | // // break; |
||
4676 | // //#endregion |
||
4677 | // #region Image |
||
4678 | // case "ImgControl": |
||
4679 | // { |
||
4680 | // using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item)) |
||
4681 | // { |
||
4682 | // ImgControl instance = new ImgControl |
||
4683 | // { |
||
4684 | // Angle = s.Angle, |
||
4685 | // StartPoint = s.StartPoint, |
||
4686 | // TopRightPoint = s.TR, |
||
4687 | // EndPoint = s.EndPoint, |
||
4688 | // LeftBottomPoint = s.LB, |
||
4689 | // PointSet = s.PointSet, |
||
4690 | // Opacity = s.Opac, |
||
4691 | // FilePath = s.ImagePath, |
||
4692 | // }; |
||
4693 | // Layer.Children.Add(instance); |
||
4694 | // instance.ApplyTemplate(); |
||
4695 | // WebClient wc = new System.Net.WebClient(); |
||
4696 | |||
4697 | // string temp = System.IO.Path.GetTempFileName(); |
||
4698 | |||
4699 | // FileInfo fsa = new FileInfo(temp); |
||
4700 | // var result = @"D:\FinalPDF\TempImage\" + fsa.Name.Replace(".tmp", "_Image.png"); |
||
4701 | |||
4702 | // GC.SuppressFinalize(fsa); |
||
4703 | |||
4704 | |||
4705 | // //var result = System.IO.Path.ChangeExtension(temp, "_Image.tmp"); |
||
4706 | |||
4707 | // //string temp = System.IO.Path.GetTempFileName().Replace(".tmp", "_Image.tmp"); //조장원 |
||
4708 | |||
4709 | // wc.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials; |
||
4710 | |||
4711 | |||
4712 | // try |
||
4713 | // { |
||
4714 | // if (s.ImagePath.Contains("comment.daelim.co.kr")) |
||
4715 | // { |
||
4716 | // wc.DownloadFile(new Uri(s.ImagePath.Replace("comment.daelim.co.kr", "comment.daelim.co.kr")), result); |
||
4717 | // } |
||
4718 | // else |
||
4719 | // { |
||
4720 | // wc.DownloadFile(new Uri(s.ImagePath), result); |
||
4721 | // } |
||
4722 | // //var imageData = new BitmapImage(new Uri(temp)); |
||
4723 | // //instance.ImageData = imageData; |
||
4724 | |||
4725 | // BitmapImage diagramBitMap = new BitmapImage(); |
||
4726 | // using (System.IO.FileStream fs = System.IO.File.OpenRead(result)) |
||
4727 | // { |
||
4728 | // diagramBitMap.BeginInit(); |
||
4729 | // diagramBitMap.CacheOption = BitmapCacheOption.OnLoad; |
||
4730 | // diagramBitMap.StreamSource = fs; |
||
4731 | // diagramBitMap.EndInit(); |
||
4732 | |||
4733 | // diagramBitMap.Freeze(); |
||
4734 | // fs.Dispose(); |
||
4735 | // fs.Close(); |
||
4736 | // } |
||
4737 | // instance.ImageData = diagramBitMap; |
||
4738 | // instance.Background = new ImageBrush(diagramBitMap); |
||
4739 | // instance.ApplyTemplate(); |
||
4740 | // instance.SetImage(); |
||
4741 | // Layer.UpdateLayout(); |
||
4742 | // //instance.Background = new ImageBrush(diagramBitMap); |
||
4743 | // //instance.SetImage(); |
||
4744 | // //Layer.UpdateLayout(); |
||
4745 | // GC.SuppressFinalize(diagramBitMap); |
||
4746 | // } |
||
4747 | // catch (Exception ex) |
||
4748 | // { |
||
4749 | // System.IO.StreamWriter da = new System.IO.StreamWriter(@"d:\temp\ImageError.txt", true); |
||
4750 | // da.WriteLine(String.Format("[MarkupString : {0}]", MarkupString)); |
||
4751 | // da.WriteLine(String.Format("[Error : {0}",ex.Message)); |
||
4752 | // da.WriteLine(); |
||
4753 | // da.Close(); |
||
4754 | // } |
||
4755 | |||
4756 | // if (File.Exists(temp)) |
||
4757 | // { |
||
4758 | // try |
||
4759 | // { |
||
4760 | // File.Delete(temp); |
||
4761 | // } |
||
4762 | // catch (Exception ea) |
||
4763 | // { |
||
4764 | // System.Diagnostics.Debug.WriteLine(ea.Message); |
||
4765 | // } |
||
4766 | |||
4767 | // } |
||
4768 | // if (File.Exists(result)) |
||
4769 | // { |
||
4770 | // try |
||
4771 | // { |
||
4772 | // File.Delete(result); |
||
4773 | // } |
||
4774 | // catch (Exception ea) |
||
4775 | // { |
||
4776 | // System.Diagnostics.Debug.WriteLine(ea.Message); |
||
4777 | // } |
||
4778 | |||
4779 | // } |
||
4780 | // GC.Collect(1); |
||
4781 | |||
4782 | // GC.SuppressFinalize(wc); |
||
4783 | |||
4784 | // } |
||
4785 | // break; |
||
4786 | // } |
||
4787 | // break; |
||
4788 | // #endregion |
||
4789 | // default: |
||
4790 | // break; |
||
4791 | // }; |
||
4792 | // } |
||
4793 | // } |
||
4794 | //#if SILVERLIGHT |
||
4795 | // this.GetSignImageLoaded(SignUserSet); |
||
4796 | //#endif |
||
4797 | // return Layer; |
||
4798 | // } |
||
4799 | //#endif |
||
4800 | |||
4801 | // public void SetSign(List<SignControl> SignList) |
||
4802 | // { |
||
4803 | // //SignControl instance_Sign = new SignControl |
||
4804 | // // { |
||
4805 | // // Angle = s.Angle, |
||
4806 | // // UserNumber = s.UserNumber, |
||
4807 | // // StartPoint = s.StartPoint, |
||
4808 | // // TopRightPoint = s.TR, |
||
4809 | // // EndPoint = s.EndPoint, |
||
4810 | // // LeftBottomPoint = s.LB, |
||
4811 | // // PointSet = s.PointSet, |
||
4812 | // // SignImage = instance.Source, |
||
4813 | // // }; |
||
4814 | // //instance_Sign.Base_Image = instance; |
||
4815 | // //Layer.Children.Add(instance_Sign); |
||
4816 | // //instance_Sign.ApplyTemplate(); |
||
4817 | // //instance_Sign.SetImage(); |
||
4818 | // } |
||
4819 | // } |
||
4820 | |||
4821 | // //public class GetSignAsyncArgs:EventArgs |
||
4822 | // //{ |
||
4823 | // // public GetSignAsyncArgs() |
||
4824 | // // { |
||
4825 | |||
4826 | // // } |
||
4827 | |||
4828 | // // public Dictionary<string, string> _useID; |
||
4829 | // // public Dictionary<string, string> UserID |
||
4830 | // // { |
||
4831 | // // get { return _useID; } |
||
4832 | // // set {_useID u |
||
4833 | // // } |
||
4834 | |||
4835 | |||
4836 | } |
||
4837 | } |