Пример #1
0
        public DialogueForm(OverlayForm parent, HomeForm homeForm, string theme, int timerValue)
        {
            //set parent form
            OVERLAYFORM = parent;
            //set current form
            DIALOGUEFORM = this;

            InitializeComponent();

            //setstyle
            DIALOGUEFORM.BackColor = Color.FromName(theme);
            //set time
            timeLeft            = timerValue;
            messageLabel.Text   = homeForm.CONFIG_FILE.timeoutText;
            countdownLabel.Text = timeLeft + " seconds";

            Font tempFont = new Font("Arial", homeForm.CONFIG_FILE.timeoutFontSize);

            messageLabel.Font   = tempFont;
            countdownLabel.Font = tempFont;
            ContinueButton.Font = tempFont;

            DIALOGUEFORM.Size   = new Size(homeForm.CONFIG_FILE.timeoutWidth, homeForm.CONFIG_FILE.timeoutHeight);
            messageLabel.Size   = new Size(DIALOGUEFORM.Width, messageLabel.Height);
            countdownLabel.Size = new Size(DIALOGUEFORM.Width, countdownLabel.Height);
            ContinueButton.Size = new Size(DIALOGUEFORM.Width / 3, DIALOGUEFORM.Height / 6);

            DIALOGUEFORM.CenterToScreen();
            messageLabel.Location   = new Point((DIALOGUEFORM.Width / 2) - (messageLabel.Width / 2), (DIALOGUEFORM.Height / 6) * 1);
            countdownLabel.Location = new Point((DIALOGUEFORM.Width / 2) - (countdownLabel.Width / 2), (DIALOGUEFORM.Height / 6) * 2);
            ContinueButton.Location = new Point((DIALOGUEFORM.Width / 2) - (ContinueButton.Width / 2), (DIALOGUEFORM.Height / 6) * 4);
        }
Пример #2
0
 private void HomeDialogue()
 {
     dialogueUp   = true;
     DIALOGUEFORM = new DialogueForm(OVERLAYFORM, HOMEFORM, HOMEFORM.CONFIG_FILE.themeColour, TIMEOUT)
     {
         Visible = true
     };
     SetTimer();
 }