本文整理汇总了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();
}
示例2: KernelEventSupport
public KernelEventSupport(SerializationInfo info, StreamingContext context)
{
events = new EventHandlerList();
events[HandlerRegisteredEvent] = (Delegate)
info.GetValue("HandlerRegisteredEvent", typeof(Delegate));
}
示例3: AddHandlers
public void AddHandlers(EventHandlerList listToAddFrom)
{
for (ListEntry entry = listToAddFrom.head; entry != null; entry = entry.next)
{
this.AddHandler(entry.key, entry.handler);
}
}
示例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);
}
}
}
}
示例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;
}
}
示例6: AbstractKernelEvents
public AbstractKernelEvents()
{
m_events = new EventHandlerList();
m_service2Key = new Hashtable();
m_dependencyToSatisfy = new Hashtable();
m_proxy2ComponentWrapper = new Hashtable();
InterceptedComponentBuilder = new DefaultInterceptedComponentBuilder();
}
示例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);
}
示例8: Add
public void Add(EventPrivateKey key, Delegate handler)
{
if (_directEventHandlers == null)
{
_directEventHandlers = new EventHandlerList();
}
_directEventHandlers.AddHandler(key, handler);
}
示例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>();
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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();
}
示例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);
}