/// <summary>
        /// Clones the object and sets values to the parameter set
        /// </summary>
        /// <param name="paramNames">The parameter names.</param>
        /// <param name="paramValues">The parameter values.</param>
        /// <returns></returns>
        public aceOperationArgs CloneFor(List <String> paramNames, List <String> paramValues)
        {
            aceOperationArgs output = this.Clone() as aceOperationArgs;

            output.paramSet.setValues(paramNames, paramValues);

            return(output);
        }
Exemple #2
0
        public void processArgs(string[] args)
        {
            aceOperationArgs opArgs = null;

            List <aceOperationArgs> operations = new List <aceOperationArgs>();


            foreach (String str in args)
            {
                if (str.StartsWith("-"))
                {
                    if (opArgs != null)
                    {
                        operations.Add(opArgs);
                        opArgs = null;
                    }

                    String itemKey = str.removeStartsWith("-");

                    var itm = getItem(itemKey, -1, true);

                    opArgs = itm.metaObject as aceOperationArgs;
                }

                if (opArgs != null)
                {
                    if (opArgs.item == selected)
                    {
                    }
                    //opArgs = selected.metaObject as aceOperationArgs;

                    if (!str.StartsWith("-"))
                    {
                        opArgs.paramSet.addFromString(str);
                    }
                }
            }


            foreach (var op in operations)
            {
                op.method.Invoke(op.executor, new Object[] { op });
            }
        }
        public object Clone()
        {
            aceOperationArgs output = new aceOperationArgs(executor, menu, item, method, component);

            return(output);
        }