示例#1
0
def create_form():
    f = Form()
    f.Text = "HelloIronPython"

    btn = Button()
    btn.Text = "ClickMe"

    f.Controls.Add(btn)

    btn.Top = (f.ClientSize.Height - btn.Height) / 2
    btn.Left = (f.ClientSize.Width - btn.Width) / 2

    Application.Run(f)
示例#2
0
def create_form():
    f=Form()
    f.Text="HelloIronPython"

    btn=Button()
    btn.Text="ClickMe"

    f.Controls.Add(btn)

    btn.Top=(f.ClientSize.Height-btn.Height)/2
    btn.Left=(f.ClientSize.Width-btn.Width)/2

    Application.Run(f)
示例#3
0
#########################################

#  UNDERLYING INFORMATION AREA CONTROLS #
FORMBOXES["Year"] = Formbox("Year", Formbox.VALID_TYPES[2])
FORMBOXES["Year"].Top = 10
FORMBOXES["Year"].Left = UNDERLYING_INFORMATION_AREA.Width - 270
UNDERLYING_INFORMATION_AREA.Controls.Add(FORMBOXES["Year"])

FORMBOXES["Track #"] = Formbox("Track #", Formbox.VALID_TYPES[2])
FORMBOXES["Track #"].Top = 10
FORMBOXES["Track #"].Left = UNDERLYING_INFORMATION_AREA.Width - 120
UNDERLYING_INFORMATION_AREA.Controls.Add(FORMBOXES["Track #"])

APPLY_BUTTON = Button()
APPLY_BUTTON.Text = "Apply"
APPLY_BUTTON.Left = 15
UNDERLYING_INFORMATION_AREA.Controls.Add(APPLY_BUTTON)

FETCH_BUTTON = Button()
FETCH_BUTTON.Text = "Tagme"
FETCH_BUTTON.Left = 100
UNDERLYING_INFORMATION_AREA.Controls.Add(FETCH_BUTTON)

#  Button Methods #######################


def load_file(object, sender):

    global FI
    path = LOAD_TEXTBOX.get_text()
    if path:
示例#4
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)