public bool InitializeProgrammer()
        {
            int    hr;
            string m_sLastError;

            Programmer.lib_SetHexFile(SelectedHEXFilePath);
            Programmer.lib_SetAcquireMode(SelectedAquireMode);
            Programmer.lib_SetVerification(ValidateAfterProgramming); //is not applicable for PSoC3/5 chips
            Programmer.lib_SetAutoChipDetection(true);
            Programmer.lib_SetProtocol(enumInterfaces.SWD);
            Programmer.lib_SetAutoReset(0x01);
            Programmer.lib_SetProtocolClock(enumFrequencies.FREQ_03_0);
            Programmer.lib_SetProtocolConnector(SelectedConnectorType); //0 -> 5-pins; 1 -> 10-pins;
            Programmer.lib_SetPartialProgram(true);                     //skips empty flash rows

            //Setup Power - "3.3V" and internal for reset mode
            hr = Programmer.SetPowerVoltage(SelectedVoltageSetting.Substring(0, 3), out m_sLastError);
            if (IsSuccess(hr) == false)
            {
                Log.PrintLog(this, "Unable to set acquire mode to Reset.", LogDetailLevel.LogRelevant);
                return(false);
            }

            hr = Programmer.PowerOn(out m_sLastError);
            if (IsSuccess(hr) == false)
            {
                Log.PrintLog(this, "Unable to set programming voltage.", LogDetailLevel.LogRelevant);
                return(false);
            }

            return(true);
        }