/// <summary>
 /// Called when [auction queued].
 /// </summary>
 /// <param name="monitor">The monitor.</param>
 /// <param name="line">The line.</param>
 protected virtual void OnAuctionQueued(AuctionMonitor monitor, string line)
 {
     var evtArgs = new AuctionReadEventArgs(line)
     {
         CharacterName = monitor.CharacterName,
         FileName = monitor.File.Name
     };
     AuctionRead?.Invoke(this, evtArgs);
 }
 /// <summary>
 ///     Called when a batch of auction lines is ready for transmittal
 /// </summary>
 /// <param name="line">The line.</param>
 protected virtual void OnAuctionRead(string line)
 {
     var e = new AuctionReadEventArgs(line)
     {
         CharacterName = _characterName,
         FileName = _fi.Name
     };
     AuctionRead?.Invoke(this, e);
 }
Beispiel #3
0
        /// <summary>
        /// Called when [auction queued].
        /// </summary>
        /// <param name="monitor">The monitor.</param>
        /// <param name="line">The line.</param>
        protected virtual void OnAuctionQueued(AuctionMonitor monitor, string line)
        {
            var evtArgs = new AuctionReadEventArgs(line)
            {
                CharacterName = monitor.CharacterName,
                FileName      = monitor.File.Name
            };

            AuctionRead?.Invoke(this, evtArgs);
        }
Beispiel #4
0
        /// <summary>
        /// Fired when an auction is read
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="P99Auctions.Client.Watchers.AuctionReadEventArgs" /> instance containing the event data.</param>
        private void Monitor_AuctionQueued(object sender, AuctionReadEventArgs e)
        {
            var monitor = sender as AuctionMonitor;

            if (monitor != null)
            {
                //_clientLogger.WriteLine("[{1}] Transmitting {0} Lines", e.Batch.Lines.Count(), monitor.File.Name);
                this.OnAuctionQueued(monitor, e.Line);
            }
        }
 /// <summary>
 /// Fired when an auction is read
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="P99Auctions.Client.Watchers.AuctionReadEventArgs" /> instance containing the event data.</param>
 private void Monitor_AuctionQueued(object sender, AuctionReadEventArgs e)
 {
     var monitor = sender as AuctionMonitor;
     if (monitor != null)
     {
         //_clientLogger.WriteLine("[{1}] Transmitting {0} Lines", e.Batch.Lines.Count(), monitor.File.Name);
         this.OnAuctionQueued(monitor, e.Line);
     }
 }
        /// <summary>
        /// Event fired by the auction watcher when an auction is read from the log file
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="P99Auctions.Client.Watchers.AuctionReadEventArgs" /> instance containing the event data.</param>
        private void LogWatcher_AuctionRead(object sender, AuctionReadEventArgs e)
        {
            _logger.Debug($"Auction Queuing: [{e.CharacterName}] {e.Line}");
            _clientSettings.AddAuctionCounter();

            //update hte global counts and queue a message for UI status pieces to be updated
            _trackerWindowModel.UpdateAuctionCounts(_clientSettings.TodayAuctionCount, _clientSettings.LifetimeAuctionCount);
            _uiMessageQueue.QueueItem("Enqueuing Auction", 300, activityState: ActivityState.AuctionFound);
            _uiMessageQueue.QueueItem(MessageScanningForAuctions, activityState: ActivityState.Idle);

            //send the line
            if(_dataDispatcher.IsEnabled)
                _dataDispatcher.SendAuctionLine(e.Line);
        }