//=========================================================== /*----------------------------------------- * * Constructor * * an optional boolean bit will continue * from the last location * * -----------------------------------------*/ public GamePage(bool ResumeGame = false) { InitializeComponent(); gpvm = new GamePageViewModel(ResumeGame); BindingContext = gpvm; RedrawScreen = new RedrawHandler(OnRedraw); }
public CAxis(RedrawHandler redraw_handler) { this.pen = new System.Drawing.Pen(System.Drawing.Color.Black, 2); this.pen.CustomEndCap = new System.Drawing.Drawing2D.AdjustableArrowCap(6, 6, false); this.label = new CLabel(new CLabel.RedrawHandler(redraw_handler)); this.redraw_handler = redraw_handler; }
//get a new extinguisher object private void GetExtinguisher() { foreach (Tile t in lineOfSight) //up, down, left and right { if (sharedExtinguishers.Contains(t)) //if it is still in the shared extinguishers list (it has not been taken yet) { this.extinguisher = new Extinguisher(); this.sharedExtinguishers.Remove(t); //remove it from the shared list this.DIJKSTRA = new Dijkstra(currentLocation, grid); //create the dijsktra object this.NewExtinguisher(); //create a new extinguisher if (RedrawHandler != null) { RedrawHandler.Invoke(t); //Call the form's redraw method to redraw a wall } return; //spend one tick to get the extinguisher } } this.NewExtinguisher(); //set a new extinguisher RunForExtinguisher(); //avoid wasting time in one place when no extinguisher at the current place }
public CPlotInfoList(RedrawHandler redraw_handler) { this.redraw_handler = redraw_handler; this.graph_brush = new System.Drawing.SolidBrush(System.Drawing.Color.Blue); this.al_plot_info_list = new System.Collections.ArrayList(); }
public CPlotInfo(RedrawHandler redraw_handler, double plot_value, string plot_label) : base(redraw_handler) { this.label = plot_label; this.plot_value = plot_value; }
public CPlotInfo(RedrawHandler redraw_handler, double plot_value) : base(redraw_handler) { this.plot_value = plot_value; }
public CPlotInfo(RedrawHandler redraw_handler) : base(redraw_handler) { }
public CLabel(RedrawHandler redraw_handler) { this.redraw_handler = redraw_handler; this.brush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); this.font = new System.Drawing.Font("Arial", 10); }