Пример #1
0
        private void but_Add_Click(object sender, EventArgs e)
        {
            EditVaribute.name = "";
            EditVaribute.URL  = "";
            frm_Edit frm_Edit = new frm_Edit();

            frm_Edit.Text = "添加网页";
            frm_Edit.ShowDialog();
            websites.Add(new Website(EditVaribute.name, EditVaribute.URL));
            ReFresh();
        }
Пример #2
0
        private void but_Edit_Click(object sender, EventArgs e)
        {
            Website tem = websites.GetArray()[lst_Main.SelectedIndex];

            EditVaribute.name = tem.Name;
            EditVaribute.URL  = tem.URL;
            frm_Edit frm_Edit = new frm_Edit();

            frm_Edit.Text = "编辑网页";
            frm_Edit.ShowDialog();
            tem.Name = EditVaribute.name;
            tem.URL  = EditVaribute.URL;
            ReFresh();
        }