Advertisement
vilgelmbb

TaskTreeView.CreateChildTask сравнение трёх версий

Oct 25th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.49 KB | None | 0 0
  1. //2529
  2. if (
  3.     (parentTask.Preset.ChildKind.ChildTaskKindType == ChildTaskKindType.ParentTaskKind
  4.         && parentTask.SystemInfo.CardKind != kind)
  5.     ||
  6.     (parentTask.Preset.ChildKind.ChildTaskKindType == ChildTaskKindType.KindFromList
  7.         && !TaskTreeView.IsKindCreatable(parentTask.Preset.ChildKind.ChildKindSettings, kind))
  8.     )
  9.         {
  10.             this.UIService.ShowMessage(Resources.TaskTreeView_CreateChildTaskWrongKind, Resources.TaskTreeView_ChildTaskCreationCaption, MessageBoxButtons.OK);
  11.             return null;
  12.         }
  13.        
  14. //2559
  15. if (
  16.     (parentTask.Preset.ChildKind.ChildTaskKindType == ChildTaskKindType.ParentTaskKind
  17.         && parentTask.SystemInfo.CardKind != kind)
  18.     ||
  19.     (parentTask.Preset.ChildKind.ChildTaskKindType == ChildTaskKindType.KindFromList
  20.         && !TaskTreeView.IsKindCreatable(parentTask.Preset.ChildKind.ChildKindSettings, kind)))
  21.         {
  22.             this.UIService.ShowMessage(Resources.TaskTreeView_CreateChildTaskWrongKind, Resources.TaskTreeView_ChildTaskCreationCaption, MessageBoxButtons.OK);
  23.             return null;
  24.         }
  25. //2559 patch       
  26. if (
  27.     (parentTask.Preset.ChildKind.ChildTaskKindType == ChildTaskKindType.ParentTaskKind
  28.         && parentTask.SystemInfo.CardKind != kind)
  29.     ||
  30.     (parentTask.Preset.ChildKind.ChildTaskKindType == ChildTaskKindType.KindFromList
  31.         && !TaskTreeView.IsKindCreatable(parentTask.Preset.ChildKind.ChildKindSettings, kind)))
  32.         {
  33.             this.UIService.ShowMessage(Resources.TaskTreeView_CreateChildTaskWrongKind, Resources.TaskTreeView_ChildTaskCreationCaption, MessageBoxButtons.OK);
  34.             return null;
  35.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement