Esempio n. 1
0
 public static void ShowDialog(string message, SearchComponent search, string path, string id)
 {
     using (ModalDeleteclass md = new ModalDeleteclass(message, search, path, id))
     {
         md.ShowDialog();
     }
 }
Esempio n. 2
0
        private Panel generateBtn(String urlImage, Point location)
        {
            Panel      panelBtnDelete = new Panel();
            PictureBox pictureDelete  = new PictureBox();
            Image      imgDelete      = Image.FromFile(urlImage);

            pictureDelete.SizeMode = PictureBoxSizeMode.Zoom;
            pictureDelete.Location = location;
            pictureDelete.Dock     = DockStyle.Right;
            panelBtnDelete.Width   = widthBloc;
            panelBtnDelete.Height  = 30;
            pictureDelete.Image    = imgDelete;


            pictureDelete.Click += new System.EventHandler(m_pictureDelete_click);

            void m_pictureDelete_click(object sender, EventArgs e)
            {
                string path;

                path = getPath();
                // appel du modal qui va supprimer en fonction du path
                string str   = "ohh pttit !!  Voulez vous vraiment " + this.tabs[0, 5] + " supprimer ? ";
                var    modal = new smallComponents.ModalDeleteclass(str, this, path, this.tabs[0, 5]);

                modal.ShowDialog();
            }

            panelBtnDelete.Controls.Add(pictureDelete);


            return(panelBtnDelete);
        }
        public static void ShowDialog(string message)
        {
            ModalDeleteclass md = new ModalDeleteclass(message);

            md.ShowDialog();
        }
Esempio n. 4
0
        private void btnDeleteClass_Click_1(object sender, EventArgs e)
        {
            var modal = new smallComponents.ModalDeleteclass("Voulez vous vraiment supprimer ?");

            modal.ShowDialog();
        }