コード例 #1
0
        private void ShredThreadProc(object stateInfo)
        {
            _logger                 = new Logger();
            _intervalTimer          = new System.Timers.Timer(1000);
            _intervalTimer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
            _intervalTimer.Start();

            var sc = (ShredCommand)stateInfo;

            _shredEngine = new ShredEngine();
            _shredResult = _shredEngine.Shred(_redditUser, sc);

            Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action <bool>(UpdateUIThreadWithShredResult), _shredResult);
            _intervalTimer.Stop();
        }
コード例 #2
0
        private void ShredThreadProc(object stateInfo)
        {
            _intervalTimer = new System.Timers.Timer(10000);
            _intervalTimer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
            _intervalTimer.Start();

            var sc = (ShredCommand)stateInfo;
            _shredEngine = new ShredEngine();
            _shredResult = _shredEngine.Shred(_redditUser, sc);

            Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action<bool>(UpdateUIThreadWithShredResult), _shredResult);
            _intervalTimer.Stop();
        }