Пример #1
0
 public void Init(PluginInitContext context)
 {
     this.context = context;
     InitialDriverList();
     if (_settings.FolderLinks == null)
     {
         _settings.FolderLinks = new List <FolderLink>();
         _settings.Save();
     }
 }
Пример #2
0
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            var selectedFolder = lbxFolders.SelectedItem as FolderLink;

            if (selectedFolder != null)
            {
                string msg = string.Format(woxAPI.GetTranslation("wox_plugin_folder_delete_folder_link"), selectedFolder.Path);

                if (MessageBox.Show(msg, string.Empty, MessageBoxButton.YesNo) == MessageBoxResult.Yes)
                {
                    _settings.FolderLinks.Remove(selectedFolder);
                    lbxFolders.Items.Refresh();
                    _settings.Save();
                }
            }
            else
            {
                string warning = woxAPI.GetTranslation("wox_plugin_folder_select_folder_link_warning");
                MessageBox.Show(warning);
            }
        }