Пример #1
0
        public void AddWarningSign(IWarningable target, string message)
        {
            WarningSign warningSign = new WarningSign(target)
            {
                Message = message
            };

            _warnings.Add(warningSign);
        }
Пример #2
0
        public void ShowWarning(WarningSign warningSign)
        {
            if (warningSign == null)
            {
                this.treeListView.Roots = new ArrayList();
                return;
            }
            ArrayList roots = new ArrayList()
            {
                warningSign
            };

            this.treeListView.Roots = roots;
            this.treeListView.ExpandAll();
        }
Пример #3
0
 private void InitializeTreeListView()
 {
     this.treeListView.CanExpandGetter = delegate(object x)
     {
         WarningSign warningSign = x as WarningSign;
         if (x == null)
         {
             return(false);
         }
         return(warningSign.Warnings.Count > 0);
     };
     this.treeListView.ChildrenGetter = delegate(object x)
     {
         WarningSign warningSign = x as WarningSign;
         if (warningSign == null)
         {
             return(new ArrayList());
         }
         return(new ArrayList(warningSign.Warnings));
     };
     this.treeListView.CheckBoxes = false;
     TreeListView.TreeRenderer treeRenderer = this.treeListView.TreeColumnRenderer as TreeListView.TreeRenderer;
     treeRenderer.IsShowLines        = false;
     this.treeColumnIcon.ImageGetter = delegate(object x)
     {
         WarningSign warningSign = x as WarningSign;
         if (String.IsNullOrEmpty(warningSign.Message))
         {
             return(0);
         }
         else
         {
             return(1);
         }
     };
     this.treeColumnName.AspectGetter = delegate(object x)
     {
         WarningSign warningSign = x as WarningSign;
         if (String.IsNullOrEmpty(warningSign.Message))
         {
             return(warningSign.Name);
         }
         else
         {
             return(warningSign.Message);
         }
     };
 }
Пример #4
0
 public void AddWarningSign(WarningSign warning)
 {
     _warnings.Add(warning);
 }
Пример #5
0
 public virtual void Remove(WarningSign value)
 {
     List.Remove(value);
 }
Пример #6
0
 public void Insert(int index, WarningSign value)
 {
     List.Insert(index, value);
 }
Пример #7
0
 public int IndexOf(WarningSign value)
 {
     return(List.IndexOf(value));
 }
Пример #8
0
 public bool Contains(WarningSign value)
 {
     return(List.Contains(value));
 }
Пример #9
0
 public virtual int Add(WarningSign value)
 {
     return(List.Add(value));
 }