예제 #1
0
        void StrArrFieldEnter(object sender, EventArgs e)
        {
            var formControl = (Control)sender;

            var dataField = (StrArr)scripts.GetType().GetField(formControl.Name).GetValue(scripts);

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

            var form = new ListBoxForm(dataField.Values);

            form.ShowDialog();

            formControl.Text = dataField.ToString().Trim(new [] { '"' });
            scripts.GetType().GetField(formControl.Name).SetValue(scripts, dataField);

            ((Control)sender).Parent.SelectNextControl(ActiveControl, true, true, true, true);
        }
예제 #2
0
        void ArchiveEnter(object sender, EventArgs e)
        {
            var formControl = (Control)sender;

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

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


            var form = new ListBoxForm(dataField.exclude);

            form.ShowDialog();

            formControl.Text = (new StrArr(dataField.exclude)).ToString().Trim(new [] { '"' });
            data.GetType().GetField(formControl.Name).SetValue(data, dataField);

            UpdateJson();

            ((Control)sender).Parent.SelectNextControl(ActiveControl, true, true, true, true);
        }