/// <summary> /// Receives data to be processed by the DirectOutput framework.<br/> /// This function has to be called whenever the state of a table element changes in the hosting application. /// </summary> /// <param name="TableElementTypeChar">The table element type char.</param> /// <param name="Number">The number of the table element.</param> /// <param name="Value">The value of the table element.</param> /// <exception cref="System.Exception"> /// Could not extract the first char of the TableElementTypeChar parameter /// or /// You must call Init before passing data to the DirectOutput framework /// or /// A exception occured when passing in data (TableElementTypeChar: {0}, Number: {1}, Value: {2}) /// </exception> public static void UpdateTableElement(string TableElementTypeChar, int Number, int Value) { char C; try { C = TableElementTypeChar[0]; } catch (Exception E) { throw new Exception("Could not extract the first char of the TableElementTypeChar parameter", E); } try { Pinball.ReceiveData(C, Number, Value); } catch (Exception E) { if (Pinball == null) { throw new Exception("You must call Init before passing data to the DirectOutput framework"); } else { throw new Exception("A exception occured when passing in data (TableElementTypeChar: {0}, Number: {1}, Value: {2})".Build(C, Number, Value), E); } } }
/// <summary> /// Receives data for named table elements. /// The received data is put in a queue and the internal thread of the framework is notified about the availability of new data. /// </summary> /// <param name="TableElementName">Name of the table element.</param> /// <param name="Value">The value of the table element.</param> /// <exception cref="System.Exception"> /// You must call Init before passing data to the DirectOutput framework /// or /// A exception occured when passing in data (TableElementName: {0}, Value: {1}).Build(TableElementName, Value) /// </exception> public static void UpdateNamedTableElement(string TableElementName, int Value) { try { Pinball.ReceiveData(TableElementName, Value); } catch (Exception E) { if (Pinball == null) { throw new Exception("You must call Init before passing data to the DirectOutput framework"); } else { throw new Exception("A exception occured when passing in data (TableElementName: {0}, Value: {1})".Build(TableElementName, Value), E); } } }