示例#1
0
        public CustomButton CreateTeamButton(UserTeamCombo u)
        {
            CustomButton ret = new CustomButton()
            {
                Text = string.Format("Sign in on {0}", u.team)
            };

            ret.Font = buttonFont;
            ret.Size = ret.PreferredSize;
            //ret.FlatStyle = FlatStyle.Flat;
            //ret.BackColor = ret.FlatAppearance.MouseOverBackColor = ret.FlatAppearance.MouseDownBackColor = ret.FlatAppearance.CheckedBackColor = Color.FromArgb(0x00,0x99,0xcc);
            //ret.ForeColor = Color.White;
            ret.TabStop = false;
            //ret.FlatAppearance.BorderSize = 0;
            //ret.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255);
            ret.Click += (o, e) => teamSelected(u);

            return ret;
        }
示例#2
0
        private void InitializeComponent()
        {
            this.welcome = new System.Windows.Forms.Label();
            this.howTo = new Label();
            this.emailContainer = new CustomTextbox(LoginEmail, "Your email address");
            emailContainer.OnError += (s) =>
            {
                loadingPictureBox.StopAnimation();
                loadingPictureBox.Visible = false;
            };
            this.emailContainer.SuspendLayout();
            this.SuspendLayout();

            //
            // welcome
            //
            this.welcome.AutoSize = true;
            this.welcome.Location = new System.Drawing.Point(222, 125);
            this.welcome.Name = "welcome";
            this.welcome.Size = new System.Drawing.Size(55, 13);
            this.welcome.Text = "Welcome!";
            this.welcome.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.welcome.Parent = this;
            this.welcome.BackColor = Color.Transparent;
            //
            // howTo
            //
            this.howTo.AutoSize = true;
            this.howTo.Name = "introHowTo";
            this.howTo.Text = "Please type in your email below and press enter to get started.";
            this.howTo.Size = this.howTo.PreferredSize;
            this.howTo.TextAlign = ContentAlignment.MiddleCenter;
            this.howTo.Parent = this;
            this.howTo.BackColor = Color.Transparent;
            //
            // emailContainer
            //
            this.emailContainer.Location = new System.Drawing.Point(143, 183);
            this.emailContainer.Name = "emailContainer";
            this.emailContainer.Size = new System.Drawing.Size(300, 34);
            this.emailContainer.TabIndex = 2;
            this.emailContainer.BorderRadius = 4;

            login = new CustomButton()
            {
                Text = "Retrieve account"
            };
            login.Size = login.PreferredSize;
            login.Location = new Point((emailContainer.Width - login.Width) / 2, emailContainer.Bottom + 7);
            login.Click += (o, e) => LoginEmail(emailContainer.Text);
            Controls.Add(login);

            this.loadingPictureBox = new SlackLoading();
            this.loadingPictureBox.Size = new Size(70, 70);
            this.loadingPictureBox.Parent = this;
            this.loadingPictureBox.BackColor = Color.Transparent;
            this.loadingPictureBox.Visible = false;
            this.Controls.Add(loadingPictureBox);
            //
            // EmailLogin
            //
            this.Controls.Add(this.emailContainer);
            this.Controls.Add(this.welcome);
            this.Controls.Add(howTo);
            this.Name = "EmailLogin";
            this.Size = new System.Drawing.Size(500, 400);
            this.emailContainer.ResumeLayout(false);
            this.emailContainer.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();
        }