private void CancelCondition(object sender, RoutedEventArgs e)
        {
            _condition      = new Modules.WalkerModule.Condition();
            _conditionsList = new List <Modules.WalkerModule.Condition>();

            refreshCondition();
            ConditionGrid.Visibility = Visibility.Hidden;
        }
 private void CreateCondition(object sender, RoutedEventArgs e)
 {
     ConditionGrid.Visibility = Visibility.Visible;
     _conditionsList          = new List <Modules.WalkerModule.Condition>();
     _condition                     = new Modules.WalkerModule.Condition();
     ConditionText.Text             = "";
     ConditionFulfilledTextBox.Text = "";
 }
 private void setItem(string item, object value = null)
 {
     if (_condition.connector != _NotSet || _conditionsList.Count == 0)
     {
         if (value != null)
         {
             _condition.args.Add(value);
         }
         if (_condition.item1 == _NotSet)
         {
             _condition.item1 = StatementType.conditionElement[item];
         }
         else if (_condition.comparator != _NotSet)
         {
             _condition.item2 = StatementType.conditionElement[item];
             _conditionsList.Add(_condition);
             _condition = new Modules.WalkerModule.Condition();
         }
         refreshCondition();
     }
 }
        private string setText(Modules.WalkerModule.Condition cond, string text = "")
        {
            int argsNumber = 0;

            if (cond.connector != _NotSet)
            {
                text += StatementType.getConditionElementName(cond.connector) + "\n";
            }
            if (cond.item1 == StatementType.conditionElement["Value"])
            {
                text += cond.args[argsNumber++];
            }
            else if (cond.item1 == StatementType.conditionElement["Item count"])
            {
                text += cond.args[argsNumber++] + " count";
            }
            else
            {
                text += StatementType.getConditionElementName(cond.item1);
            }

            text += " " + StatementType.getConditionElementName(cond.comparator) + " ";

            if (cond.item2 == StatementType.conditionElement["Value"])
            {
                text += cond.args[argsNumber++];
            }
            else if (cond.item2 == StatementType.conditionElement["Item count"])
            {
                text += cond.args[argsNumber++] + " count";
            }
            else
            {
                text += StatementType.getConditionElementName(cond.item2);
            }

            return(text);
        }