Commit 978ae918 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Eeschema: Fixes and enhancements in BOM list generation and BOM code:

 * remove useless spaces in csv bom file format.
 * remove KICAD_GOST conditionnal compilation and merge KICAD_GOST code with the "normal" code.
 * Csv file format created by KICAD_GOST code is now available for everybody through the BOM dialog options (as it should).
 * fix coding style issues.
parents c00a93e9 bf3b8f56
Loading
Loading
Loading
Loading

eeschema/BOM_lister.h

0 → 100644
+189 −0
Original line number Diff line number Diff line
/**
 * @file BOM_lister.h
 */

/* This program source code file is part of KiCad, a free EDA CAD application.
 *
 * Copyright (C) 2012 Jean-Pierre Charras  jp.charras at wanadoo.fr
 * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you may find one here:
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * or you may search the http://www.gnu.org website for the version 2 license,
 * or you may write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */

#ifndef _BOM_LISTER_H_
#define _BOM_LISTER_H_

#include <netlist.h>


// A helper class to build item lists for BOM,
// and write lists on files
class BOM_LISTER
{
private:
    BOM_LABEL_LIST      m_labelList;            // a list of global and hierarchical labels
    SCH_REFERENCE_LIST  m_cmplist;              // a flat list of components in the full hierarchy
    FILE*               m_outFile;              // the output file for BOM generation
    char                m_separatorSymbol;      // the separator used for csv files ( usually \t ; or , )
    bool                m_outputFmtCsv;         // true to create Csv files, false to create text lists
    bool                m_includeSubComponents; // true to list each part
                                                // of a multiple part per package component
                                                // false to list only once this kind of component
    bool                m_csvForm;              // true to print less verbose component list
                                                // false to print more verbose component list
    bool                m_groupReferences;      // true to group  in list by reference (when possible,
                                                // i.e. when other fields have the same value
                                                // false to list one reference per line
    bool                m_printLocation;        // true to print component location in list by reference
    std::vector <int>   m_fieldIDactive;        // list of field IDs to print

public:
    BOM_LISTER()
    {
        m_outFile = NULL;
        m_separatorSymbol   = '\t';
        m_outputFmtCsv      = false;
        m_includeSubComponents = false;
        m_csvForm = true;
        m_printLocation     = false;
        m_groupReferences   = false;
    }

    // Accessors:
    void SetGroupReferences( bool aGroupRef )
    {
        m_groupReferences = aGroupRef;
    }

    void SetPrintLocation( bool aPrintLoc )
    {
        m_printLocation = aPrintLoc;
    }

    void SetIncludeSubCmp( bool aIncludeSubCmp )
    {
        m_includeSubComponents = aIncludeSubCmp;
    }

    /**
     * Function SetCvsFormOn
     * prepare parameters to create a BOM list in comma separated value (cvs)
     * @param aSeparator = the character used as "csv" separator
     * @param aFile = the file to write to (will be closed)
     */
    void SetCvsFormOn( char aSeparator )
    {
        m_csvForm = true;
        m_separatorSymbol = aSeparator;
    }

    /**
     * Function SetCvsFormOff
     * prepare parameters to create a BOM list in full text readable mode
     * (not csv format)
     */
    void SetCvsFormOff()
    {
        m_csvForm = false;
    }

    void            AddFieldIdToPrintList( int aFieldId );

    void ClearFieldIdPrintList() { m_fieldIDactive.clear(); }

    /**
     * Function CreateCsvBOMListByValues
     * print the list of components, grouped by values:
     * One line by value. The format is something like:
     *   value;quantity;references;other fields
     *   18pF;2;"C404 C405";SM0402
     *   22nF/25V;4;"C128 C168 C228 C268";SM0402
     * @param aFile = the file to write to (will be closed)
     */
    void            CreateCsvBOMListByValues( FILE* aFile );

    /**
     * Function PrintGlobalAndHierarchicalLabelsList
     * print the list of global and hierarchical labels by sheet or by name
     * @param aSortBySheet = true to print by sheet name order
     *          false to print by label name order
     * @param aFile = the file to write to (will be NOT closed)
     */
    void            PrintGlobalAndHierarchicalLabelsList( FILE* aFile, bool aSortBySheet );

    /**
     * Function PrintComponentsListByReferenceHumanReadable
     * print a BOM list in human readable form
     * @param aFile = the file to write to (will be NOT closed)
     */
    bool            PrintComponentsListByReferenceHumanReadable( FILE* aFile );

    /**
     * Function PrintComponentsListByReferenceCsvForm
     * print the list of components ordered by references. Generate 2 formats:
     * - full component list in csv form
     * - "short" component list in csv form, grouped by common fields values
     *          (mainly component value)
     * @param aFile = the file to write to (will be NOT closed)
     */
    bool            PrintComponentsListByReferenceCsvForm( FILE* aFile );

    /**
     * Function PrintComponentsListByValue
     * print the list of components, sorted by value, one line per component
     * not useable for csv format (use CreateCsvBOMListByValues instead)
     * @param aFile = the file to write to (will be NOT closed)
     */
    int             PrintComponentsListByValue( FILE* aFile );

private:

    /**
     * Helper function isFieldPrintable
     * @return true if the field aFieldId should be printed.
     * @param aFieldId = the field Id (FOOTPRIN, FIELD4 ...)
     */
    bool            isFieldPrintable( int aFieldId );

    /**
     * Helper function buildGlobalAndHierarchicalLabelsList
     * Populate m_labelList with global and hierarchical labels
     * and sheet pins labels
     */
    void            buildGlobalAndHierarchicalLabelsList();

    /**
     * Helper function returnFieldsString
     * @return a string containing all selected fields texts,
     * @param aComponent = the schematic component
     * separated by the csv separator symbol
     */
    const wxString  returnFieldsString( SCH_COMPONENT* aComponent );

    /**
     * Helper function returnURLItemLocation
     * @param aPathName = the full sheet name of item
     * @param aPosition = a position (in internal units) to print
     * @return a formated string to print the full location:
     * /sheet name/( X Y position)
     */
    const wxString  returnURLItemLocation( const wxString&  aPathName,
                                           wxPoint          aPosition );
};

#endif    // _BOM_LISTER_H_
+632 −85

File changed.

Preview size limit exceeded, changes collapsed.

+137 −526

File changed.

Preview size limit exceeded, changes collapsed.

+41 −25
Original line number Diff line number Diff line
/////////////////////////////////////////////////////////////////////////////
// Name:        dialog_build_BOM.h
// Copyright:   GNU license
// Licence:
/////////////////////////////////////////////////////////////////////////////
/**
 * @file dialog_build_BOM.h
 */

/* This program source code file is part of KiCad, a free EDA CAD application.
 *
 * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you may find one here:
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * or you may search the http://www.gnu.org website for the version 2 license,
 * or you may write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */


#ifndef _DIALOG_BUILD_BOM_H_
#define _DIALOG_BUILD_BOM_H_
@@ -14,13 +35,12 @@ class EDA_DRAW_FRAME;
class SCH_COMPONENT;
class wxConfig;


class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE
{
private:
    EDA_DRAW_FRAME* m_Parent;
    wxConfig*       m_Config;
    wxString        m_ListFileName;     // The full filename of the file report.
    EDA_DRAW_FRAME* m_parent;
    wxConfig*       m_config;
    wxString        m_listFileName;     // The full filename of the file report.

private:
    void    OnRadioboxSelectFormatSelected( wxCommandEvent& event );
@@ -34,19 +54,26 @@ private:
                              char  aExportSeparatorSymbol,
                              bool  aRunBrowser );

    void    GenereListeOfItems( bool aIncludeSubComponents );
    void    CreatePartsAndLabelsFullList( bool aIncludeSubComponents );

    /**
     * Function CreateExportList
     * Function CreateSpreadSheetPartsFullList
     * prints a list of components, in a form which can be imported by a
     * spreadsheet.  Form is:
     *  reference; cmp value; \<footprint\>; \<field1\>; ...;
     * Components are sorted by reference
     * @param aIncludeSubComponents = true to print sub components
     * @param aPrintLocation = true to print components location
     *        (only possible when aIncludeSubComponents == true)
     * @param aGroupRefs = true to group components references, when other fieds
     *          have the same value
     */
    void    CreateExportList( bool aIncludeSubComponents );
    void    CreateSpreadSheetPartsFullList( bool aIncludeSubComponents,
                                            bool aPrintLocation,
                                            bool aGroupRefs );

    /**
     * Function CreatePartsList
     * Function CreateSpreadSheetPartsShortList
     * prints a list of components, in a form which can be imported by a spreadsheet.
     * components having the same value and the same footprint
     * are grouped on the same line
@@ -54,18 +81,7 @@ private:
     *  value; number of components; list of references; \<footprint\>; \<field1\>; ...;
     * list is sorted by values
     */
    void    CreatePartsList();

    int     PrintComponentsListByRef( FILE* f, SCH_REFERENCE_LIST& aList,
                                      bool CompactForm, bool aIncludeSubComponents );

    int     PrintComponentsListByVal( FILE* f, SCH_REFERENCE_LIST& aList,
                                      bool aIncludeSubComponents );

    int     PrintComponentsListByPart( FILE* f, SCH_REFERENCE_LIST& aList,
                                       bool aIncludeSubComponents );

    wxString PrintFieldData( SCH_COMPONENT* DrawLibItem, bool CompactForm = false );
    void    CreateSpreadSheetPartsShortList();

    bool    IsFieldChecked( int aFieldId );

+156 −155
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 21 2008)
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -9,12 +9,15 @@

///////////////////////////////////////////////////////////////////////////

DIALOG_BUILD_BOM_BASE::DIALOG_BUILD_BOM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
DIALOG_BUILD_BOM_BASE::DIALOG_BUILD_BOM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bMainSizer;
	bMainSizer = new wxBoxSizer( wxHORIZONTAL );
	bMainSizer = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizerUpper;
	bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
	
	wxStaticBoxSizer* sbOptionsSizer;
	sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL );
@@ -23,31 +26,27 @@ DIALOG_BUILD_BOM_BASE::DIALOG_BUILD_BOM_BASE( wxWindow* parent, wxWindowID id, c
	sbListOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("List items:") ), wxVERTICAL );
	
	m_ListCmpbyRefItems = new wxCheckBox( this, wxID_ANY, _("Components by reference"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbListOptionsSizer->Add( m_ListCmpbyRefItems, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_ListSubCmpItems = new wxCheckBox( this, wxID_ANY, _("Sub components (i.e. U2A, U2B ...)"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbListOptionsSizer->Add( m_ListSubCmpItems, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_ListCmpbyValItems = new wxCheckBox( this, wxID_ANY, _("Components by value"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbListOptionsSizer->Add( m_ListCmpbyValItems, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_GenListLabelsbyVal = new wxCheckBox( this, wxID_ANY, _("Hierarchy pins by name"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbListOptionsSizer->Add( m_GenListLabelsbyVal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_GenListLabelsbySheet = new wxCheckBox( this, wxID_ANY, _("Hierarchy pins by sheets"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbListOptionsSizer->Add( m_GenListLabelsbySheet, 0, wxALL, 5 );
	
	
	sbOptionsSizer->Add( sbListOptionsSizer, 0, wxEXPAND, 5 );
	
	wxString m_OutputFormCtrlChoices[] = { _("List"), _("Text for spreadsheet import"), _("Single Part per line") };
	wxString m_OutputFormCtrlChoices[] = { _("List"), _("List for spreadsheet import (by ref)"), _("List for spreadsheet import (by grouped ref)"), _("List for spreadsheet import (by value)") };
	int m_OutputFormCtrlNChoices = sizeof( m_OutputFormCtrlChoices ) / sizeof( wxString );
	m_OutputFormCtrl = new wxRadioBox( this, ID_RADIOBOX_SELECT_FORMAT, _("Output format:"), wxDefaultPosition, wxDefaultSize, m_OutputFormCtrlNChoices, m_OutputFormCtrlChoices, 1, wxRA_SPECIFY_COLS );
	m_OutputFormCtrl->SetSelection( 2 );
	m_OutputFormCtrl->SetSelection( 1 );
	sbOptionsSizer->Add( m_OutputFormCtrl, 0, wxEXPAND|wxTOP, 5 );
	
	wxString m_OutputSeparatorCtrlChoices[] = { _("Tab"), _(";"), _(",") };
@@ -56,100 +55,102 @@ DIALOG_BUILD_BOM_BASE::DIALOG_BUILD_BOM_BASE( wxWindow* parent, wxWindowID id, c
	m_OutputSeparatorCtrl->SetSelection( 0 );
	sbOptionsSizer->Add( m_OutputSeparatorCtrl, 0, wxEXPAND|wxTOP, 5 );
	
	wxStaticBoxSizer* sbBrowseOptSizer;
	sbBrowseOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL );
	
	m_GetListBrowser = new wxCheckBox( this, wxID_ANY, _("Launch list browser"), wxDefaultPosition, wxDefaultSize, 0 );
	sbOptionsSizer->Add( m_GetListBrowser, 0, wxALL|wxEXPAND, 5 );
	
	sbBrowseOptSizer->Add( m_GetListBrowser, 0, wxALL|wxEXPAND, 5 );
	
	sbOptionsSizer->Add( sbBrowseOptSizer, 0, wxEXPAND|wxTOP, 5 );
	
	bMainSizer->Add( sbOptionsSizer, 10, wxALL|wxEXPAND, 5 );
	bSizerUpper->Add( sbOptionsSizer, 10, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bRightSizer;
	bRightSizer = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* sbFieldsSelectionSizer;
	sbFieldsSelectionSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields to add:") ), wxVERTICAL );
	wxStaticBoxSizer* sbAddToListSelectionSizer;
	sbAddToListSelectionSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Add to list:") ), wxVERTICAL );
	
	m_AddLocationField = new wxCheckBox( this, wxID_ANY, _("Component location"), wxDefaultPosition, wxDefaultSize, 0 );
	sbAddToListSelectionSizer->Add( m_AddLocationField, 0, wxALL, 5 );
	
	wxStaticBoxSizer* sbFixedFieldsSizer;
	sbFixedFieldsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("System Fields:") ), wxVERTICAL );
	
	m_AddFootprintField = new wxCheckBox( this, wxID_ANY, _("Footprint"), wxDefaultPosition, wxDefaultSize, 0 );
	m_AddDatasheetField = new wxCheckBox( this, wxID_ANY, _("Datasheet"), wxDefaultPosition, wxDefaultSize, 0 );
	sbFixedFieldsSizer->Add( m_AddDatasheetField, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_AddFootprintField = new wxCheckBox( this, wxID_ANY, _("Footprint"), wxDefaultPosition, wxDefaultSize, 0 );
	sbFixedFieldsSizer->Add( m_AddFootprintField, 0, wxALL|wxEXPAND, 5 );
	
	sbFieldsSelectionSizer->Add( sbFixedFieldsSizer, 0, wxEXPAND, 5 );
	
	sbAddToListSelectionSizer->Add( sbFixedFieldsSizer, 0, wxEXPAND, 5 );
	
	wxStaticBoxSizer* sbUsersFiledsSizer;
	sbUsersFiledsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Users Fields:") ), wxVERTICAL );
	sbUsersFiledsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Users fields:") ), wxVERTICAL );
	
	m_AddField1 = new wxCheckBox( this, wxID_ANY, _("Field 1"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbUsersFiledsSizer->Add( m_AddField1, 0, wxEXPAND|wxALL, 5 );
	
	m_AddField2 = new wxCheckBox( this, wxID_ANY, _("Field 2"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbUsersFiledsSizer->Add( m_AddField2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_AddField3 = new wxCheckBox( this, wxID_ANY, _("Field 3"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbUsersFiledsSizer->Add( m_AddField3, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_AddField4 = new wxCheckBox( this, wxID_ANY, _("Field 4"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbUsersFiledsSizer->Add( m_AddField4, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_AddField5 = new wxCheckBox( this, wxID_ANY, _("Field 5"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbUsersFiledsSizer->Add( m_AddField5, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_AddField6 = new wxCheckBox( this, wxID_ANY, _("Field 6"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbUsersFiledsSizer->Add( m_AddField6, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_AddField7 = new wxCheckBox( this, wxID_ANY, _("Field 7"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbUsersFiledsSizer->Add( m_AddField7, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_AddField8 = new wxCheckBox( this, wxID_ANY, _("Field 8"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbUsersFiledsSizer->Add( m_AddField8, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_AddAllFields = new wxCheckBox( this, wxID_ANY, _("All existing users fields"), wxDefaultPosition, wxDefaultSize, 0 );
	
	sbUsersFiledsSizer->Add( m_AddAllFields, 0, wxALL, 5 );
	sbAddToListSelectionSizer->Add( sbUsersFiledsSizer, 0, wxEXPAND|wxTOP, 5 );
	
	m_AddAllFields = new wxCheckBox( this, wxID_ANY, _("All existing user fields"), wxDefaultPosition, wxDefaultSize, 0 );
	sbAddToListSelectionSizer->Add( m_AddAllFields, 0, wxALL, 5 );
	
	
	sbFieldsSelectionSizer->Add( sbUsersFiledsSizer, 0, wxEXPAND|wxTOP, 5 );
	bRightSizer->Add( sbAddToListSelectionSizer, 1, wxEXPAND, 5 );
	
	bRightSizer->Add( sbFieldsSelectionSizer, 1, wxEXPAND, 5 );
	
	bSizerUpper->Add( bRightSizer, 0, wxALL|wxEXPAND, 5 );
	
	bRightSizer->Add( 10, 10, 0, 0, 5 );
	
	m_buttonOK = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonOK->SetDefault(); 
	bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	bMainSizer->Add( bSizerUpper, 1, wxEXPAND, 5 );
	
	m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
	bRightSizer->Add( m_buttonCANCEL, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
	
	m_sdbSizer = new wxStdDialogButtonSizer();
	m_sdbSizerOK = new wxButton( this, wxID_OK );
	m_sdbSizer->AddButton( m_sdbSizerOK );
	m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer->AddButton( m_sdbSizerCancel );
	m_sdbSizer->Realize();
	
	bMainSizer->Add( m_sdbSizer, 0, wxALIGN_RIGHT, 5 );
	
	bMainSizer->Add( bRightSizer, 8, wxALL|wxEXPAND, 5 );
	
	this->SetSizer( bMainSizer );
	this->Layout();
	
	// Connect Events
	m_OutputFormCtrl->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_BUILD_BOM_BASE::OnRadioboxSelectFormatSelected ), NULL, this );
	m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BUILD_BOM_BASE::OnOkClick ), NULL, this );
	m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BUILD_BOM_BASE::OnCancelClick ), NULL, this );
	m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BUILD_BOM_BASE::OnCancelClick ), NULL, this );
	m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BUILD_BOM_BASE::OnOkClick ), NULL, this );
}

DIALOG_BUILD_BOM_BASE::~DIALOG_BUILD_BOM_BASE()
{
	// Disconnect Events
	m_OutputFormCtrl->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_BUILD_BOM_BASE::OnRadioboxSelectFormatSelected ), NULL, this );
	m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BUILD_BOM_BASE::OnOkClick ), NULL, this );
	m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BUILD_BOM_BASE::OnCancelClick ), NULL, this );
	m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BUILD_BOM_BASE::OnCancelClick ), NULL, this );
	m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BUILD_BOM_BASE::OnOkClick ), NULL, this );
	
}
Loading