Наследование: DebuggerMarshalByRefObject
Пример #1
0
        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);
            }
        }
Пример #2
0
 public void DeleteDisplay(Display d)
 {
     displays.Remove (d.Index);
 }
Пример #3
0
        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);
            }
        }
Пример #4
0
 public Display CreateDisplay(string text)
 {
     Display d = new Display (this, text);
     displays.Add (d.Index, d);
     return d;
 }