Skip to main content

Creating A User Interface In Omicron Test Universe Import Filter

Welcome to my page. This is the third part of the Omicron Import Filter tutorial series. In this tutorial, I will show you how to create a User Interface (UI) inside the Import Filter. UI will be helpful to see the activities during import like in the image below. Unlike the traditional way, it just open the setting file then wait until the setting files populated in the test object and wait until the confirmation of completion.


Now open the MyImportFilter project in Visual Studio that we've created in the previous tutorial which can be found here (Omicron Import Filter - Create New Filter and Omicron Import Filter - Install And Use Newly Created Import Filter). Check those tutorials if you haven't done creation of the project.


Now add new form by clicking Add Form (Windows Forms) in the Project menu or right clicking in the MyImportFilter project at the solution explorer then selecting Add > Form (Windows Forms). Set the name to FormSample.vb then click Add button.

Once the new form added, set the following properties below
  • Text - My Import Filter Dialog
  • StartPosition - CenterScreen
  • MinimizeBox - False
  • MaximizeBox - False
  • FormBorderStyle - FixedDialog

Add the following controls and arrange them like in the image below
  • Textbox - 1
  • Label - 1
  • Pushbutton - 3
  • DataGridView - 1

Set the the following controls' properties
  • Textbox1, set the Name to TextboxFilename and ReadOnly to True
  • Button1, set the Name to ButtonBrowseFile and Text to &Browse
  • DataGridView1, set the Name to DataGridViewParameters
  • Label1, set the Name to LabelStatusMessage and clear the text content
  • Button2, set the Name to ButtonCancel and Text to &Cancel
  • Button3, set the Name to ButtonOK and Text to &OK
  • FormSample, set the AcceptButton to ButtonOK and CancelButton to ButtonCancel

Open the FormSample code window and copy the codes below and paste it to inside the FormSample class.

Private Document As OMXRioData.IAutoXRioDocument

Public Sub DisplayForm(ByVal pDocument As OMXRioData.IAutoXRioDocument)
Document = pDocument
ShowDialog()
End Sub

Private Sub ButtonOK_Click(sender As Object, e As EventArgs) Handles ButtonOK.Click
DialogResult = Windows.Forms.DialogResult.OK
End Sub

Private Sub ButtonCancel_Click(sender As Object, e As EventArgs) Handles ButtonCancel.Click
DialogResult = Windows.Forms.DialogResult.Cancel
End Sub

Open the SampleFilter class and copy the codes below then replace the ShowParameterDialog procedure.

Public Overrides Function ShowParameterDialog(isImport As Boolean) As Boolean
Dim Result As Boolean = False
Using dlg As New FormSample
With dlg
dlg.DisplayForm(Document)
If .DialogResult = Windows.Forms.DialogResult.OK Then
MsgBox("The import filter was successfully executed.", MsgBoxStyle.OkOnly, "Import Filter")
Result = True
End If
End With
End Using
Return Result
End Function

Now, compile or build the project and install the output class to the XRIO directory. To see how to install and execute the new Import Filter check this link (Omicron Import Filter - Install And Use Newly Created Import Filter) .


We have successfully executed the newly modified Import Filter. In the next tutorial, I will show you how to open, read and parse relay setting file particularly in MiCOM P12x relay. I will show you how to manipulate the relay setting file to import the parameters easily. See you next time.


Comments

Popular posts from this blog

Micom SE Studio1 Import Filter - Creating User Interface (UI)

Welcome to my page and welcome to the continuation of Omicron Import Filter tutorial series. In this tutorial, I will show you how to create the actual import filter fom Micom relays. In this tutorial, we will focus on the Visual Studio program. We're going to modify the codes in our project called MyImportFilter that we've created in the previous tutorial.  Download the project in this link  MyImportFilter - Process Relay Setting Parameters . Extract and open the project. Once the project is loaded, add New Folder inside the project and set the name to SEStudio1. We need this to make organize our project class filter.  SE Studio 1 stands for Schneider Electric Studio 1 which is the software that used in communicating MiCOM relays particularly P12x series. And yes we're going to create a new import filter and user interface form MiCOM P12x series relay. I think this will applied to other MiCOM P series relay. Add a new Form inside the  SEStudio1 folder  and set the name to

Processing The Relay Setting Parameters In Omicron Import Filter

Welcome to my page and welcome to the fifth part of Omicron Import Filter tutorial series. In this tutorial, I will show you how to process the relay setting parameters that to be import in the Xrio converter. In this tutorial, we will focus on the Visual Studio program. We're going to modify the codes in our project called MyImportFilter that we've created in the previous tutorial.  Download the project in this link  MyImportFilter - Process Relay Setting Parameters . Extract and open the project. Once the project is loaded, add New Folder inside the project and set the name to SEStudio1. We need this to make organize our project class filter.  SE Studio 1 stands for Schneider Electric Studio 1 which is the software that used in communicating MiCOM relays particularly P12x series. And yes we're going to create a new import filter and user interface form MiCOM P12x series relay. I think this will applied to other MiCOM P series relay. Add a new Form inside the  SEStudio1 fo

Write An Encrypted Text File In Visual Basic

There are many ways to encrypt text or data. In this tutorial, DESCryptoServiceProvider class to encrypt and decrypt strings using the cryptographic service provider version of the Triple Data Encryption Standard algorithm. The use encryption to protect secret data and to make data unreadable by unauthorized users. Creating encryption wrapper Open the previous project from this tutorial  Write Text To File In Visual Basic  then rename it to WriteTextToFileWithEncryptionVB or create a new project. I recommend to open the existing project to easily follow this tutorial. Create the Encryption3DesWrapper class to implement the encryption and decryption methods. 1 2 3 Public NotInheritable Class Encryption3DesWrapper End Class Add an import of the cryptography namespace to the start of the file that contains the Encryption3DesWrapper class. 1 2 3 4 5 Imports System.Security.Cryptography Public Class Encryption3DesWrapper End Class In the Encryption3DesWr