本文整理汇总了C#中System.ComponentModel.EventHandlerList类的典型用法代码示例。如果您正苦于以下问题:C# EventHandlerList类的具体用法?C# EventHandlerList怎么用?C# EventHandlerList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EventHandlerList类属于System.ComponentModel命名空间,在下文中一共展示了EventHandlerList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: DeviceContext11
public DeviceContext11(IntPtr handle, DeviceSettings settings)
{
Contract.Requires(handle != IntPtr.Zero);
Contract.Requires(settings != null);
Settings = settings;
LogEvent.Engine.Log(settings.ToString());
eventHandlerList = new EventHandlerList();
SwapChainDescription swapChainDesc = new SwapChainDescription
{
BufferCount = 1,
IsWindowed = Settings.IsWindowed,
ModeDescription =
new ModeDescription{
Width = Settings.ScreenWidth,
Height = Settings.ScreenHeight,
RefreshRate= new Rational(0, 1),
Format = Settings.Format,
Scaling = DisplayModeScaling.Unspecified,
ScanlineOrdering = DisplayModeScanlineOrdering.Unspecified,
},
//new Rational(120, 1), Settings.Format),
OutputHandle = handle,
SampleDescription = Settings.SampleDescription,
Flags = SwapChainFlags.AllowModeSwitch,
SwapEffect = SwapEffect.Discard,
Usage = Usage.RenderTargetOutput,
};
FeatureLevel[] featureLevels = new FeatureLevel[] { FeatureLevel.Level_11_0, FeatureLevel.Level_10_1, FeatureLevel.Level_10_0 };
LogEvent.Engine.Log(Resources.INFO_OE_DeviceCreating);
Device.CreateWithSwapChain(DriverType.Hardware, Settings.CreationFlags, featureLevels, swapChainDesc, out device, out swapChain);
factory = swapChain.GetParent<Factory>();
factory.SetWindowAssociation(handle, WindowAssociationFlags.IgnoreAltEnter | WindowAssociationFlags.IgnoreAll);
immediate = device.ImmediateContext;
CreateTargets();
LogEvent.Engine.Log(Resources.INFO_OE_DeviceCreated);
}
开发者ID:yong-ja,项目名称:starodyssey,代码行数:43,代码来源:DeviceContext11.cs
示例17: FileBasedConfigurationSource
/// <summary>
/// Initializes a new instance of the <see cref="FileBasedConfigurationSource"/> class.
/// </summary>
/// <param name="configurationFilepath">The path for the main configuration file.</param>
/// <param name="refresh"><b>true</b>if runtime changes should be refreshed, <b>false</b> otherwise.</param>
/// <param name="refreshInterval">The poll interval in milliseconds.</param>
protected FileBasedConfigurationSource(string configurationFilepath, bool refresh, int refreshInterval)
{
this.configurationFilepath = configurationFilepath;
this.refresh = refresh && !string.IsNullOrEmpty(configurationFilepath);
this.refreshInterval = refreshInterval;
this.refreshLock = new object();
this.eventHandlersLock = new object();
this.eventHandlers = new EventHandlerList();
this.watchersLock = new object();
this.watchedConfigSourceMapping = new Dictionary<string, ConfigurationSourceWatcher>();
this.watchedSectionMapping = new Dictionary<string, ConfigurationSourceWatcher>();
CompositeConfigurationHandler = new CompositeConfigurationSourceHandler(this);
CompositeConfigurationHandler.ConfigurationSectionChanged += new ConfigurationChangedEventHandler(handler_ConfigurationSectionChanged);
CompositeConfigurationHandler.ConfigurationSourceChanged += new EventHandler<ConfigurationSourceChangedEventArgs>(handler_ConfigurationSourceChanged);
HierarchicalConfigurationHandler = new HierarchicalConfigurationSourceHandler(this);
HierarchicalConfigurationHandler.ConfigurationSectionChanged += new ConfigurationChangedEventHandler(handler_ConfigurationSectionChanged);
HierarchicalConfigurationHandler.ConfigurationSourceChanged += new EventHandler<ConfigurationSourceChangedEventArgs>(handler_ConfigurationSourceChanged);
}
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:28,代码来源:FileBasedConfigurationSource.cs
示例18: Sample
public Sample()
{
Events = new EventHandlerList();
}
开发者ID:devlights,项目名称:Sazare,代码行数:4,代码来源:EventSettingSamples01.cs
示例19: ChoicePropertyFilter
internal ChoicePropertyFilter(
DeviceSpecificChoice choice,
IDeviceSpecificDesigner designer,
ISite site
) {
_events = new EventHandlerList();
_choice = choice;
_site = site;
_designer = designer;
CreateLocalCopiesOfObjects();
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:12,代码来源:PropertyOverridesDialog.cs
示例20: AddEventHandler
void AddEventHandler (object key, EventHandler handler)
{
if (events == null)
events = new EventHandlerList ();
events.AddHandler (key, handler);
}
开发者ID:Profit0004,项目名称:mono,代码行数:6,代码来源:DataPagerField.cs
注:本文中的System.ComponentModel.EventHandlerList类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论