예제 #1
0
	def __init__(self):
	
		FORMheight = 250 
		FORMwidth = 400

		self.Text = 'Whatsapp Import - Whatsapp messages loader'
		self.Height = FORMheight-50
		self.Width = FORMwidth


		flowPanel = FlowLayoutPanel()
		flowPanel.AutoSize = True
		flowPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink
		self.Controls.Add(flowPanel)

		labelDir = Label()
		labelDir.Text = "Exported artifacts directory path:"
		labelDir.Top = 20
		labelDir.Left = 10
		labelDir.Width = 300
		labelDir.Anchor = AnchorStyles.Top

		TextboxDir = TextBox()
		TextboxDir.Name = 'ImportDir'
		TextboxDir.Text = '\export'#[type directory]'
		TextboxDir.Top = 45
		TextboxDir.Left = 10
		TextboxDir.Width = 360
		TextboxDir.Anchor = AnchorStyles.Top

		'''labelRegex = Label()
		labelRegex.Text = "Chat file's name regex:"
		labelRegex.Top = 75
		labelRegex.Left = 10
		labelRegex.Width = 300
		labelRegex.Anchor = AnchorStyles.Top

		fileRegex = TextBox()
		fileRegex.Name = 'fileNameRegex'
		fileRegex.Text = '^Conversa\sdo\sWhatsApp\scom\s(.*)\.txt$'
		fileRegex.Top = 100
		fileRegex.Left = 10
		fileRegex.Width = 360
		fileRegex.Anchor = AnchorStyles.Top'''

		'''SelectDirBtn = Button()
		SelectDirBtn.Text = 'Select dir.'		
		SelectDirBtn.Width = 150		
		SelectDirBtn.Top = 80
		SelectDirBtn.Left = 350
		SelectDirBtn.UseVisualStyleBackColor = True
		SelectDirBtn.Anchor = AnchorStyles.Top
		SelectDirBtn.Click += self.onClick'''

		button = Button()
		button.Text = "Import"
		button.Width = 110
		button.Top = 120
		button.Left = (FORMwidth / 2) - 50
		button.Anchor = AnchorStyles.Top
		button.Click += self.buttonPressed
		
		self.Controls.Add(labelDir)
		self.Controls.Add(TextboxDir)
		#self.Controls.Add(labelRegex)
		#self.Controls.Add(fileRegex)
		#self.Controls.Add(SelectDirBtn)
		self.Controls.Add(button)