Пример #1
0
    public LoginView(SquidLayout layout)
    {
        Desktop loginDesktop = layout.GetInstance();

        loginDesktop.Dock = DockStyle.Fill;

        Controls.Add(loginDesktop);


        (loginDesktop.GetControl("ResetPassword") as Button).MouseClick += new MouseEvent(ResetPasswordButton);

        (loginDesktop.GetControl("GoButton") as Button).MouseClick += new MouseEvent(LoginButton);


        (loginDesktop.GetControl("RegisterLink") as Button).MouseClick += new MouseEvent(RegisterButton);

        (loginDesktop.GetControl("BackButton") as Button).MouseClick += new MouseEvent(BackButton);

        _emailTextBox    = (loginDesktop.GetControl("EmailTextBox") as TextBox);
        _passwordTextBox = (loginDesktop.GetControl("PasswordTextBox") as TextBox);


        _emailTextBox.MouseClick    += new MouseEvent(_emailTextBox_MouseClick);
        _emailTextBox.LostFocus     += new VoidEvent(_emailTextBox_LostFocus);
        _passwordTextBox.MouseClick += new MouseEvent(_passwordTextBox_MouseClick);
        _passwordTextBox.LostFocus  += new VoidEvent(_passwordTextBox_LostFocus);
    }
Пример #2
0
    public MenuView(SquidLayout menuLayout)
    {
        Desktop menuDesktop = menuLayout.GetInstance();

        menuDesktop.Dock = DockStyle.Fill;
        Controls.Add(menuDesktop);

        (GetControl("SinglePlayerButton") as Button).MouseClick += new MouseEvent(PlayButton_MouseClick);
        (GetControl("LoginButton") as Button).MouseClick        += new MouseEvent(MenuView_MouseClick);
        (GetControl("ExitButton") as Button).MouseClick         += new MouseEvent(ExitButton_MouseClick);
    }
Пример #3
0
    public MinigameView(SquidLayout menuLayout)
    {
        Desktop menuDesktop = menuLayout.GetInstance();

        menuDesktop.Dock = DockStyle.Fill;
        Controls.Add(menuDesktop);

        (GetControl("Start") as Button).MouseClick      += new MouseEvent(PlayButton_MouseClick);
        (GetControl("New") as Button).MouseClick        += new MouseEvent(NewGameButton_MouseClick);
        (GetControl("ExitButton") as Button).MouseClick += new MouseEvent(ExitButton_MouseClick);
    }
Пример #4
0
    public RegisterView(SquidLayout registerLayout)
    {
        Desktop registerDesktop = registerLayout.GetInstance();

        registerDesktop.Dock = DockStyle.Fill;

        Controls.Add(registerDesktop);

        (registerDesktop.GetControl("SubmitButton") as Button).MouseClick += new MouseEvent(SubmitButton);

        (registerDesktop.GetControl("BackButton") as Button).MouseClick += new MouseEvent(BackButton);

        _emailTextBox           = (registerDesktop.GetControl("EmailTextBox") as TextBox);
        _passwordTextBox        = (registerDesktop.GetControl("PasswordTextBox") as TextBox);
        _confirmPasswordTextBox = (registerDesktop.GetControl("ConfirmPasswordTextBox") as TextBox);

        _ageTextBox        = (registerDesktop.GetControl("AgeTextBox") as TextBox);
        _educationDropDown = (registerDesktop.GetControl("EducationDropDown") as DropDownList);

        _maleGenderRadio   = (registerDesktop.GetControl("GenderMaleRadio") as RadioButton);
        _femaleGenderRadio = (registerDesktop.GetControl("GenderFemaleRadio") as RadioButton);

        _collectDataYes = (registerDesktop.GetControl("CollectDataYesRadio") as RadioButton);
        _collectDataNo  = (registerDesktop.GetControl("CollectDataNoRadio") as RadioButton);

        _passwordsMustMatch         = (registerDesktop.GetControl("PasswordsMustMatchLabel") as Label);
        _passwordsMustMatch.Visible = false;

        _emailTextBox.MouseClick += new MouseEvent(_emailTextBox_MouseClick);
        _emailTextBox.LostFocus  += new VoidEvent(_emailTextBox_LostFocus);

        _passwordTextBox.MouseClick += new MouseEvent(_passwordTextBox_MouseClick);
        _passwordTextBox.LostFocus  += new VoidEvent(_passwordTextBox_LostFocus);

        _confirmPasswordTextBox.MouseClick += new MouseEvent(_confirmPasswordTextBox_MouseClick);
        _confirmPasswordTextBox.LostFocus  += new VoidEvent(_confirmPasswordTextBox_LostFocus);

        _ageTextBox.MouseClick += new MouseEvent(_ageTextBox_MouseClick);
        _ageTextBox.LostFocus  += new VoidEvent(_ageTextBox_LostFocus);

        _maleGenderRadio.MouseClick   += new MouseEvent(_maleGenderRadio_MouseClick);
        _femaleGenderRadio.MouseClick += new MouseEvent(_femaleGenderRadio_MouseClick);

        _collectDataYes.MouseClick += new MouseEvent(_collectDataYes_MouseClick);
        _collectDataNo.MouseClick  += new MouseEvent(_collectDataNo_MouseClick);

        _passwordTextBox.TextChanged        += new VoidEvent(_passwordTextBox_TextChanged);
        _confirmPasswordTextBox.TextChanged += new VoidEvent(_passwordTextBox_TextChanged);

        _ageTextBox.TextChanged += new VoidEvent(_ageTextBox_TextChanged);

        _educationDropDown.MouseClick += new MouseEvent(_educationDropDown_MouseClick);
    }
Пример #5
0
    public MillionaireView(SquidLayout menuLayout)
    {
        Desktop menuDesktop = menuLayout.GetInstance();

        menuDesktop.Dock = DockStyle.Fill;
        Controls.Add(menuDesktop);

        (GetControl("Help1") as ImageControl).MouseClick += new MouseEvent(Help1Button_MouseClick);
        (GetControl("Help2") as ImageControl).MouseClick += new MouseEvent(Help2Button_MouseClick);
        (GetControl("Help3") as ImageControl).MouseClick += new MouseEvent(Help3Button_MouseClick);

        (GetControl("A") as Button).MouseClick += new MouseEvent(AButton_MouseClick);
        (GetControl("B") as Button).MouseClick += new MouseEvent(BButton_MouseClick);
        (GetControl("C") as Button).MouseClick += new MouseEvent(CButton_MouseClick);
        (GetControl("D") as Button).MouseClick += new MouseEvent(DButton_MouseClick);

        (GetControl("Yes") as Button).MouseClick += new MouseEvent(YesButton_MouseClick);
        (GetControl("No") as Button).MouseClick  += new MouseEvent(NoButton_MouseClick);

        (GetControl("Exit") as Button).MouseClick += new MouseEvent(ExitButton_MouseClick);
    }