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


C# IControl.GetType方法代码示例

本文整理汇总了C#中IControl.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# IControl.GetType方法的具体用法?C# IControl.GetType怎么用?C# IControl.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IControl的用法示例。


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

示例1: Apply

		/// <summary>
		/// Applies the corresponding styles to a recently created control
		/// <para xml:lang="es">
		/// Aplica los estilos correspondientes a un control creado recientemente.
		/// </para>
		/// </summary>
		public static void Apply(IControl e)
		{
			string selector = "." + e.GetType().Name;

			//select the correct styles using the selector, and apply
			foreach (ICssStyleDeclaration style in ParsedStyleRules.Where(s => s.SelectorText == selector))
			{
				Apply(style, e);
			}
		}
开发者ID:okhosting,项目名称:OKHOSTING.UI,代码行数:16,代码来源:Style.cs

示例2: OnValueChanged

 private void OnValueChanged(IControl next)
 {
     if (next == null || _ancestorType.IsAssignableFrom(next.GetType().GetTypeInfo()))
         _subject.OnNext(next);
     else
     {
         _child?.Dispose();
         _child = new FinderNode(next, _ancestorType);
         _child.Observable.Subscribe(OnChildValueChanged);
         _child.Init();
     }
 }
开发者ID:Arlorean,项目名称:Perspex,代码行数:12,代码来源:AncestorFinder.cs

示例3: GetKey

		private String GetKey (IControl<UIView> control)
		{
			String s = "";
			if (control.Parent != null)
				s = GetKey ((IControl<UIView>)control.Parent);

			String cssClass = null;
			if (control is IStyledObject) {
				cssClass = control.CssClass;
				if (!String.IsNullOrEmpty (cssClass))
					cssClass = cssClass.ToLower ();
			}
			
			if (!String.IsNullOrEmpty (s))
				s = s + " ";
			
			if (!String.IsNullOrEmpty (cssClass)) {
				s = s + String.Format ("({0}|{1})", control.GetType ().Name.ToLower (), cssClass);
			} else
				s = s + control.GetType ().Name.ToLower ();

			return s;
		}
开发者ID:Fedorm,项目名称:core-master,代码行数:23,代码来源:IOSStyleSheet.cs

示例4: AddControl

        public bool AddControl(IControl control)
        {
            if (_controlLayers.Count > 0)
                _controlLayers.First.Value.IsActive = false;

            if (!_controlLayers.TryAddFirst(control)) {
                Console.Error.WriteLine("Failed to acquire control lock. {0} control not added.", control.GetType().Name);
                return false;
            }
            if (_isLoaded)
                control.LoadContent(this);
            control.IsActive = true;
            control.OnClosed += _closedControlHandler;
            _alignControl(control);
            return true;
        }
开发者ID:sleepless1,项目名称:GameSharp,代码行数:16,代码来源:ControlManager.cs

示例5: CanCreate

 public bool CanCreate( IControl control )
 {
     return control != null && control.GetType() == typeof( CarsRemoverBuildMode );
 }
开发者ID:Klakier,项目名称:Road-Traffic-Simualator,代码行数:4,代码来源:CarsRemoverBuilder.cs

示例6: GetAction

 private IEnumerable<BuilderAction> GetAction( IControl control )
 {
     var builder = this._builders.FirstOrDefault( b => b.CanCreate( control ) );
     if ( builder == null ) throw new ArgumentException( "Controls not supported: " + control.GetType().Name );
     return builder.Create( control );
 }
开发者ID:Klakier,项目名称:Road-Traffic-Simualator,代码行数:6,代码来源:Builder.cs

示例7: CanCreate

 public bool CanCreate( IControl control )
 {
     return control != null && control.GetType() == typeof( BuildJunctionEdge );
 }
开发者ID:Klakier,项目名称:Road-Traffic-Simualator,代码行数:4,代码来源:JunctionEdgeBuilder.cs

示例8: RemoveControl

        public virtual bool RemoveControl(IControl control)
        {
            if (control.Parent != this) {
                Console.Error.WriteLine("Tried to remove control [{0}] that is not a child of parent [{1}].", control.GetType().Name, this.GetType().Name);
                return false;
            }

            if (!_lockControlList())
                throw new SynchronizationLockException("Could not acquire control lock, control not removed.");
            try {
                _controls.Remove(control);
            } finally {
                _unlockControlList(true);
            }
            control.SetParent(null);
            control.OnResized -= this._handleResizeEvent;
            control.OnClosed -= this._handleClosedEvent;
            return true;
        }
开发者ID:sleepless1,项目名称:GameSharp,代码行数:19,代码来源:ControlContainer.cs

示例9: CanCreate

 public bool CanCreate( IControl control )
 {
     return control != null && control.GetType() == typeof( RoadLaneBlock );
 }
开发者ID:Klakier,项目名称:Road-Traffic-Simualator,代码行数:4,代码来源:RoadLaneBuilder.cs

示例10: CanCreate

 public bool CanCreate( IControl control )
 {
     return control != null && control.GetType() == typeof( RoadConnection );
 }
开发者ID:Klakier,项目名称:Road-Traffic-Simualator,代码行数:4,代码来源:LaneCornerBuilder.cs

示例11: CreateControlDocumentFragment

        public ControlDocumentFragment CreateControlDocumentFragment(IContainer container, IControl control) {
			control.Id = Guid.NewGuid().ToString().Replace("-", "");
            container.ApplyToScriptManager(this);
            return new ControlDocumentFragment(GetAllRequiredIncludes().ToArray(), ConfigObject, control.GetType().FullName, control.Html, control.ConfigObject);
        }
开发者ID:fiinix00,项目名称:Saltarelle,代码行数:5,代码来源:DefaultScriptManagerService.cs


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