#!/usr/bin/env python import os import sys from .viafence_basedialogs import * class MainDialog(MainDialogBase): def __init__(self, parent): MainDialogBase.__init__(self, parent) # Small workaround to fix the paths generated by wxFormBuilder self.bmpViafence.SetBitmap(wx.Bitmap( os.path.join(os.path.dirname(os.path.realpath(__file__)), "resources", "viafence.png") ) ) def OnInitDialog(self, event): self.Layout() self.GetSizer().Fit(self) self.SetMinSize(self.GetSize()) #self.SetMaxSize(self.GetSize()) self.SetTitle(u"Via Fence Generator") if sys.version_info[0] == 2: self.chkDebugDump.SetToolTipString( u"Creates a json file in the same directory as the opened board file containing the tracks and settings" ) else: self.chkDebugDump.SetToolTip( u"Creates a json file in the same directory as the opened board file containing the tracks and settings" ) def OnNetFilterCheckBox(self, event): self.txtNetFilter.Enable(event.IsChecked()) def OnLayerCheckBox(self, event): self.lstLayer.Enable(event.IsChecked())