Exemplo n.º 1
0
        public Dictionary <string, object> ComposeArgumentList()
        {
            Dictionary <string, object> arguments = new Dictionary <string, object>();

            foreach (Control ctrl in flowLayoutPanelArgument.Controls)
            {
                if (ctrl is ArgumentControl)
                {
                    ArgumentControl        argCtrl = ctrl as ArgumentControl;
                    StringFunctionArgument sfArg   = new StringFunctionArgument(argCtrl.ArgumentKey);
                    sfArg.Value = argCtrl.Value;
                    arguments.Add(sfArg.Name, sfArg);
                }
            }

            return(arguments);
        }
Exemplo n.º 2
0
        private void RenderArgumentBox(Dictionary <string, object> args)
        {
            Clear();

            if (args != null)
            {
                foreach (string key in args.Keys)
                {
                    StringFunctionArgument sfArg = args[key] as StringFunctionArgument;
                    if (sfArg != null)
                    {
                        ArgumentControl argCtrl = new ArgumentControl();
                        argCtrl.ArgumentKey = sfArg.Name;
                        argCtrl.LabelText   = sfArg.Name;
                        argCtrl.Value       = sfArg.DefaultValue.ToString();
                        argCtrl.Visible     = true;

                        flowLayoutPanelArgument.Controls.Add(argCtrl);
                    }
                }
            }
        }