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


C# Target类代码示例

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


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

示例1: attr

        /// <summary>Assigns all needed attributes to the tag</summary>
        /// <returns>This instance downcasted to base class</returns>
        public virtual IndexedTag attr(
            Shape? shape = null,
            Length[] coords = null,
            string href = null,
            NoHref? nohref = null,
            Target target = null,
            string alt = null,
            string id = null,
            string @class = null,
            string style = null,
            string title = null,
            LangCode lang = null,
            string xmllang = null,
            Dir? dir = null,
            string onclick = null,
            string ondblclick = null,
            string onmousedown = null,
            string onmouseup = null,
            string onmouseover = null,
            string onmousemove = null,
            string onmouseout = null,
            string onkeypress = null,
            string onkeydown = null,
            string onkeyup = null,
            char? accesskey = null,
            int? tabindex = null,
            string onfocus = null,
            string onblur = null
        )
        {
            Shape = shape;
            Coords = coords;
            Href = href;
            NoHref = nohref;
            Target = target;
            Alt = alt;
            Id = id;
            Class = @class;
            Style = style;
            Title = title;
            Lang = lang;
            XmlLang = xmllang;
            Dir = dir;
            OnClick = onclick;
            OnDblClick = ondblclick;
            OnMouseDown = onmousedown;
            OnMouseUp = onmouseup;
            OnMouseOver = onmouseover;
            OnMouseMove = onmousemove;
            OnMouseOut = onmouseout;
            OnKeyPress = onkeypress;
            OnKeyDown = onkeydown;
            OnKeyUp = onkeyup;
            AccessKey = accesskey;
            TabIndex = tabindex;
            OnFocus = onfocus;
            OnBlur = onblur;

            return this;
        }
开发者ID:bzure,项目名称:BSA.Net,代码行数:62,代码来源:TagArea.cs

示例2: GetShowReference

        /// <summary>
        /// 获取显示确认对话框的客户端脚本
        /// </summary>
        /// <param name="message">对话框消息</param>
        /// <param name="title">对话框标题</param>
        /// <param name="icon">对话框图标</param>
        /// <param name="okScriptstring">点击确定按钮执行的客户端脚本</param>
        /// <param name="cancelScript">点击取消按钮执行的客户端脚本</param>
        /// <param name="target">弹出对话框的目标页面</param>
        /// <returns>客户端脚本</returns>
        public static string GetShowReference(string message, string title, MessageBoxIcon icon, string okScriptstring, string cancelScript, Target target)
        {
            //string msgBoxScript = "var msgBox=Ext.MessageBox;";
            //msgBoxScript += "if(parent!=window){msgBox=parent.window.Ext.MessageBox;}";
            if (String.IsNullOrEmpty(title))
            {
                title = "X.util.confirmTitle";
            }
            else
            {
                title = JsHelper.GetJsString(title.Replace("\r\n", "\n").Replace("\n", "<br/>"));
            }
            message = message.Replace("\r\n", "\n").Replace("\n", "<br/>");

            JsObjectBuilder ob = new JsObjectBuilder();
            ob.AddProperty("title", title, true);
            ob.AddProperty("msg", JsHelper.GetJsStringWithScriptTag(message), true);
            ob.AddProperty("buttons", "Ext.MessageBox.OKCANCEL", true);
            ob.AddProperty("icon", String.Format("{0}", MessageBoxIconHelper.GetName(icon)), true);
            ob.AddProperty("fn", String.Format("function(btn){{if(btn=='cancel'){{{0}}}else{{{1}}}}}", cancelScript, okScriptstring), true);

            string targetName = "window";
            if (target != Target.Self)
            {
                targetName = TargetHelper.GetScriptName(target);
            }
            return String.Format("{0}.Ext.MessageBox.show({1});", targetName, ob.ToString());
        }
开发者ID:jinwmmail,项目名称:RDFNew,代码行数:38,代码来源:Confirm.cs

示例3: BufferingTargetWrapper

 /// <summary>
 /// Initializes a new instance of the <see cref="BufferingTargetWrapper" /> class.
 /// </summary>
 /// <param name="wrappedTarget">The wrapped target.</param>
 /// <param name="bufferSize">Size of the buffer.</param>
 /// <param name="flushTimeout">The flush timeout.</param>
 public BufferingTargetWrapper(Target wrappedTarget, int bufferSize, int flushTimeout)
 {
     this.WrappedTarget = wrappedTarget;
     this.BufferSize = bufferSize;
     this.FlushTimeout = flushTimeout;
     this.SlidingTimeout = true;
 }
开发者ID:shadowca,项目名称:NLog,代码行数:13,代码来源:BufferingTargetWrapper.cs

示例4: OnHit

    private void OnHit(HitEffectList effects, Target target, Collider other)
    {
        if (this.isDead) return;

        if (other != null)
            Debug.Log(this.name +  " was hit by collider on " + other.name);

        foreach (HitEffect effect in effects)
        {
            if (effect.name == "Damage")
            {
                this.life -= (int)effect.value;
            }
        }

        if (this.life <= 0)
        {
            this.isDead = true;
            Instantiate
            (
                this.explosion.gameObject,
                this.transform.position,
                this.transform.rotation
            );

            this.gameObject.SetActive(false);
        }
    }
开发者ID:imclab,项目名称:Unity-csharp-shmup-template,代码行数:28,代码来源:DemoEnemy.cs

示例5: BufferingTargetWrapper

 /// <summary>
 ///     Initializes a new instance of the <see cref="BufferingTargetWrapper" /> class.
 /// </summary>
 /// <param name="wrappedTarget">The wrapped target.</param>
 /// <param name="bufferSize">Size of the buffer.</param>
 /// <param name="flushTimeout">The flush timeout.</param>
 public BufferingTargetWrapper(Target wrappedTarget, int bufferSize, int flushTimeout)
 {
     WrappedTarget = wrappedTarget;
     BufferSize = bufferSize;
     FlushTimeout = flushTimeout;
     SlidingTimeout = true;
 }
开发者ID:modulexcite,项目名称:SQLoogle,代码行数:13,代码来源:BufferingTargetWrapper.cs

示例6: PlayerValid

 protected bool PlayerValid(Player localPlayer, Player enemy, Target target)
 {
     if (enemy == null)
         return false;
     if (enemy.Address == localPlayer.Address)
         return false;
     if (enemy.Index == localPlayer.Index)
         return false;
     if (!enemy.IsValid())
         return false;
     if (target == Target.Allies && enemy.InTeam != localPlayer.InTeam)
         return false;
     if (target == Target.Enemies && enemy.InTeam == localPlayer.InTeam)
         return false;
     //if (!Geometry.PointSeesPoint(localPlayer.Vector2, enemy.Vector2, Player.FOV_DEGREE, localPlayer.Yaw))
     //    return false;
     //if (!enemy.IsVisible())
     //    return false;
     CSGOImplementation csgo = (CSGOImplementation)Program.GameImplementation;
     //if (!csgo.CurrentMap.IsVisible(localPlayer.Vector3 + Vector3.UnitZ * (enemy.Skeleton.Head.Z - enemy.Skeleton.LeftFoot.Z), enemy.Skeleton.Head))
     //    return false;
     //if(!enemy.IsSpotted)
     //    return false;
     return true;
 }
开发者ID:nkarpey,项目名称:Zat-s-External-CSGO-Multihack,代码行数:25,代码来源:AimMethodImplementation.cs

示例7: GetNextTargetPluralExpression

        public string GetNextTargetPluralExpression(Target target)
        {
            var text = string.Empty;
            switch (target)
            {
                case Target.MeasureGroups:
                    text = "measures";
                    break;
                case Target.Dimensions:
                    text = "hierarchies";
                    break;
                case Target.Hierarchies:
                    text = "levels";
                    break;
                case Target.Levels:
                    text = "properties";
                    break;
                case Target.Tables:
                    text = "columns";
                    break;
                default:
                    break;
            }

            return text;
        }
开发者ID:Waltervondehans,项目名称:NBi,代码行数:26,代码来源:DescriptionStructureHelper.cs

示例8: JoinVoiceMessage

        public JoinVoiceMessage(Target target)
        {
            if (target == null)
                throw new ArgumentNullException ("target");

            Target = target;
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:7,代码来源:JoinVoiceMessage.cs

示例9: SetNLogTarget

 public static void SetNLogTarget(Target target, LogLevel minLevel = null)
 {
     if (target != null)
     {
         SimpleConfigurator.ConfigureForTargetLogging(target, minLevel ?? LogLevel.Info);
     }
 }
开发者ID:svn2github,项目名称:ecm7migrator,代码行数:7,代码来源:MigratorLogManager.cs

示例10: TestCompletionCore

		private static void TestCompletionCore( bool expectedIsCompletedSynchronously, Action<AsyncResult> test, Action<AsyncResult> assertion )
		{
			using ( var waitHandle = new ManualResetEventSlim() )
			{
				object owner = new object();
				var target =
					new Target(
						owner,
						null,
						null
					);
				using ( var task =
					Task.Factory.StartNew( () =>
						{
							test( target );
						}
					) )
				{
					target.WaitForCompletion();
					Assert.That( target.IsCompleted, Is.True );
					Assert.That( target.IsFinished, Is.False );
					Assert.That( ( target as IAsyncResult ).CompletedSynchronously, Is.EqualTo( expectedIsCompletedSynchronously ) );

					// NOTE: Invocation of AsyncCallback is derived class responsibility.

					if ( assertion != null )
					{
						assertion( target );
					}

					task.Wait( 10 );
				}
			}
		}
开发者ID:Indifer,项目名称:Test,代码行数:34,代码来源:AsyncResultTest.cs

示例11: OnUnitDestroyedHandler

    protected override void OnUnitDestroyedHandler(Target obj)
    {
        PlayerHealth.Instance.RemoveOneHealth();
        (SoldierGeneral as PlayerGeneral).ResurrectPlayer();

        base.OnUnitDestroyedHandler(obj);
    }
开发者ID:darkcheg,项目名称:RikiTest,代码行数:7,代码来源:PlayerSoldier.cs

示例12: OnHit

    protected void OnHit(EventInfoList infoList, Target target)
    {
        if (this.isDead) return;
				
        foreach (EventInfo info in infoList)
        {
            switch (info.name)
            {
				case "Damage":
                	this.life -= (int)info.value;
					break;
            }
        }

        if (this.life <= 0)
        {
            this.isDead = true;
            Instantiate
            (
                this.explosion.gameObject,
                this.transform.position,
                this.transform.rotation
            );

            this.gameObject.SetActive(false);
        }
    }
开发者ID:Niklas83,项目名称:UnityGame1,代码行数:27,代码来源:DemoEnemy.cs

示例13: ManualMapGeneralTest

        public void ManualMapGeneralTest()
        {
            ManualMap<Source, Target> map = ManualMap<Source, Target>.New
                .AddMap(a => a.Source1, b => b.Target1)
                .AddMap(a => a.Source2, b => b.Target2)
                .AddMap(a => a.Source3, b => b.Target3)
                .AddMap(a => a.Source4, b => b.Target4)
                .AddMap(a => a.Source5, b => b.Target5);

            Guid guid = Guid.NewGuid();

            Source source = new Source(1, "as", null, guid, 2);

            Target target = new Target();
            Assert.That(target.Target1, Is.EqualTo(default(int)));
            Assert.That(target.Target2, Is.EqualTo(default(string)));
            Assert.That(target.Target3, Is.EqualTo(default(object)));
            Assert.That(target.Target4, Is.EqualTo(default(Guid)));
            Assert.That(target.Target5, Is.EqualTo(default(int)));

            target = source.Map(map);
            Assert.That(target.Target1, Is.EqualTo(source.Source1));
            Assert.That(target.Target2, Is.EqualTo(source.Source2));
            Assert.That(target.Target3, Is.EqualTo(source.Source3));
            Assert.That(target.Target4, Is.EqualTo(source.Source4));
            Assert.That(target.Target5, Is.EqualTo(source.Source5));
        }
开发者ID:dun3,项目名称:dun3,代码行数:27,代码来源:ManualMapTest.cs

示例14: use_is_empty

        public void use_is_empty()
        {
            var doc1 = Target.Random(false);
            var doc2 = Target.Random(true);
            var doc3 = Target.Random(false);
            var doc4 = Target.Random(true);

            var empties = new Target[] {doc1, doc3}.OrderBy(x => x.Id).Select(x => x.Id).ToArray();

            using (var session = theStore.OpenSession())
            {
                session.Store(doc1, doc2, doc3, doc4);
                session.SaveChanges();
            }

            using (var query = theStore.QuerySession())
            {
                query.Query<Target>().Where(x => x.Children.IsEmpty())
                    .OrderBy(x => x.Id).Select(x => x.Id)
                    .ToList()
                    .ShouldHaveTheSameElementsAs(empties);


            }
        }
开发者ID:JasperFx,项目名称:marten,代码行数:25,代码来源:query_with_is_empty.cs

示例15: SetUp

        public static void SetUp(TestContext context)
        {
            _unitOfWork = new UnitOfWork();
            _memberFactory = new MemberFactory();
            _gomeeFactory = new GomeeFactory();
            _targetFactory = new TargetFactory();
            _targetDecorator = new TargetDecorator(_targetFactory, _unitOfWork.TargetRepository);

            _member = _memberFactory.CreateMember(Guid.NewGuid().ToString());
            _gomee = _gomeeFactory.CreateGomee(_member);
            _target = _targetFactory.CreateGomeeTarget(_member, _gomee);

            using (var uow = new UnitOfWork())
            {
                uow.MemberRepository.Add(_member);
                uow.GomeeRepository.Add(_gomee);
                uow.TargetRepository.Add(_target);
                uow.PersistAll();
                _oldCount = uow.TargetRepository.Count();
            }

            _targetDecorator.Remove(_unitOfWork.TargetRepository.Get(_target.Id));
            _unitOfWork.PersistAll();

            _newCount = _unitOfWork.TargetRepository.Count();

            try
            {
                _loadedTarget = _unitOfWork.TargetRepository.Get(_target.Id);
            }
            catch (ArgumentException)
            {
                _loadedTarget = null;
            }
        }
开发者ID:AnthonyNystrom,项目名称:YoGoMee,代码行数:35,代码来源:When_remove_target.cs


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