public override bool ApplyDataToRuleSet()
        {
            bool valid = true;

            InitializeCommonRule();
            try
            {
                BuildRules.Buildrule((CollectionRule)Properties.Result, collectionTypes.SelectedItem.ToString(), valueRule, keyRule, Assemblyname, AssemblyPath);
            }
            catch (Exception e)
            {
                valid = ErrorMessage(e);
            }
            return(valid);
        }
        public override bool ApplyDataToRuleSet()
        {
            bool valid = true;

            InitializeCommonRule();
            try
            {
                BuildRules.Buildrule((NumberRule)Properties.Result, txtStart.Text, txtEnd.Text, txtNumIncrement.Text);
            }
            catch (Exception e)
            {
                valid = ErrorMessage(e);
            }
            return(valid);
        }
        public override bool ApplyDataToRuleSet()
        {
            bool valid = true;

            InitializeCommonRule();
            try
            {
                BuildRules.Buildrule((BoolRule)Properties.Result, rbTrue.Checked, rbFalse.Checked);
            }
            catch (Exception e)
            {
                valid = ErrorMessage(e);
            }
            return(valid);
        }
Ejemplo n.º 4
0
        public override bool ApplyDataToRuleSet()
        {
            bool valid = true;

            Properties.GeneralType = Enums.FieldTypes.Enumerator;
            InitializeCommonRule();
            try
            {
                BuildRules.Buildrule((EnumeratorRule)Properties.Result, rbRandom.Checked, enumeratorList.SelectedItem.ToString(), lblAssemblyName.Text);
            }
            catch (Exception e)
            {
                valid = ErrorMessage(e);
            }
            return(valid);
        }
Ejemplo n.º 5
0
        public override bool ApplyDataToRuleSet()
        {
            bool valid = true;

            Properties.GeneralType = Enums.FieldTypes.MappedSource;
            InitializeCommonRule();
            try
            {
                BuildRules.Buildrule((MappedSourceRule)Properties.Result, currentMappedSource);
            }
            catch (Exception e)
            {
                valid = ErrorMessage(e);
            }
            return(valid);
        }
        public override bool ApplyDataToRuleSet()
        {
            bool valid = true;

            InitializeCommonRule();
            try
            {
                string[] entries = new string[lstEntries.Items.Count];
                lstEntries.Items.CopyTo(entries, 0);
                BuildRules.Buildrule((StringRule)Properties.Result, rbRandomPosition.Checked, txtStringLength.Text, entries);
            }
            catch (Exception e)
            {
                valid = ErrorMessage(e);
            }
            return(valid);
        }
        public override bool ApplyDataToRuleSet()
        {
            bool valid = true;

            Properties.GeneralType = FieldTypes.MultiColumn;
            InitializeCommonRule();
            try
            {
                BuildRules.Buildrule((MultiFieldDataSourceRule)Properties.Result, SourceType, int.Parse(txtMaxRecords.Text), selectionCtrl.SearchFields, selectionCtrl.DataFields, ListCtrlType.Grid);
            }
            catch (Exception e)
            {
                valid = ErrorMessage(e);
            }

            return(valid);
        }
        public override bool ApplyDataToRuleSet()
        {
            bool valid = true;

            Properties.Random      = rangeCtrl.Random;
            Properties.GeneralType = FieldTypes.SingleColumn;
            InitializeCommonRule();
            try
            {
                BuildRules.Buildrule((SingleFieldDataSourceRule)Properties.Result, SourceType, int.Parse(txtMaxRecords.Text), rangeCtrl.Start, rangeCtrl.End, regularExpressionCtrl.RegularExpression);
            }
            catch (Exception e)
            {
                valid = ErrorMessage(e);
            }

            return(valid);
        }
Ejemplo n.º 9
0
        public override bool ApplyDataToRuleSet()
        {
            bool valid = true;

            InitializeCommonRule();
            try
            {
                List <IDataRule> rules = new List <IDataRule>();
                foreach (ListViewItem aItem in lstTupleSet.Items)
                {
                    rules.Add((IDataRule)aItem.Tag);
                }
                BuildRules.Buildrule((TupleRule)Properties.Result, rules);
            }
            catch (Exception e)
            {
                valid = ErrorMessage(e);
            }
            return(valid);
        }
        public override bool ApplyDataToRuleSet()
        {
            bool valid = true;

            InitializeCommonRule();
            try
            {
                switch (Properties.GeneralType)
                {
                case FieldTypes.Date:
                    BuildRules.Buildrule((DateRule)Properties.Result, startDatePicker.Value, endDatePicker.Value, txtTimeDateIncrement.Text, BoxUtl.CboBoxItem(cboRate));
                    break;

                case FieldTypes.Time:
                    BuildRules.Buildrule((TimeRule)Properties.Result, startDatePicker.Value, endDatePicker.Value, txtTimeDateIncrement.Text, BoxUtl.CboBoxItem(cboRate));
                    break;
                }
            }
            catch (Exception e)
            {
                valid = ErrorMessage(e);
            }
            return(valid);
        }