コード例 #1
0
		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");
		}
コード例 #2
0
        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");
        }