프로젝트

일반

사용자정보

개정판 24c5e56c

ID24c5e56cba9a265a53397a5ffe348514c5f100b8
상위 c206d293
하위 ef22793a

김태성이(가) 4년 이상 전에 추가함

- final pdf Font 추가
- Markus navi 속도 최적화 Key input 최적화

Change-Id: I7f2cf1933e86017d7b1df9ef4bd3048a8e80a653

차이점 보기:

MarkupToPDF/Controls/Parsing/MarkupParse.cs
65 65
        /// </summary>
66 66
        /// <param name="str"></param>
67 67
        /// <returns></returns>
68
        public static async Task<CommentUserInfo> FromStringAsync(string item, SolidColorBrush brush, string sProjectNo)
68
        public static CommentUserInfo FromString(string item, SolidColorBrush brush, string sProjectNo)
69 69
        {
70 70
            CommentUserInfo instance = null;
71 71
            var unkown = JsonSerializerHelper.JsonDeserialize<S_BaseControl>(item); //복호화작업
......
208 208
        /// 데이터베이스의 마크업데이터를 컨트롤로 변환한다.
209 209
        /// </summary>
210 210
        /// <param name="MarkupString"></param>
211
        public static async Task<bool> ParseAsync(string sProjectNo, string MarkupString, Canvas Layer, string DisplayColor, string ToolTipMessage)
211
        public static async Task<bool> ParseAsync(string sProjectNo, string MarkupString, Canvas Layer, string DisplayColor, string ToolTipMessage, System.Threading.CancellationToken cts)
212 212
        {
213 213
            bool result = false;
214 214

  
......
222 222

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

  
227 228
                    if (control != null)
228 229
                    {
229 230
                        Layer.Children.Add(control);
......
276 277
        /// 데이터베이스의 마크업데이터를 컨트롤로 변환한다.
277 278
        /// </summary>
278 279
        /// <param name="MarkupString"></param>
279
        public static async Task<Control> ParseExAsync(string sProjectNo, string MarkupString, ObservableCollection<CommentUserInfo> baseLayer, string DisplayColor, string ToolTipMessage, string markupInfoID = null, string commentId = null)
280
        public static async Task<Control> ParseExAsync(System.Threading.CancellationToken? cts,string sProjectNo, string MarkupString, ObservableCollection<CommentUserInfo> baseLayer, string DisplayColor, string ToolTipMessage, string markupInfoID = null, string commentId = null)
280 281
        {
281 282
            Control res = null;
282 283

  
......
289 290

  
290 291
                foreach (var dataPease in data)
291 292
                {
292
                    var item = await JsonSerializerHelper.UnCompressStringAsync(dataPease); //언패킹작업
293
                    string item = "";
294

  
295
                    if (cts == null)
296
                    {
297
                        item = await JsonSerializerHelper.UnCompressStringAsync(dataPease, null); //언패킹작업
298
                    }
299
                    else
300
                    {
301
                        if(cts.Value.IsCancellationRequested)
302
                        {
303
                            return null;
304
                        }
305

  
306
                        item = await JsonSerializerHelper.UnCompressStringAsync(dataPease, cts); //언패킹작업
307
                    }
293 308

  
294
                    CommentUserInfo control = await MarkupParser.FromStringAsync(item, _SetColor, sProjectNo);
309
                    CommentUserInfo control = MarkupParser.FromString(item, _SetColor, sProjectNo);
295 310

  
296 311
                    res = control as Control;
297 312
                    if (control != null)
......
345 360
            return res;
346 361
        }
347 362

  
348
        public static async Task<S_BaseControl> GetBaseControlAsync(string MarkupString)
363
        public static async Task<S_BaseControl> GetBaseControlAsync(string MarkupString, System.Threading.CancellationToken cts)
349 364
        {
350
            var item = await JsonSerializerHelper.UnCompressStringAsync(MarkupString); //언패킹작업
365
            var item = await JsonSerializerHelper.UnCompressStringAsync(MarkupString,cts); //언패킹작업
351 366
            var unknownData = JsonSerializerHelper.JsonDeserialize<S_BaseControl>(item); //복호화작업
352 367
            return unknownData;
353 368
        }
354 369

  
355 370
        public static async Task<string> GetMemoAsync(string MarkupString)
356 371
        {
357
            var item = await JsonSerializerHelper.UnCompressStringAsync(MarkupString); //언패킹작업
372
            var item = await JsonSerializerHelper.UnCompressStringAsync(MarkupString,null); //언패킹작업
358 373
            var unknownData = JsonSerializerHelper.JsonDeserialize<S_BaseControl>(item); //복호화작업
359 374
            return unknownData.Memo;
360 375
        }

내보내기 Unified diff

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