public GetFromScanner() { this.Build (); try { logger.Debug("init scan"); scan = new ScanWorks(); scan.Pulse += OnScanerPulse; scan.ImageTransfer += OnScanerImageTransfer; foreach(string scannerName in scan.GetScannerList ()) { comboScanner.AppendText (scannerName); } if(scan.ScannerCount > 0) comboScanner.Active = 0; } catch (Exception ex) { logger.Error (ex, "Не удалось инициализировать библиотеку Saraff.Twain."); QSProjectsLib.QSMain.ErrorMessage (this, ex); Respond (Gtk.ResponseType.Reject); } TestCanSave (); }