public static RuleList ParseRules(string newFormat, RuleGrid grid)
        {
            // format string
            RuleList rules = new RuleList(newFormat);

            for (int r = grid.FixedRows; r < grid.RowsCount; r++)
            {
                if (!(bool)grid[r, RuleGrid.ColControl].Value)
                    continue;
                if (!grid.CheckRow(r))
                    continue;

                rules.Add(ParseRule(grid.GetCellsAtRow(r)));
            }

            return rules;
        }
Exemple #2
0
 public PopupMenu(RuleGrid grid)
 {
     menu.MenuItems.Add(Textual.InsertDeleteRule, new EventHandler(Delete_Click));
     menu.MenuItems.Add(Textual.InsertCopyRule, new EventHandler(Copy_Click));
     menu.MenuItems.Add(Textual.InsertReplaceRule, new EventHandler(Replace_Click));
     menu.MenuItems.Add(Textual.RemoveRule, new EventHandler(RemoveRow_Click));
     this.grid = grid;
 }