Exemplo n.º 1
0
 def __init__(self, doFunc, param, doneFunc, progressFunc):
     self.doFunc = doFunc
     self.param = param
     self.doneFunc = doneFunc
     thread = BackgroundWorker()
     self.thread = thread
     if progressFunc:
         thread.WorkerReportsProgress = True
         thread.ProgressChanged += progressFunc
     else:
         thread.WorkerReportsProgress = False
     thread.WorkerSupportsCancellation = False
     thread.DoWork += DoWorkEventHandler(self.doWork)
     thread.RunWorkerAsync()
     self.done = False
Exemplo n.º 2
0
reload(sys)
sys.setdefaultencoding('utf-8')

workstatuspanel = StatusBarPanel()
splashForm = Form()
formConvert = Form()
progressbar1 = ProgressBar()
combobox1 = ComboBox()
textboxBrowse = TextBox()
start = Button()
canceling = Button()
worker = BackgroundWorker()
datetimepicker1 = DateTimePicker()
open = Button()
worker.WorkerReportsProgress = True
worker.WorkerSupportsCancellation = True

path_dir_root = os.path.dirname(os.path.abspath(__file__.decode('cp1251')))
path_dirname_ = path_dir_root + '\\' + 'templates'
textboxBrowse.Text = path_dir_root
mydir = textboxBrowse.Text + '\\' + u'Обработка Анкет'

state_dir = True

mydir0 = mydir + "\\" + u"Ошибки"
mydir1 = mydir + "\\" + u"Результаты Финал"
mydir2 = mydir + "\\" + u"Грамоты"
mydir3 = path_dirname_ + "\\" + u"Пример Диплома_27072020.docx"
mydir4 = path_dirname_ + "\\" + u"3.1. информац. сообщение - победитель.docx"
mydir5 = path_dirname_ + "\\" + u"3.3. информац. сообщение - не прошел.docx"