示例#1
0
 private void bunifuCustomDataGrid1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex != -1)
     {
         if (e.ColumnIndex == 4)
         {
             for (int i = 0; i < HomePreview.ClassButton.Count; i++)
             {
                 if (bunifuCustomDataGrid1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == HomePreview.ClassButton[i].Text)
                 {
                     HomePreview.id = HomePreview.id_classes[i];
                 }
             }
             Groupe Groupe_Form = new Groupe(HomePreview.id, bunifuCustomDataGrid1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());
             HomePreview.resizeLocationForm(Groupe_Form);
         }
         else if (e.ColumnIndex == 5)
         {
             if (bunifuCustomDataGrid1.Rows[e.RowIndex].Cells[6].Value.ToString() == "0")
             {
                 if (MessageBox.Show("voulez-vous réinitialise le mot de passe", "changer le mot de passe", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
                 {
                     string pass = generatePassword(bunifuCustomDataGrid1.Rows[e.RowIndex].Cells[0].Value.ToString());
                     bunifuCustomDataGrid1.Rows[e.RowIndex].Cells[5].Value = pass;
                 }
             }
         }
     }
 }
示例#2
0
        void click_eleves()
        {
            Eleves view = new Eleves(this.id, matieres);

            view.el = this.el;
            view.render_eleves();
            HomePreview.resizeLocationForm(view);
        }
示例#3
0
        void click_matiere(object sender, EventArgs e)
        {
            Bunifu.Framework.UI.BunifuTileButton b = (Bunifu.Framework.UI.BunifuTileButton)sender;
            string   nom  = b.LabelText.Split('_')[0];
            string   id   = b.LabelText.Split('_')[1];
            Subjects view = new Subjects(id, nom);

            HomePreview.resizeLocationForm(view);
        }
示例#4
0
        void click_matiere(object sender, EventArgs e)
        {
            Bunifu.Framework.UI.BunifuFlatButton b = (Bunifu.Framework.UI.BunifuFlatButton)sender;
            string   nom  = b.Text;
            string   id   = dictionary[b.Text];
            Subjects view = new Subjects(id, nom);

            HomePreview.resizeLocationForm(view);
        }
示例#5
0
        private void bunifuCustomDataGrid1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex != -1)
            {
                if (e.ColumnIndex == 4)
                {
                    for (int i = 0; i < HomePreview.ClassButton.Count; i++)
                    {
                        if (bunifuCustomDataGrid1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == HomePreview.ClassButton[i].Text)
                        {
                            HomePreview.id = HomePreview.id_classes[i];
                        }
                    }
                    Groupe Groupe_Form = new Groupe(HomePreview.id, bunifuCustomDataGrid1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());
                    HomePreview.resizeLocationForm(Groupe_Form);
                }
                else if (e.ColumnIndex == 5)
                {
                    if (bunifuCustomDataGrid1.Rows[e.RowIndex].Cells[6].Value.ToString() == "0")
                    {
                        if (MessageBox.Show("voulez-vous réinitialise le mot de passe", "changer le mot de passe", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
                        {
                            string pass = generatePassword(bunifuCustomDataGrid1.Rows[e.RowIndex].Cells[0].Value.ToString());
                            bunifuCustomDataGrid1.Rows[e.RowIndex].Cells[5].Value = pass;
                            using (FolderBrowserDialog dlg = new FolderBrowserDialog())
                            {
                                dlg.Description = "Select a folder";
                                if (dlg.ShowDialog() == DialogResult.OK)
                                {
                                    string Nom    = bunifuCustomDataGrid1.Rows[e.RowIndex].Cells[1].Value.ToString();
                                    string Prenom = bunifuCustomDataGrid1.Rows[e.RowIndex].Cells[2].Value.ToString();


                                    password p = new password(Nom, Prenom, pass, dlg.SelectedPath + "\\" + "mot de pass de " + Nom + " " + Prenom + ".pdf");


                                    MessageBox.Show("mot de pass bien generee");
                                }
                            }
                        }
                    }
                }
            }
        }
示例#6
0
        private void dirCreate()
        {
            foreach (string subPath in new string[3] {
                "C:\\Massar", "C:\\Fonts", "C:\\Images"
            })
            {
                bool exists = Directory.Exists(subPath);
                if (!exists)
                {
                    Directory.CreateDirectory(subPath);
                }
            }
            using (StreamWriter sw = File.CreateText(@"C:\\Massar\Installer.txt"))
            {
                sw.WriteLine("Installed");
                if (val)
                {
                    sw.WriteLine(textBox1.Text);
                }
                sw.Close();
            }
            using (StreamWriter sw = File.CreateText(@"C:\\Massar\.ConfigurationDB.txt"))
            {
                if (val)
                {
                    sw.WriteLine(textBox8.Text);
                    sw.WriteLine("Massar");
                    sw.WriteLine(textBox7.Text);
                    sw.WriteLine(textBox6.Text);
                }
                sw.Close();
            }
            string fileName   = "img.png";
            string sourcePath = @"C:\\Program Files (x86)\Cesim\Massar Admin\Config";
            string targetPath = @"C:\\Images";

            string sourceFile = Path.Combine(sourcePath, fileName);
            string destFile   = Path.Combine(targetPath, fileName);

            if (!Directory.Exists(targetPath))
            {
                Directory.CreateDirectory(targetPath);
            }


            File.Copy(sourceFile, destFile, true);
            foreach (string fiName in new string[4] {
                "ARIALUNI.TTF", "LATO-BLACK.TTF", "LATO-BOLD.TTF", "LATO-REGULAR.TTF"
            })
            {
                sourcePath = @"C:\Program Files (x86)\Cesim\Massar Admin\Config";
                targetPath = @"C:\Fonts";

                sourceFile = Path.Combine(sourcePath, fiName);
                destFile   = Path.Combine(targetPath, fiName);

                if (!Directory.Exists(targetPath))
                {
                    Directory.CreateDirectory(targetPath);
                }


                File.Copy(sourceFile, destFile, true);
            }

            progressBar1.Value = 100;
            HomePreview homePreview = new HomePreview(this);

            homePreview.Show();
            this.Hide();
        }
示例#7
0
        private void bunifuTileButton2_Click(object sender, EventArgs e)
        {
            classview view = new classview();

            HomePreview.resizeLocationForm(view);
        }
示例#8
0
        private void bunifuTileButton3_Click(object sender, EventArgs e)
        {
            Evolutionperyear view = new Evolutionperyear();

            HomePreview.resizeLocationForm(view);
        }
示例#9
0
        private void bunifuTileButton1_Click(object sender, EventArgs e)
        {
            viewprofesseur view = new viewprofesseur();

            HomePreview.resizeLocationForm(view);
        }
示例#10
0
        private void Betudiant_Click(object sender, EventArgs e)
        {
            viewetudiant view = new viewetudiant();

            HomePreview.resizeLocationForm(view);
        }
示例#11
0
        private void bunifuImageButton6_Click(object sender, EventArgs e)
        {
            Historique historique = new Historique();

            HomePreview.resizeLocationForm(historique);
        }