public override void LoadPanelContents()
		{
			foreach (FiletypeAssociation assoc in FiletypeAssociationDoozer.GetList()) {
				ListEntry entry = new ListEntry(assoc);
				fileTypesListBox.Items.Add(entry, entry.InitiallyChecked);
			}
		}
 // Properties
 public Delegate this[object key]
 {
     get
     {
         ListEntry entry = null;
         if ((this.parent == null) || this.parent.CanRaiseEventsInternal)
         {
             entry = this.Find(key);
         }
         if (entry != null)
         {
             return entry.handler;
         }
         return null;
     }
     set
     {
         ListEntry entry = this.Find(key);
         if (entry != null)
         {
             entry.handler = value;
         }
         else
         {
             this.head = new ListEntry(key, value, this.head);
         }
     }
 }
 /// <summary>
 ///    <para>Gets or sets the delegate for the specified key.</para>
 /// </summary>
 public Delegate this[object key]
 {
     [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
     get
     {
         ListEntry e = Find(key);
         if (e != null)
         {
             return e.handler;
         }
         else
         {
             return null;
         }
     }
     set
     {
         ListEntry e = Find(key);
         if (e != null)
         {
             e.handler = value;
         }
         else
         {
             _head = new ListEntry(key, value, _head);
         }
     }
 }
Beispiel #4
0
 /// <include file='doc\EventHandlerList.uex' path='docs/doc[@for="EventHandlerList.AddHandler"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public void AddHandler(object key, Delegate value) {
     ListEntry e = Find(key);
     if (e != null) {
         e.handler = Delegate.Combine(e.handler, value);
     }
     else {
         head = new ListEntry(key, value, head);
     }
 }
 public void AddHandler(object key, Delegate value)
 {
     ListEntry entry = this.Find(key);
     if (entry != null)
     {
         entry.handler = Delegate.Combine(entry.handler, value);
     }
     else
     {
         this.head = new ListEntry(key, value, this.head);
     }
 }
 private ListEntry Find(object key)
 {
     ListEntry head = this.head;
     while (head != null)
     {
         if (head.key == key)
         {
             return head;
         }
         head = head.next;
     }
     return head;
 }
Beispiel #7
0
		public void AddHandler (object key, Delegate value)
		{
			if (key == null) {
				null_entry = Delegate.Combine (null_entry, value);
				return;
			}

			ListEntry entry = FindEntry (key);
			if (entry == null) {
				entry = new ListEntry ();
				entry.key = key;
				entry.value = null;
				entry.next = entries;
				entries = entry;
			}

			entry.value = Delegate.Combine (entry.value, value);
		}
Beispiel #8
0
 /// <include file='doc\EventHandlerList.uex' path='docs/doc[@for="EventHandlerList.this"]/*' />
 /// <devdoc>
 ///    <para>Gets or sets the delegate for the specified key.</para>
 /// </devdoc>
 public Delegate this[object key] {
     get {
         ListEntry e = Find(key);
         if (e != null) {
             return e.handler;
         }
         else {
             return null;
         }
     }
     set {
         ListEntry e = Find(key);
         if (e != null) {
             e.handler = value;
         }
         else {
             head = new ListEntry(key, value, head);
         }
     }
 }
Beispiel #9
0
        public void AddHandler(object key, Delegate value)
        {
            if (key == null)
            {
                null_entry = Delegate.Combine(null_entry, value);
                return;
            }

            ListEntry entry = FindEntry(key);

            if (entry == null)
            {
                entry       = new ListEntry();
                entry.key   = key;
                entry.value = null;
                entry.next  = entries;
                entries     = entry;
            }

            entry.value = Delegate.Combine(entry.value, value);
        }
Beispiel #10
0
        public Delegate this [object key] {
            get {
                if (key == null)
                {
                    return(null_entry);
                }
                ListEntry entry = FindEntry(key);
                if (entry != null)
                {
                    return(entry.value);
                }
                else
                {
                    return(null);
                }
            }

            set {
                AddHandler(key, value);
            }
        }
 /// <include file='doc\EventHandlerList.uex' path='docs/doc[@for="EventHandlerList.this"]/*' />
 /// <devdoc>
 ///    <para>Gets or sets the delegate for the specified key.</para>
 /// </devdoc>
 public Delegate this[object key] {
     get {
         ListEntry e = Find(key);
         if (e != null)
         {
             return(e.handler);
         }
         else
         {
             return(null);
         }
     }
     set {
         ListEntry e = Find(key);
         if (e != null)
         {
             e.handler = value;
         }
         else
         {
             head = new ListEntry(key, value, head);
         }
     }
 }
Beispiel #12
0
 public ListEntry(object key, Delegate handler, ListEntry next)
 {
     this.next    = next;
     this.key     = key;
     this.handler = handler;
 }
Beispiel #13
0
 public void Dispose()
 {
     entries = null;
 }
Beispiel #14
0
 public void Dispose()
 {
     this.head = null;
 }
 /// <summary>
 ///    <para>[To be supplied.]</para>
 /// </summary>
 public void Dispose()
 {
     _head = null;
 }
 public void Dispose()
 {
     this.head = null;
 }
 public ListEntry(object key, Delegate handler, ListEntry next)
 {
     this.next = next;
     this.key = key;
     this.handler = handler;
 }
Beispiel #18
0
 /// <summary>Disposes the delegate list.</summary>
 public void Dispose()
 {
     this.entries = null;
 }
Beispiel #19
0
 /// <summary>
 ///    <para>[To be supplied.]</para>
 /// </summary>
 public void Dispose()
 {
     _head = null;
 }
Beispiel #20
0
		public void Dispose ()
		{
			entries = null;
		}