Esempio n. 1
0
 private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show(this, "Are you sure you want to delete \n " + listBox1.SelectedItem, "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         FileGroups.current.Groups[g_name].Remove((string)listBox1.SelectedItem);
         Program.SaveGroups(FileGroups.current);
         MyApplicationContext.InitializeDirectoryMonitors();
         UpdateListBox();
     }
 }
Esempio n. 2
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            inputDialogBrowse dia = new inputDialogBrowse();

            dia.ShowDialog();
            if (dia.Applied)
            {
                FileGroups.current.Groups[g_name].Add(dia.InputText);
                Program.SaveGroups(FileGroups.current);
                MyApplicationContext.InitializeDirectoryMonitors();
                UpdateListBox();
            }
        }