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


C# Modifier类代码示例

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


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


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