public void ChangeSource(int index) { _log.Info("Twain: change source"); TwainDotNetSource source; if (_sources.Count == 0) RefreshSources(); try { source = _sources[index]; } catch (Exception) { throw new Exception(string.Format("Source with index {0} not found", index)); } _currentSource = source; _log.Info("Twain: change source success"); }
public void ChangeSource(int index) { _log.Info("Twain: change source"); TwainDotNetSource source; if (_sources.Count == 0) { RefreshSources(); } try { source = _sources[index]; } catch (Exception) { throw new Exception(string.Format("Source with index {0} not found", index)); } _currentSource = source; _log.Info("Twain: change source success"); }