public void restore() { // clickable = false; shade = originalShade; Recolor(); watch = empty; }
public void makeClickable() { // clickable = true; shade = clickableShade; Recolor(); watch = click; }
/// <summary> /// If accepted, changes the inner contents of the KScriptObject value to the innerXML of the given node. /// </summary> /// <param name="parentObject">The KScriptObject to perform functions and property changes with.</param> /// <param name="node">Node passed to the Parser Handler</param> /// <returns></returns> public override KScriptObject GenerateKScriptObject(KScriptObject parentObject, XmlNode node) { var watcher = new watcher(); watcher.SetContainer(KScript()); var watchers = SelectNodes("//watchers/watch", node); var rules = SelectNodes("//rules/rule", node); foreach (XmlNode watch in watchers) { watcher.AddWatcher( new watch(KScript()) { @for = watch.Attributes["for"].Value } ); } foreach (XmlNode rule in rules) { watcher.AddRule( new rule(KScript()) { condition = rule.Attributes["condition"].Value } ); } return(watcher); }
(string, THandler)[] handlers = expectedChanges.Select((x, i) => (x.WatchedPath, getHandlerFunc(watcher, x, () => handled[i] = true))).ToArray();