private void btn_Click(object sender, RoutedEventArgs e)
        {
            Button buttonThatWasClicked = (Button)sender;
            Ballot ballot = (Ballot)Window.GetWindow(this);

            ballot.txtVPAcademicAffair.Text = buttonThatWasClicked.Tag.ToString();
            Greetings();
        }
        void NextPage()
        {
            Ballot ballot = (Ballot)Window.GetWindow(this);

            ballot.NavTextExternalAffair.FontFamily = new FontFamily("Segoe UI Semibold");
            ballot.NavTextPresident.FontFamily      = ballot.NavTextAcademicAffair.FontFamily = ballot.NavTextInternalAffair.FontFamily = ballot.NavTextOperation.FontFamily = ballot.NavTextFinance.FontFamily = ballot.NavTextProgram.FontFamily = new FontFamily("Segoe UI Semilight");

            ballot.GridPrincipal.Children.Clear();
            ballot.GridPrincipal.Children.Add(new PositionVPExternalAffair());
        }
        void Greetings()
        {
            Ballot ballot = (Ballot)Window.GetWindow(this);

            if (ballot.txtPresident.Text.Equals("") || ballot.txtVPAcademicAffair.Text.Equals("") || ballot.txtVPExternalAffair.Text.Equals("") || ballot.txtVPInternalAffair.Text.Equals("") || ballot.txtVPFinance.Text.Equals("") ||
                ballot.txtVPOperation.Text.Equals("") || ballot.txtRepresentative.Text.Equals(""))
            {
                NextPage();
            }
            else
            {
                MessageBox.Show("Alright! You`re done, click Submit vote if you`re sure!", "Login Successful", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
Exemplo n.º 4
0
        void NextPage()
        {
            Ballot ballot = (Ballot)Window.GetWindow(this);

            ballot.NavTextProgram.FontFamily   = new FontFamily("Segoe UI Semibold");
            ballot.NavTextPresident.FontFamily = ballot.NavTextAcademicAffair.FontFamily = ballot.NavTextExternalAffair.FontFamily = ballot.NavTextInternalAffair.FontFamily = ballot.NavTextOperation.FontFamily = ballot.NavTextFinance.FontFamily = new FontFamily("Segoe UI Semilight");

            if (getter.getProgram.Equals(programs[0]) || getter.getProgram.Equals(programs[1]))
            {
                //for ICT representative
                ballot.GridPrincipal.Children.Clear();
                ballot.GridPrincipal.Children.Add(new PositionICTRepresentative());
            }
            else if (getter.getProgram.Equals(programs[2]) || getter.getProgram.Equals(programs[3]))
            {
                //for arts and science representative
                ballot.GridPrincipal.Children.Clear();
                ballot.GridPrincipal.Children.Add(new PositionArtsScienceRepresentative());
            }
            else if (getter.getProgram.Equals(programs[4]) || getter.getProgram.Equals(programs[5]))
            {
                //for ABM representative
                ballot.GridPrincipal.Children.Clear();
                ballot.GridPrincipal.Children.Add(new PositionABMRepresentative());
            }
            else if (getter.getProgram.Equals(programs[6]))
            {
                //for engineering representatative
                ballot.GridPrincipal.Children.Clear();
                ballot.GridPrincipal.Children.Add(new PositionEngineeringRepresentative());
            }
            else if (getter.getProgram.Equals(programs[7]) || getter.getProgram.Equals(programs[8]))
            {
                ballot.GridPrincipal.Children.Clear();
                ballot.GridPrincipal.Children.Add(new PositionTourismHospitalityRepresentative());
            }
        }