コード例 #1
0
 public ExtraButtonsOS(WindowSelect ws, InfoBalk info)
 {
     windowselect = ws;
     Infobalk = info;
     InitializeComponent();
     mouseEntered = false;
 }
コード例 #2
0
 public BovenSchermRechts(WindowSelect ws, InfoBalk info, OnderScherm Onder, int bs, int bib, int hbb)
 {
     windowselect = ws;
     infoBalk = info;
     onderScherm = Onder;
     breedteScherm = bs;
     breedteInfoBalk = bib;
     hoogteBovenBalk = hbb;
     InitializeComponent();
 }
コード例 #3
0
 public OnderScherm(WindowSelect ws, InfoBalk info, ExtraButtonsOS extra, ElementHost extraHost, int bob, int ylob, int xlob, int hob)
 {
     windowselect = ws;
     extraButtonsHost = extraHost;
     infoBalk = info;
     extraButtonsOS = extra;
     breedteOnderBalk = bob;
     yLocatieOnderBalk = ylob;
     xLocatieOnderBalk = xlob;
     hoogteOnderBalk = hob;
     InitializeComponent();
 }
コード例 #4
0
        public BovenSchermLinks(WindowSelect ws, InfoBalk info, OnderScherm onder)
        {
            windowselect = ws;
            infobalk = info;
            onderscherm = onder;
            InitializeComponent();

            //At the beginning the simulation part is not used
            play.IsEnabled = false;
            slowDown.IsEnabled = false;
            speedUp.IsEnabled = false;
            stop.IsEnabled = false;
            pauze.IsEnabled = false;
        }
コード例 #5
0
        public SimWindow(Size size, WindowSelect windowselect)
        {
            this.Size = size;
            this.windowselect = windowselect;
            sim = new SimControl(this.ClientSize, this);
            this.BackColor = Color.Green;

            //Variable om de elementhosten afhankelijk te maken van het scherm en andere elementhosten
            breedteScherm = Screen.PrimaryScreen.Bounds.Width;
            hoogteScherm = Screen.PrimaryScreen.Bounds.Height;
            hoogteBovenBalk = 80;
            hoogteOnderBalk = 100;
            hoogteInfoBalk = (hoogteScherm - (hoogteBovenBalk + hoogteOnderBalk));
            yLocatieOnderBalk = (hoogteScherm - hoogteOnderBalk);
            xLocatieOnderBalk = (breedteScherm / 7) * 2;
            breedteInfoBalk = breedteScherm / 6;
            breedteOnderBalk = ((breedteScherm / 3));

            using (Graphics graphics = this.CreateGraphics())
            {
                breedteBovenSchermLinks = (260 * (int)graphics.DpiX) / 96;
                breedteBovenSchermRechts = ((55 * 4) * (int)graphics.DpiX) / 96;
                breedteInfoBalk = ((300) * (int)graphics.DpiX) / 96;
                xLocatieOnderBalk = (((breedteScherm / 8) * 2) * (int)graphics.DpiX) / 96;
            }

            InfoBalk = new InfoBalk(windowselect);
            ExtraButtonsOS = new ExtraButtonsOS(windowselect, InfoBalk);
            OnderScherm = new OnderScherm(windowselect, InfoBalk, ExtraButtonsOS, extraButtonsHost, breedteOnderBalk, yLocatieOnderBalk, xLocatieOnderBalk, hoogteOnderBalk);
            BovenSchermLinks = new BovenSchermLinks(windowselect, InfoBalk, OnderScherm);
            BovenSchermRechts = new BovenSchermRechts(windowselect, InfoBalk, OnderScherm, breedteScherm, breedteInfoBalk, hoogteBovenBalk);

            extraButtonsHost = new ElementHost()
            {
                Height = 200,
                Width = 100,
                Location = new Point(this.Size),
                Child = ExtraButtonsOS,
            };
            this.Controls.Add(extraButtonsHost);

            bovenHostLinks = new ElementHost()
            {
                BackColor = Color.Transparent,
                Height = hoogteBovenBalk,
                Width = breedteBovenSchermLinks,
                Location = new Point(10, 10),
                Child = BovenSchermLinks,
            };
            this.Controls.Add(bovenHostLinks);

            bovenHostRechts = new ElementHost()
            {
                BackColor = Color.Transparent,
                Height = hoogteBovenBalk,
                Width = breedteBovenSchermRechts,
                Location = new Point((breedteScherm - breedteBovenSchermRechts), 0),
                Child = BovenSchermRechts,
            };
            this.Controls.Add(bovenHostRechts);

            onderHost = new ElementHost()
            {
                BackColor = Color.Transparent,
                Location = new Point(xLocatieOnderBalk, yLocatieOnderBalk),
                Height = hoogteOnderBalk,
                Width = breedteOnderBalk,
                Child = OnderScherm,
            };
            this.Controls.Add(onderHost);

            infoHost = new ElementHost()
            {
                BackColor = Color.Transparent,
                Location = new Point(this.Size),
                Height = hoogteInfoBalk,
                Width = breedteInfoBalk,
                Child = InfoBalk,
            };
            this.Controls.Add(infoHost);

            this.Controls.Add(sim);

        }