프로젝트

일반

사용자정보

개정판 cd988cd8

IDcd988cd8cf01f6600c3226a3d58e60e80b8b14e0
상위 7c694ea3
하위 5ee8c093, 32af2c3b

김동진이(가) 5년 이상 전에 추가함

issue #1119: Stamp string 를 가져와서 daelim replace 하는 부분을 묶고, ini 에서 replace 할 name 을 가져오도록 수정. User information 클릭 시 child 가 null 이여서 stamp 가 안보이는 현상 수정.

Change-Id: I520599b1b2740ad94319d96aa8d9ec93fa852162

차이점 보기:

KCOM/MARKUS.ini
31 31
[SetFinalPDFSuccess]
32 32
MSG=7LWc7KKFIO2MjOydvCDsg53shLEg7KSR7J6F64uI64ukLiDrrLjshJzqtIDrpqzsi5zsiqTthZzsnYQg7ZmV7J247ZW07KO87IS47JqU
33 33
[SetThumbnail]
34
WIDTH=100
34
WIDTH=100
35
[Site]
36
NAME=DAELIM
KCOM/Views/MainMenu.xaml.cs
1442 1442
                            break;
1443 1443
                        case ControlType.Stamp:
1444 1444
                            {
1445
                                var control = currentControl as SymControlN;    
1446
                                if(control.STAMP != null)
1445
                                var control = currentControl as SymControlN;
1446
                                if (control != null)
1447 1447
                                {
1448
                                    if (control != null)
1448
                                    if (control.STAMP != null)
1449 1449
                                    {
1450 1450
                                        control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1451 1451
                                    }
1452
                                }
1453
                                else
1454
                                {
1455
                                    currentControl = null;
1456
                                    this.cursor = new Cursor(MainWindow.CursorChange().StreamSource);
1457
                                    MessageBox.Show("Approved Stamp 가 등록되어 있지 않습니다. \n관리자에게 문의하세요.", "MARKUS");
1458
                                    //DialogMessage_Alert("aa", "Error");
1459
                                }
1452
                                    else
1453
                                    {
1454
                                        currentControl = null;
1455
                                        this.cursor = new Cursor(MainWindow.CursorChange().StreamSource);
1456
                                        DialogMessage_Alert("Approved Stamp 가 등록되어 있지 않습니다. \n관리자에게 문의하세요.", "안내");
1457
                                    }
1458
                                }                                    
1460 1459
                            }
1461 1460
                            break;
1462 1461
                        case ControlType.Rectangle:
......
3780 3779
                                        {
3781 3780
                                            StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y),
3782 3781
                                            Background = new SolidColorBrush(Colors.Black),
3783
                                            STAMP = App.SystemInfo.STAMP,
3782
                                            STAMP = App.SystemInfo.STAMP,                                            
3784 3783
                                            ControlType = ControlType.Stamp
3785 3784
                                        };
3786 3785

  
MarkupToPDF/Controls/Etc/SymControlN.cs
237 237
            pathFigure.IsClosed = true;
238 238
            pathGeometry.Figures.Add(pathFigure);
239 239
            this.Base_ViewBox.Width = pathGeometry.Bounds.Width;
240
            this.Base_ViewBox.Height = pathGeometry.Bounds.Height; ;
240
            this.Base_ViewBox.Height = pathGeometry.Bounds.Height;
241 241
            this.Tag = pathGeometry;
242 242

  
243 243
            if(Base_ViewBox.Child == null)
......
250 250
        }
251 251

  
252 252
        public void SetChild()
253
        {
254
            //string appovalData = "eJyycS/KTFHwS8xNtVVKBAMlhYrcnLxiW6WMkpICK3394uSM1NzEYr3czOSi/OL8tBK95Pxc/fLMvLQKfSMDAzP9isTcHP2CotTi1LySxJLM/DwlOxuQqXpOicnZ6UX5pXkpdjbB+TmZKc75OflFTkWlxRkKYKatkrIbFCgp+BckJmeWVNoqGegZKino29noYxgSlJpckpiXnpOqEFxSlFqSnGGr5JaZk6ME4uZnp0KNMwACmFBIRmZydl5qMdA7pjAxn8y8VK/8zDxbpSCQsUpQ38MNV1IIz0wpAZptZADU45GamZ5RYqtkYamk4JyYVwYMCZ/UNKCArpGeKVwoJL8AJqIP8T00DILyy11S0zLzMkEBUwz0AjIfbrgWWBt2OWM9U3zSBviljfBJaiGFM7pDQ1IrSpxy8pOzFUAsWyXHgIAg/zBXFyUFt/y8knCoCa4VJUWJTvk5KRDh4MwqYEgaG4B4RamQaEOJFY/8oswqoMLEHMeczPS8XGCSsVVyBpKpRUoKYalFJZnJWKVgTrRVgqQNdNc5VSqkJKbmZOYS4TwjWjrPGBGkMAoAAAD//w==";
255

  
256
            //var xamlData = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressString_NonPrefix(appovalData);
257
            //xamlData = xamlData.Replace("daelim", "DAELIM");
258
            ////object obj = System.Windows.Markup.XamlReader.Load(xamlData);
259

  
260
            //System.IO.MemoryStream stream = new System.IO.MemoryStream();
261
            //System.IO.StreamWriter writer = new System.IO.StreamWriter(stream);
262
            //writer.Write(xamlData);
263
            //writer.Flush();
264
            //stream.Position = 0;
265

  
266
            //object obj = System.Windows.Markup.XamlReader.Load(stream);
267
            //UIElement ob = obj as UIElement;
253
        {            
254
            if(this.PathXathData != null)
255
            {
256
                var xamlData = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressStamp(this.PathXathData);
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;
268 262

  
269
            //PathXathData = appovalData;
270
            //Base_ViewBox.Child = ob;
263
                object obj = System.Windows.Markup.XamlReader.Load(stream);
264
                UIElement ob = obj as UIElement;
265
                                
266
                Base_ViewBox.Child = ob;
267
            }            
271 268
        }
272 269

  
273 270
        public override bool IsSelected
......
347 344
        {
348 345
            if (this.StartPoint == this.EndPoint)
349 346
            {
350
                var xamlData = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressString_NonPrefix(this.STAMP);
351
                xamlData = xamlData.Replace("daelim", "DAELIM");
347
                var xamlData = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressStamp(this.STAMP);                    
352 348

  
353 349
                System.IO.MemoryStream stream = new System.IO.MemoryStream();
354 350
                System.IO.StreamWriter writer = new System.IO.StreamWriter(stream);
MarkupToPDF/Controls/Parsing/MarkupParse.cs
248 248
                        {
249 249
                            SymControlN _instance = control as SymControlN;
250 250

  
251
                            var xamlData = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressString_NonPrefix(_instance.PathXathData);
252
                            xamlData = xamlData.Replace("daelim", "DAELIM");
251
                            var xamlData = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressStamp(_instance.PathXathData);
252
                            
253 253
                            System.IO.MemoryStream stream = new System.IO.MemoryStream();
254 254
                            System.IO.StreamWriter writer = new System.IO.StreamWriter(stream);
255 255
                            writer.Write(xamlData);
......
315 315
                            {
316 316
                                SymControlN _instance = control as SymControlN;
317 317

  
318
                                var xamlData = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressString_NonPrefix(_instance.PathXathData);
319
                                xamlData = xamlData.Replace("daelim", "DAELIM");
318
                                var xamlData = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressStamp(_instance.PathXathData);
319
                                
320 320
                                System.IO.MemoryStream stream = new System.IO.MemoryStream();
321 321
                                System.IO.StreamWriter writer = new System.IO.StreamWriter(stream);
322 322
                                writer.Write(xamlData);
MarkupToPDF/Serialize/Core/JsonSerializerHelper.cs
122 122
            StreamReader reader = new StreamReader(input);
123 123
            return reader.ReadToEnd();
124 124
        }
125
        public static string UnCompressStamp(string compress_string)
126
        {
127
            MemoryStream memoryStream = new MemoryStream(Convert.FromBase64String(compress_string));
128
            ZipInputStream input = new ZipInputStream(memoryStream);
129
            StreamReader reader = new StreamReader(input);
130

  
131
            string returnstr = reader.ReadToEnd();
132
            returnstr = returnstr.Replace("daelim",CommonLib.Common.GetConfigString("Site","NAME",""));
133
            return returnstr;
134
        }
125 135
    }
126 136
}
Site/Daelim/ini/MARKUS.ini
31 31
[SetFinalPDFSuccess]
32 32
MSG=RmluYWwgUERGIOyDneyEsSDspJEg7J6F64uI64ukLiDsmYTro4wg65CY66m0ICBPdXRsb29rIOyVjOumvCDrqZTsnbwg67Cc7IahIOuQqeuLiOuLpC4gXHJcbuyeoOyLnOunjCDquLDri6TroKQg7KO87IS47JqULg==
33 33
[SetThumbnail]
34
WIDTH=100
34
WIDTH=100
35
[Site]
36
NAME=DAELIM
Site/Daelim/ini/Test/MARKUS.ini
31 31
[SetFinalPDFSuccess]
32 32
MSG=RmluYWwgUERGIOyDneyEsSDspJEg7J6F64uI64ukLiDsmYTro4wg65CY66m0ICBPdXRsb29rIOyVjOumvCDrqZTsnbwg67Cc7IahIOuQqeuLiOuLpC4gXHJcbuyeoOyLnOunjCDquLDri6TroKQg7KO87IS47JqULg==
33 33
[SetThumbnail]
34
WIDTH=100
34
WIDTH=100
35
[Site]
36
NAME=DAELIM

내보내기 Unified diff

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