Ejemplo n.º 1
0
 public static void Update(this EnumerableDictionary <IControl> dictionary, InputHandler input, GameTime gameTime, Viewport?viewport)
 {
     foreach (var item in dictionary)
     {
         item.Update(input, gameTime, viewport);
     }
 }
        public void OnDocumentsIndexed(IEnumerable <Document> documents, Analyzer searchAnalyzer)
        {
            var indexingPerformanceStats = new IndexingPerformanceStats {
                Operation = _operationText, Started = SystemTime.UtcNow
            };

            _indexInstance.AddIndexingPerformanceStats(indexingPerformanceStats);

            var sp = Stopwatch.StartNew();
            var enumerableDictionary = new EnumerableDictionary(documents, field, searchAnalyzer);

            spellChecker.IndexDictionary(enumerableDictionary, workContext.CancellationToken);

            indexingPerformanceStats.Duration    = sp.Elapsed;
            indexingPerformanceStats.InputCount  = enumerableDictionary.NumberOfDocuments;
            indexingPerformanceStats.ItemsCount  = enumerableDictionary.NumberOfTokens;
            indexingPerformanceStats.OutputCount = enumerableDictionary.NumberOfFields;
        }
		public void OnDocumentsIndexed(IEnumerable<Document> documents, Analyzer searchAnalyzer)
		{
			var indexingPerformanceStats = new IndexingPerformanceStats {Operation = _operationText, Started = SystemTime.UtcNow};
			_indexInstance.AddindexingPerformanceStat(indexingPerformanceStats);
			
			var sp = Stopwatch.StartNew();
			var enumerableDictionary = new EnumerableDictionary(documents, field, searchAnalyzer);
			spellChecker.IndexDictionary(enumerableDictionary, workContext.CancellationToken);
			
			indexingPerformanceStats.Duration = sp.Elapsed;
			indexingPerformanceStats.InputCount = enumerableDictionary.NumberOfDocuments;
			indexingPerformanceStats.ItemsCount = enumerableDictionary.NumberOfTokens;
			indexingPerformanceStats.OutputCount = enumerableDictionary.NumberOfFields;
		}
Ejemplo n.º 4
0
        private static void DrawActionButtons(SpriteBatch spriteBatch, EnumerableList <string> actions, EnumerableDictionary <IControl> actionButtons)
        {
            var selectedStackViewActions = actions;

            foreach (var actionButton in actionButtons)
            {
                actionButton.Enabled = selectedStackViewActions.Contains(actionButton.Name);
                actionButton.Draw(spriteBatch);
            }
        }
Ejemplo n.º 5
0
        private static void DrawUnits(SpriteBatch spriteBatch, StackViews stackViews, StackView.StackView selectedStackView, PointI frmUnitsTopLeft, PointI frmUnitsBottomRight, EnumerableDictionary <IControl> actionButtons)
        {
            if (selectedStackView == null)
            {
                return;
            }

            var topLeftPosition = frmUnitsTopLeft.ToVector2() + new Vector2(10.0f, 10.0f);

            DrawUnitBadges(spriteBatch, stackViews, selectedStackView, topLeftPosition);
            DrawMovementTypeImages(spriteBatch, frmUnitsBottomRight, selectedStackView.GetMovementTypeImages());
            DrawActionButtons(spriteBatch, selectedStackView.Actions, actionButtons);
        }