Exemple #1
0
        protected override void Init()
        {
            base.Init();

            PatternSet.Add(33, Pattern.Parse("0 1 0 1 0 1"));

            Parity.Clear();
            Parity.Add(new bool[] { true, true, true, false, false, false });
            Parity.Add(new bool[] { true, true, false, true, false, false });
            Parity.Add(new bool[] { true, true, false, false, true, false });
            Parity.Add(new bool[] { true, true, false, false, false, true });
            Parity.Add(new bool[] { true, false, true, true, false, false });
            Parity.Add(new bool[] { true, false, false, true, true, false });
            Parity.Add(new bool[] { true, false, false, false, true, true });
            Parity.Add(new bool[] { true, false, true, false, true, false });
            Parity.Add(new bool[] { true, false, true, false, false, true });
            Parity.Add(new bool[] { true, false, false, true, false, true });

            AllowedCharsPattern = new Regex("^([01]\\d{6,7}|\\d{11,12})$");
        }
Exemple #2
0
        protected override void Init()
        {
            base.Init();

            DefaultSettings.TextPadding = 2;

            PatternSet.Add(33, Pattern.Parse("nb nw nb nb"));
            PatternSet.Add(34, Pattern.Parse("nw nb"));

            Parity.Clear();
            Parity.Add(new bool[] { true, true, false, false, false });
            Parity.Add(new bool[] { true, false, true, false, false });
            Parity.Add(new bool[] { true, false, false, true, false });
            Parity.Add(new bool[] { true, false, false, false, true });
            Parity.Add(new bool[] { false, true, true, false, false });
            Parity.Add(new bool[] { false, false, true, true, false });
            Parity.Add(new bool[] { false, false, false, true, true });
            Parity.Add(new bool[] { false, true, false, true, false });
            Parity.Add(new bool[] { false, true, false, false, true });
            Parity.Add(new bool[] { false, false, true, false, true });

            AllowedCharsPattern = new System.Text.RegularExpressions.Regex("^\\d{5}$");
        }