프로젝트

일반

사용자정보

개정판 d128ceb2

IDd128ceb2a00511f4acf4bbd329bc077aa1c41f62
상위 340a9bf3
하위 748afa9f

백흠경이(가) 5년 이상 전에 추가함

issue #923: add UndoCommand

Change-Id: I7bb9cf1d4276c75e50906b7f4672433afc233e15

차이점 보기:

KCOM/Services/BaseServices.cs
168 168
        {
169 169
            Logger.sendResLog("DeleteMarkupCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
170 170

  
171
            SetDisplayColor(ViewerDataModel.Instance._markupInfoList.ToList(), App.ViewInfo.UserID);
171
            foreach(var info in ViewerDataModel.Instance._markupInfoList)
172
            {
173
                if(info.UserID == App.ViewInfo.UserID)
174
                {
175
                    info.userDelete = true;
176
                    info.DisplayColor = "FFFF0000";
177
                }
178
                else
179
                {
180
                    info.userDelete = false;
181
                }
182
            }
172 183
        }
173 184

  
174 185
        private void BaseClient_GetDeptDataCompleted(object sender, GetDeptDataCompletedEventArgs e)
......
196 207
            ViewerDataModel.Instance.MarkupControls.Clear();
197 208
            if (e.Result != null)
198 209
            {
210
                ViewerDataModel.Instance._markupInfoList.Clear();
199 211
                var pureItem = e.Result;
200 212
                if (pureItem.Count > 0)
201 213
                {
202 214
                    ViewerDataModel.Instance.MarkupList_USER.Clear();
203 215
                }
204 216

  
217
                foreach(var info in e.Result)
218
                {
219
                    if (info.UserID == App.ViewInfo.UserID)
220
                    {
221
                        info.userDelete = true;
222
                        info.DisplayColor = "#FFFF0000";
223
                    }
224
                    else
225
                    {
226
                        info.userDelete = false;
227
                    }
228
                    ViewerDataModel.Instance._markupInfoList.Add(info);
229
                }
230

  
205 231
                pureItem.ToList().ForEach(d => d.MarkupList.ForEach(p =>
206 232
                {
207 233
                    if (d.UserID == App.ViewInfo.UserID)
......
277 303
                    App.Custom_ViewInfoId = currentUser.MarkupInfoID;
278 304
                }
279 305

  
280
                ViewerDataModel.Instance._markupInfoList = SetDisplayColor(pureItem, _ViewInfo.UserID);
306
                foreach(var info in pureItem)
307
                {
308
                    if (info.UserID == App.ViewInfo.UserID) info.DisplayColor = "#FFFF0000";
309
                }
281 310

  
282 311
                //Consolidation 된 데이터가 최상단에 올 수 있도록 변경
283 312
                var markupItem = ViewerDataModel.Instance._markupInfoList.OrderByDescending(p => p.Consolidate == Convert.ToInt32(true)).ToList();
......
459 488
            }
460 489
        }
461 490

  
462
        private static ObservableCollection<MarkupInfoItem> SetDisplayColor(List<MarkupInfoItem> MarkupInfoList, string userID)
463
        {
464
            //var random = new Random();
465
            ObservableCollection<MarkupInfoItem> _result = new ObservableCollection<MarkupInfoItem>();
466

  
467
            MarkupInfoList.ForEach(delegate (MarkupInfoItem infoitem)
468
            {
469
                if (userID == infoitem.UserID)
470
                {
471
                    infoitem.userDelete = true;
472
                    infoitem.DisplayColor = "#FFFF0000";
473
                }
474
                else
475
                {
476
                    infoitem.userDelete = false;
477

  
478
                    #region sample code
479

  
480
                    //string _ColorStr = "#FF";
481

  
482
                    //for (int i = 0; i < infoitem.Depatment.Count(); i++)
483
                    //{
484
                    //    _ColorStr += Convert.ToByte(infoitem.Depatment[i]);
485
                    //}
486

  
487
                    //if (_ColorStr.Length < 9)
488
                    //{
489
                    //    for (int i = 0; i < 9 - _ColorStr.Length; i++)
490
                    //    {
491
                    //        _ColorStr += "F";
492
                    //    }
493
                    //}
494
                    //else
495
                    //{
496
                    //    _ColorStr = _ColorStr.Substring(0,9);
497
                    //}
498
                    //System.Diagnostics.Debug.WriteLine(_ColorStr);
499
                    //infoitem.DisplayColor = _ColorStr;// String.Format("#FF{0:X6}", random.Next(0x1000000)); 
500
                    #endregion
501
                }
502

  
503
                _result.Add(infoitem);
504
            });
505

  
506
            return _result;
507
        }
508

  
509 491
        private void BaseClient_GetDocumentItemInfoCompleted(object sender, GetDocumentItemInfoCompletedEventArgs e)
510 492
        {
511 493
            Logger.sendResLog("GetDocumentItemInfoCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);

내보내기 Unified diff

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