Exercise 2

Version 2

    Create an AF applet

     

    Objective: Create your own AF applet for end users to be able to:

     

    1. Select the PI AF server they want to connect to.
    2. Select the city to view its attributes.
    3. Choose one of the 6 attributes to view the data.
    4. Choose the UOM.
    5. Specify the start time and end time.
    6. Choose the retrieval method (Recorded, Interpolated, or Summary).
    7. If the selected method is interpolated, the user must type in the interval of the interpolation.
    8. If the selected method is summary, the results will be shown using the default UOM.
    9. If the user clicks on Get Data, the results/values should appear on the list box with the selected UOM.
    10. If the user clicks on View Element Settings, another form with the settings of the selected city / element would appear.

     

    You should develop something similar to the screenshots below:

     

    Picture 2.png

     

    Picture 3.png

     

    Remember that your application should handle all types of errors (Invalid StartTime and EndTime, City element not selected when clicking on Get Data etc.)

     

    Tip: The following objects should be used in this exercise:

    OSIsoft.AF.UI.PISystemPicker

    OSIsoft.AF.UI.AFDatabasePicker

    OSIsoft.AF.UI.AFTreeView

    OSIsoft.AF.UI.AFViewControl

    System.Windows.Forms.GroupBox

    System.Windows.Forms.Label

    System.Windows.Forms.RadioButton

    System.Windows.Forms.Button

    System.Windows.Forms.ComboBox

    System.Windows.Forms.TextBox

    System.Windows.Forms.ListBox