コード例 #1
0
ファイル: Form1.cs プロジェクト: Giok15/Ultimate-Seat-Finder
        private void locomotiefToevoegen()
        {
            try
            {
                string naam = textboxCabineNaam.Text;
                bool   passagier;
                if (radioPassagierJa.Checked)
                {
                    passagier = true;
                }
                else
                {
                    passagier = false;
                }
                Image foto = pictureAddCabine.Image;

                Locomotief cabine = new Locomotief(naam, passagier, foto);
                cabine.CabineToevoegen();
                fillCombos();
                MessageBox.Show("Cabine is toegevoegd");
            }
            catch (Exception c)
            {
                MessageBox.Show("U bent iets vergeten!");
                Error.ErrorWegschrijven(c.ToString());
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: Giok15/Ultimate-Seat-Finder
        private void fillCombos()
        {
            List <Locomotief> list1 = Locomotief.LocomotiefOphalen();

            foreach (Locomotief loco in list1)
            {
                cmbCabine.Items.Add(loco);
            }

            List <Coupe> list = Coupe.CoupeOphalen();

            foreach (Coupe coupe in list)
            {
                cmbCoupe.Items.Add(coupe);
            }
        }
コード例 #3
0
        public SimuleerSchermcs(List <Coupe> listCoupe, Locomotief loco)
        {
            InitializeComponent();

            // Create a material theme manager and add the form to manage (this)
            MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance;

            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;

            // Configure color schema
            materialSkinManager.ColorScheme = new ColorScheme(
                Primary.Yellow700, Primary.Blue800,
                Primary.Yellow600, Accent.Blue400,
                TextShade.BLACK
                );

            coupeList  = listCoupe;
            locomotief = loco;

            xPositieLabels = 12;
            yPositieLabels = 107;

            xPositieNumeric = 115;
            yPositieNumeric = 107;

            xPositieButton = 12;
            yPositieButton = yPositieLabels;

            controlCounter = 1;

            ControlsAanmaken();

            button = new MaterialRaisedButton
            {
                Location = new Point(xPositieButton, yPositieButton),
                Text     = ("Simuleer")
            };

            button.Click += new EventHandler(button_Click);
            this.Controls.Add(button);
        }
コード例 #4
0
        //static string ConnectionString = @"Server=mssql.fhict.local;Database=dbi392341;User Id = dbi392341; Password=Proftaak123;";

        public Trein(List <Coupe> coupes, Locomotief locomotief)
        {
            this.locomotief = locomotief;
            this.coupes     = coupes;
        }
コード例 #5
0
ファイル: Form1.cs プロジェクト: Giok15/Ultimate-Seat-Finder
        private void cmbCabine_SelectedIndexChanged(object sender, EventArgs e)
        {
            Locomotief loco = (Locomotief)cmbCabine.SelectedItem;

            pictureCabine.Image = loco.Image;
        }