Exemple #1
0
        public static bool popup(string title, string msg, frm_main m, out item choosed, bool error = false
                                 , List <item> items = null, bool yn = false)
        {
            choosed = null;

            frm_popup f = init(title, msg, yn || items != null, error, m);

            f.items = items;
            DialogResult r = f.ShowDialog();

            choosed = f.choosed;

            return(r == DialogResult.OK);
        }
Exemple #2
0
 public interop(frm_main p)
 {
     this.parent = p;
 }
Exemple #3
0
        protected static frm_popup init(string title, string msg, bool yn, bool error, frm_main m)
        {
            error = true;
            frm_popup f = new frm_popup();

            f.lbl_title.Text = title.ToUpper();
            f.lbl_msg.Text   = msg;
            f.yn             = yn;

            m.style.set_style(f);

            f.lbl_title.BackColor = f.pb_close.BackColor = error ? m.style.fore_color_error : m.style.fore_color_link;
            f.lbl_title.ForeColor = Color.White;
            f.lbl_msg.ForeColor   = error ? Color.Tomato : Color.DarkSlateGray;

            f.Width = m.ClientSize.Width - 4;
            f.Left  = 2;
            return(f);
        }
Exemple #4
0
 public static void popup_err(frm_main m, string msg)
 {
     popup("ERRORE", msg, m, out item choosed, true);
 }
Exemple #5
0
 public static void popup_err(frm_main m, Exception ex)
 {
     popup("ERRORE", ex.Message, m, out item choosed, true);
 }