UpdateFWTool.SetComport.btn_Update_Click C# (CSharp) Method

btn_Update_Click() private method

private btn_Update_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void btn_Update_Click(object sender, EventArgs e)
        {
            if (null == m_clsInterface)
            {
                MessageBox.Show("Error: Interface class is null.",
                                "Configuration - Error",
                                 MessageBoxButtons.OK,
                                 MessageBoxIcon.Error               );

                return;
            }

            //com port
            UInt32 portNum = m_clsInterface.uiLibSettingComPort;

            try
            {
                portNum = Convert.ToUInt32( numComNum.Value );

            }
            catch (Exception exception)
            {
                MessageBox.Show( "Please enter number",
                                 "Invalid number",
                                 MessageBoxButtons.OK,
                                 MessageBoxIcon.Exclamation );
                return;
            }

             m_clsInterface.uiLibSettingComPort = portNum;
        }