public void ShowDisplay(Display display) { if (!HasTarget) { Print ("Display {0}: {1}", display.Index, display.Text); return; } try { string text = Interpreter.ExpressionParser.EvaluateExpression ( this, display.Text, DisplayFormat.Object); Print ("Display {0} (\"{1}\"): {2}", display.Index, display.Text, text); } catch (ScriptingException ex) { Print ("Display {0} (\"{1}\"): {2}", display.Index, display.Text, ex.Message); } catch (Exception ex) { Print ("Display {0} (\"{1}\"): {2}", display.Index, display.Text, ex); } }
public void DeleteDisplay(Display d) { displays.Remove (d.Index); }
protected void LoadDisplays(XPathNodeIterator display_iter) { while (display_iter.MoveNext ()) { if (display_iter.Current.Name != "Display") throw new InternalError (); int index = Int32.Parse (display_iter.Current.GetAttribute ("index", "")); string text = display_iter.Current.GetAttribute ("text", ""); bool enabled = Boolean.Parse (display_iter.Current.GetAttribute ("enabled", "")); Display d = new Display (this, index, enabled, text); displays.Add (d.Index, d); } }
public Display CreateDisplay(string text) { Display d = new Display (this, text); displays.Add (d.Index, d); return d; }