Пример #1
0
        private void parseActions(string p)
        {
            string[] strArrayActions = p.Trim().Split(new string[] { ">>", "<<" }, StringSplitOptions.RemoveEmptyEntries);

            for (int i = 0; i < strArrayActions.Length; i++)
            {
                if (strArrayActions[i].Trim() != "")
                {
                    string sActionToParse = strArrayActions[i];

                    dmAction tmpAction = new dmAction(sActionToParse);

                    Actions.Add(tmpAction);
                }
            }
        }
Пример #2
0
        private void parseActions(string p, Version version)
        {
            string[] strArrayRules = p.Trim().Split(new string[] { ">> ", ">>", " <<", "<<" }, StringSplitOptions.RemoveEmptyEntries);


            for (int i = 0; i < strArrayRules.Length; i++)
            {
                if (strArrayRules[i].Trim() != "")
                {
                    string sRuleToParse = strArrayRules[i];

                    dmAction tmpRule = new dmAction(sRuleToParse, version);

                    Actions.Add(tmpRule);
                }
            }
        }
Пример #3
0
        public void Parse(string strTemplate, ParameterType dmParameterType)
        {
            string[] tmpParameters = strTemplate.Split(new string[] { ">>,<<", "<<", ">>" }, StringSplitOptions.RemoveEmptyEntries);
            for (int i = 0; i < tmpParameters.Length; i++)
            {
                DataManagerGUI.dmParameters tmpParameterItem = null;
                switch (dmParameterType)
                {
                case ParameterType.Rule:
                    tmpParameterItem = new dmRule(tmpParameters[i]);
                    break;

                case ParameterType.Action:
                    tmpParameterItem = new dmAction(tmpParameters[i]);
                    break;
                }

                this.Items.Add(tmpParameterItem);
            }
        }
Пример #4
0
 public bool Equals(dmAction other)
 {
     return(this.GetHashCode() == other.GetHashCode());
 }
Пример #5
0
 public void AddAction(dmAction action)
 {
     Actions.Add(action);
 }