Example #1
0
 public override void Clear()
 {
     base.Clear();
     string message = string.Format("Collection has cleared!");
     NotifyArgs messageNotify = new NotifyArgs(message);
     this.OnChanged(messageNotify);
 }
Example #2
0
 // Invoke the Changed event; called whenever list changes
 private void OnChanged(NotifyArgs message)
 {
     if (this.CollectionChanged != null)
     {
         this.CollectionChanged(this, message);
     }
 }
 private void OnChanged(NotifyArgs note)
 {
     if (this.CollectionChanged != null)
     {
         this.CollectionChanged(this, note);
     }
 }
 private void OnChanged(NotifyArgs message)
 {
     if (this.CollectionChanged != null)
     {
         this.CollectionChanged(this, message);
     }
 }
 public override void Clear()
 {
     base.Clear();
     string note = String.Format("Collection has cleared.");
     NotifyArgs notify = new NotifyArgs(note);
     this.OnChanged(notify);
 }
 private void OnChanged(NotifyArgs note)
 {
     if (this.CollectionChanged != null)
     {
         this.CollectionChanged(this, note);
     }
 }
        public override void Clear()
        {
            base.Clear();
            string     message       = string.Format("Collection has cleared!");
            NotifyArgs messageNotify = new NotifyArgs(message);

            this.OnChanged(messageNotify);
        }
Example #8
0
 // Override some of the methods that can change the list;
 // invoke event after each
 public override int Add(object value)
 {
     int i = base.Add(value);
     string message = string.Format("Added new item with value={0} in collection!",value);
     NotifyArgs messageNotify = new NotifyArgs(message);
     this.OnChanged(messageNotify);
     return i;
 }
 public override int Add(object value)
 {
     int i = base.Add(value);
     string note = String.Format("Added new item with value {0}.", value);
     NotifyArgs notify = new NotifyArgs(note);
     this.OnChanged(notify);
     return i;
 }
Example #10
0
        public override void Clear()
        {
            base.Clear();
            string     note   = String.Format("Collection has cleared.");
            NotifyArgs notify = new NotifyArgs(note);

            this.OnChanged(notify);
        }
Example #11
0
        public override int Add(object value)
        {
            int        i      = base.Add(value);
            string     note   = String.Format("Added new item with value {0}.", value);
            NotifyArgs notify = new NotifyArgs(note);

            this.OnChanged(notify);
            return(i);
        }
        public override int Add(object value)
        {
            int        i         = base.Add(value);
            string     msg       = string.Format("Added new value={0} in the collection", value);
            NotifyArgs msgNotify = new NotifyArgs(msg);

            this.OnChanged(msgNotify);
            return(i);
        }
 public override object this[int index]
 {
     set
     {
         string     message       = string.Format("The value of index {0}=({1}) has change to: {2}", index, this[index], value);
         NotifyArgs messageNotify = new NotifyArgs(message);
         base[index] = value;
         this.OnChanged(messageNotify);
     }
 }
Example #14
0
 public override object this[int index]
 {
     set
     {
         string note = String.Format("The value {0} of index {1} has changed to {2}", this[index], index, value);
         NotifyArgs notify = new NotifyArgs(note);
         base[index] = value;
         this.OnChanged(notify);
     }
 }
Example #15
0
 public override object this[int index]
 {
     set
     {
         string message = string.Format("The value of index {0}=({1}) has change to: {2}", index, this[index], value);
         NotifyArgs messageNotify = new NotifyArgs(message);
         base[index] = value;
         this.OnChanged(messageNotify);
     }
 }
Example #16
0
 public override object this[int index]
 {
     set
     {
         string     note   = String.Format("The value {0} of index {1} has changed to {2}", this[index], index, value);
         NotifyArgs notify = new NotifyArgs(note);
         base[index] = value;
         this.OnChanged(notify);
     }
 }
 private static void OnCollectionChange(object sender,NotifyArgs e)
 {
     Console.WriteLine(e.Message);
 }
 private static void OnCollectionChange(object sender, NotifyArgs e)
 {
     Console.WriteLine(e.Message);
 }