当前位置: 首页>>代码示例>>C#>>正文


C# IComponent类代码示例

本文整理汇总了C#中IComponent的典型用法代码示例。如果您正苦于以下问题:C# IComponent类的具体用法?C# IComponent怎么用?C# IComponent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IComponent类属于命名空间,在下文中一共展示了IComponent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Collider

        private float m_Radius;         // size of the collider for a sphere

        public Collider(Vector3 size,Boolean trigger = false, IComponent material = null, Vector3 centre = null )
        {
            m_Trigger = trigger;
            m_Material = material;
            m_Centre = centre != null ? centre : new Vector3();
            m_Size = size;
        }
开发者ID:kaldhu,项目名称:MyGameEngine,代码行数:9,代码来源:BoxCollider.cs

示例2: Initialize

 /// <summary>
 /// Overridden. Inherited from <see cref="ControlDesigner.Initialize( IComponent )"/>.
 /// </summary>
 /// <param name="component">
 /// The <see cref="IComponent"/> hosted by the designer.
 /// </param>
 public override void Initialize(IComponent component)
 {
     _page = component as MultiPanelPage;
     if (_page == null)
         DisplayError(new Exception("You attempted to use a MultiPanelPageDesigner with a class that does not inherit from MultiPanelPage."));
     base.Initialize(component);
 }
开发者ID:panoti,项目名称:DADHMT_LTW,代码行数:13,代码来源:MultiPanelPageDesigner.cs

示例3: DesignModeSite

		public DesignModeSite (IComponent component, string name, IContainer container, IServiceProvider serviceProvider)
		{
			_component = component;
			_container = container;
			_componentName = name;
			_serviceProvider = serviceProvider;
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:7,代码来源:DesignModeSite.cs

示例4: ImageListViewActionLists

		/// <summary>
		/// Initializes a new instance of the ImageListViewActionLists class.
		/// </summary>
		/// <param name="component">A component related to the DesignerActionList.</param>
		public ImageListViewActionLists(IComponent component)
			: base(component)
		{
			imageListView = (ImageListView)component;

			designerService = (DesignerActionUIService)GetService(typeof(DesignerActionUIService));
		}
开发者ID:ericpony,项目名称:comic-gallery,代码行数:11,代码来源:ImageListViewDesigner.cs

示例5: DrawAndGetNewValue

 public object DrawAndGetNewValue(Type type, string fieldName, object value, Entity entity, int index, IComponent component) {
     var myObject = (CustomObject)value;
     var fieldType = myObject.GetType().GetField("name").FieldType;
     EntityInspector.DrawAndSetElement(fieldType, "customObject.name", myObject.name,
         entity, index, component, newValue => myObject.name = (string)newValue);
     return myObject;
 }
开发者ID:ntl92bk,项目名称:Entitas-CSharp,代码行数:7,代码来源:CustomObjectTypeDrawer.cs

示例6: Initialize

 /// <summary>
 ///    <para>
 ///       Initializes the designer with the component for design.
 ///    </para>
 /// </summary>
 /// <param name='component'>
 ///    The control element for design.
 /// </param>
 /// <remarks>
 ///    <para>
 ///       This is called by the designer host to establish the component for
 ///       design.
 ///    </para>
 /// </remarks>
 /// <seealso cref='System.ComponentModel.Design.IDesigner'/>
 public override void Initialize(IComponent component)
 {
     Debug.Assert(component is System.Web.UI.MobileControls.Calendar,
                  "CalendarDesigner.Initialize - Invalid Calendar Control");
     _calendar = (System.Web.UI.MobileControls.Calendar) component;
     base.Initialize(component);
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:22,代码来源:CalendarDesigner.cs

示例7: InvokeItemSelected

        /// <summary>
        /// 
        /// </summary>
        private void InvokeItemSelected(IComponent component)
        {
            if (ItemSelected == null)
                return;

            ItemSelected(this, component);
        }
开发者ID:romeowa,项目名称:hadows8,代码行数:10,代码来源:ComponentSelector.cs

示例8: RenderHtml

 private string RenderHtml(IComponent component)
 {
     string layout = ReadLayout();
     string content = BuildContent(component);            
     content = layout.Replace("@[email protected]", content); 
     return content;
 }
开发者ID:felix-tien,项目名称:TechLab,代码行数:7,代码来源:TableComponentRenderer.cs

示例9: NestedContainer

 /// <devdoc>
 ///     Creates a new NestedContainer.
 /// </devdoc>
 public NestedContainer(IComponent owner) {
     if (owner == null) {
         throw new ArgumentNullException("owner");
     }
     _owner = owner;
     _owner.Disposed += new EventHandler(OnOwnerDisposed);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:10,代码来源:NestedContainer.cs

示例10: GetComponentName

		string GetComponentName(IComponent component)
		{
			string siteName = component.Site.Name;
			if (GeneralOptionsPanel.GenerateVisualStudioStyleEventHandlers)
				return siteName;
			return Char.ToUpper(siteName[0]) + siteName.Substring(1);
		}
开发者ID:dgrunwald,项目名称:SharpDevelop,代码行数:7,代码来源:CSharpEventBindingService.cs

示例11: Initialize

        /// <summary>
        /// Initializes the designer with the specified component.
        /// </summary>
        /// <param name="component">The IComponent to associate the designer with.</param>
        public override void Initialize(IComponent component)
        {
            Debug.Assert(component != null);

            // Validate the parameter reference
            if (component == null) throw new ArgumentNullException("component");

            // Let base class do standard stuff
            base.Initialize(component);

            // Cast to correct type
            _groupBox = component as KryptonGroupBox;

            // The resizing handles around the control need to change depending on the
            // value of the AutoSize and AutoSizeMode properties. When in AutoSize you
            // do not get the resizing handles, otherwise you do.
            AutoResizeHandles = true;

            // Acquire service interfaces
            _designerHost = (IDesignerHost)GetService(typeof(IDesignerHost));

            // Let the internal panel in the container be designable
            if (_groupBox != null)
                EnableDesignMode(_groupBox.Panel, "Panel");
        }
开发者ID:yp25,项目名称:Krypton,代码行数:29,代码来源:KryptonGroupBoxDesigner.cs

示例12: OnGameBoardElementAdded

 void OnGameBoardElementAdded(Group group, Entity entity, int index, IComponent component)
 {
     var grid = pool.gameBoardCache.grid;
     var pos = entity.position;
     grid.Add(pos.x, pos.y, entity);
     pool.ReplaceGameBoardCache(grid);
 }
开发者ID:JamesMcMahon,项目名称:entitas-2d-roguelike,代码行数:7,代码来源:GameBoardCacheSystem.cs

示例13: Initialize

 /// <summary>
 ///    <para>
 ///       Initializes the designer with the component for design.
 ///    </para>
 /// </summary>
 /// <param name='component'>
 ///    The control element for design.
 /// </param>
 /// <remarks>
 ///    <para>
 ///       This is called by the designer host to establish the component for
 ///       design.
 ///    </para>
 /// </remarks>
 /// <seealso cref='System.ComponentModel.Design.IDesigner'/>
 public override void Initialize(IComponent component)
 {
     Debug.Assert(component is System.Web.UI.MobileControls.Link,
                  "LinkDesigner.Initialize - Invalid Link Control");
     _link = (System.Web.UI.MobileControls.Link) component;
     base.Initialize(component);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:22,代码来源:LinkDesigner.cs

示例14: DesignerActionBehavior

 internal DesignerActionBehavior(IServiceProvider serviceProvider, IComponent relatedComponent, DesignerActionListCollection actionLists, DesignerActionUI parentUI)
 {
     this.actionLists = actionLists;
     this.serviceProvider = serviceProvider;
     this.relatedComponent = relatedComponent;
     this.parentUI = parentUI;
 }
开发者ID:Reegenerator,项目名称:Sample-CustomizeDatasetCS,代码行数:7,代码来源:DesignerActionBehavior.cs

示例15: Add

 public virtual void Add(IComponent component, string name)
 {
     lock (this.syncObj)
     {
         if (component != null)
         {
             ISite site = component.Site;
             if ((site == null) || (site.Container != this))
             {
                 if (this.sites == null)
                 {
                     this.sites = new ISite[4];
                 }
                 else
                 {
                     this.ValidateName(component, name);
                     if (this.sites.Length == this.siteCount)
                     {
                         ISite[] destinationArray = new ISite[this.siteCount * 2];
                         Array.Copy(this.sites, 0, destinationArray, 0, this.siteCount);
                         this.sites = destinationArray;
                     }
                 }
                 if (site != null)
                 {
                     site.Container.Remove(component);
                 }
                 ISite site2 = this.CreateSite(component, name);
                 this.sites[this.siteCount++] = site2;
                 component.Site = site2;
                 this.components = null;
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:35,代码来源:Container.cs


注:本文中的IComponent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。