Picker controller of text type

Section 5

In the "RGA" iPhone view, section 5 has a picker controller similar to that in section 4, except that it is text based, not numeric. In the current version of iQuipment software, the text-based picker allows only ONE dial. Please contact us if you have a multi-dialer text application. We may add this feature to future versions based on user need.

Now, you will learn how to recreate this controller in "myRGA" iPhone view.

Add a new section

Right click the "view" node then select "add section." Right click the "title" node of the new "section" node and enter "Application Mode" in the pop-up.

Select a controller type

Find the "row" node under the new section and right click "controller" node. Select "add picker" from the options. To set the height of this picker, right click the "height" node (1) and enter 180 (in terms of pixels on iPhone). Next, right click the "width" node (2) and enter 260.

Right click the "title" node and enter the string of "Normal; He Leak Check; Air Leak Monitor; Vacuum Gauge; Oil Contamination; Quick Scan; High Averaging." These are the text strings that will appear on the dial. Do not include the quotation marks. Separate each string with a semicolon.

Connect the picker controller (of iPhone view) to the RGA example.exe (Windows app)

Right click the "source.dataName" of section 5 and select "applicationMode" from the pull-down list.

Save, reload and test

Now dial to select a text string on your iPhone and watch the changes on the RGA Example.exe.

How is the "Application Mode" comboBox variable exposed for MONITORING?

Open Form1.cs in the RGA Example VS project and double click the textBox (1, figure above). It should jump to the following code:

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
INFOMATO.WCF.DataExchangeService.servicePostData("RGA", "applicationMode", comboBox_application.SelectedItem.ToString());

Every time the comboBox (named comboBox_application) value changes, the above function is executed. We call up the function INFOMATO.WCF.DataExchangeService.servicePostData to inform iQuipment PC to update the value for "applicationMode" in "RGA" view.

How is the "Application Mode" comboBox variable exposed for REMOTE CONTROL?

Similar to the handling of the segments control, when you tap the picker on your iPhone, it will trigger the event INFOMATO.WCF.DataExchangeService.clientSetDataEvent which, in turn, calls up DataExchangeService_clientSetDataEvent for event handling.

void DataExchangeService_clientSetDataEvent(string viewName, string dataName, object dataValue)
if (viewName.ToLower() == "RGA".ToLower())
switch (dataName.ToLower())
case "applicationmode":
selectTextInComboBox(comboBox_application , dataValue.ToString());

In the selectTextInComboBox(comboBox_application , dataValue.ToString()) function call, we took care of UI thread-safe issues when updating the comboBox. Windows UI thread-safe coding is discussed in greater detail in the section on segments controllers.

Previous Lesson: Picker controller of numerical type Table of Contents Next Lesson: TextEntry Controller