示例#1
0
        /// <summary>
        /// Prepares the MagicResultItems and displays it on the search window
        /// </summary>
        /// <param name="output"></param>
        public override void Run(string[] output)
        {
            var outputResults = new List <MagicResultItem>();

            foreach (string text in output)
            {
                string[] splits = text.Split(HORIZONTALSPLIT);
                outputResults.Add(new MagicResultItem()
                {
                    Icon              = GetIcon(IconFormat.InsertArguments(splits)),
                    Title             = FormatString.InsertArguments(splits),
                    Subtitle          = SubtitleFormat.InsertArguments(splits),
                    WorkflowComponent = this,
                    WorkflowArguments = splits
                });
            }
            if (outputResults.Count > 0)
            {
                MyWindows.MainWindow.GetInstance().searchResultControl.WorkflowOutput(outputResults);
            }
        }