コード例 #1
0
        private void btnAddRule_Click(object sender, EventArgs e)
        {
            Watcher          newWatcher = new Watcher(Application.StartupPath, Path.Combine(Application.StartupPath, "Moved by Ejik"), "*.jpg|*.jpeg|*.gif|*.png|*.bmp");
            ComboWatcherItem newItem    = new ComboWatcherItem(newWatcher.WatchPath, newWatcher);

            comboRules.Items.Add(newItem);
            comboRules.SelectedItem = newItem;
        }
コード例 #2
0
 private void FillRules()
 {
     comboRules.Items.Clear();
     foreach (Watcher watcher in Watcher.AllOfThem)
     {
         ComboWatcherItem tmpItem = new ComboWatcherItem(watcher.WatchPath, watcher);
         comboRules.Items.Add(tmpItem);
     }
 }