Пример #1
0
        static void Main(string[] args)
        {
            var yuv        = new YuvModel();
            var helpers    = new Helpers(yuv);
            var filter     = new Filter(yuv, helpers);
            var config     = new ConfigurationMethods(Console.ReadLine, Console.Write, yuv, helpers);
            var controller = new CustomController(Console.ReadLine, Console.Write, config);


            ConfigStartup(args, filter);


            while (true)
            {
                Console.Clear();

                GetAssemblyInfo();

                if (keepInstancesAlive is "no")
                {
                    LoadNewFile(filter);

                    GetAssemblyInfo();
                }

                controller.Build()
                .ApplyFilter(value)
                .Out();

                GetNextAction();
            }
        }
 public ConfigurationMethods(Func <string> inputProvider, Action <string> outputProvider, YuvModel yuv, Helpers helpers)
 {
     _inputProvider  = inputProvider;
     _outputProvider = outputProvider;
     _yuv            = yuv;
     _helpers        = helpers;
 }
Пример #3
0
        public Filter(YuvModel yuv, Helpers helpers)
        {
            _yuv     = yuv;
            _helpers = helpers;

            _filters = new Dictionary <string, Action>()
            {
                { "Median", () => { if (ApplyMedianFilter().IsCompletedSuccessfully)
                                    {
                                        Console.Write("Task successfully completed.\n");
                                    }
                  } },

                { "Average", () => { if (ApplyAverageFilter().IsCompletedSuccessfully)
                                     {
                                         Console.Write("Task successfully completed.\n");
                                     }
                  } },

                { "Laplacian", () => { if (ApplyLaplacianFilter().IsCompletedSuccessfully)
                                       {
                                           Console.Write("Task successfully completed.\n");
                                       }
                  } }
            };
        }
Пример #4
0
 public Helpers(YuvModel yuv)
 {
     _yuv = yuv;
 }