Exemplo n.º 1
0
        /// <summary>
        /// Initialisation du windows form
        /// </summary>
        private void Form1_Load(object sender, EventArgs e)
        {
            int i = 0;

            insultesPath     = "Insultes.txt";
            messagePerioPath = "MessagesPerio.txt";
            MotBanniUpdate();
            MessagePeriodiqueUpdate();
            ajouterInsultes           = new FormAjout();
            ajouterMessagesPeriodique = new FormAjoutPerio();
            ajouterVoteValues         = new FormAjoutVoteValues();
            connexionBT.FlatStyle     = FlatStyle.Flat;
            connexionBT.FlatAppearance.BorderColor = Color.Red;
            pauseBT.FlatStyle = FlatStyle.Flat;
            pauseBT.FlatAppearance.BorderColor = Color.Red;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Ouvre la fenetre d'ajout de valeurs possible pour le prochain vote
        /// </summary>
        private void btAjoutVoteValue_MouseClick(object sender, MouseEventArgs e)
        {
            ajouterVoteValues = new FormAjoutVoteValues();
            DialogResult diag = ajouterVoteValues.ShowDialog();

            if (diag == DialogResult.OK)
            {
                string   voteValues  = ajouterVoteValues.getVoteValues();
                string[] splitValues = voteValues.Split(',');
                foreach (string value in splitValues)
                {
                    string trimedValue = value.TrimStart(' ').TrimEnd(' ');
                    if (!lbVote.Items.Contains(trimedValue))
                    {
                        lbVote.Items.Add(trimedValue);
                    }
                }
            }
        }