本文整理汇总了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;
}
示例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;
}
示例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");
}
}
示例4: Initialize
public virtual void Initialize(Modifier modifier, Engine game)
{
Game = game;
Modifier = modifier;
Initialize();
}
示例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;
}
示例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;
}
示例7: AddModifierObstacle
public void AddModifierObstacle(Modifier modifier, Unit unit)
{
if (Obstacle != null)
{
End();
}
}
示例8: Constructor
public Constructor(Modifier m, IRegion region, IRegion bodyRegion)
{
FullyQualifiedName = "ctor";
this.region = region;
this.bodyRegion = bodyRegion;
modifiers = (ModifierEnum)m;
}
示例9: Class
public Class(CompilationUnit cu, ClassType t, Modifier m, IRegion region)
{
this.cu = cu;
classType = t;
this.region = region;
modifiers = (ModifierEnum)m;
}
示例10: IndexerDeclaration
public IndexerDeclaration(TypeReference typeReference, ArrayList parameters, Modifier modifier, ArrayList attributes)
{
this.type = typeReference;
this.modifier = modifier;
this.parameters = parameters;
this.attributes = attributes;
}
示例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;
}
示例12: PropertyDeclaration
public PropertyDeclaration(string name, TypeReference typeReference, Modifier modifier, ArrayList attributes)
{
this.name = name;
this.typeReference = typeReference;
this.modifier = modifier;
this.attributes = attributes;
}
示例13: Field
public Field(ReturnType type, string fullyQualifiedName, Modifier m, IRegion region)
{
this.returnType = type;
this.FullyQualifiedName = fullyQualifiedName;
this.region = region;
modifiers = (ModifierEnum)m;
}
示例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;
}
示例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);
}