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


C# TextManager类代码示例

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


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

示例1: GetFor

        public override ISwitchConditionEvaluator GetFor(string spelling, PatternDialect dialect, TextManager manager)
        {
            Match m;
            if ((m = matcher.Match(spelling)).Success)
            {
                var ops = new List<ArithmeticCondition.Operation>();
                foreach (Match op in operation.Matches(m.Groups["Ops"].Value))
                {
                    ops.Add(new ArithmeticCondition.Operation
                    {
                       Number = double.Parse(op.Groups["Number"].Value, dialect.Parser.PatternCulture),
                       Operator = Arithmetic.GetArithmeticOperator(op.Groups["Op"].Value)
                    });
                }

                return new ArithmeticCondition
                {
                    Operations = ops,
                    CompareOperator = Arithmetic.GetCompareOperator(m.Groups["Op"].Value),
                    TargetValue = int.Parse(m.Groups["TargetValue"].Value)
                };
            }

            return null;
        }
开发者ID:paulsuart,项目名称:rebelcmsxu5,代码行数:25,代码来源:ArithmeticCondition.cs

示例2: Parse

        /// <summary>
        /// Parses the specified pattern returned by the reader and localizes error messages with the text manager specified
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <param name="textManager">The text manager.</param>
        /// <returns></returns>
        public override Expression Parse(TextReader reader, TextManager textManager)
        {
            try
            {
                _reader = reader.ReadToEnd();

                _pos = -1;

                MoveNext();

                var expr = ParseExpression();
                if (_current != Eof)
                {
                    UnexpectedToken("Expression", "" + _current);
                }

                expr.Accept(_trimmer);

                return expr;
            }
            catch (InnerParserException template)
            {
                throw new SyntaxErrorException(template.Message, template.Construct, template.Pos);
            }
        }
开发者ID:nikolajw,项目名称:localizationnet,代码行数:31,代码来源:DefaultExpressionParser.cs

示例3: Parse

        public override Expression Parse(System.IO.TextReader reader, TextManager manager)
        {
            var expr = new Expression();
            expr.Parts.Add(new Text { Spelling = reader.ReadToEnd() });

            return expr;
        }
开发者ID:Joebeazelman,项目名称:rebelcmsxu5,代码行数:7,代码来源:TextParser.cs

示例4: Start

 // Use this for initialization
 void Start()
 {
     rb2d = gameObject.GetComponent<Rigidbody2D> ();
     animator = gameObject.GetComponent<Animator> ();
     movement = getDefaultMovement ();
     dragon = GameObject.FindGameObjectWithTag ("Dragon").GetComponent<Dragon> ();
     textManager = GameObject.FindGameObjectWithTag ("TextManager").GetComponent<TextManager> ();
 }
开发者ID:zillix,项目名称:LD33,代码行数:9,代码来源:Player.cs

示例5: GetFor

 public IValueFormatter GetFor(string formatExpression, PatternDialect dialect, TextManager manager)
 {
     if (!string.IsNullOrEmpty(formatExpression))
     {
         return new StringFormatFormatter(formatExpression);
     }
     return null;
 }
开发者ID:Joebeazelman,项目名称:rebelcmsxu5,代码行数:8,代码来源:StringFormatFormatter.cs

示例6: GetFor

        public IValueFormatter GetFor(string formatExpression, PatternDialect dialect, TextManager manager)
        {
            if (!string.IsNullOrEmpty(formatExpression) && formatExpression.Equals("roman", StringComparison.InvariantCulture))
            {
                return new RomanNumberFormatter();
            }

            return null;
        }
开发者ID:paulsuart,项目名称:rebelcmsxu5,代码行数:9,代码来源:RomanToNumberConvertor.cs

示例7: GetEvaluator

        public override PatternEvaluator GetEvaluator(string pattern, TextManager manager)
        {
            lock (_parseLock)
            {
                var expr = Parser.Parse(pattern, manager);

                return new PatternEvaluator(expr);
            }
        }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:9,代码来源:TextDialect.cs

示例8: GetFor

        public override ISwitchConditionEvaluator GetFor(string spelling, PatternDialect dialect, TextManager manager)
        {
            if (string.IsNullOrEmpty(spelling) || spelling.Equals("true", StringComparison.InvariantCultureIgnoreCase))
            {
                return new TakeAllCondition();
            }

            return null;
        }
开发者ID:nikolajw,项目名称:localizationnet,代码行数:9,代码来源:TakeAllCondition.cs

示例9: GetSwitchConditionEvaluator

 public virtual ISwitchConditionEvaluator GetSwitchConditionEvaluator(Expression expr, TextManager manager)
 {
     ISwitchConditionEvaluator sc = null;
     if (!SwitchConditionEvaluators.Any(x => (sc = x.GetFor(expr, this, manager)) != null))
     {
         throw new LocalizedKeyNotFoundException("Exceptions.SwitchConditionNotFound", "No switch condition evaluator found for {0}", new { Spec = expr });                
     }
     return sc;
 }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:9,代码来源:PatternDialect.cs

示例10: Start

    // Use this for initialization
    void Start()
    {
        networkManager = gameObject.GetComponent<NetworkManager>();
        collisionManager = gameObject.GetComponent<CollisionManager>();
        textManager = gameObject.GetComponent<TextManager>();
        notificationManager = gameObject.GetComponent<NotificationManager>();

        panelManager = GameObject.Find("Panel");
        scaleChilds(panelManager);
    }
开发者ID:Hargalaten,项目名称:meGAMEss,代码行数:11,代码来源:Manager.cs

示例11: GetValueFormatter

        public virtual IValueFormatter GetValueFormatter(string spelling, TextManager manager)
        {
            IValueFormatter formatter = null;
            if (!ValueFormatters.Any(x => (formatter = x.GetFor(spelling, this, manager)) != null))
            {
                throw new LocalizedKeyNotFoundException("Exceptions.ValueFormatterNotFound", "No parameter evaluator found for {0}", new { Text = spelling});                
            }

            return formatter;
        }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:10,代码来源:PatternDialect.cs

示例12: GetParameterEvaluator

        public virtual IParameterEvaluator GetParameterEvaluator(ParameterSpec spec, TextManager manager)
        {
            IParameterEvaluator evaluator = null;
            if (!ParameterEvaluators.Any(x => (evaluator = x.GetFor(spec, this, manager)) != null))
            {
                throw new LocalizedKeyNotFoundException("Exceptions.ParameterEvaluatorNotFound", "No parameter evaluator found for {0}", new { Text = spec });
            }

            return evaluator;
        }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:10,代码来源:PatternDialect.cs

示例13: GetFor

        public IParameterEvaluator GetFor(ParameterSpec spec, PatternDialect dialect, TextManager manager)
        {
            var parts = spec.ParameterName.Split('.');
            if (parts.Length > 1)
            {
                return new ReflectionParameterEvaluator(parts[0], parts.Skip(1).ToArray());
            }

            return null;
        }
开发者ID:paulsuart,项目名称:rebelcmsxu5,代码行数:10,代码来源:ReflectionParameterEvaluator.cs

示例14: GetFor

        public IValueFormatter GetFor(string formatExpression, PatternDialect dialect, TextManager manager)
        {
            StringCaseTransformationType type;
            if (!string.IsNullOrEmpty(formatExpression) 
                && _transformationTypes.TryGetValue(formatExpression.ToLowerInvariant(), out type))
            {
                return new StringCaseFormatter { TransformationType = type };
            }

            return null;
        }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:11,代码来源:StringCaseFormatter.cs

示例15: Start

	void Start()
    {
        root = GameObject.Find("UI Root");
        ps = transform.GetComponent<PanelSwitch>();
        tm = transform.GetComponent<TextManager>();
        im = transform.GetComponent<ImageManager>();
        playerdata = new UserData();
        for(int i = 0; i < 7; i++)
        {
            girl[i] = new GirlData(i);
        }
    }
开发者ID:lshy1993,项目名称:LianaiYuTuili,代码行数:12,代码来源:GameManager.cs


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