public void ChangeSource(int index) { _log.Info("Wia: change source"); WiaSource source; if (_sources.Count == 0) RefreshSources(); try { source = _sources.Find(s=>s.Index == index); } catch (Exception) { throw new Exception(string.Format("Source with index {0} not found", index)); } _currentSource = source; _log.Info("Wia: change source success"); }
public void ChangeSource(int index) { _log.Info("Wia: change source"); WiaSource source; if (_sources.Count == 0) { RefreshSources(); } try { source = _sources.Find(s => s.Index == index); } catch (Exception) { throw new Exception(string.Format("Source with index {0} not found", index)); } _currentSource = source; _log.Info("Wia: change source success"); }