當前位置: 首頁>>代碼示例>>C#>>正文


C# ComponentModel.EventHandlerList類代碼示例

本文整理匯總了C#中System.ComponentModel.EventHandlerList的典型用法代碼示例。如果您正苦於以下問題:C# EventHandlerList類的具體用法?C# EventHandlerList怎麽用?C# EventHandlerList使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EventHandlerList類屬於System.ComponentModel命名空間,在下文中一共展示了EventHandlerList類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: DeviceContextWpf

        public DeviceContextWpf(DeviceSettings settings)
        {
            Contract.Requires(settings != null);

            Settings = settings;
            LogEvent.Engine.Log(settings.ToString());

            eventHandlerList = new EventHandlerList();

            LogEvent.Engine.Log(Resources.INFO_OE_DeviceCreating);
            //SwapChainDescription swapChainDesc = new SwapChainDescription
            //                                         {
            //                                             BufferCount = 1,
            //                                             ModeDescription =
            //                                                 new ModeDescription(Settings.ScreenWidth, Settings.ScreenHeight,
            //                                                                     new Rational(120, 1), Settings.Format),
            //                                             IsWindowed = true,
            //                                             OutputHandle =(new System.Windows.Interop.WindowInteropHelper(Global.Window)).Handle,
            //                                             SampleDescription = Settings.SampleDescription,
            //                                             SwapEffect = SwapEffect.Discard,
            //                                             Usage = Usage.RenderTargetOutput,
            //                                         };

            //LogEvent.Engine.Log(Resources.INFO_OE_DeviceCreating);
            //Device.CreateWithSwapChain(DriverType.Hardware, Settings.CreationFlags, swapChainDesc, out device, out swapChain);
            device = new Device(DriverType.Hardware, Settings.CreationFlags, FeatureLevel.Level_11_0);

            //if (!Settings.IsWindowed)

            immediate = device.ImmediateContext;

            CreateTargets();
            LogEvent.Engine.Log(Resources.INFO_OE_DeviceCreated);
            device.ImmediateContext.Flush();
        }
開發者ID:yong-ja,項目名稱:starodyssey,代碼行數:35,代碼來源:DeviceContextWpf.cs

示例2: KernelEventSupport

		public KernelEventSupport(SerializationInfo info, StreamingContext context)
		{
			events = new EventHandlerList();

			events[HandlerRegisteredEvent] = (Delegate) 
				 info.GetValue("HandlerRegisteredEvent", typeof(Delegate));
		}
開發者ID:nats,項目名稱:castle-1.0.3-mono,代碼行數:7,代碼來源:KernelEventSupport.cs

示例3: AddHandlers

 public void AddHandlers(EventHandlerList listToAddFrom)
 {
     for (ListEntry entry = listToAddFrom.head; entry != null; entry = entry.next)
     {
         this.AddHandler(entry.key, entry.handler);
     }
 }
開發者ID:memsom,項目名稱:dotNetAnywhere-wb,代碼行數:7,代碼來源:EventHandlerList.cs

示例4: DesignerHost

 public DesignerHost(DesignSurface surface)
 {
     this._surface = surface;
     this._state = new BitVector32();
     this._designers = new Hashtable();
     this._events = new EventHandlerList();
     DesignSurfaceServiceContainer service = this.GetService(typeof(DesignSurfaceServiceContainer)) as DesignSurfaceServiceContainer;
     if (service != null)
     {
         foreach (Type type in DefaultServices)
         {
             service.AddFixedService(type, this);
         }
     }
     else
     {
         IServiceContainer container2 = this.GetService(typeof(IServiceContainer)) as IServiceContainer;
         if (container2 != null)
         {
             foreach (Type type2 in DefaultServices)
             {
                 container2.AddService(type2, this);
             }
         }
     }
 }
開發者ID:Reegenerator,項目名稱:Sample-CustomizeDatasetCS,代碼行數:26,代碼來源:DesignerHost.cs

示例5: AddHandlers

 /// <devdoc> allows you to add a list of events to this list </devdoc>
 public void AddHandlers(EventHandlerList listToAddFrom) {
  
     ListEntry currentListEntry = listToAddFrom.head;
     while (currentListEntry != null) {
         AddHandler(currentListEntry.key, currentListEntry.handler);
         currentListEntry = currentListEntry.next;
     }
 }
開發者ID:iskiselev,項目名稱:JSIL.NetFramework,代碼行數:9,代碼來源:EventHandlerList.cs

示例6: AbstractKernelEvents

 public AbstractKernelEvents()
 {
     m_events = new EventHandlerList();
     m_service2Key = new Hashtable();
     m_dependencyToSatisfy = new Hashtable();
     m_proxy2ComponentWrapper = new Hashtable();
     InterceptedComponentBuilder = new DefaultInterceptedComponentBuilder();
 }
開發者ID:BackupTheBerlios,項目名稱:dpml-svn,代碼行數:8,代碼來源:AbstractKernelEvents.cs

示例7: EventPropertyDescriptor

        public EventPropertyDescriptor(object component, EventInfo eventInfo, EventHandlerList eventHandlerList)
            : base(eventInfo.Name)
        {
            this.component = component;
            this.eventInfo = eventInfo;
            this.eventHandlerList = eventHandlerList;

            this.converter = new EventInfoConverter(this);
        }
開發者ID:KillerGoldFisch,項目名稱:GCharp,代碼行數:9,代碼來源:EventPropertyDescriptor.cs

示例8: Add

    public void Add(EventPrivateKey key, Delegate handler)
    {
      if (_directEventHandlers == null)
      {
        _directEventHandlers = new EventHandlerList();
      }

      _directEventHandlers.AddHandler(key, handler);
    }
開發者ID:npcomplete111,項目名稱:MediaPortal-1,代碼行數:9,代碼來源:EventHandlersStore.cs

示例9: BaseFileConfigurationSourceImplementation

 public BaseFileConfigurationSourceImplementation(string configurationFilepath)
 {
     this.lockMe = new object();
     this.refresh = true;
     this.eventHandlersLock = new object();
     this.eventHandlers = new EventHandlerList();
     this.configurationFilepath = configurationFilepath;
     this.watchedConfigSourceMapping = new Dictionary<string, ConfigurationSourceWatcher>();
     this.watchedSectionMapping = new Dictionary<string, ConfigurationSourceWatcher>();
 }
開發者ID:huaminglee,項目名稱:myyyyshop,代碼行數:10,代碼來源:BaseFileConfigurationSourceImplementation.cs

示例10: DockContentHandler

    /// <include file='CodeDoc\DockContentHandler.xml' path='//CodeDoc/Class[@name="DockContentHandler"]/Constructor[@name="(Form, GetPersistStringDelegate)"]/*'/>
    public DockContentHandler(Form form, GetPersistStringDelegate getPersistStringDelegate) {
      if (!(form is IDockContent))
        throw new ArgumentException();

      m_form = form;
      m_getPersistStringDelegate = getPersistStringDelegate;

      m_events = new EventHandlerList();
      Form.Disposed += new EventHandler(Form_Disposed);
      Form.TextChanged += new EventHandler(Form_TextChanged);
    }
開發者ID:Pelsoft,項目名稱:fwk_10.3,代碼行數:12,代碼來源:DockContentHandler.cs

示例11: DockContentHandler

		public DockContentHandler(Form form, GetPersistStringCallback getPersistStringCallback) {
			if (!(form is IDockContent))
				throw new ArgumentException(Strings.DockContent_Constructor_InvalidForm, "form");

			m_form = form;
			m_getPersistStringCallback = getPersistStringCallback;

			m_events = new EventHandlerList();
			Form.Disposed += new EventHandler(Form_Disposed);
			Form.TextChanged += new EventHandler(Form_TextChanged);
		}
開發者ID:sanyaade-fintechnology,項目名稱:SquareOne,代碼行數:11,代碼來源:DockContentHandler.cs

示例12: EventSuppressor

        public EventSuppressor(Component source)
        {
            if (source == null)
                throw new ArgumentNullException("control", "An instance of a control must be provided.");

            _source = source;
            _sourceType = _source.GetType();
            _sourceEventsInfo = _sourceType.GetProperty("Events", BindingFlags.Instance | BindingFlags.NonPublic);
            _sourceEventHandlerList = (EventHandlerList)_sourceEventsInfo.GetValue(_source, null);
            _eventHandlerListType = _sourceEventHandlerList.GetType();
            _headFI = _eventHandlerListType.GetField("head", BindingFlags.Instance | BindingFlags.NonPublic);
        }
開發者ID:urmilaNominate,項目名稱:mERP-framework,代碼行數:12,代碼來源:EventSuppressor.cs

示例13: DockContentHandler

        public DockContentHandler(Form form, GetPersistStringCallback getPersistStringCallback)
        {
            if (!(form is IDockContent))
                throw new ArgumentException(Strings.DockContent_Constructor_InvalidForm, "form");

            this._mForm = form;
            this.m_getPersistStringCallback = getPersistStringCallback;

            (form as DockContent).Size = form.Size;

            this._mEvents = new EventHandlerList();
            this.Form.Disposed += this.Form_Disposed;
            this.Form.TextChanged += this.Form_TextChanged;
        }
開發者ID:borisblizzard,項目名稱:arcreator,代碼行數:14,代碼來源:DockContentHandler.cs

示例14: UIHierarchy

 public UIHierarchy(IServiceProvider serviceProvider, ConfigurationContext configurationContext)
 {
     if (serviceProvider == null)
     {
         throw new ArgumentNullException("serviceProvider");
     }
     this.serviceProvider = serviceProvider;
     this.configurationContext = configurationContext;
     this.configDomain = new ConfigurationDesignManagerDomain(serviceProvider);
     nodesByType = new Hashtable(CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
     nodesById = new Hashtable(CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
     nodesByName = new Hashtable(CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
     storageTable = new StorageTable();
     handlerList = new EventHandlerList();
 }
開發者ID:bnantz,項目名稱:NCS-V1-1,代碼行數:15,代碼來源:UIHierarchy.cs

示例15: ConfigurationUIHierarchy

        /// <summary>
        /// Initialize a new instance of the <see cref="ConfigurationUIHierarchy"/> class.
        /// </summary>
        /// <param name="rootNode">The root node of the hierarchy.</param>
        /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
        public ConfigurationUIHierarchy(ConfigurationApplicationNode rootNode, IServiceProvider serviceProvider)
        {
            if (rootNode == null) throw new ArgumentNullException("rootNode");
            if (serviceProvider == null) throw new ArgumentNullException("serviceProvider");

            this.storageSerivce = new StorageService();
            this.configDomain = new ConfigurationDesignManagerDomain(serviceProvider);
            this.serviceProvider = serviceProvider;
            nodesByType = new Dictionary<Guid,NodeTypeEntryArrayList>();
            nodesById = new Dictionary<Guid, ConfigurationNode>();
            nodesByName = new Dictionary<Guid, Dictionary<string, ConfigurationNode>>();
            handlerList = new EventHandlerList();
            this.rootNode = rootNode;
            this.storageSerivce.ConfigurationFile = this.rootNode.ConfigurationFile;
            this.rootNode.Renamed += new EventHandler<ConfigurationNodeChangedEventArgs>(OnConfigurationFileChanged);
            selectedNode = rootNode;
            AddNode(rootNode);
            if (null != rootNode.FirstNode) rootNode.UpdateHierarchy(rootNode.FirstNode);
        }
開發者ID:bnantz,項目名稱:NCS-V2-0,代碼行數:24,代碼來源:ConfigurationUIHierarchy.cs


注:本文中的System.ComponentModel.EventHandlerList類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。