Esempio n. 1
0
 protected virtual void OnPatternChanged(bool[] pattern)
 {
     PatternChanged?.Invoke(this, new PatternEventArgs()
     {
         Pattern = pattern
     });
 }
Esempio n. 2
0
        private void AddRows()
        {
            table.RowCount = codeText.Rows.Length;

            for (int i = 0; i < CodeText.Rows.Length; i++)
            {
                table.RowStyles.Add(new RowStyle(SizeType.AutoSize));

                var patternRow = new PatternRow(codeText.Rows[i])
                {
                    Anchor = AnchorStyles.Left
                };
                var textLabel = new Label()
                {
                    Anchor   = AnchorStyles.Left,
                    AutoSize = true,
                    Font     = CodeFont,
                    Text     = codeText.Rows[i].Text
                };

                patternRow.PatternChanged += (o, e) => PatternChanged?.Invoke(this, EventArgs.Empty);

                table.Controls.Add(patternRow, 0, i);
                table.Controls.Add(textLabel, 1, i);
            }
        }
Esempio n. 3
0
 public CodeText(CodeRow[] rows)
 {
     Rows = rows;
     foreach (var r in rows)
     {
         r.PatternChanged += (o, e) => PatternChanged?.Invoke(this, EventArgs.Empty);
     }
 }
Esempio n. 4
0
 public CodeRow(CodeByte[] bytes, string text)
 {
     Bytes = bytes;
     Text  = text;
     foreach (var b in bytes)
     {
         b.WildcardChanged += (o, e) => PatternChanged?.Invoke(this, EventArgs.Empty);
     }
 }
Esempio n. 5
0
 private void WildCardChangedEvent(object sender, EventArgs e)
 {
     PatternChanged?.Invoke(this, EventArgs.Empty);
 }
Esempio n. 6
0
 /// <summary>
 /// Fires the pattern changed event.
 /// </summary>
 protected virtual void OnPatternChanged()
 {
     PatternChanged?.Invoke(this, EventArgs.Empty);
 }
Esempio n. 7
0
 /// <summary> Sets the <see cref="Pattern"/> to the specified <paramref name="value"/>. </summary>
 public LogConfiguration SetPattern(string value)
 {
     Pattern = value ?? string.Empty;
     PatternChanged?.Invoke(this);
     return(this);
 }