Example #1
0
        public IView GetView(string view, string keyword)
        {
            IView      result;
            ViewResult viewResult = ViewResultBuilder.BuildResult(dataset, view, keyword);

            switch (viewResult.Name)
            {
            case "unassigned":
                result = new View(viewResult.Result)
                {
                    Foreground = ConsoleColor.DarkRed, Background = ConsoleColor.Black
                };
                break;

            case "assigned-ready":
                result = new View(viewResult.Result)
                {
                    Foreground = ConsoleColor.DarkYellow, Background = ConsoleColor.Black
                };
                break;

            case "complete":
                result = new View(viewResult.Result)
                {
                    Foreground = ConsoleColor.Green, Background = ConsoleColor.Black
                };
                break;

            case "priority-1-unassigned":
                result = new View(viewResult.Result)
                {
                    Foreground = ConsoleColor.Red, Background = ConsoleColor.Black
                };
                break;

            case "priority-2-unassigned":
                result = new View(viewResult.Result)
                {
                    Foreground = ConsoleColor.Red, Background = ConsoleColor.Black
                };
                break;

            default:
                throw new InvalidOperationException($"View {view} specified is not supported");
            }

            return(result);
        }
Example #2
0
 private void ShowSelectedView()
 {
     viewModel.SetViewResult(ViewResultBuilder.BuildResult(currentDataSet, viewModel.CurrentViewType, context.Keyword));
 }