private void _coffeeOption_Click(object sender, EventArgs e)
        {
            RoundLabel thisBtn = (RoundLabel)sender;

            thisBtn._BackColor      = Color.LightBlue;
            thisBtn.ForeColor       = Color.White;
            _espressoOption.Enabled = false;
            _yesBtnRFID.Enabled     = true;
            _yesBtnRFID._BackColor  = Color.LightGreen;
        }
예제 #2
0
        void ReleaseDesignerOutlets()
        {
            if (AnswerButton != null)
            {
                AnswerButton.Dispose();
                AnswerButton = null;
            }

            if (PictureButton != null)
            {
                PictureButton.Dispose();
                PictureButton = null;
            }

            if (QuestionLable != null)
            {
                QuestionLable.Dispose();
                QuestionLable = null;
            }

            if (QuestionTextView != null)
            {
                QuestionTextView.Dispose();
                QuestionTextView = null;
            }

            if (ResetButton != null)
            {
                ResetButton.Dispose();
                ResetButton = null;
            }

            if (RoundLabel != null)
            {
                RoundLabel.Dispose();
                RoundLabel = null;
            }

            if (ScoreLabel != null)
            {
                ScoreLabel.Dispose();
                ScoreLabel = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AnswerButton != null)
            {
                AnswerButton.Dispose();
                AnswerButton = null;
            }

            if (CommentTextView != null)
            {
                CommentTextView.Dispose();
                CommentTextView = null;
            }

            if (QuestionTextView != null)
            {
                QuestionTextView.Dispose();
                QuestionTextView = null;
            }

            if (RoundLabel != null)
            {
                RoundLabel.Dispose();
                RoundLabel = null;
            }

            if (ScoreLabel != null)
            {
                ScoreLabel.Dispose();
                ScoreLabel = null;
            }

            if (StartNewGameButton != null)
            {
                StartNewGameButton.Dispose();
                StartNewGameButton = null;
            }
        }
예제 #4
0
 private void InitializeComponent()
 {
     this.portadaPelicula    = new System.Windows.Forms.PictureBox();
     this.roundLblFilmStatus = new RoundLbl.RoundLabel();
     ((System.ComponentModel.ISupportInitialize)(this.portadaPelicula)).BeginInit();
     this.SuspendLayout();
     //
     // portadaPelicula
     //
     this.portadaPelicula.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(61)))), ((int)(((byte)(61)))), ((int)(((byte)(60)))));
     this.portadaPelicula.Location  = new System.Drawing.Point(5, 5);
     this.portadaPelicula.Name      = "portadaPelicula";
     this.portadaPelicula.Size      = new System.Drawing.Size(160, 195);
     this.portadaPelicula.SizeMode  = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.portadaPelicula.TabIndex  = 0;
     this.portadaPelicula.TabStop   = false;
     this.portadaPelicula.Click    += new System.EventHandler(this.PictureBox1_Click);
     //
     // roundLblFilmStatus
     //
     this.roundLblFilmStatus._BackColor = System.Drawing.Color.WhiteSmoke;
     this.roundLblFilmStatus.BackColor  = System.Drawing.Color.Transparent;
     this.roundLblFilmStatus.Location   = new System.Drawing.Point(5, 203);
     this.roundLblFilmStatus.Name       = "roundLblFilmStatus";
     this.roundLblFilmStatus.Size       = new System.Drawing.Size(160, 34);
     this.roundLblFilmStatus.TabIndex   = 1;
     this.roundLblFilmStatus.Click     += new System.EventHandler(this.RoundLblFilmStatus_Click);
     //
     // PeliculaControl
     //
     this.BackColor = System.Drawing.Color.Black;
     this.Controls.Add(this.roundLblFilmStatus);
     this.Controls.Add(this.portadaPelicula);
     this.Name = "PeliculaControl";
     this.Size = new System.Drawing.Size(170, 242);
     ((System.ComponentModel.ISupportInitialize)(this.portadaPelicula)).EndInit();
     this.ResumeLayout(false);
 }
        /// <summary>
        /// Erforderliche Methode für die Designerunterstützung.
        /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
        /// </summary>
        private void InitializeComponent()
        {
            this._labelName               = new Label();
            this._companyLogo             = new PictureBox();
            this._labelOccupation         = new Label();
            this._rfidScanImage           = new Button();
            this._noBtnRFID               = new RoundLabel();
            this._yesBtnRFID              = new RoundLabel();
            this._wouldYouLikeACoffeeRFID = new Label();
            this._espressoOption          = new RoundLabel();
            this._coffeeOption            = new RoundLabel();
            this._timerToClose            = new Timer();

            _timerToClose.Interval = 1000;
            _timerToClose.Tick    += new EventHandler(_timerToClose_Tick);
            _timerToClose.Start();

            // Main Settings for the Welcome Popup
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
            this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
            this.Size = new Size(Convert.ToInt32(Screen.PrimaryScreen.Bounds.Width * 0.6), Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height * 0.75));
            this.Controls.Add(this._labelName);
            this.Controls.Add(this._companyLogo);
            this.Controls.Add(this._labelOccupation);
            this.ResumeLayout(false);
            this.BringToFront();
            this.FormBorderStyle = FormBorderStyle.None;
            this.BackColor       = Color.White;
            this.StartPosition   = FormStartPosition.CenterScreen;
            this.TopMost         = true;


            //PictureBox for the company logo or the default image (in case the rfid tag is not registered or image is missing)
            this._companyLogo.SizeMode = PictureBoxSizeMode.Zoom;
            this._companyLogo.Size     = new Size(600, 300);
            this._companyLogo.Location = new Point((this.ClientSize.Width / 2) - (this._companyLogo.Width / 2), 10);
            this._companyLogo.Image    = new Bitmap(projectFolder + @"Pictures\general\SAP_Logo.jpg");


            // Label for Name of the customer. If RFID Chip is not registered, there is a Welcome Text instead of the name

            this._labelName.AutoSize    = true;
            this._labelName.MinimumSize = new Size(600, 0);
            this._labelName.Location    = new Point((this.ClientSize.Width / 2) - (this._labelName.Width / 2), this._companyLogo.Size.Height + 30);
            this._labelName.Text        = "Herzlich Willkommen";
            this._labelName.TextAlign   = ContentAlignment.MiddleCenter;
            this._labelName.Font        = new Font("Serif", 24);


            // Label for Occupation. If RFID Chip is not registered, there is a hint instead of Occupation

            this._labelOccupation.AutoSize    = true;
            this._labelOccupation.MinimumSize = new Size(600, 0);
            this._labelOccupation.Location    = new Point((this.ClientSize.Width / 2) - (this._labelOccupation.Width / 2), this._labelName.Location.Y + this._labelName.Height + 10);
            this._labelOccupation.Text        = "Ihr RFID Chip ist noch nicht registriert";
            this._labelOccupation.TextAlign   = ContentAlignment.MiddleCenter;
            this._labelOccupation.Font        = new Font("Serif", 12);

            // RFID Buttons and label for would you like a coffee

            double containerWidth  = this.Width;
            double containerHeight = this.Height;



            this._wouldYouLikeACoffeeRFID.Text      = "Möchten Sie einen             oder             ?";
            this._wouldYouLikeACoffeeRFID.Font      = new Font("Arial", 18);
            this._wouldYouLikeACoffeeRFID.Size      = new Size(Convert.ToInt32(containerWidth), Convert.ToInt32(containerHeight * 0.2));
            this._wouldYouLikeACoffeeRFID.TextAlign = ContentAlignment.MiddleCenter;
            this._yesBtnRFID.Text       = "Ja!";
            this._noBtnRFID.Text        = "Nein";
            this._noBtnRFID.Font        = this._yesBtnRFID.Font = new Font("Arial", 10);
            this._yesBtnRFID.Size       = _noBtnRFID.Size = new Size(100, 50);
            this._yesBtnRFID.TextAlign  = _noBtnRFID.TextAlign = ContentAlignment.MiddleCenter;
            this._yesBtnRFID.BackColor  = _noBtnRFID.BackColor = Color.White;
            this._yesBtnRFID.Top       += Convert.ToInt32(containerHeight * 0.87);
            this._yesBtnRFID.Left      += Convert.ToInt32(containerWidth * 0.3);
            this._yesBtnRFID.ForeColor  = this._noBtnRFID.ForeColor = Color.White;
            this._yesBtnRFID._BackColor = Color.LightSlateGray;
            this._noBtnRFID._BackColor  = Color.IndianRed;

            this._noBtnRFID.Top  += Convert.ToInt32(containerHeight * 0.87);
            this._noBtnRFID.Left += Convert.ToInt32(containerWidth * 0.5);



            this._wouldYouLikeACoffeeRFID.Top += Convert.ToInt32(containerHeight * 0.69);


            this._wouldYouLikeACoffeeRFID.BackColor = Color.Transparent;
            //_wouldYouLikeACoffeeRFID.Left += Convert.ToInt32(screenWidth * 0.3);

            //Coffee and espresso options

            this._coffeeOption.Text       = "Coffee";
            this._espressoOption.Text     = "Espresso";
            this._coffeeOption.Font       = this._espressoOption.Font = new Font("Arial", 10);
            this._coffeeOption.Size       = _espressoOption.Size = new Size(75, 50);
            this._coffeeOption.TextAlign  = _espressoOption.TextAlign = ContentAlignment.MiddleCenter;
            this._coffeeOption._BackColor = _espressoOption._BackColor = Color.LightGray;

            this._coffeeOption.Top      += Convert.ToInt32(containerHeight * 0.74);
            this._coffeeOption.Left     += Convert.ToInt32(containerWidth * 0.49);
            this._coffeeOption.ForeColor = this._espressoOption.ForeColor = Color.Black;


            this._espressoOption.Top  += Convert.ToInt32(containerHeight * 0.74);
            this._espressoOption.Left += Convert.ToInt32(containerWidth * 0.67);



            this.Controls.Add(_noBtnRFID);
            this.Controls.Add(_yesBtnRFID);
            this.Controls.Add(_wouldYouLikeACoffeeRFID);
            this.Controls.Add(_coffeeOption);
            this.Controls.Add(_espressoOption);


            this._wouldYouLikeACoffeeRFID.BringToFront();
            this._yesBtnRFID.BringToFront();
            this._noBtnRFID.BringToFront();
            this._coffeeOption.BringToFront();
            this._espressoOption.BringToFront();

            this._noBtnRFID.Click      += _noBtnRFID_Click;
            this._yesBtnRFID.Click     += _yesBtnRFID_Click;
            this._coffeeOption.Click   += _coffeeOption_Click;
            this._espressoOption.Click += _espressoOption_Click;

            this._wouldYouLikeACoffeeRFID.Visible = false;
            this._yesBtnRFID.Visible     = false;
            this._noBtnRFID.Visible      = false;
            this._coffeeOption.Visible   = false;
            this._espressoOption.Visible = false;
            this._yesBtnRFID.Enabled     = false;
        }