Exemplo n.º 1
0
        void AutoloadEnter(object sender, EventArgs e)
        {
            var formControl = (Control)sender;

            var dataField = (Autoload)data.GetType().GetField(formControl.Name).GetValue(data);

            if (dataField == null)
            {
                dataField = new Autoload();
            }

            var form = new AutoloadForm(dataField);

            form.ShowDialog();

            formControl.Text = "";

            if (dataField.psr_4.Keys.Count > 0)
            {
                formControl.Text += ", PSR-4";
            }

            if (dataField.psr_0.Keys.Count > 0)
            {
                formControl.Text += ", PSR-0";
            }

            if (dataField.classmap.Count > 0)
            {
                formControl.Text += ", Classmap";
            }

            if (dataField.files.Count > 0)
            {
                formControl.Text += ", Files";
            }

            if (dataField.exclude_from_classmap.Count > 0)
            {
                formControl.Text += ", Excluded from classmap";
            }

            if (formControl.Text.Length > 0)
            {
                formControl.Text = formControl.Text.Substring(2);
            }

            data.GetType().GetField(formControl.Name).SetValue(data, dataField);

            UpdateJson();

            formControl.Parent.SelectNextControl(ActiveControl, true, true, true, true);
        }
Exemplo n.º 2
0
 public AutoloadForm(Autoload autoload)
     : this()
 {
     this.autoload = autoload;
 }