Esempio n. 1
0
        private void UpdateOutputControllerProperties(IOutputController OutputController)
        {
            DataTable DT = new DataTable();

            DT.Columns.Add("Property", typeof(string));
            DT.Columns.Add("Value", typeof(string));
            if (OutputController != null)
            {
                DT.Rows.Add("Name", OutputController.Name);
                DT.Rows.Add("Output Count", OutputController.Outputs.Count);

                Type T = OutputController.GetType();

                foreach (PropertyInfo PI in T.GetProperties(BindingFlags.Instance | BindingFlags.Public))
                {
                    if (PI.Name != "Name" && PI.Name != "Outputs")
                    {
                        DT.Rows.Add(PI.Name, PI.GetValue(OutputController, new object[] { }).ToString());
                    }
                }
            }
            CabinetOutputControllerProperties.ClearSelection();
            CabinetOutputControllerProperties.Columns.Clear();
            CabinetOutputControllerProperties.AutoGenerateColumns = true;

            CabinetOutputControllerProperties.DataSource = DT;
            CabinetOutputControllerProperties.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
            CabinetOutputControllerProperties.Refresh();
        }
        public DefaultPipeline(IOutputController controller, IContext context)
        {
            _context     = (PipelineContext)context;
            _controller  = controller;
            Transformers = new List <ITransform>();
            MapReaders   = new List <IMapReader>();

            _context.Debug(() => $"Registering {GetType().Name}.");
            _context.Debug(() => $"Registering {_controller.GetType().Name}.");
        }
Esempio n. 3
0
        private void UpdateOutputControllerProperties(IOutputController OutputController)
        {
            DataTable DT = new DataTable();
            DT.Columns.Add("Property", typeof(string));
            DT.Columns.Add("Value", typeof(string));
            if (OutputController != null)
            {
                DT.Rows.Add("Name", OutputController.Name);
                DT.Rows.Add("Output Count", OutputController.Outputs.Count);

                Type T = OutputController.GetType();

                foreach (PropertyInfo PI in T.GetProperties(BindingFlags.Instance | BindingFlags.Public))
                {
                    if (PI.Name != "Name" && PI.Name != "Outputs")
                    {
                        DT.Rows.Add(PI.Name, PI.GetValue(OutputController, new object[] { }).ToString());
                    }
                }
            }
            CabinetOutputControllerProperties.ClearSelection();
            CabinetOutputControllerProperties.Columns.Clear();
            CabinetOutputControllerProperties.AutoGenerateColumns = true;

            CabinetOutputControllerProperties.DataSource = DT;
            CabinetOutputControllerProperties.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
            CabinetOutputControllerProperties.Refresh();

        }