예제 #1
0
 public override void Clear()
 {
     base.Clear();
     string message = string.Format("Collection has cleared!");
     NotifyArgs messageNotify = new NotifyArgs(message);
     this.OnChanged(messageNotify);
 }
예제 #2
0
 // Invoke the Changed event; called whenever list changes
 private void OnChanged(NotifyArgs message)
 {
     if (this.CollectionChanged != null)
     {
         this.CollectionChanged(this, message);
     }
 }
예제 #3
0
 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);
     }
 }
예제 #5
0
 public override void Clear()
 {
     base.Clear();
     string note = String.Format("Collection has cleared.");
     NotifyArgs notify = new NotifyArgs(note);
     this.OnChanged(notify);
 }
예제 #6
0
 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);
        }
예제 #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;
 }
예제 #9
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;
 }
예제 #10
0
        public override void Clear()
        {
            base.Clear();
            string     note   = String.Format("Collection has cleared.");
            NotifyArgs notify = new NotifyArgs(note);

            this.OnChanged(notify);
        }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #17
0
 private static void OnCollectionChange(object sender,NotifyArgs e)
 {
     Console.WriteLine(e.Message);
 }
예제 #18
0
 private static void OnCollectionChange(object sender, NotifyArgs e)
 {
     Console.WriteLine(e.Message);
 }