public GH_CanvasForm(bool extraForm = false) { InitializeComponent(); if (!extraForm) { thisForm = this; spacerSize = pnScale.Location.X; tileSize = pnScale.Size.Width; } }
public static void loadTileFormExtra(CanvasGrid canvasGrid) { GH_CanvasForm extraForm = new GH_CanvasForm(true); extraForm.Controls.Clear(); extraForms.Add(extraForm); extraForm.FormBorderStyle = FormBorderStyle.FixedSingle; extraForm.MaximizeBox = false; extraForm.Text = "RTC Extra Form"; loadTileForm(extraForm, canvasGrid); extraForm.Show(); }
public GH_ShadowPanel(GH_CanvasForm _parentForm, string _type) { InitializeComponent(); parentForm = _parentForm; UpdateBackground(); if (_type != null) { var subFormType = Type.GetType("RTCV.GlitchHarvester.SubForms." + _type); subForm = (Form)Activator.CreateInstance(subFormType); } UpdateSubForm(); }
public void Load() { //Deploys and loads all the grids in the multigrid object for (int i = 0; i < grids.Count(); i++) { if (i == 0) { GH_CanvasForm.loadTileFormMain(grids[i]); } else { GH_CanvasForm.loadTileFormExtra(grids[i]); } } }
public GH_CoreForm() { InitializeComponent(); thisForm = this; cfForm = new GH_CanvasForm(); cfForm.TopLevel = false; cfForm.Dock = DockStyle.Fill; this.Controls.Add(cfForm); cfForm.Location = new Point(0, pnTopBar.Size.Height); cfForm.Show(); cfForm.BringToFront(); xPadding = (Width - cfForm.Width); coreYPadding = pnTopBar.Height; yPadding = (Height - cfForm.Height) - coreYPadding; }
public static void loadTileForm(GH_CanvasForm targetForm, CanvasGrid canvasGrid) { targetForm.ResizeCanvas(targetForm, canvasGrid); for (int x = 0; x < canvasGrid.x; x++) { for (int y = 0; y < canvasGrid.y; y++) { if (canvasGrid.grid[x, y] != null) { Form tileForm = getTileForm(canvasGrid.grid[x, y]); tileForm.TopLevel = false; targetForm.Controls.Add(tileForm); tileForm.Location = getTileLocation(x, y); tileForm.Show(); } } } }
public void ResizeCanvas(GH_CanvasForm targetForm, CanvasGrid canvasGrid) { this.SetSize(getTilePos(canvasGrid.x), getTilePos(canvasGrid.y)); }