Exemplo n.º 1
0
        private void addevid_Click(object sender, EventArgs e)
        {
            add_thing frm = new add_thing("", "", "", "");

            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                //do things while using the input
                Console.WriteLine(frm.piccpath1); //for debugging reasons
                btnadd(frm.titlee, frm.description, frm.piccpath1, frm.piccpath2);
            }
        }
Exemplo n.º 2
0
        private void newbut_click(object sender, EventArgs e)
        {
            //Add button Editor Here, every buttons name is the same with the index for the info.
            string    id  = ((Button)sender).Name;
            int       id2 = Int32.Parse(id) - 1;
            add_thing frm = new add_thing(titlee[id2], desce[id2], pathh[id2], paaath[id2]);



            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                titlee[id2] = frm.titlee;
                desce[id2]  = frm.description;
                pathh[id2]  = frm.piccpath2;
                paaath[id2] = frm.piccpath1;
                try
                {
                    ((Button)sender).BackgroundImage = Image.FromFile(frm.piccpath1);
                }
                catch (Exception ex)
                {
                }
            }
        }