• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Modifier类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Destructor

 public Destructor(string className, Modifier m, IRegion region, IRegion bodyRegion)
 {
     FullyQualifiedName = "~" + className;
     this.region     = region;
     this.bodyRegion = bodyRegion;
     modifiers = (ModifierEnum)m;
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:7,代码来源:Destructor.cs


示例2: Column

 /// <summary>
 /// Initializes a new instance of the <see cref="Column"/> class.
 /// </summary>
 /// <param name="table">The parent table.</param>
 /// <param name="name">The column's name.</param>
 /// <param name="modifier">The modifier.</param>
 internal Column(Table table, string name, Modifier modifier)
 {
     Table = table;
     IsNullable = true;
     Name = name;
     Modifier = modifier;
 }
开发者ID:roufamatic,项目名称:NMigrations,代码行数:13,代码来源:Column.cs


示例3: Check

 public void Check(Modifier allowed)
 {
     Modifier wrong = cur & (allowed ^ Modifier.All);
     if (wrong != Modifier.None) {
         parser.Error("modifier(s) " + wrong + " not allowed here");
     }
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:7,代码来源:Modifiers.cs


示例4: Initialize

        public virtual void Initialize(Modifier modifier, Engine game)
        {
            Game = game;
            Modifier = modifier;

            Initialize();
        }
开发者ID:BlacksheepNZ,项目名称:BattleOn,代码行数:7,代码来源:DamagePrevention.cs


示例5: ApplyModifiers

 public bool ApplyModifiers(Stack stack, Modifier mod)
 {
     //This is used to perform the mathematical modifiers.
     int firstValue = stack.Pop();
     Program.form.listBox1.Items.Add("FirstValue is removed from stack.");
     int secondValue = stack.Pop();
     Program.form.listBox1.Items.Add("SecondValue is removed from stack.");
     if (mod == Modifier.Add){
         Push(firstValue+secondValue);
         Program.form.listBox1.Items.Add("Pushed " + (firstValue + secondValue) + " to stack.");
     }
     else if (mod == Modifier.Divide){
         if(secondValue == 0){
             Program.form.listBox1.Items.Add("Can't devide by zero.");
             return false;
         }
         Push(firstValue/secondValue);
         Program.form.listBox1.Items.Add("Pushed " + (firstValue / secondValue) + " to stack.");
     }
     else if (mod == Modifier.Multiply){
         Push(firstValue*secondValue);
         Program.form.listBox1.Items.Add("Pushed " + (firstValue * secondValue) + " to stack.");
     }
     else if (mod == Modifier.Subtract){
         Push(firstValue-secondValue);
         Program.form.listBox1.Items.Add("Pushed " + (firstValue - secondValue) + " to stack.");
     }
     else{
         Program.form.listBox1.Items.Add("Unknown modifier: " + mod); //Just to be sure.
         return false;
     }
     return true;
 }
开发者ID:hendrikwiersma,项目名称:HPCalc,代码行数:33,代码来源:Stack.cs


示例6: DoMouseMove

        /// <summary>
        /// MouseMove method for Guideline
        /// </summary>
        /// <param name="X">mouse X position</param>
        /// <param name="Y"> mouse Y position</param>
        /// <param name="keys"> mouse and keyboard modifiers</param>
        /// <param name="ps">the InteractivePlotSurface2D</param>
        public override bool DoMouseMove(int X, int Y, Modifier keys, InteractivePlotSurface2D ps)
        {
            Rectangle plotArea = ps.PlotAreaBoundingBoxCache;

            if (drawPending) {
                overRuns += 1;
                return false;
            }

            // note previous guideline ready to erase it
            Rectangle prevExtent = lineExtent;

            // Only display guideline when mouse is within the plotArea
            if (plotArea.Contains(X,Y)) {
                int h = 1;
                int w = plotArea.Right - plotArea.Left + 1;
                lineExtent = new Rectangle (plotArea.X, Y, w, h);
                drawPending = true;
            }
            else {
                lineExtent = Rectangle.Empty;
            }
            ps.QueueDraw (prevExtent);
            ps.QueueDraw (lineExtent);
            return false;
        }
开发者ID:hwthomas,项目名称:XwPlot,代码行数:33,代码来源:HorizontalGuideline.cs


示例7: AddModifierObstacle

 public void AddModifierObstacle(Modifier modifier, Unit unit)
 {
     if (Obstacle != null)
     {
         End();
     }
 }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:7,代码来源:Chakram.cs


示例8: Constructor

		public Constructor(Modifier m, IRegion region, IRegion bodyRegion)
		{
			FullyQualifiedName = "ctor";
			this.region     = region;
			this.bodyRegion = bodyRegion;
			modifiers = (ModifierEnum)m;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:Constructor.cs


示例9: Class

 public Class(CompilationUnit cu, ClassType t, Modifier m, IRegion region)
 {
     this.cu = cu;
     classType = t;
     this.region = region;
     modifiers = (ModifierEnum)m;
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:7,代码来源:Class.cs


示例10: IndexerDeclaration

 public IndexerDeclaration(TypeReference typeReference, ArrayList parameters, Modifier modifier, ArrayList attributes)
 {
     this.type = typeReference;
     this.modifier = modifier;
     this.parameters = parameters;
     this.attributes = attributes;
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:7,代码来源:IndexerDeclaration.cs


示例11: DoMouseDown

 /// <summary>
 /// MouseDown method for PlotDrag interaction
 /// </summary>
 /// <param name="X">mouse X position</param>
 /// <param name="Y"> mouse Y position</param>
 /// <param name="keys"> mouse and keyboard modifiers</param>
 /// <param name="ps">the InteractivePlotSurface2D</param>
 public override bool DoMouseDown(int X, int Y, Modifier keys, InteractivePlotSurface2D ps)
 {
     // Only start drag if mouse is inside plot area (excluding axes)
     Rectangle area = ps.PlotAreaBoundingBoxCache;
     if (area.Contains(X,Y)) {
         dragInitiated_ = true;
         lastPoint_ = new Point(X,Y);
         if (((keys & Modifier.Button1) != 0)) {		   // Drag
             if (horizontal_ || vertical_) {
                 ps.plotCursor = CursorType.Hand;
             }
             if (((keys & Modifier.Control) != 0)) {	   // Zoom
                 if (horizontal_)
                     ps.plotCursor = CursorType.LeftRight;
                 if (vertical_)
                     ps.plotCursor = CursorType.UpDown;
                 if (horizontal_ && vertical_)
                     ps.plotCursor = CursorType.Zoom;
             }
         }
         // evaluate focusPoint about which axis is expanded
         focusX = (double)(X - area.Left)/(double)area.Width;
         focusY = (double)(area.Bottom - Y)/(double)area.Height;
     }
     return false;
 }
开发者ID:parnham,项目名称:NPlot,代码行数:33,代码来源:PlotDrag.cs


示例12: PropertyDeclaration

 public PropertyDeclaration(string name, TypeReference typeReference, Modifier modifier, ArrayList attributes)
 {
     this.name = name;
     this.typeReference = typeReference;
     this.modifier = modifier;
     this.attributes = attributes;
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:7,代码来源:PropertyDeclaration.cs


示例13: Field

 public Field(ReturnType type, string fullyQualifiedName, Modifier m, IRegion region)
 {
     this.returnType = type;
     this.FullyQualifiedName = fullyQualifiedName;
     this.region = region;
     modifiers = (ModifierEnum)m;
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:7,代码来源:Field.cs


示例14: ArrayList

        ArrayList parameters = new ArrayList(); // [ParameterDeclarationExpression]

        #endregion Fields

        #region Constructors

        public ConstructorDeclaration(string name, Modifier modifier, ArrayList parameters, ArrayList attributes)
        {
            this.name     = name;
            this.modifier = modifier;
            this.parameters = parameters;
            this.attributes = attributes;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:13,代码来源:ConstructorDeclaration.cs


示例15: DoMouseScroll

        /// <summary>
        /// Mouse Scroll (wheel) method for AxisZoom interaction
        /// </summary>
        public override bool DoMouseScroll(int X, int Y, int direction, Modifier keys, InteractivePlotSurface2D ps)
        {
            double proportion = 0.1*sensitivity_;	// use initial zoom of 10%
            double focusX = 0.5, focusY = 0.5;		// default focus point

            // Zoom direction is +1 for Up/ZoomIn, or -1 for Down/ZoomOut
            proportion *= -direction;

            // delete previous focusPoint drawing - this is all a bit 'tentative'
            ps.QueueDraw (focusRect);

            Rectangle area = ps.PlotAreaBoundingBoxCache;
            if (area.Contains(X,Y)) {
                pF.X = X;
                pF.Y = Y;
                focusX = (double)(X - area.Left)/(double)area.Width;
                focusY = (double)(area.Bottom - Y)/(double)area.Height;
            }

            // Zoom in/out for all defined axes
            ps.CacheAxes();
            ps.ZoomXAxes (proportion,focusX);
            ps.ZoomYAxes (proportion,focusY);

            int x = pF.X-10;
            int y = pF.Y-10;

            focusRect = new Rectangle (x, y, 21, 21);
            // draw new focusRect
            ps.QueueDraw (focusRect);

            return (true);
        }
开发者ID:parnham,项目名称:NPlot,代码行数:36,代码来源:PlotZoom.cs


示例16: Start

	// Use this for initialization
	void Start () {
		gameControl = GameObject.Find("GameControl").GetComponent("GameControl") as GameControl;
		mod			= gameObject.GetComponent<Modifier>();
		boot_boom	= PlayerPrefs.GetInt("Boot_Boom");
		item_revive		= PlayerPrefs.GetInt("Revive");

		_fb = gameObject.GetComponent<GUIFB>();
	}
开发者ID:MizzKii,项目名称:PuruDash2D,代码行数:9,代码来源:GUIEnd.cs


示例17: Property

		public Property(string fullyQualifiedName, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion)
		{
			this.FullyQualifiedName = fullyQualifiedName;
			returnType = type;
			this.region = region;
			this.bodyRegion = bodyRegion;
			modifiers = (ModifierEnum)m;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:8,代码来源:Property.cs


示例18: AddScatterModifier

    private void AddScatterModifier(Modifier modifier)
    {
        ModifierEnumifier.WriteNewModifier(modifier, replacementIndex, 2); //2 should be the index for default modifiers

        ModifierEnumifier.GenerateFile();

        Close();
    }
开发者ID:Charnock,项目名称:Space,代码行数:8,代码来源:ScatterModifierForm.cs


示例19: AddBeamModifier

    private void AddBeamModifier(Modifier modifier)
    {
        ModifierEnumifier.WriteNewModifier(modifier, replacementIndex, 4); //4 should be the index for beam modifiers

        ModifierEnumifier.GenerateFile();

        Close();
    }
开发者ID:Charnock,项目名称:Space,代码行数:8,代码来源:BeamModifierForm.cs


示例20: Add

 public void Add(Modifier m)
 {
     if (!this.HasModifier(m))
     {
         this.items[this.count] = m;
         this.count++;
     }
 }
开发者ID:RainsSoft,项目名称:CSLiteScript,代码行数:8,代码来源:ModifierList.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ModifierData类代码示例发布时间:2022-05-24
下一篇:
C# ModificationCommandTreeGenerator类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap