프로젝트

일반

사용자정보

개정판 58dd9e89

ID58dd9e89926a369c95a6ab7bfe82c1feb0a42d56
상위 e4a4f96d
하위 c7555c83

백흠경이(가) 6달 전에 추가함

Fix: 스탬의 COMPANY_NAME이 실제 회사 이름으로 대체도지 않는 오류 수정

Change-Id: Ief8011c7d7ce974f1881907911f45c8c446a7e98

차이점 보기:

KCOM/Controls/AdornerFinal.xaml.cs
658 658

  
659 659
            foreach (var item in this.Members)
660 660
            {
661
                UIElement currentControl = (item as AdornerMember).DrawingData;
661
                UIElement currentControl = item.DrawingData;
662 662
                
663 663
                Point startP = (currentControl as IPath).StartPoint;
664 664
                Point endP = (currentControl as IPath).EndPoint;
KCOM/Controls/SignManager.xaml.cs
34 34
        private async void SignManager_Loaded(object sender, RoutedEventArgs e)
35 35
        {
36 36
            var strokeData = await ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseTaskClient.GetSignStrokesAsync(App.ViewInfo.ProjectNO, App.ViewInfo.UserID);
37

  
38 37
            if(strokeData != null)
39 38
            {
40 39
                StringToStroke(strokeData);
......
51 50

  
52 51
        private async void Save_Click(object sender, RoutedEventArgs e)
53 52
        {
54
            //if (KCOM.VistaSecurity.IsAdmin())
55
            //{
56

  
57 53
            if (SignCanvas.Strokes.Count > 0)
58 54
            {
59

  
60 55
                var signImage = Convert.ToBase64String(SignatureToBitmapBytes());
61 56

  
62 57
                var pointes = SignCanvas.Strokes.Select(x => x.GetBounds());
......
91 86
                    //SetPreview(signData);
92 87
                }
93 88
            };
94
            //}
95
            //else
96
            //{
97
            //    MessageBox.Show("어드민 권한 필요");
98
            //}
99 89
        }
100 90

  
101 91
        private void SetPreview(string imgStr)
......
120 110
            }
121 111
        }
122 112

  
113
        /// <summary>
114
        /// Sign을 비트맵으로 변환하여 리턴한다.
115
        /// </summary>
116
        /// <returns></returns>
123 117
        private byte[] SignatureToBitmapBytes()
124 118
        {
125 119
            RenderTargetBitmap rtb = new RenderTargetBitmap((int)SignCanvas.ActualWidth, (int)SignCanvas.ActualHeight, 96d, 96d, PixelFormats.Default);
126 120
            rtb.Render(SignCanvas);
127 121

  
128
            MemoryStream ms = new MemoryStream();
129
            System.Windows.Media.Imaging.PngBitmapEncoder encoder = new PngBitmapEncoder();
130
            BitmapFrame frame = BitmapFrame.Create(rtb);
131
            encoder.Frames.Add(frame);
132
            encoder.Save(ms);
122
            byte[] bytes = null;
123
            using (MemoryStream ms = new MemoryStream())
124
            {
125
                System.Windows.Media.Imaging.PngBitmapEncoder encoder = new PngBitmapEncoder();
126
                BitmapFrame frame = BitmapFrame.Create(rtb);
127
                encoder.Frames.Add(frame);
128
                encoder.Save(ms);
133 129

  
134
            ms.Position = 0;
130
                ms.Position = 0;
135 131

  
136
            byte[] bytes = new byte[ms.Length];
137
            ms.Read(bytes, 0, bytes.Length);
132
                bytes = new byte[ms.Length];
133
                ms.Read(bytes, 0, bytes.Length);
134
            }
138 135

  
139 136
            return bytes;
140 137
        }
......
178 175
        {
179 176
            try
180 177
            {
181
                
182 178
                //deserialize it
183 179
                BinaryFormatter bf = new BinaryFormatter();
184 180
                MemoryStream ms = new MemoryStream(Convert.FromBase64String(strokesData));
KCOM/Controls/Symbol.xaml.cs
171 171
            _canvas.Background = Brushes.White;
172 172
            _canvas.Width = finalItem.BorderSize.Width;
173 173
            _canvas.Height = finalItem.BorderSize.Height;
174
            await MarkupParser.ParseAsync(App.BaseAddress, App.ViewInfo.ProjectNO, data, _canvas, PageAngle, "#FFFF0000", "", ViewerDataModel.Instance.NewMarkupCancelToken());
174
            await MarkupParser.ParseAsync(App.BaseAddress, App.ViewInfo.ProjectNO, data, _canvas, PageAngle, "#FFFF0000", "", ViewerDataModel.Instance.NewMarkupCancelToken(),
175
                STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
175 176

  
176 177
            BitmapEncoder encoder = new PngBitmapEncoder();
177 178

  
......
235 236
            _canvas.Width = rect.Width;
236 237
            _canvas.Height = rect.Height;
237 238

  
238
            await MarkupParser.ParseAsync(App.BaseAddress, App.ViewInfo.ProjectNO, data, _canvas, PageAngle, "#FFFF0000", "", ViewerDataModel.Instance.NewMarkupCancelToken());
239
            await MarkupParser.ParseAsync(App.BaseAddress, App.ViewInfo.ProjectNO, data, _canvas, PageAngle, "#FFFF0000", "", ViewerDataModel.Instance.NewMarkupCancelToken(),
240
                STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
239 241

  
240 242
            BitmapEncoder encoder = new PngBitmapEncoder();
241 243
            RenderTargetBitmap renderBitmap = new RenderTargetBitmap((int)rect.Width, (int)rect.Height, 96d, 96d, PixelFormats.Pbgra32);
......
560 562
                    {
561 563
                        if (parse != "")
562 564
                        {
563
                            System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(),App.ViewInfo.ProjectNO, parse, ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, string.Empty, string.Empty);
565
                            System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(),App.ViewInfo.ProjectNO, parse, ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, string.Empty, string.Empty,
566
                                STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
564 567
                            (item as MarkupToPDF.Common.CommentUserInfo).CommentID = Commons.shortGuid();
565 568
                            (item as MarkupToPDF.Common.CommentUserInfo).SymbolID = id;
566 569
                            //(item as MarkupToPDF.Common.CommentUserInfo).GroupID = group_id;
KCOM/Events/Implementation/TopMenuEvent.cs
3030 3030
                {
3031 3031
                    if (parse != "")
3032 3032
                    {
3033
                        System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(App.BaseAddress,ViewerDataModel.Instance.NewMarkupCancelToken(),App.ViewInfo.ProjectNO, parse, ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, string.Empty, string.Empty);
3033
                        System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(App.BaseAddress,ViewerDataModel.Instance.NewMarkupCancelToken(),App.ViewInfo.ProjectNO, parse, ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, string.Empty, string.Empty,
3034
                            STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
3034 3035
                        (item as MarkupToPDF.Common.CommentUserInfo).CommentID = Commons.shortGuid();
3035 3036

  
3036 3037
                        ViewerDataModel.Instance.MarkupControls.Remove(item as MarkupToPDF.Common.CommentUserInfo);
KCOM/Events/Load.cs
63 63

  
64 64
            foreach (string data in markupdata)
65 65
            {
66
                result = await MarkupParser.ParseAsync(App.BaseAddress, App.ViewInfo.ProjectNO, data, printCanvas, pageAngle, DisplayColor, "",Common.ViewerDataModel.Instance.NewMarkupCancelToken());
66
                result = await MarkupParser.ParseAsync(App.BaseAddress, App.ViewInfo.ProjectNO, data, printCanvas, pageAngle, DisplayColor, "",Common.ViewerDataModel.Instance.NewMarkupCancelToken(),
67
                    STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
67 68

  
68 69
                if(!result)
69 70
                {
KCOM/Events/PasteCommand.cs
86 86
                            string[] data2 = new string[2];
87 87
                            data2 = parse.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
88 88

  
89
                            System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, data2[0], ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, "#FFFF0000", string.Empty);
89
                            System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, data2[0], ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, "#FFFF0000", string.Empty,
90
                                STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
90 91

  
91 92
                            var control = (item as MarkupToPDF.Common.CommentUserInfo);
92 93

  
......
272 273
                        string[] data2 = new string[2];
273 274
                        data2 = parse.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
274 275

  
275
                        System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, data2[0], ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, "#FFFF0000", string.Empty);
276
                        System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, data2[0], ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, "#FFFF0000", string.Empty,
277
                            STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
276 278
                        (item as MarkupToPDF.Common.CommentUserInfo).CommentID = Commons.shortGuid();
277 279
                        if (data2.Length >= 2)
278 280
                        {
KCOM/Services/BaseServices.cs
158 158
            }
159 159
        }
160 160

  
161
        /// <summary>
162
        /// FinalPDF를 수행 후 관련 메시지를 표시한다.
163
        /// </summary>
164
        /// <param name="sender"></param>
165
        /// <param name="e"></param>
161 166
        private void BaseClient_SetFinalPDFCompleted(object sender, SetFinalPDFCompletedEventArgs e)
162 167
        {
163
            //Logger.sendResLog("SetFinalPDFCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
164
            string errormsg = CommonLib.Common.GetAlertMessageString("SetFinalPDFError", "MSG", "최종 파일을 만드는데 문제가 발생하였습니다");
165
            string successmsg = CommonLib.Common.GetAlertMessageString("SetFinalPDFSuccess", "MSG", "최종 파일 생성 중입니다. 문서관리시스템을 확인해주세요");
166 168
            if (e.Error != null || e.Result.Status == FinalStatus.Error)
167 169
            {
170
                string errormsg = CommonLib.Common.GetAlertMessageString("SetFinalPDFError", "MSG", $"최종 파일을 만드는데 문제가 발생하였습니다{System.Environment.NewLine}{e.Result.Exception}");
168 171
                DialogMessage_Alert(errormsg, "안내");
169 172
            }
170 173
            else
171 174
            {
175
                string successmsg = CommonLib.Common.GetAlertMessageString("SetFinalPDFSuccess", "MSG", "최종 파일 생성 중입니다. 문서관리시스템을 확인해주세요");
172 176
                DialogMessage_Alert(successmsg, "안내");
173 177
            }
174 178
        }
......
729 733

  
730 734
                    foreach (var markupitem in pageItems)
731 735
                    {
732
                       await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "", item.MarkupInfoID);
736
                       await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "", item.MarkupInfoID,
737
                           STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
733 738
                    }
734 739
                }
735 740
            }
......
850 855
                                foreach (var markup in instance)
851 856
                                {
852 857
                                    await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "", 
853
                                        item.MarkupInfoID, markup.ID,STAMP_Contents:App.SystemInfo.STAMP_CONTENTS);
858
                                        item.MarkupInfoID, markup.ID, STAMP_Contents:App.SystemInfo.STAMP_CONTENTS);
854 859
                                }
855 860
                            }
856 861

  
......
870 875
                                foreach (var markup in instance)
871 876
                                {
872 877
                                    await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "",
873
                                        item.MarkupInfoID, markup.ID);
878
                                        item.MarkupInfoID, markup.ID, STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
874 879
                                }
875 880
                            }
876 881

  
......
1041 1046
                                        foreach (var markup in instance)
1042 1047
                                        {
1043 1048
                                            await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "",
1044
                                                item.MarkupInfoID, markup.ID);
1049
                                                item.MarkupInfoID, markup.ID, STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
1045 1050
                                        }
1046 1051
                                    }
1047 1052

  
......
1354 1359
                    foreach (var markupitem in markupItems)
1355 1360
                    {
1356 1361
                        await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "", 
1357
                                item.MarkupInfoID, markupitem.ID);
1362
                                item.MarkupInfoID, markupitem.ID, STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
1358 1363
                    }
1359 1364
                }
1360 1365
                else
......
1363 1368

  
1364 1369
                    foreach (var markupitem in markupItems)
1365 1370
                    {
1366
                        await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "", item.MarkupInfoID);
1371
                        await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "", item.MarkupInfoID,
1372
                            STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
1367 1373
                    }
1368 1374
                }
1369 1375
            }
KCOM/Views/MainMenu.xaml.cs
1085 1085
                    if (info.UserID == App.ViewInfo.UserID)
1086 1086
                    {
1087 1087
                        var control = await MarkupParser.ParseExAsync(App.BaseAddress, cts, App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, PageAngle, sColor, "",
1088
                                        markup.MarkupInfoID, markup.ID);
1088
                                        markup.MarkupInfoID, markup.ID, STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
1089 1089
                        if (control != null)
1090 1090
                        {
1091 1091
                            Canvas.SetZIndex(control, (control as CommentUserInfo).ZIndex);
......
1095 1095
                    else
1096 1096
                    {
1097 1097
                        var control = await MarkupParser.ParseExAsync(App.BaseAddress, cts, App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, PageAngle, sColor, "",
1098
                                                                markup.MarkupInfoID, markup.ID);
1098
                                                                markup.MarkupInfoID, markup.ID, STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
1099 1099
                        if (control != null)
1100 1100
                        {
1101 1101
                            Canvas.SetZIndex(control, (control as CommentUserInfo).ZIndex);
......
1128 1128

  
1129 1129
                    foreach (var markupitem in markupitems)
1130 1130
                    {
1131
                        await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync,PageAngle, item.DisplayColor, "", item.MarkupInfoID);
1131
                        await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync,PageAngle, item.DisplayColor, "", item.MarkupInfoID,
1132
                            STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
1132 1133

  
1133 1134
                        //if (cts.IsCancellationRequested)
1134 1135
                        //{
......
5160 5161
                        var markupitems = item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.SyncPageNumber).ToList();
5161 5162
                        foreach (var markupitem in markupitems)
5162 5163
                        {
5163
                            await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync,0, item.DisplayColor, "", item.MarkupInfoID);
5164
                            await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync,0, item.DisplayColor, "", item.MarkupInfoID,
5165
                                STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
5164 5166
                        }
5165 5167
                    }
5166 5168

  
......
5820 5822
            _canvas.Background = Brushes.White;
5821 5823
            _canvas.Width = adorner_.BorderSize.Width;
5822 5824
            _canvas.Height = adorner_.BorderSize.Height;
5823
            await MarkupParser.ParseAsync(App.BaseAddress, App.ViewInfo.ProjectNO, data, _canvas,ViewerDataModel.Instance.PageAngle, "#FFFF0000", "", ViewerDataModel.Instance.NewMarkupCancelToken());
5825
            await MarkupParser.ParseAsync(App.BaseAddress, App.ViewInfo.ProjectNO, data, _canvas,ViewerDataModel.Instance.PageAngle, "#FFFF0000", "", ViewerDataModel.Instance.NewMarkupCancelToken(),
5826
                STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
5824 5827

  
5825 5828
            BitmapEncoder encoder = new PngBitmapEncoder();
5826 5829

  
......
6115 6118
                        if (item.PageNumber == pageNavigator.CurrentPage.PageNumber)
6116 6119
                        {
6117 6120
                            await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, item.Data, Common.ViewerDataModel.Instance.MarkupControls_USER,ViewerDataModel.Instance.PageAngle, "#FFFF0000", "",
6118
                                 items.MarkupInfoID, Commons.shortGuid());
6121
                                 items.MarkupInfoID, Commons.shortGuid(), STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
6119 6122
                        }
6120 6123
                    }
6121 6124
                }
MarkupToPDF/Controls/Parsing/MarkupParse.cs
208 208
        /// 데이터베이스의 마크업데이터를 컨트롤로 변환한다.
209 209
        /// </summary>
210 210
        /// <param name="MarkupString"></param>
211
        public static async Task<bool> ParseAsync(string baseUri, string sProjectNo, string MarkupString, Canvas Layer,double PageAngle, string DisplayColor, string ToolTipMessage, System.Threading.CancellationToken cts)
211
        public static async Task<bool> ParseAsync(string baseUri, string sProjectNo, string MarkupString, Canvas Layer,double PageAngle, 
212
            string DisplayColor, string ToolTipMessage, System.Threading.CancellationToken cts, Dictionary<string, string> STAMP_Contents = null)
212 213
        {
213 214
            bool result = false;
214 215

  
......
223 224
                foreach (var token in tokens)
224 225
                {
225 226
                    var item = await JsonSerializerHelper.UnCompressStringAsync(token,cts); //언패킹작업
226
                    CommentUserInfo control =  MarkupParser.FromString(baseUri, item, _SetColor, sProjectNo,PageAngle);
227
                    CommentUserInfo control =  MarkupParser.FromString(baseUri, item, _SetColor, sProjectNo, PageAngle);
227 228

  
228 229
                    if (control != null)
229 230
                    {
......
253 254
                            SymControlN _instance = control as SymControlN;
254 255

  
255 256
                            var xamlData = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressStamp(_instance.PathXathData);
256
                            
257
                            System.IO.MemoryStream stream = new System.IO.MemoryStream();
258
                            System.IO.StreamWriter writer = new System.IO.StreamWriter(stream);
259
                            writer.Write(xamlData);
260
                            writer.Flush();
261
                            stream.Position = 0;
262

  
263
                            object obj = XamlReader.Load(stream);
264
                            _instance.Base_ViewBox.Child = obj as UIElement;
265
                            _instance.SetViewBox();
257

  
258
                            using (System.IO.MemoryStream stream = new System.IO.MemoryStream())
259
                            {
260
                                System.IO.StreamWriter writer = new System.IO.StreamWriter(stream);
261
                                xamlData = xamlData.Replace("#FFFF0000", DisplayColor);
262

  
263
                                if (STAMP_Contents?.Count > 0)
264
                                {
265
                                    foreach (var Content in STAMP_Contents)
266
                                    {
267
                                        xamlData = xamlData.Replace(Content.Key, System.Security.SecurityElement.Escape(Content.Value));
268
                                    }
269
                                }
270

  
271
                                writer.Write(xamlData);
272
                                writer.Flush();
273
                                stream.Position = 0;
274

  
275
                                object obj = XamlReader.Load(stream);
276
                                _instance.Base_ViewBox.Child = obj as UIElement;
277
                                _instance.SetViewBox();
278
                            }
266 279
                        }
267 280
                        else if(control is ImgControl)
268 281
                        { 
......
330 343
                        else if (control is SymControlN SymCtrl)
331 344
                        {
332 345
                            var xamlData = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressStamp(SymCtrl.PathXathData);
333
                            
334
                            System.IO.MemoryStream stream = new System.IO.MemoryStream();
335
                            System.IO.StreamWriter writer = new System.IO.StreamWriter(stream);
336
                            xamlData = xamlData.Replace("#FFFF0000", DisplayColor);
337 346

  
338
                            if (STAMP_Contents?.Count > 0)
347
                            using (System.IO.MemoryStream stream = new System.IO.MemoryStream())
339 348
                            {
340
                                foreach (var Content in STAMP_Contents)
349
                                System.IO.StreamWriter writer = new System.IO.StreamWriter(stream);
350
                                xamlData = xamlData.Replace("#FFFF0000", DisplayColor);
351

  
352
                                if (STAMP_Contents?.Count > 0)
341 353
                                {
342
                                    xamlData = xamlData.Replace(Content.Key, System.Security.SecurityElement.Escape(Content.Value));
354
                                    foreach (var Content in STAMP_Contents)
355
                                    {
356
                                        xamlData = xamlData.Replace(Content.Key, System.Security.SecurityElement.Escape(Content.Value));
357
                                    }
343 358
                                }
344
                            }
345 359

  
346
                            writer.Write(xamlData);
347
                            writer.Flush();
348
                            stream.Position = 0;
360
                                writer.Write(xamlData);
361
                                writer.Flush();
362
                                stream.Position = 0;
349 363

  
350
                            object obj = XamlReader.Load(stream);
351
                            SymCtrl.Base_ViewBox.Child = obj as UIElement;
352
                            SymCtrl.SetViewBox();
364
                                object obj = XamlReader.Load(stream);
365
                                SymCtrl.Base_ViewBox.Child = obj as UIElement;
366
                                SymCtrl.SetViewBox();
367
                            }
353 368
                        }
354 369
                    }
355 370
                }

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)