public Destructor(string className, Modifier m, IRegion region, IRegion bodyRegion) { FullyQualifiedName = "~" + className; this.region = region; this.bodyRegion = bodyRegion; modifiers = (ModifierEnum)m; }
/// <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; }
public void Check(Modifier allowed) { Modifier wrong = cur & (allowed ^ Modifier.All); if (wrong != Modifier.None) { parser.Error("modifier(s) " + wrong + " not allowed here"); } }
public virtual void Initialize(Modifier modifier, Engine game) { Game = game; Modifier = modifier; Initialize(); }
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; }
/// <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; }
public void AddModifierObstacle(Modifier modifier, Unit unit) { if (Obstacle != null) { End(); } }
public Constructor(Modifier m, IRegion region, IRegion bodyRegion) { FullyQualifiedName = "ctor"; this.region = region; this.bodyRegion = bodyRegion; modifiers = (ModifierEnum)m; }
public Class(CompilationUnit cu, ClassType t, Modifier m, IRegion region) { this.cu = cu; classType = t; this.region = region; modifiers = (ModifierEnum)m; }
public IndexerDeclaration(TypeReference typeReference, ArrayList parameters, Modifier modifier, ArrayList attributes) { this.type = typeReference; this.modifier = modifier; this.parameters = parameters; this.attributes = attributes; }
/// <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; }
public PropertyDeclaration(string name, TypeReference typeReference, Modifier modifier, ArrayList attributes) { this.name = name; this.typeReference = typeReference; this.modifier = modifier; this.attributes = attributes; }
public Field(ReturnType type, string fullyQualifiedName, Modifier m, IRegion region) { this.returnType = type; this.FullyQualifiedName = fullyQualifiedName; this.region = region; modifiers = (ModifierEnum)m; }
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; }
/// <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); }
// 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>(); }
public Field(ReturnType type, string fullyQualifiedName, Modifier m, IRegion region) { this.returnType = type; this.FullyQualifiedName = fullyQualifiedName; this.region = region; modifiers = (ModifierEnum)m; // Console.WriteLine("modifiers for field {0} are {1} were {2}", fullyQualifiedName, modifiers, m); }
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; }
private void AddScatterModifier(Modifier modifier) { ModifierEnumifier.WriteNewModifier(modifier, replacementIndex, 2); //2 should be the index for default modifiers ModifierEnumifier.GenerateFile(); Close(); }
private void AddBeamModifier(Modifier modifier) { ModifierEnumifier.WriteNewModifier(modifier, replacementIndex, 4); //4 should be the index for beam modifiers ModifierEnumifier.GenerateFile(); Close(); }
public void Add(Modifier m) { if (!this.HasModifier(m)) { this.items[this.count] = m; this.count++; } }
public Indexer(ReturnType type, ParameterCollection parameters, Modifier m, IRegion region, IRegion bodyRegion) { returnType = type; this.parameters = parameters; this.region = region; this.bodyRegion = bodyRegion; modifiers = (ModifierEnum)m; }
public void Add(Modifier m) { if ((cur & m) == 0) { cur |= m; } else { parser.Error("modifier " + m + " already defined"); } }
protected FieldDef(Namespace ns, string name, Modifier modifiers) : base( null, (ns is GlobalRootNamespace ? new MemberName(name) : new MemberName(ns.MemberName, Separators.DoubleColon, name)), modifiers) { }
public ClassName(Type ty) : this(ty.Namespace, Modifier.Public, ty.Name) { if (ty.IsPublic) this.modifier = Modifier.Public; else this.modifier = Modifier.Internal; }
private void AddProjectileModifier(Modifier modifier) { ModifierEnumifier.WriteNewModifier(modifier, replacementIndex, 1); //1 should be the index for Projectile modifiers ModifierEnumifier.GenerateFile(); Close(); }
public MethodDeclaration(string name, Modifier modifier, TypeReference typeReference, ArrayList parameters, ArrayList attributes) { this.name = name; this.modifier = modifier; this.typeReference = typeReference; this.parameters = parameters; this.attributes = attributes; }
public EventDeclaration(TypeReference typeReference, string name, Modifier modifier, ArrayList attributes) { this.typeReference = typeReference; this.name = name; this.variableDeclarators = null; this.modifier = modifier; this.attributes = attributes; }
public Method(string name, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion) { FullyQualifiedName = name; returnType = type; this.region = region; this.bodyRegion = bodyRegion; modifiers = (ModifierEnum)m; }
private void AddMineModifier(Modifier modifier) { ModifierEnumifier.WriteNewModifier(modifier, replacementIndex, 3); //0 should be the index for mine modifiers ModifierEnumifier.GenerateFile(); Close(); }