GridRules LoadRules(string datafile) { var rules = new GridRules(); FileIterator.ForEachLine <string>(datafile, line => { ParseRule(rules, line); }); return(rules); }
void ParseRule(GridRules rules, string rule) { var fromTo = rule.Replace(" => ", "|").Split('|'); var rotations = CreateRotations(fromTo[0]); var writer = CreateWriter(fromTo[1]); foreach (var rotation in rotations) { if (rules.ContainsKey(rotation)) { Oh.Bugger(); } rules[rotation] = writer; } }
private void GridRules_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e) { GridRules.Columns["Id"].Visible = false; GridRules.ClearSelection(); }
/// <summary> /// Awake is called when the script instance is being loaded. /// </summary> void Awake() { Instance = this; }