def __init__(self, parent=None):

        posY = 0
        posX = 0
        if wx.Platform == '__WXMSW__':
            posY = -20
            posX = -20

        wx.Frame.__init__(self, None, -1, "WikiReader Update", size=(499, 307))
        self.SetBackgroundColour("black")

        whitePanel = wx.Panel(self, -1, size=(499, 252), pos=(0, 51))
        whitePanel.SetBackgroundColour("White")
        self.Bind(wx.EVT_CLOSE, parent.OnClose)

        logoImage = images.getlogo_topBitmap()
        wx.StaticBitmap(self, -1, logoImage, pos=(8, 12), size=(336, 39))

        HintLabel = wx.StaticText(whitePanel, -1, "Installing updates to microSD card..", size=(499, 40), pos=(115+posX, 60+posY))
        HintLabelFont = wx.Font(defaultBigFontSize, wx.DEFAULT, wx.NORMAL, wx.BOLD, underline=False, faceName="Helvetica", encoding=wx.FONTENCODING_DEFAULT)
        HintLabel.SetFont(HintLabelFont)

        SubHintLabel = wx.StaticText(whitePanel, -1, "We're almost there..", size=(499, 40), pos=(115+posX, 80+posY))
        SubHintLabelFont = wx.Font(defaultFontSize, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline=False, faceName="Helvetica", encoding=wx.FONTENCODING_DEFAULT)
        SubHintLabel.SetForegroundColour('gray')
        SubHintLabel.SetFont(SubHintLabelFont)

        self.gauge = wx.Gauge(whitePanel, -1, 100, pos=(100, 140+posY), size=(300, 25))
        self.gauge.SetBezelFace(3)
        self.gauge.SetShadowWidth(3)


        self.Centre()
        self.SetIcon(images.icon.GetIcon())
    def __init__(self, parent=None):

        pos = (140, 42)
        if wx.Platform == '__WXMSW__':
           pos = (110, 42)

        wx.Frame.__init__(self, None, -1, "WikiReader Update", size=(499, 307))
        self.SetBackgroundColour("black")
        self.parent = parent
        self.Bind(wx.EVT_CLOSE, parent.OnClose)

        whitePanel = wx.Panel(self, -1, size=(499, 252), pos=(0, 51))
        whitePanel.SetBackgroundColour("White")

        logoImage = images.getlogo_topBitmap()
        wx.StaticBitmap(self, -1, logoImage, pos=(8, 12), size=(336, 39))

        CheckUpdateLabel = wx.StaticText(whitePanel, -1, "Checking for new updates...", size=(50, 40), pos=pos)
        CheckUpdateLabelFont = wx.Font(defaultBigFontSize, wx.DEFAULT, wx.NORMAL, wx.BOLD, underline=False, faceName="Helvetica", encoding=wx.FONTENCODING_DEFAULT)
        CheckUpdateLabel.SetFont(CheckUpdateLabelFont)

        cancelButton = wx.Button(whitePanel, 9, "Cancel", (211, 137))
        self.Bind(wx.EVT_BUTTON, parent.OnClose, cancelButton)

        gauge = wx.Gauge(self, -1, 50, pos=(125, 130), size=(250, 25))
        gauge.Pulse()

        self.Centre()
        self.SetIcon(images.icon.GetIcon())
    def __init__(self, parent=None):

        frameHeight = 0
        posY = 0
        if wx.Platform == '__WXMSW__':
           frameHeight = 40
           posY = -10

        wx.Frame.__init__(self, None, -1, "WikiReader Update", size=(499, 507+frameHeight))
        self.SetBackgroundColour("black")
        self.parent = parent
        self.Bind(wx.EVT_CLOSE, parent.OnClose)
        WindowsMenuBar(self)

        whitePanel = wx.Panel(self, -1, size=(499, 451+frameHeight), pos=(0, 51))
        whitePanel.SetBackgroundColour("White")

        logoImage = images.getlogo_topBitmap()
        wx.StaticBitmap(self, -1, logoImage, pos=(8, 12), size=(336, 39))

        WaringLabel = wx.StaticText(whitePanel, -1, "Not Enough Disk Space!", size=(30, 40), pos=(36, 20+posY))
        WaringLabelFont = wx.Font(defaultBigFontSize, wx.DEFAULT, wx.NORMAL, wx.BOLD, underline=False, faceName="Helvetica", encoding=wx.FONTENCODING_DEFAULT)
        WaringLabel.SetForegroundColour('red')
        WaringLabel.SetFont(WaringLabelFont)
        WaringLabel.Hide()
        self.WaringLabel = WaringLabel

        TopHintLabel = wx.StaticText(whitePanel, -1, "New updates are available for your WikiReader.", size=(30, 40), pos=(36, 16+posY))
        TopHintLabelFont = wx.Font(defaultBigFontSize, wx.DEFAULT, wx.NORMAL, wx.BOLD, underline=False, faceName="Helvetica", encoding=wx.FONTENCODING_DEFAULT)
        TopHintLabel.SetFont(TopHintLabelFont)

        DescLabel = wx.StaticText(whitePanel, -1, "Downloading the updates may take some time.\nIf you're not ready to download now, press Cancel.\nTo continue, check the desired updates and press Download.", size=(30, 40), pos=(36, 36+posY))
        DescLabel.SetForegroundColour("#666666")
        DescLabelFont = wx.Font(defaultFontSize, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline=False, faceName="Helvetica", encoding=wx.FONTENCODING_DEFAULT)
        DescLabel.SetFont(DescLabelFont)

        SelectedSizeLabel = wx.StaticText(whitePanel, -1, "No SDCard detected.", size=(30, 40), pos=(36, 90+posY))
        SelectedSizeLabel.SetForegroundColour("#666666")
        SelectedSizeLabelFont = wx.Font(defaultFontSize, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline=False, faceName="Helvetica", encoding=wx.FONTENCODING_DEFAULT)
        SelectedSizeLabel.SetFont(SelectedSizeLabelFont)
        self.SelectedSizeLabel = SelectedSizeLabel

        cancelButton = wx.Button(whitePanel, 9, "Cancel", (150, 395+posY))
        self.Bind(wx.EVT_BUTTON, self.OnClick, cancelButton)

        downloadButton = wx.Button(whitePanel, 10, "Download", (260, 395+posY))
        downloadButton.Disable()
        self.downloadButton = downloadButton
        self.Bind(wx.EVT_BUTTON, self.OnClick, downloadButton)

        PackagesListPanel = wx.Panel(whitePanel, -1, size=(420, 270), pos=(36, 116+posY))
        PackagesListPanel.parent = self
        self.packagesListCtrl = PackagesListCtrl(PackagesListPanel, -1, size=(420, 270), style=wx.LC_REPORT | wx.LC_NO_HEADER)
        self.packagesListCtrl.setColumns()


        self.Centre()
        self.SetIcon(images.icon.GetIcon())
        self.updateSelectedSize()
    def __init__(self, parent=None):

        posY = 0
        posX = 0
        if wx.Platform == '__WXMSW__':
            posY = -20
            posX = -20

        wx.Frame.__init__(self, None, -1, "WikiReader Update", size=(499, 307))
        self.SetBackgroundColour("black")

        whitePanel = wx.Panel(self, -1, size=(499, 252), pos=(0, 51))
        whitePanel.SetBackgroundColour("White")
        self.Bind(wx.EVT_CLOSE, parent.OnClose)

        logoImage = images.getlogo_topBitmap()
        wx.StaticBitmap(self, -1, logoImage, pos=(8, 12), size=(336, 39))

        HintLabel = wx.StaticText(whitePanel,
                                  -1,
                                  "Installing updates to microSD card..",
                                  size=(499, 40),
                                  pos=(115 + posX, 60 + posY))
        HintLabelFont = wx.Font(defaultBigFontSize,
                                wx.DEFAULT,
                                wx.NORMAL,
                                wx.BOLD,
                                underline=False,
                                faceName="Helvetica",
                                encoding=wx.FONTENCODING_DEFAULT)
        HintLabel.SetFont(HintLabelFont)

        SubHintLabel = wx.StaticText(whitePanel,
                                     -1,
                                     "We're almost there..",
                                     size=(499, 40),
                                     pos=(115 + posX, 80 + posY))
        SubHintLabelFont = wx.Font(defaultFontSize,
                                   wx.DEFAULT,
                                   wx.NORMAL,
                                   wx.NORMAL,
                                   underline=False,
                                   faceName="Helvetica",
                                   encoding=wx.FONTENCODING_DEFAULT)
        SubHintLabel.SetForegroundColour('gray')
        SubHintLabel.SetFont(SubHintLabelFont)

        self.gauge = wx.Gauge(whitePanel,
                              -1,
                              100,
                              pos=(100, 140 + posY),
                              size=(300, 25))
        self.gauge.SetBezelFace(3)
        self.gauge.SetShadowWidth(3)

        self.Centre()
        self.SetIcon(images.icon.GetIcon())
    def __init__(self, parent=None):

        frameHeight = 0
        posY = 0
        posX = 0
        imagePosY = 0
        imagePosX = 0
        if wx.Platform == '__WXMSW__':
            frameHeight = 40
            posY = -0
            posX = -40
            imagePosY = -0
            imagePosX = -30

        wx.Frame.__init__(self, None, -1, "WikiReader Update", size=(499, 320+frameHeight))
        self.SetBackgroundColour("black")
        self.parent = parent
        self.Bind(wx.EVT_CLOSE, parent.OnClose)
        WindowsMenuBar(self)

        whitePanel = wx.Panel(self, -1, size=(499, 252+frameHeight), pos=(0, 51))
        whitePanel.SetBackgroundColour("White")

        logoImage = images.getlogo_topBitmap()
        wx.StaticBitmap(self, -1, logoImage, pos=(8, 12), size=(336, 39))


        self.posX = posX
        self.posY = posY

        HintLabel = wx.StaticText(whitePanel, -1, "Prepare to install ...", size=(499, 40), pos=(68+posX, 20+posY), style=wx.ALIGN_CENTER)
        HintLabelFont = wx.Font(defaultFontSize, wx.DEFAULT, wx.NORMAL, wx.BOLD, underline=False, faceName="Helvetica", encoding=wx.FONTENCODING_DEFAULT)
        HintLabel.SetFont(HintLabelFont)
        self.HintLabel = HintLabel

        deviceImage = images.getdeviceBitmap()
        wx.StaticBitmap(whitePanel, -1, deviceImage, pos=(75+imagePosX, 65+posY+imagePosY), size=(388, 112))

        quitButton = wx.Button(whitePanel, 8, "Quit", (150, 195+posY))
        self.Bind(wx.EVT_BUTTON, parent.OnClose, quitButton)

        self.installButton = wx.Button(whitePanel, 9, "Install", (270, 195+posY))
        self.Bind(wx.EVT_BUTTON, parent.OnInstall, self.installButton)

        tryButton = wx.Button(whitePanel, 10, "Try again", (270, 195+posY), (20, 20))
        self.Bind(wx.EVT_BUTTON, self.OnTryClick, tryButton)
        tryButton.SetDefault()
        tryButton.SetSize(tryButton.GetBestSize())
        self.tryButton = tryButton

        self.Centre()
        self.SetIcon(images.icon.GetIcon())

        self.checkSDcard()
    def __init__(self, parent=None):

        frameHeight = 0
        posY = 0
        if wx.Platform == '__WXMSW__':
           frameHeight = 40
           posY = -60

        wx.Frame.__init__(self, None, -1, "WikiReader Update", size=(499, 507+frameHeight))

        self.parent = parent
        self.SetBackgroundColour("black")
        self.Bind(wx.EVT_CLOSE, parent.OnClose)
        WindowsMenuBar(self)

        whitePanel = wx.Panel(self, -1, size=(499, 451+frameHeight), pos=(0, 51))
        whitePanel.SetBackgroundColour("White")

        logoImage = images.getlogo_topBitmap()
        wx.StaticBitmap(self, -1, logoImage, pos=(8, 12), size=(336, 39))

        TopHintLabel = wx.StaticText(whitePanel, -1, "Downloading %d updates.. " % (len(checkedItems)), size=(30, 40), pos=(36, 66+posY))
        TopHintLabelFont = wx.Font(defaultBigFontSize, wx.DEFAULT, wx.NORMAL, wx.BOLD, underline=False, faceName="Helvetica", encoding=wx.FONTENCODING_DEFAULT)
        TopHintLabel.SetFont(TopHintLabelFont)
        self.TopHintLabel = TopHintLabel

        DescLabel = wx.StaticText(whitePanel, -1, "This will take a while. Make sure your computer is connected\nto a power source and please do not disconnect the Internet\nconnection while downloads are in progress.", size=(30, 40), pos=(36, 86+posY))
        DescLabel.SetForegroundColour("#666666")
        DescLabelFont = wx.Font(defaultFontSize, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline=False, faceName="Helvetica", encoding=wx.FONTENCODING_DEFAULT)
        DescLabel.SetFont(DescLabelFont)

        cancelButton = wx.Button(whitePanel, 9, "Cancel", (210, 450+posY))
        self.Bind(wx.EVT_BUTTON, parent.OnCancelDownload, cancelButton)

        PackagesListPanel = wx.Panel(whitePanel, -1, size=(420, 270), pos=(36, 166+posY))
        self.packagesListCtrl = DownloadPackagesListCtrl(PackagesListPanel, -1, size=(420, 270), style=wx.LC_REPORT)


        self.Centre()
        #self.Show(True)
        self.SetIcon(images.icon.GetIcon())
    def __init__(self, parent=None):

        pos = (140, 42)
        if wx.Platform == '__WXMSW__':
            pos = (110, 42)

        wx.Frame.__init__(self, None, -1, "WikiReader Update", size=(499, 307))
        self.SetBackgroundColour("black")
        self.parent = parent
        self.Bind(wx.EVT_CLOSE, parent.OnClose)

        whitePanel = wx.Panel(self, -1, size=(499, 252), pos=(0, 51))
        whitePanel.SetBackgroundColour("White")

        logoImage = images.getlogo_topBitmap()
        wx.StaticBitmap(self, -1, logoImage, pos=(8, 12), size=(336, 39))

        CheckUpdateLabel = wx.StaticText(whitePanel,
                                         -1,
                                         "Checking for new updates...",
                                         size=(50, 40),
                                         pos=pos)
        CheckUpdateLabelFont = wx.Font(defaultBigFontSize,
                                       wx.DEFAULT,
                                       wx.NORMAL,
                                       wx.BOLD,
                                       underline=False,
                                       faceName="Helvetica",
                                       encoding=wx.FONTENCODING_DEFAULT)
        CheckUpdateLabel.SetFont(CheckUpdateLabelFont)

        cancelButton = wx.Button(whitePanel, 9, "Cancel", (211, 137))
        self.Bind(wx.EVT_BUTTON, parent.OnClose, cancelButton)

        gauge = wx.Gauge(self, -1, 50, pos=(125, 130), size=(250, 25))
        gauge.Pulse()

        self.Centre()
        self.SetIcon(images.icon.GetIcon())
    def __init__(self, parent=None):

        frameHeight = 0
        posY = 0
        posX = 0
        if wx.Platform == '__WXMSW__':
            frameHeight = 70
            posY = 0
            posX = -20

        wx.Frame.__init__(self, None, -1, "WikiReader Update", size=(499, 307+frameHeight))
        self.SetBackgroundColour("black")
        self.parent = parent
        self.Bind(wx.EVT_CLOSE, parent.OnClose)
        WindowsMenuBar(self)

        whitePanel = wx.Panel(self, -1, size=(499, 252+frameHeight), pos=(0, 51))
        whitePanel.SetBackgroundColour("White")

        logoImage = images.getlogo_topBitmap()
        wx.StaticBitmap(self, -1, logoImage, pos=(8, 12), size=(336, 39))

        HintLabel = wx.StaticText(whitePanel, -1, "Installation complete!", size=(499, 40), pos=(155+posX, 50+posY))
        HintLabelFont = wx.Font(defaultBigFontSize, wx.DEFAULT, wx.NORMAL, wx.BOLD, underline=False, faceName="Helvetica", encoding=wx.FONTENCODING_DEFAULT)
        HintLabel.SetFont(HintLabelFont)

        SubHintLabel = wx.StaticText(whitePanel, -1, "Thank you for being so patient. You may now safely eject\nthe microSD card and place it back in your WikiReader.", size=(10, 40), pos=(65+posX, 80+posY), style=wx.ALIGN_CENTER)
        SubHintLabelFont = wx.Font(defaultFontSize, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline=False, faceName="Helvetica", encoding=wx.FONTENCODING_DEFAULT)
        # SubHintLabel.SetForegroundColour('777777')
        SubHintLabel.SetFont(SubHintLabelFont)

        doneButton = wx.Button(whitePanel, 8, "Done", (200, 230))
        doneButton.SetDefault()
        self.Bind(wx.EVT_BUTTON, parent.OnClose, doneButton)

        self.Centre()
        self.SetIcon(images.icon.GetIcon())
    def __init__(self, parent=None):

        frameHeight = 0
        posY = 0
        posX = 0
        if wx.Platform == '__WXMSW__':
            frameHeight = 70
            posY = 0
            posX = -20

        wx.Frame.__init__(self,
                          None,
                          -1,
                          "WikiReader Update",
                          size=(499, 307 + frameHeight))
        self.SetBackgroundColour("black")
        self.parent = parent
        self.Bind(wx.EVT_CLOSE, parent.OnClose)
        WindowsMenuBar(self)

        whitePanel = wx.Panel(self,
                              -1,
                              size=(499, 252 + frameHeight),
                              pos=(0, 51))
        whitePanel.SetBackgroundColour("White")

        logoImage = images.getlogo_topBitmap()
        wx.StaticBitmap(self, -1, logoImage, pos=(8, 12), size=(336, 39))

        HintLabel = wx.StaticText(whitePanel,
                                  -1,
                                  "Installation complete!",
                                  size=(499, 40),
                                  pos=(155 + posX, 50 + posY))
        HintLabelFont = wx.Font(defaultBigFontSize,
                                wx.DEFAULT,
                                wx.NORMAL,
                                wx.BOLD,
                                underline=False,
                                faceName="Helvetica",
                                encoding=wx.FONTENCODING_DEFAULT)
        HintLabel.SetFont(HintLabelFont)

        SubHintLabel = wx.StaticText(
            whitePanel,
            -1,
            "Thank you for being so patient. You may now safely eject\nthe microSD card and place it back in your WikiReader.",
            size=(10, 40),
            pos=(65 + posX, 80 + posY),
            style=wx.ALIGN_CENTER)
        SubHintLabelFont = wx.Font(defaultFontSize,
                                   wx.DEFAULT,
                                   wx.NORMAL,
                                   wx.NORMAL,
                                   underline=False,
                                   faceName="Helvetica",
                                   encoding=wx.FONTENCODING_DEFAULT)
        # SubHintLabel.SetForegroundColour('777777')
        SubHintLabel.SetFont(SubHintLabelFont)

        doneButton = wx.Button(whitePanel, 8, "Done", (200, 230))
        doneButton.SetDefault()
        self.Bind(wx.EVT_BUTTON, parent.OnClose, doneButton)

        self.Centre()
        self.SetIcon(images.icon.GetIcon())
    def __init__(self, parent=None):

        frameHeight = 0
        posY = 0
        posX = 0
        imagePosY = 0
        imagePosX = 0
        if wx.Platform == '__WXMSW__':
            frameHeight = 40
            posY = -0
            posX = -40
            imagePosY = -0
            imagePosX = -30

        wx.Frame.__init__(self,
                          None,
                          -1,
                          "WikiReader Update",
                          size=(499, 320 + frameHeight))
        self.SetBackgroundColour("black")
        self.parent = parent
        self.Bind(wx.EVT_CLOSE, parent.OnClose)
        WindowsMenuBar(self)

        whitePanel = wx.Panel(self,
                              -1,
                              size=(499, 252 + frameHeight),
                              pos=(0, 51))
        whitePanel.SetBackgroundColour("White")

        logoImage = images.getlogo_topBitmap()
        wx.StaticBitmap(self, -1, logoImage, pos=(8, 12), size=(336, 39))

        self.posX = posX
        self.posY = posY

        HintLabel = wx.StaticText(whitePanel,
                                  -1,
                                  "Prepare to install ...",
                                  size=(499, 40),
                                  pos=(68 + posX, 20 + posY),
                                  style=wx.ALIGN_CENTER)
        HintLabelFont = wx.Font(defaultFontSize,
                                wx.DEFAULT,
                                wx.NORMAL,
                                wx.BOLD,
                                underline=False,
                                faceName="Helvetica",
                                encoding=wx.FONTENCODING_DEFAULT)
        HintLabel.SetFont(HintLabelFont)
        self.HintLabel = HintLabel

        deviceImage = images.getdeviceBitmap()
        wx.StaticBitmap(whitePanel,
                        -1,
                        deviceImage,
                        pos=(75 + imagePosX, 65 + posY + imagePosY),
                        size=(388, 112))

        quitButton = wx.Button(whitePanel, 8, "Quit", (150, 195 + posY))
        self.Bind(wx.EVT_BUTTON, parent.OnClose, quitButton)

        self.installButton = wx.Button(whitePanel, 9, "Install",
                                       (270, 195 + posY))
        self.Bind(wx.EVT_BUTTON, parent.OnInstall, self.installButton)

        tryButton = wx.Button(whitePanel, 10, "Try again", (270, 195 + posY),
                              (20, 20))
        self.Bind(wx.EVT_BUTTON, self.OnTryClick, tryButton)
        tryButton.SetDefault()
        tryButton.SetSize(tryButton.GetBestSize())
        self.tryButton = tryButton

        self.Centre()
        self.SetIcon(images.icon.GetIcon())

        self.checkSDcard()
    def __init__(self, parent=None):

        frameHeight = 0
        posY = 0
        if wx.Platform == '__WXMSW__':
            frameHeight = 40
            posY = -60

        wx.Frame.__init__(self,
                          None,
                          -1,
                          "WikiReader Update",
                          size=(499, 507 + frameHeight))

        self.parent = parent
        self.SetBackgroundColour("black")
        self.Bind(wx.EVT_CLOSE, parent.OnClose)
        WindowsMenuBar(self)

        whitePanel = wx.Panel(self,
                              -1,
                              size=(499, 451 + frameHeight),
                              pos=(0, 51))
        whitePanel.SetBackgroundColour("White")

        logoImage = images.getlogo_topBitmap()
        wx.StaticBitmap(self, -1, logoImage, pos=(8, 12), size=(336, 39))

        TopHintLabel = wx.StaticText(whitePanel,
                                     -1,
                                     "Downloading %d updates.. " %
                                     (len(checkedItems)),
                                     size=(30, 40),
                                     pos=(36, 66 + posY))
        TopHintLabelFont = wx.Font(defaultBigFontSize,
                                   wx.DEFAULT,
                                   wx.NORMAL,
                                   wx.BOLD,
                                   underline=False,
                                   faceName="Helvetica",
                                   encoding=wx.FONTENCODING_DEFAULT)
        TopHintLabel.SetFont(TopHintLabelFont)
        self.TopHintLabel = TopHintLabel

        DescLabel = wx.StaticText(
            whitePanel,
            -1,
            "This will take a while. Make sure your computer is connected\nto a power source and please do not disconnect the Internet\nconnection while downloads are in progress.",
            size=(30, 40),
            pos=(36, 86 + posY))
        DescLabel.SetForegroundColour("#666666")
        DescLabelFont = wx.Font(defaultFontSize,
                                wx.DEFAULT,
                                wx.NORMAL,
                                wx.NORMAL,
                                underline=False,
                                faceName="Helvetica",
                                encoding=wx.FONTENCODING_DEFAULT)
        DescLabel.SetFont(DescLabelFont)

        cancelButton = wx.Button(whitePanel, 9, "Cancel", (210, 450 + posY))
        self.Bind(wx.EVT_BUTTON, parent.OnCancelDownload, cancelButton)

        PackagesListPanel = wx.Panel(whitePanel,
                                     -1,
                                     size=(420, 270),
                                     pos=(36, 166 + posY))
        self.packagesListCtrl = DownloadPackagesListCtrl(PackagesListPanel,
                                                         -1,
                                                         size=(420, 270),
                                                         style=wx.LC_REPORT)

        self.Centre()
        #self.Show(True)
        self.SetIcon(images.icon.GetIcon())
    def __init__(self, parent=None):

        frameHeight = 0
        posY = 0
        if wx.Platform == '__WXMSW__':
            frameHeight = 40
            posY = -10

        wx.Frame.__init__(self,
                          None,
                          -1,
                          "WikiReader Update",
                          size=(499, 507 + frameHeight))
        self.SetBackgroundColour("black")
        self.parent = parent
        self.Bind(wx.EVT_CLOSE, parent.OnClose)
        WindowsMenuBar(self)

        whitePanel = wx.Panel(self,
                              -1,
                              size=(499, 451 + frameHeight),
                              pos=(0, 51))
        whitePanel.SetBackgroundColour("White")

        logoImage = images.getlogo_topBitmap()
        wx.StaticBitmap(self, -1, logoImage, pos=(8, 12), size=(336, 39))

        WaringLabel = wx.StaticText(whitePanel,
                                    -1,
                                    "Not Enough Disk Space!",
                                    size=(30, 40),
                                    pos=(36, 20 + posY))
        WaringLabelFont = wx.Font(defaultBigFontSize,
                                  wx.DEFAULT,
                                  wx.NORMAL,
                                  wx.BOLD,
                                  underline=False,
                                  faceName="Helvetica",
                                  encoding=wx.FONTENCODING_DEFAULT)
        WaringLabel.SetForegroundColour('red')
        WaringLabel.SetFont(WaringLabelFont)
        WaringLabel.Hide()
        self.WaringLabel = WaringLabel

        TopHintLabel = wx.StaticText(
            whitePanel,
            -1,
            "New updates are available for your WikiReader.",
            size=(30, 40),
            pos=(36, 16 + posY))
        TopHintLabelFont = wx.Font(defaultBigFontSize,
                                   wx.DEFAULT,
                                   wx.NORMAL,
                                   wx.BOLD,
                                   underline=False,
                                   faceName="Helvetica",
                                   encoding=wx.FONTENCODING_DEFAULT)
        TopHintLabel.SetFont(TopHintLabelFont)

        DescLabel = wx.StaticText(
            whitePanel,
            -1,
            "Downloading the updates may take some time.\nIf you're not ready to download now, press Cancel.\nTo continue, check the desired updates and press Download.",
            size=(30, 40),
            pos=(36, 36 + posY))
        DescLabel.SetForegroundColour("#666666")
        DescLabelFont = wx.Font(defaultFontSize,
                                wx.DEFAULT,
                                wx.NORMAL,
                                wx.NORMAL,
                                underline=False,
                                faceName="Helvetica",
                                encoding=wx.FONTENCODING_DEFAULT)
        DescLabel.SetFont(DescLabelFont)

        SelectedSizeLabel = wx.StaticText(whitePanel,
                                          -1,
                                          "No SDCard detected.",
                                          size=(30, 40),
                                          pos=(36, 90 + posY))
        SelectedSizeLabel.SetForegroundColour("#666666")
        SelectedSizeLabelFont = wx.Font(defaultFontSize,
                                        wx.DEFAULT,
                                        wx.NORMAL,
                                        wx.NORMAL,
                                        underline=False,
                                        faceName="Helvetica",
                                        encoding=wx.FONTENCODING_DEFAULT)
        SelectedSizeLabel.SetFont(SelectedSizeLabelFont)
        self.SelectedSizeLabel = SelectedSizeLabel

        cancelButton = wx.Button(whitePanel, 9, "Cancel", (150, 395 + posY))
        self.Bind(wx.EVT_BUTTON, self.OnClick, cancelButton)

        downloadButton = wx.Button(whitePanel, 10, "Download",
                                   (260, 395 + posY))
        downloadButton.Disable()
        self.downloadButton = downloadButton
        self.Bind(wx.EVT_BUTTON, self.OnClick, downloadButton)

        PackagesListPanel = wx.Panel(whitePanel,
                                     -1,
                                     size=(420, 270),
                                     pos=(36, 116 + posY))
        PackagesListPanel.parent = self
        self.packagesListCtrl = PackagesListCtrl(PackagesListPanel,
                                                 -1,
                                                 size=(420, 270),
                                                 style=wx.LC_REPORT
                                                 | wx.LC_NO_HEADER)
        self.packagesListCtrl.setColumns()

        self.Centre()
        self.SetIcon(images.icon.GetIcon())
        self.updateSelectedSize()