Exemplo n.º 1
0
        public DeusEmailer()
        {
            _nameLabel = new DeusLabel(new Point(25, 25), "Your Name*");
            _nameField = new DeusTextBox(new Point(25, 55));

            _emailLabel = new DeusLabel(new Point(25, 100), "Your Email Address*");
            _emailField = new DeusTextBox(new Point(25, 130));

            _phoneLabel = new DeusLabel(new Point(25, 175), "Phone Extension");
            _phoneField = new DeusTextBox(new Point(25, 205), new Size(100, 28), new Font(TextBox.DefaultFont.FontFamily, 12));

            _cellLabel = new DeusLabel(new Point(25, 250), "Cellphone");
            _cellField = new DeusTextBox(new Point(25, 280));

            _severityLabel = new DeusLabel(new Point(25, 325), "Issue Severity (click a bubble*)");
            _severityGroupBox = new GroupBox()
            {
                Height = 35
            };
            _severityGroupBox.Location = new Point(25, 355);

            _severityOptions = Settings.Default.IssueSeverityOptions;

            _descriptionLabel = new DeusLabel(new Point(25, 415), "Description of Issue*");
            _descriptionField = new DeusTextBox(new Point(25, 445), new Size(400, 28), new Font(TextBox.DefaultFont.FontFamily, 10))
            {
                Height = 90
            };

            _AddTextControls();

            _AddRadioControls(24, 37, 7);

            _connectedToInternet = _CanPingGoogleMail();
            if (false == _connectedToInternet)
            {
                DialogResult nope = MessageBox.Show("Not Connected To Internet");

                string msg = "Please call " + Settings.Default.NoInternetPhone + " for assistance";
                _noInternetPhone = new DeusLabel(new Point(25, 550), msg);

                this.Controls.Add(_noInternetPhone);
            }
            else
            {
                _submitButton = new Button()
                {
                    Text = "Submit Ticket",
                    Location = new Point(25, 550),
                    Height = 35,
                    Width = 100,
                    ForeColor = Color.Black,
                    BackColor = Color.AliceBlue
                };

                _submitButton.Click += new EventHandler(this.SubmitButtonClicked);

                this.Controls.Add(_submitButton);
            }

            _brandImage = new PictureBox()
            {
                ImageLocation = Settings.Default.BrandImagePath,
                SizeMode = PictureBoxSizeMode.AutoSize,
                Location = new Point(468, 25)
            };
            this.Controls.Add(_brandImage);

            string supportLinkText = Settings.Default.OnlineSupportLink;
            if (!string.IsNullOrEmpty(supportLinkText))
            {
                _onlineSupportLink = new DeusLabel(new Point(25, 650), supportLinkText);
                this.Controls.Add(_onlineSupportLink);
            }

            InitializeComponent();
        }
Exemplo n.º 2
0
        public DeusEmailer()
        {
            _nameLabel = new DeusLabel(new Point(25, 25), "Your Name*");
            _nameField = new DeusTextBox(new Point(25, 55));

            _emailLabel = new DeusLabel(new Point(25, 100), "Your Email Address*");
            _emailField = new DeusTextBox(new Point(25, 130));

            _phoneLabel = new DeusLabel(new Point(25, 175), "Phone Extension");
            _phoneField = new DeusTextBox(new Point(25, 205), new Size(100, 28), new Font(TextBox.DefaultFont.FontFamily, 12));

            _cellLabel = new DeusLabel(new Point(25, 250), "Cellphone");
            _cellField = new DeusTextBox(new Point(25, 280));

            _severityLabel    = new DeusLabel(new Point(25, 325), "Issue Severity (click a bubble*)");
            _severityGroupBox = new GroupBox()
            {
                Height = 35
            };
            _severityGroupBox.Location = new Point(25, 355);

            _severityOptions = Settings.Default.IssueSeverityOptions;

            _descriptionLabel = new DeusLabel(new Point(25, 415), "Description of Issue*");
            _descriptionField = new DeusTextBox(new Point(25, 445), new Size(400, 28), new Font(TextBox.DefaultFont.FontFamily, 10))
            {
                Height = 90
            };

            _AddTextControls();

            _AddRadioControls(24, 37, 7);

            _connectedToInternet = _CanPingGoogleMail();
            if (false == _connectedToInternet)
            {
                DialogResult nope = MessageBox.Show("Not Connected To Internet");

                string msg = "Please call " + Settings.Default.NoInternetPhone + " for assistance";
                _noInternetPhone = new DeusLabel(new Point(25, 550), msg);

                this.Controls.Add(_noInternetPhone);
            }
            else
            {
                _submitButton = new Button()
                {
                    Text      = "Submit Ticket",
                    Location  = new Point(25, 550),
                    Height    = 35,
                    Width     = 100,
                    ForeColor = Color.Black,
                    BackColor = Color.AliceBlue
                };

                _submitButton.Click += new EventHandler(this.SubmitButtonClicked);

                this.Controls.Add(_submitButton);
            }

            _brandImage = new PictureBox()
            {
                ImageLocation = Settings.Default.BrandImagePath,
                SizeMode      = PictureBoxSizeMode.AutoSize,
                Location      = new Point(468, 25)
            };
            this.Controls.Add(_brandImage);

            string supportLinkText = Settings.Default.OnlineSupportLink;

            if (!string.IsNullOrEmpty(supportLinkText))
            {
                _onlineSupportLink = new DeusLabel(new Point(25, 650), supportLinkText);
                this.Controls.Add(_onlineSupportLink);
            }

            InitializeComponent();
        }