public override void LoadPanelContents()
		{
			foreach (FiletypeAssociation assoc in FiletypeAssociationDoozer.GetList()) {
				ListEntry entry = new ListEntry(assoc);
				fileTypesListBox.Items.Add(entry, entry.InitiallyChecked);
			}
		}
예제 #2
0
 // 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);
         }
     }
 }
예제 #3
0
 /// <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);
         }
     }
 }
예제 #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);
     }
 }
예제 #5
0
 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;
 }
예제 #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);
		}
예제 #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);
         }
     }
 }
예제 #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);
        }
예제 #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);
            }
        }
예제 #11
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);
         }
     }
 }
예제 #12
0
 public ListEntry(object key, Delegate handler, ListEntry next)
 {
     this.next    = next;
     this.key     = key;
     this.handler = handler;
 }
예제 #13
0
 public void Dispose()
 {
     entries = null;
 }
예제 #14
0
 public void Dispose()
 {
     this.head = null;
 }
예제 #15
0
 /// <summary>
 ///    <para>[To be supplied.]</para>
 /// </summary>
 public void Dispose()
 {
     _head = null;
 }
예제 #16
0
 public void Dispose()
 {
     this.head = null;
 }
예제 #17
0
 public ListEntry(object key, Delegate handler, ListEntry next)
 {
     this.next = next;
     this.key = key;
     this.handler = handler;
 }
예제 #18
0
 /// <summary>Disposes the delegate list.</summary>
 public void Dispose()
 {
     this.entries = null;
 }
예제 #19
0
 /// <summary>
 ///    <para>[To be supplied.]</para>
 /// </summary>
 public void Dispose()
 {
     _head = null;
 }
예제 #20
0
		public void Dispose ()
		{
			entries = null;
		}