private void registerButton_Click(System.Object sender, System.EventArgs e)
        {
            var fb = new FixtureBuilder();
            var userList = new List<string>();
            string username = null;
            userList = fb.getPRUsers();
            username = this.usernameTextBox.Text;
            string urlBase = "http://www.predictresults.co.uk/API/PYBMembers.php?user='******'";

                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();

                Stream receiveStream = response.GetResponseStream();
                StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);

                response.Close();
                readStream.Close();

                Interaction.MsgBox("User '" + username + "' " + "registered as Place Your Bets user");
                My.MyProject.Forms.ContainerForm.Show();
                LoginUserControl fLoginUserControl = new LoginUserControl();
                My.MyProject.Forms.ContainerForm.MainFlowLayoutPanel.Controls.Add(fLoginUserControl);
                My.MyProject.Forms.ContainerForm.AcceptButton = fLoginUserControl.loginButton;
                this.Close();

            } else {
                Interaction.MsgBox("Username not recognised");
            }
        }
 private void closeButton_Click(System.Object sender, System.EventArgs e)
 {
     My.MyProject.Forms.ContainerForm.Show();
     LoginUserControl fLoginUserControl = new LoginUserControl();
     My.MyProject.Forms.ContainerForm.MainFlowLayoutPanel.Controls.Add(fLoginUserControl);
     My.MyProject.Forms.ContainerForm.AcceptButton = fLoginUserControl.loginButton;
     this.Close();
 }
Beispiel #3
0
        private void closeButton_Click(System.Object sender, System.EventArgs e)
        {
            My.MyProject.Forms.ContainerForm.Show();
            LoginUserControl fLoginUserControl = new LoginUserControl();

            My.MyProject.Forms.ContainerForm.MainFlowLayoutPanel.Controls.Add(fLoginUserControl);
            My.MyProject.Forms.ContainerForm.AcceptButton = fLoginUserControl.loginButton;
            this.Close();
        }
Beispiel #4
0
        private void logOutButton_Click(System.Object sender, System.EventArgs e)
        {
            this.MainFlowLayoutPanel.Controls.Clear();
            this.enterPredictionsButton.Text    = "";
            this.betSlipButton.Text             = "";
            this.whoBetButton.Text              = "";
            this.predictionLeagueButton.Text    = "";
            this.myAccountButton.Text           = "";
            this.logOutButton.Text              = "";
            this.enterPredictionsButton.Enabled = false;
            this.betSlipButton.Enabled          = false;
            this.whoBetButton.Enabled           = false;
            this.predictionLeagueButton.Enabled = false;
            this.myAccountButton.Enabled        = false;
            this.logOutButton.Enabled           = false;
            this.coverTitleLabel.Visible        = false;
            LoginUserControl fLoginUserControl = new LoginUserControl();

            this.MainFlowLayoutPanel.Controls.Add(fLoginUserControl);
            this.AcceptButton = fLoginUserControl.loginButton;
        }
Beispiel #5
0
        private void ContainerForm_Load(System.Object sender, System.EventArgs e)
        {
            Version version = null;

            version   = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
            this.Text = string.Format("v{0}.{1}", version.Major, version.Minor);

            this.enterPredictionsButton.Visible = true;
            this.betSlipButton.Visible          = true;
            this.whoBetButton.Visible           = true;
            this.predictionLeagueButton.Visible = true;
            this.myAccountButton.Visible        = true;
            this.logOutButton.Visible           = true;
            this.enterPredictionsButton.Text    = "";
            this.betSlipButton.Text             = "";
            this.whoBetButton.Text              = "";
            this.predictionLeagueButton.Text    = "";
            this.myAccountButton.Text           = "";
            this.logOutButton.Text              = "";
            this.enterPredictionsButton.Enabled = false;
            this.betSlipButton.Enabled          = false;
            this.whoBetButton.Enabled           = false;
            this.predictionLeagueButton.Enabled = false;
            this.myAccountButton.Enabled        = false;
            this.logOutButton.Enabled           = false;
            this.submitGroupBox.Visible         = true;
            this.submitGroupBox.Visible         = false;
            this.submitButton.Visible           = false;
            this.editButton.Visible             = false;
            this.MainFlowLayoutPanel.Visible    = false;
            this.MainFlowLayoutPanel.Enabled    = false;
            this.MainFlowLayoutPanel.Controls.Clear();

            LoginUserControl fLoginUserControl = new LoginUserControl();

            this.MainFlowLayoutPanel.Controls.Add(fLoginUserControl);
            this.MainFlowLayoutPanel.Visible = true;
            this.MainFlowLayoutPanel.Enabled = true;
            this.AcceptButton = fLoginUserControl.loginButton;
        }
Beispiel #6
0
        private void registerButton_Click(System.Object sender, System.EventArgs e)
        {
            var    fb       = new FixtureBuilder();
            var    userList = new List <string>();
            string username = null;

            userList = fb.getPRUsers();
            username = this.usernameTextBox.Text;
            string urlBase = "http://www.predictresults.co.uk/API/PYBMembers.php?user='******'";

                HttpWebRequest  request  = (HttpWebRequest)WebRequest.Create(url);
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();

                Stream       receiveStream = response.GetResponseStream();
                StreamReader readStream    = new StreamReader(receiveStream, Encoding.UTF8);

                response.Close();
                readStream.Close();

                Interaction.MsgBox("User '" + username + "' " + "registered as Place Your Bets user");
                My.MyProject.Forms.ContainerForm.Show();
                LoginUserControl fLoginUserControl = new LoginUserControl();
                My.MyProject.Forms.ContainerForm.MainFlowLayoutPanel.Controls.Add(fLoginUserControl);
                My.MyProject.Forms.ContainerForm.AcceptButton = fLoginUserControl.loginButton;
                this.Close();
            }
            else
            {
                Interaction.MsgBox("Username not recognised");
            }
        }
Beispiel #7
0
 private void logOutButton_Click(System.Object sender, System.EventArgs e)
 {
     this.MainFlowLayoutPanel.Controls.Clear();
     this.enterPredictionsButton.Text = "";
     this.betSlipButton.Text = "";
     this.whoBetButton.Text = "";
     this.predictionLeagueButton.Text = "";
     this.myAccountButton.Text = "";
     this.logOutButton.Text = "";
     this.enterPredictionsButton.Enabled = false;
     this.betSlipButton.Enabled = false;
     this.whoBetButton.Enabled = false;
     this.predictionLeagueButton.Enabled = false;
     this.myAccountButton.Enabled = false;
     this.logOutButton.Enabled = false;
     this.coverTitleLabel.Visible = false;
     LoginUserControl fLoginUserControl = new LoginUserControl();
     this.MainFlowLayoutPanel.Controls.Add(fLoginUserControl);
     this.AcceptButton = fLoginUserControl.loginButton;
 }
Beispiel #8
0
        private void ContainerForm_Load(System.Object sender, System.EventArgs e)
        {
            Version version = null;
            version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
            this.Text = string.Format("v{0}.{1}", version.Major, version.Minor);

            this.enterPredictionsButton.Visible = true;
            this.betSlipButton.Visible = true;
            this.whoBetButton.Visible = true;
            this.predictionLeagueButton.Visible = true;
            this.myAccountButton.Visible = true;
            this.logOutButton.Visible = true;
            this.enterPredictionsButton.Text = "";
            this.betSlipButton.Text = "";
            this.whoBetButton.Text = "";
            this.predictionLeagueButton.Text = "";
            this.myAccountButton.Text = "";
            this.logOutButton.Text = "";
            this.enterPredictionsButton.Enabled = false;
            this.betSlipButton.Enabled = false;
            this.whoBetButton.Enabled = false;
            this.predictionLeagueButton.Enabled = false;
            this.myAccountButton.Enabled = false;
            this.logOutButton.Enabled = false;
            this.submitGroupBox.Visible = true;
            this.submitGroupBox.Visible = false;
            this.submitButton.Visible = false;
            this.editButton.Visible = false;
            this.MainFlowLayoutPanel.Visible = false;
            this.MainFlowLayoutPanel.Enabled = false;
            this.MainFlowLayoutPanel.Controls.Clear();

            LoginUserControl fLoginUserControl = new LoginUserControl();
            this.MainFlowLayoutPanel.Controls.Add(fLoginUserControl);
            this.MainFlowLayoutPanel.Visible = true;
            this.MainFlowLayoutPanel.Enabled = true;
            this.AcceptButton = fLoginUserControl.loginButton;
        }