Opc.Ua.Configuration.ManagedApplicationCtrl.ApplicationToManageCB_SelectedIndexChanged C# (CSharp) Method

ApplicationToManageCB_SelectedIndexChanged() private method

private ApplicationToManageCB_SelectedIndexChanged ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void ApplicationToManageCB_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                EditApplicationBTN.Enabled = false;

                // check if nothing is selected.
                if (ApplicationToManageCB.SelectedIndex == -1)
                {
                    if (ApplicationToManageCB.Items.Count > 0)
                    {
                        ApplicationToManageCB.SelectedIndex = 0;
                    }

                    return;
                }

                // get the application.
                ManagedApplication application = ApplicationToManageCB.SelectedItem as ManagedApplication;

                if (application == null)
                {
                    return;
                }

                EditApplicationBTN.Enabled = true;
                Utils.UpdateRecentFileList(m_groupName, application.SourceFile.FullName, 16);

                // raise notification.
                if (m_ApplicationChanged != null)
                {
                    m_ApplicationChanged(this, null);
                }
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }