def __init__(self, menu): wx.TaskBarIcon.__init__(self) # menu options self.menu = menu # event handlers self.Bind(wx.EVT_TASKBAR_LEFT_DOWN, self.click) self.Bind(wx.EVT_TASKBAR_RIGHT_DOWN, self.click) self.Bind(wx.EVT_MENU, self.select) # icon state self.states = { "on": wx.Icon(file("dat/reader_new.png", "p"), wx.BITMAP_TYPE_PNG), "off": wx.Icon(file("dat/reader_empty.png", "p"), wx.BITMAP_TYPE_PNG) } self.setStatus("off")
def add(self, text): #pub.sendMessage('note.move', 'blarg') newpopup = Popup(text,file("dat/reader_large.png", "p"),self.show_lock) print 'step 1' self.popups.append(newpopup) print 'step 2' #newpopup.start() self.NoteQ.put(newpopup) #newpopup.show() #newtimer = wx.Timer(self, -1) #event = MoveEvent(-1) #wx.PostEvent(popup.popup.GetEventHandler(),event) #popup.popup.GetEventHandler().ProcessEvent(event) # pub.sendMessage('note.move', 'blarg') print 'added'
def __init__(self,text): wx.Frame.__init__(self, None, -1, style=wx.NO_BORDER|wx.FRAME_NO_TASKBAR) self.padding = 12 # padding between edge, icon and text self.popped = 0 # the time popup was opened self.delay = 4 # time to leave the popup opened self.message = text # platform specific hacks lines = 2 lineHeight = wx.MemoryDC().GetTextExtent(" ")[1] if wx.Platform == "__WXGTK__": # use the popup window widget on gtk as the # frame widget can't animate outside the screen self.popup = wx.PopupWindow(self, -1) elif wx.Platform == "__WXMSW__": # decrement line height on windows as the text calc below is off otherwise self.popup = self lineHeight -= 3 elif wx.Platform == "__WXMAC__": # untested self.popup = self self.popup.SetSize((250, (lineHeight * (lines + 1)) + (self.padding * 2))) self.panel = wx.Panel(self.popup, -1, size=self.popup.GetSize()) # popup's click handler self.panel.Bind(wx.EVT_LEFT_DOWN, self.click) #popup's move handler #self.Bind(EVT_NOTE_MOVE, self.show) # popup's logo self.logo = wx.Bitmap(file("dat/reader_large.png", "p")) wx.StaticBitmap(self.panel, -1, pos=(self.padding, self.padding)).SetBitmap(self.logo) # main timer routine self.timer = wx.Timer(self, -1) self.Bind(wx.EVT_TIMER, self.main, self.timer) self.timer.Start(5)
{Fore.LIGHTGREEN_EX}$ FORMATO PARA LOS BINS:{Fore.RESET} 5223037787798075|05|2022|183 {Fore.LIGHTGREEN_EX}$ GENERADOR USADO:{Fore.RESET} https://bestccgen.com/namso-ccgen/ """ line = 1 while line ==1: print(Fore.GREEN+banner) print(Fore.GREEN+menu) print(f"ESCRIBA LA DIRECCION DEL ARCHIVO CON LAS CCS A PROBAR: {Fore.LIGHTGREEN_EX}") archivo = input("[fl1nnk] > ") try: if len(str(archivo)) > 0: configs = tools.file(archivo) datos = configs[0] name = configs[1] print(f"{Fore.RESET}INICIANDO....") sleep(2) break else: print(f"{Fore.LIGHTRED_EX}ESCRIBA UNA RUTA VALIDA.") goto(1) except TypeError: print(f"{Fore.LIGHTRED_EX}RUTA O ARCHIVO INVALIDO, SOLO SE ACEPTA FORMATO .TXT") goto(1) file = open(name[0]).readlines()