Exemplo n.º 1
0
        public void Initialize(Button cancelButton, Button nextButton, Button backButton)
        {
            _cancelButton = cancelButton;
            _nextButton = nextButton;
            _backButton = backButton;

            _pluginsManager = new PluginsManager();
            _pluginsManager.LoadPlugins();

            cmbDrivers.Items.Add("Unsupported");
            foreach (var loadedPlugin in _pluginsManager.LoadedPlugins)
            {
                cmbDrivers.Items.Add(loadedPlugin.Name);
            }

            foreach (var printer in NewSettings.Printers)
            {
                SetPrinterDriver(printer);
                var item = new ListViewItem(printer.Caption);
                item.SubItems.Add("40");
                printer.Level = 40;
                item.SubItems.Add(printer.Plugin);
                item.Tag = printer;
                lvPrinters.Items.Add(item);
            }


        }
Exemplo n.º 2
0
        public MainWorker()
        {
            try
            {
                _pluginsManager = new PluginsManager();
                _pluginsManager.LoadPlugins();


                _setting = Settings.LoadFromFile(Global.SettingsFileName);

            }
            catch (Exception e)
            {
                Global.Logger.Fatal(e.Message);
            }
        }