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