Esempio n. 1
0
        public GH_CanvasForm(bool extraForm = false)
        {
            InitializeComponent();

            if (!extraForm)
            {
                thisForm   = this;
                spacerSize = pnScale.Location.X;
                tileSize   = pnScale.Size.Width;
            }
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        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]);
                }
            }
        }
Esempio n. 5
0
        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;
        }
Esempio n. 6
0
        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();
                    }
                }
            }
        }
Esempio n. 7
0
 public void ResizeCanvas(GH_CanvasForm targetForm, CanvasGrid canvasGrid)
 {
     this.SetSize(getTilePos(canvasGrid.x), getTilePos(canvasGrid.y));
 }