示例#1
0
 public void Initialize(IPluginHost host)
 {
     _host            = host;
     Model            = new NiblPackListModel();
     _searchService   = new NiblSearchService(Model);
     _packQueueClient = new PackQueueClient(host);
     host.HookCommand("nibl", NIBLOpenSearch);
     host.HookCommand("niblhelp", NIBLHelpCommand);
     host.HookIdentifier("niblretrydownload", NIBLRetryDownload);
     host.HookIdentifier("niblisqueued", NIBLIsQueued);
     host.HookIdentifier("niblgetsuccess", NIBLGetSuccess);
     host.HookCommand("cancelget", NIBLCancelGet);
 }
        public NiblSearchWindow(IPluginHost host, NiblSearchService niblService, NiblPackListModel model, PackQueueClient packQueueClient, bool trustBots, bool retryDownload, string searchTerms)
        {
            _searchService   = niblService;
            Model            = model;
            _host            = host;
            _packQueueClient = packQueueClient;
            initialSearch    = searchTerms;

            InitializeComponent();
            dataGrid.ItemsSource        = Model.SimpleCollection;
            botListComboBox.ItemsSource = Model.BotCollection;
            _searchService = new NiblSearchService(Model);
            if (trustBots)
            {
                trustBotsCheckBox.IsChecked = true;
            }
            if (retryDownload)
            {
                retryDLCheckBox.IsChecked = true;
            }
        }