コード例 #1
0
        public StartControl(Size size, SimWindow sim)
        {
            InterfaceStart StartScherm = new InterfaceStart(this); 
            this.Size = size;
            simwindow = sim;

            StartHost = new ElementHost()
            {
                Location = new Point(((size.Width-300)/2), ((size.Height -300)/2)),
                Height = 300,
                Width = 300,
                BackColor = Color.Green,
                Child = StartScherm
            };
            this.Controls.Add(StartHost);

        }
コード例 #2
0
        public StartWindow(Size size, WindowSelect sim)
        {
            this.Size = size;
            widthStartScreen = size.Width;
            heightStartScreen = size.Height;
            windowselect = sim;

            interfaceStart = new InterfaceStart(this, widthStartScreen, heightStartScreen);

            StartHost = new ElementHost()
            {
                Height = size.Height,
                Width = size.Width,
                Location = new Point(0,0),
                Child = interfaceStart,
            };

            /// Add startbuttons
            this.Controls.Add(StartHost);
            StartHost.Left = (this.Size.Width - StartHost.Size.Width) / 2;

        }