def __init__(self):

        self.Text = "CheckBox"
        self.Size = Size(220, 170)

        cb = CheckBox()
        cb.Parent = self
        cb.Location = Point(30, 30)
        cb.Text = "Show Title"
        cb.Checked = True

        cb.CheckedChanged += self.OnChanged


        self.CenterToScreen()
Exemplo n.º 2
0
    def _generate_menu_strip(self):
        menu_strip = MenuStrip()
        menu_strip.Parent = self

        file_item = ToolStripMenuItem("File")
        menu_strip.Items.Add(file_item)

        new_game = ToolStripMenuItem("New game")
        file_item.DropDownItems.Add(new_game)

        self._easy = ToolStripMenuItem("Easy")
        self._easy.Click += self._on_new_game_click
        new_game.DropDownItems.Add(self._easy)

        self._normal = ToolStripMenuItem("Normal")
        self._normal.Click += self._on_new_game_click
        new_game.DropDownItems.Add(self._normal)

        self._hard = ToolStripMenuItem("Hard")
        self._hard.Click += self._on_new_game_click
        new_game.DropDownItems.Add(self._hard)

        self._new_game_handlers = []

        self.checkBox = CheckBox()
        self.checkBox.Text = "Nightmare"
        self.checkBox.Size = Size(100, 20)
        self.checkBox.Checked = False
        nightmare = ToolStripControlHost(self.checkBox)
        nightmare.Size = Size(100, 20)
        new_game.DropDownItems.Add(nightmare)

        self._exit = ToolStripMenuItem("Exit")
        self._exit.Click += self._exit_game
        file_item.DropDownItems.Add(self._exit)
    def panel(self, x, y):

        self.panel = Panel()
        self.panel.Width = width - 15
        self.panel.Height = 800
        self.panel.Location = Point(x, y)
        self.panel.BorderStyle = BorderStyle.Fixed3D
        self.panel.BackColor = Color.White
        self.panel.AutoScroll = True

        j = 30

        for i in sorted_list:

            self.checkbox = CheckBox()
            self.checkbox.Text = i[0]
            self.checkbox.Location = Point(35, j)
            self.checkbox.Font = Font("Calibri Light", 10)

            self.checkbox_description = Label()
            self.checkbox_description.Text = i[1]
            self.checkbox_description.Location = Point(150, j + 2)
            self.checkbox_description.Width = 500

            self.checkbox_description.Font = Font("Calibri Light", 10)
            self.panel.Controls.Add(self.checkbox)
            self.panel.Controls.Add(self.checkbox_description)
            self.check_value.append(self.checkbox)

            j += 25

        return self.panel
    def __init__(self, contents):
        self.Contents = contents

        self.BackColor = Color.FromArgb(25, 25, 25)
        self.ForeColor = Color.FromArgb(231, 231, 231)
        self.Size = Size(500, 400)
        self.Text = '{0} - v{1}'.format(self.ScriptName, self.CurVer)

        self.DataGridSetup()

        self.cbHide = CheckBox()
        self.cbHide.Text = 'Hide'
        self.cbHide.Checked = True
        self.cbHide.BackColor = Color.FromArgb(25, 25, 25)
        self.cbHide.Location = Point(342, 326)
        self.cbHide.Size = Size(50, 30)

        self.btnGet = Button()
        self.btnGet.Text = 'Get'
        self.btnGet.BackColor = Color.FromArgb(50, 50, 50)
        self.btnGet.Location = Point(422, 324)
        self.btnGet.Size = Size(50, 30)
        self.btnGet.FlatStyle = FlatStyle.Flat
        self.btnGet.FlatAppearance.BorderSize = 1
        self.btnGet.Click += self.btnGetPressed

        self.Controls.Add(self.DataGrid)
        self.Controls.Add(self.cbHide)
        self.Controls.Add(self.btnGet)
Exemplo n.º 5
0
	def setupCheckButtons(self):
		self.checkPanel = self.newPanel(0,0)
		
		self.checkLabel = Label()
		self.checkLabel.Text = "Choose the ROI(s) that represents GTV68"
		self.checkLabel.Location = Point(25, 25)
		self.checkLabel.AutoSize = True
		
		self.checkBoxList = [CheckBox() for i in range(0, len(self.roi_names))]
		checkBoxJumper = [i*4 for i in range(1, int(ceil(len(self.roi_names)/4.)))]
		
		xcounter = 0
		ycounter = 1
		for i in range(0, len(self.roi_names)):
			for j in checkBoxJumper:
				if i == j:
					xcounter = 0
					ycounter += 1
					
			self.checkBoxList[i].Text = self.roi_names[i]
			self.checkBoxList[i].Location = Point(xcounter*160 + 25, 55*ycounter)
			xcounter += 1
			
					
			self.checkBoxList[i].Width = 150
			self.checkPanel.Controls.Add(self.checkBoxList[i])
		
		self.checkPanel.Controls.Add(self.checkLabel)
Exemplo n.º 6
0
    def __init__(self):
        self.StartPosition = FormStartPosition.CenterScreen
        self.FormBorderStyle = FormBorderStyle.FixedDialog
        self.Text = 'Текст'
        self.Name = 'Имя'
        self.Size = Size(500, 250)
        self.MaximizeBox = False
        self.MinimizeBox = False
        self.msg = []

        gb = GroupBox()
        gb.Text = "Категории"
        gb.Size = Size(120, 110)
        gb.Location = Point(20, 20)
        gb.Parent = self

        j = 25
        for c in cats:
            self.cb = CheckBox()
            self.cb.Text = c
            self.cb.Location = Point(25, j)
            j += 25
            self.cb.Width = 200
            self.cb.Checked += self.OnChanged
            gb.Size = Size(120, 20 + j)
            gb.Controls.Add(self.cb)

        self.label = Label()
        self.label.Text = "Результат"
        self.label.Location = Point(225, 20)
        self.label.Height = 25
        self.label.Width = 225
        self.Controls.Add(self.label)
        self.label.Text = "".join(self.msg)
Exemplo n.º 7
0
        def __init__(self):
            self.Text = "SolverStudio: NEOS Warning"
            self.FormBorderStyle = FormBorderStyle.FixedDialog
            self.Height = 235
            self.Width = 310
            # self.Warning = Label()
            # self.Warning.Text = "Models solved using via NEOS will be available in the public domain for perpetuity."
            # self.Warning.Location = Point(10,10)
            # self.Warning.Height  = 30
            # self.Warning.Width = 380

            self.myOK = Button()
            self.myOK.Text = "Continue"
            self.myOK.Width = 100
            self.myOK.Location = Point(self.Width / 2 - self.myOK.Width - 30,
                                       self.Height - 65)
            self.myOK.Click += self.AddChoice

            self.myCancel = Button()
            self.myCancel.Text = "Cancel"
            self.myCancel.Width = 100
            self.myCancel.Location = Point(self.Width / 2 + 30,
                                           self.Height - 65)

            self.check1 = CheckBox()
            self.check1.Text = "Never show NEOS warnings again."
            self.check1.Location = Point(12, 80)
            self.check1.Width = 250
            self.check1.Height = 130

            self.link1 = LinkLabel()
            self.link1.Location = Point(10, 10)
            self.link1.Width = self.Width - 15
            self.link1.Height = 120
            self.link1.LinkClicked += self.OpenTCs
            self.link1.VisitedLinkColor = Color.Blue
            self.link1.LinkBehavior = LinkBehavior.HoverUnderline
            self.link1.LinkColor = Color.Navy
            msg = "By using NEOS via SolverStudio you agree to the NEOS-Server terms and conditions, and accept that your model will become publicly available.\n\n"
            msg += "Some solvers require an email address, which you can set using the GAMS menu. "
            email = SolverStudio.GetRegistrySetting("NEOS", "Email", "")
            if email == "":
                msg += "You have not provided an email address, and so some solvers may fail."
            else:
                msg += "Your email address (" + email + ") will be sent to NEOS."
            # msg += "\n\nContinue?"
            self.link1.Text = msg
            self.link1.LinkArea = LinkArea(60, 20)

            self.AcceptButton = self.myOK
            self.CancelButton = self.myCancel

            self.Controls.Add(self.myOK)
            self.Controls.Add(self.myCancel)
            self.Controls.Add(self.link1)
            # self.Controls.Add(self.Warning)
            self.Controls.Add(self.check1)
            # self.CenterToScreen()
            self.StartPosition = FormStartPosition.CenterParent
Exemplo n.º 8
0
    def __init__(self):
        self.Text = __title__
        textbox = TextBox()
        textbox.Location = Point(0, 0)
        textbox.Text = "Please input reports text or any list of IDs to select elements"
        textbox.AutoSize = False
        textbox.Size = Size(400, 200)
        textbox.Multiline = True
        textbox.Name = 'value'
        self.Controls.Add(textbox)

        saveSelection = CheckBox()
        saveSelection.Location = Point(260, 205)
        saveSelection.Text = "Save selection"
        saveSelection.Name = 'saveSelection'
        if not __shiftclick__:
            saveSelection.Checked = True
        self.Controls.Add(saveSelection)

        button_update = Button()
        button_update.Text = "Select"
        button_x = 8
        button_y = 240
        button_update.Location = Point(button_x, button_y)
        button_update.Click += self.form_update
        self.Controls.Add(button_update)
        self.Height = button_y + 70
        self.Width = 400
        self.MaximizeBox = False
        self.MinimizeBox = False
        self.FormBorderStyle = FormBorderStyle.FixedDialog
Exemplo n.º 9
0
    def add_stim_param_checkbox_to_window(self, name, label_text):
        # add param label
        add_param_label(label_text + ':', self.stim_param_panel)

        # add param textbox
        self.stim_param_checkboxes[name] = CheckBox()
        self.stim_param_checkboxes[name].Parent = self.stim_param_panel
        self.stim_param_checkboxes[name].Text = ""
        self.stim_param_checkboxes[name].Checked = self.stim_parameters[name]
        self.stim_param_checkboxes[name].AutoSize = True
        self.stim_param_checkboxes[name].Width = 360
        self.stim_param_checkboxes[name].BackColor = TEXTBOX_COLOR
        self.stim_param_checkboxes[name].Font = BODY_FONT
Exemplo n.º 10
0
    def __init__(self, formParent, myIndex, strName, strID):
        self.initLabel()
        self.checkBox = CheckBox()
        self.lblName = Label()
        self.lblID = Label()
        self.formParent = formParent
        self.strName = strName
        self.strID = strID

        self.initCheckBox()
        self.initLabelName(strName)
        self.initLabelID(strID)

        self.Controls.Add(self.checkBox)
        self.Controls.Add(self.lblName)
        self.Controls.Add(self.lblID)
Exemplo n.º 11
0
    def __init__(self):
        self.Text = __title__
        textbox = TextBox()
        textbox.Location = Point(0, 0)
        textbox.Text = "Please input reports text or any list of IDs to select elements"
        textbox.AutoSize = False
        textbox.Size = Size(400, 200)
        textbox.Multiline = True
        textbox.Name = 'value'
        self.Controls.Add(textbox)     

        all_items = RadioButton()
        all_items.Location = Point(10, 205)
        all_items.Text = "All"
        all_items.Name = 'all'
        all_items.Width = 50
        all_items.Checked = True
        self.Controls.Add(all_items) 

        even = RadioButton()
        even.Location = Point(60, 205)
        even.Text = "Even only"
        even.Name = 'even_only'
        even.Width = 80
        self.Controls.Add(even) 

        odd = RadioButton()
        odd.Location = Point(140, 205)
        odd.Text = "Odd only"
        odd.Name = 'odd_only'
        self.Controls.Add(odd) 

        saveSelection = CheckBox()
        saveSelection.Location = Point(260, 205)
        saveSelection.Text = "Save selection"
        saveSelection.Name = 'saveSelection'
        if not __shiftclick__:
            saveSelection.Checked = True
        self.Controls.Add(saveSelection) 

        button_update = Button()
        button_update.Text = "Select"
        button_x = 8
        button_y = 240
        button_update.Location = Point(button_x, button_y)
        button_update.Click += self.form_update
        self.Controls.Add(button_update)
        self.Height = button_y + 70
        self.Width = 400
        self.MaximizeBox = False
        self.MinimizeBox = False
        self.FormBorderStyle = FormBorderStyle.FixedDialog
Exemplo n.º 12
0
	def __init__(self):
		self.Text = "SolverStudio"
		self.FormBorderStyle = FormBorderStyle.FixedDialog    
		self.Height=150
		self.Width = 400
		self.Warning = Label()
		self.Warning.Text = "Note: Models solved using via NEOS will be available in the public domain for perpetuity."
		self.Warning.Location = Point(10,10)
		self.Warning.Height  = 30
		self.Warning.Width = 380
		self.myOK=Button()
		self.myOK.Text = "OK"
		self.myOK.Location = Point(310,90)
		self.myOK.Click += self.AddChoice
	
		self.check1 = CheckBox()
		self.check1.Text = "Don't show this message again"
		self.check1.Location = Point(10, 80)
		self.check1.Width = 250
		self.check1.Height = 50
		
		self.link1 = LinkLabel()
		self.link1.Location = Point(10, 50)
		self.link1.Width = 380
		self.link1.Height = 40
		self.link1.LinkClicked += self.OpenTCs
		self.link1.VisitedLinkColor = Color.Blue;
		self.link1.LinkBehavior = LinkBehavior.HoverUnderline;
		self.link1.LinkColor = Color.Navy;
		self.link1.Text = "By using NEOS via SolverStudio you also agree to the NEOS-Server terms and conditions."
		self.link1.LinkArea = LinkArea(65,20)
		
		self.AcceptButton = self.myOK
		
		self.Controls.Add(self.myOK)		
		self.Controls.Add(self.link1)		
		self.Controls.Add(self.Warning)	
		self.Controls.Add(self.check1)

		self.CenterToScreen()
Exemplo n.º 13
0
    def __init__(self, curveId):
        offset = 10
        index = 0

        # header
        self.Text = "Annotate Curve"

        #label
        crvlabel = Label(Text="Curve ID = " + str(curveId), AutoSize=True)
        self.Controls.Add(crvlabel)
        width = crvlabel.Right
        pt = Point(crvlabel.Left, crvlabel.Bottom + offset)

        #textInput
        labelstart = Label(Text="Text at start", AutoSize=True)
        labelstart.Location = pt
        self.Controls.Add(labelstart)
        pt.X = labelstart.Right + offset
        inputstart = TextBox(Text="Start")
        inputstart.Location = pt
        self.Controls.Add(inputstart)
        if (inputstart.Right > width):
            width = inputstart.Right
        self.m_inputstart = inputstart

        index += 1
        cb = CheckBox()
        cb.Parent = self
        cb.Location = Point(30, labelstart.Bottom + offset * index)
        cb.Text = "Show Title"
        cb.Checked = True

        pt.X = labelstart.Left
        pt.Y = labelstart.Bottom + offset * 3
        buttonApply = Button(Text="Apply", DialogResult=DialogResult.OK)
        buttonApply.Location = pt
        self.Controls.Add(buttonApply)
        pt.X = buttonApply.Right + offset
        buttonCancel = Button(Text="Cancel", DialogResult=DialogResult.Cancel)
        buttonCancel.Location = pt
        self.Controls.Add(buttonCancel)
        if (buttonCancel.Right > width):
            width = buttonCancel.Right
        self.ClientSize = Size(width, buttonCancel.Bottom)
        self.AcceptButton = buttonApply
        self.CancelButton = buttonCancel
Exemplo n.º 14
0
    def panel(self, x, y):

        self.panel = Panel()
        self.panel.Width = width - 15
        self.panel.Height = 800
        self.panel.Location = Point(x, y)
        self.panel.BorderStyle = BorderStyle.Fixed3D
        self.panel.BackColor = Color.White
        self.panel.AutoScroll = True

        j = 30

        for i in range(0, len(sorted_level_list)):
            self.checkbox = CheckBox()
            self.checkbox.Text = str(sorted_level_list[i])
            self.checkbox.Location = Point(35, j)
            j += 25
            self.checkbox.Width = width - 95
            self.checkbox.Font = Font("Calibri Light", 10)
            self.panel.Controls.Add(self.checkbox)
            self.check_value.append(self.checkbox)

        return self.panel
Exemplo n.º 15
0
 def __init__(self):
     self.patient = patient
     self.Text = 'My Form'  #title of the new format
     self.AutoSize = True
     labelX1 = Label()
     labelX2 = Label()
     labelX1.Text = 'What is'
     labelX2.Text = 'this?'
     labelX1.Location = Point(15, 28)
     labelX2.Location = Point(120, 28)
     labelX1.Width = 50
     labelX2.Width = 50
     labelX1.Height = 20
     labelX2.Height = 40
     self.Controls.Add(labelX1)
     self.Controls.Add(labelX2)
     # create a textbox property of the form
     self.textbox1 = TextBox()
     self.textbox1.Location = Point(50, 200)
     self.textbox1.Width = 120
     self.textbox1.Height = 50
     self.Controls.Add(self.textbox1)
     # implement an interaction button
     self.button1 = Button()
     self.button1.Text = "Auto-fill current patient name"
     self.button1.Location = Point(50, 120)
     self.button1.Width = 150
     self.button1.Height = 45
     self.Controls.Add(self.button1)
     self.button1.Click += self.button1_clicked
     # add checklist question
     self.question1 = Label()
     self.question1.Text = "Which actions have you finished so far?"
     self.question1.Location = Point(15, 280)
     self.question1.AutoSize = True
     self.Controls.Add(self.question1)
     # first checkbox
     self.check1 = CheckBox()
     self.check1.Text = "Patient modelling"
     self.check1.Location = Point(20, 310)
     self.check1.AutoSize = True
     self.check1.Checked = False
     self.Controls.Add(self.check1)
     self.check1.CheckedChanged += self.checkedChanged
     # second checkbox
     self.check2 = CheckBox()
     self.check2.Text = "Plan design"
     self.check2.Location = Point(20, 340)
     self.check2.AutoSize = True
     self.check2.Checked = False
     self.Controls.Add(self.check2)
     self.check2.CheckedChanged += self.checkedChanged
     # add checklist response message
     self.response1 = Label()
     self.response1.Text = "-"
     self.response1.Location = Point(160, 340)
     self.response1.AutoSize = True
     self.Controls.Add(self.response1)
     # generate combobox
     self.question2 = Label()
     self.question2.Text = "Select an ROI"
     self.question2.Location = Point(320, 310)
     self.question2.AutoSize = True
     self.Controls.Add(self.question2)
     rois = [r.Name for r in patient.PatientModel.RegionsOfInterest]
     self.combobox = ComboBox()
     self.combobox.Location = Point(320, 340)
     self.combobox.DataSource = rois
     self.Controls.Add(self.combobox)
     self.combobox.SelectionChangeCommitted += self.comboSelection
     # generate combobox response
     self.response2 = Label()
     self.response2.Text = ""
     self.response2.Location = Point(320, 380)
     self.response2.AutoSize = True
     self.Controls.Add(self.response2)
Exemplo n.º 16
0
    def __init__(self, tools):

        label_width = 30
        offset = 30
        index = 0

        # header
        self.Text = "Add layer"
        width = 400

        #label

        #textInput
        # labelstart = Label(Text="Text at start", AutoSize=True)
        # labelstart.Location = Point(label_width, offset* index)
        # self.Controls.Add(labelstart)
        # pt.X = labelstart.Right + offset
        # inputstart = TextBox(Text="Start")
        # inputstart.Location = pt
        # self.Controls.Add(inputstart)
        # if( inputstart.Right > width ):
        # width = inputstart.Right
        # self.m_inputstart = inputstart

        # TOOL SELECTON
        index += 1
        cbb = ComboBox(
            Text="Outer contour",
            Location=Point(label_width, offset * index),
            Parent=self,
            Width=200,
        )
        cbb.Items.AddRange(
            ("Inner contour", "Outer contour", "Pocket", "Engrave", "Drill",
             "Saw X", "Saw Y", "Clamex verticaal", "Clamex horizontaal"))
        cbb.TextChanged += self.updateLabelLayername
        self.cbb_operation = cbb

        # TOOL SELECTON
        index += 1
        cbb = ComboBox(Text=tools[0],
                       Location=Point(label_width, offset * index),
                       Parent=self,
                       Width=200)
        cbb.Items.AddRange(tools)
        cbb.TextChanged += self.updateLabelLayername

        self.cbb_tool = cbb

        index += 1
        sb = NumericUpDown(AutoSize=True,
                           Location=Point(label_width, offset * index),
                           Parent=self,
                           DecimalPlaces=2)
        sb.ValueChanged += self.updateLabelLayername

        self.sb_height = sb

        index += 1
        cb = CheckBox(Text="use depth from top of workpiece",
                      AutoSize=True,
                      Location=Point(label_width, offset * index),
                      Parent=self)
        cb.Checked = False
        cb.CheckedChanged += self.updateLabelLayername

        self.cb_depth = cb

        index += 1
        la = Label(Text="<layername>",
                   Location=Point(label_width, offset * index),
                   Parent=self,
                   AutoSize=True)
        self.la_layername = la

        index += 1
        pt = Point(label_width, offset * index)

        buttonApply = Button(Text="Apply", DialogResult=DialogResult.OK)
        buttonApply.Location = pt
        self.Controls.Add(buttonApply)
        pt.X = buttonApply.Right + offset
        buttonCancel = Button(Text="Cancel", DialogResult=DialogResult.Cancel)
        buttonCancel.Location = pt
        self.Controls.Add(buttonCancel)
        if (buttonCancel.Right > width):
            width = buttonCancel.Right
        self.ClientSize = Size(width, buttonCancel.Bottom + 10)
        self.AcceptButton = buttonApply
        self.CancelButton = buttonCancel
Exemplo n.º 17
0
    def __init__(self):
        self.received_messages = {}
        self.msg_ids = {}

        self.config = None
        self.num_messages = DEFAULT_NUM_MESSAGES
        if path.exists(CONFIG_FILENAME):
            print('Reading config...')
            self.config = open(CONFIG_FILENAME, 'r').readlines()
            for x in range(len(self.config)):
                self.config[x] = self.config[x].strip('\n')
            self.num_messages = int(self.config[0].split(',')[0])

        # we subscribe to every possible MAVLink message here
        # super inefficient, but much easier to just collect 'em all!
        for attr_name in dir(MAVLink.MAVLINK_MSG_ID):
            if attr_name.upper() == attr_name:
                attr = getattr(MAVLink.MAVLINK_MSG_ID, attr_name)
                self.msg_ids[attr.value__] = attr
                MAV.SubscribeToPacketType(
                    attr, Func[MAVLink.MAVLinkMessage,
                               bool](self.get_message_data))
        MAV.OnPacketReceived += self.packet_handler

        self.Text = 'MAVLink MinMonitor'
        self.Location = Point(0, 0)
        self.TopMost = True
        self.BackColor = CustomColor.MPDarkGray
        self.ForeColor = CustomColor.White
        self.Shown += self.on_load
        self.FormClosing += self.on_exit

        self.margin = 5
        start_x, start_y = 12, 10

        self.msg_widgets = []
        for x in range(self.num_messages):
            cbo_msg_id = ComboBox()
            cbo_msg_id.Width = 175
            cbo_msg_id.DropDownStyle = ComboBoxStyle.DropDown
            cbo_msg_id.FlatStyle = FlatStyle.Flat
            cbo_msg_id.BackColor = CustomColor.MPLightGray
            cbo_msg_id.ForeColor = CustomColor.White
            cbo_msg_id.DataSource = self.received_messages.keys()
            cbo_msg_id.MouseDown += self.update_message_ids
            cbo_msg_id.SelectionChangeCommitted += self.update_datasource
            cbo_msg_id.Text = ''

            cbo_msg_dataframes = ComboBox()
            cbo_msg_dataframes.Width = 120
            cbo_msg_dataframes.DropDownStyle = ComboBoxStyle.DropDown
            cbo_msg_dataframes.FlatStyle = FlatStyle.Flat
            cbo_msg_dataframes.BackColor = CustomColor.MPLightGray
            cbo_msg_dataframes.ForeColor = CustomColor.White
            cbo_msg_dataframes.Text = ''

            lbl_data = Label()
            lbl_data.Text = 'NO DATA'
            lbl_data.BackColor = CustomColor.MPMediumGray
            lbl_data.Width = 120
            lbl_data.Height = cbo_msg_id.Height - 5

            txt_min = TextBox()
            txt_min.Width = 75
            txt_min.BorderStyle = BorderStyle.FixedSingle
            txt_min.BackColor = CustomColor.MPLightGray
            txt_min.ForeColor = CustomColor.White
            txt_min.MaxLength = 10
            txt_min.TextAlign = HorizontalAlignment.Center
            txt_min.KeyPress += self.limit_to_decimal_digits

            txt_max = TextBox()
            txt_max.Width = 75
            txt_max.BorderStyle = BorderStyle.FixedSingle
            txt_max.BackColor = CustomColor.MPLightGray
            txt_max.ForeColor = CustomColor.White
            txt_max.MaxLength = 10
            txt_max.TextAlign = HorizontalAlignment.Center
            txt_max.KeyPress += self.limit_to_decimal_digits

            txt_factor = TextBox()
            txt_factor.Width = 75
            txt_factor.BorderStyle = BorderStyle.FixedSingle
            txt_factor.BackColor = CustomColor.MPLightGray
            txt_factor.ForeColor = CustomColor.White
            txt_factor.MaxLength = 10
            txt_factor.TextAlign = HorizontalAlignment.Center
            txt_factor.KeyPress += self.limit_to_decimal_digits

            self.msg_widgets.append(
                OrderedDict([('cbo_msg_id', cbo_msg_id),
                             ('cbo_msg_dataframes', cbo_msg_dataframes),
                             ('lbl_data', lbl_data), ('txt_min', txt_min),
                             ('txt_max', txt_max),
                             ('txt_factor', txt_factor)]))

        self.lbl_min = Label()
        self.lbl_min.Text = 'Min'
        self.lbl_min.BackColor = CustomColor.MPDarkGray
        self.lbl_min.Width = self.msg_widgets[0]['txt_min'].Width
        self.lbl_min.Height = self.msg_widgets[0]['txt_min'].Height - 5

        self.lbl_max = Label()
        self.lbl_max.Text = 'Max'
        self.lbl_max.BackColor = CustomColor.MPDarkGray
        self.lbl_max.Width = self.msg_widgets[0]['txt_max'].Width
        self.lbl_max.Height = self.msg_widgets[0]['txt_max'].Height - 5

        self.lbl_factor = Label()
        self.lbl_factor.Text = 'Factor'
        self.lbl_factor.BackColor = CustomColor.MPDarkGray
        self.lbl_factor.Width = self.msg_widgets[0]['txt_factor'].Width
        self.lbl_factor.Height = self.msg_widgets[0]['txt_factor'].Height - 5

        self.lbl_num_messages = Label()
        self.lbl_num_messages.Text = 'Number of messages to monitor (restart to take effect)'
        self.lbl_num_messages.BackColor = CustomColor.MPDarkGray
        self.lbl_num_messages.AutoSize = True

        self.spn_num_messages = NumericUpDown()
        self.spn_num_messages.Width = 40
        self.spn_num_messages.BorderStyle = BorderStyle.FixedSingle
        self.spn_num_messages.BackColor = CustomColor.MPLightGray
        self.spn_num_messages.ForeColor = CustomColor.White
        self.spn_num_messages.Value = self.num_messages

        self.chk_hide_factors = CheckBox()
        self.chk_hide_factors.FlatAppearance.BorderSize = 1
        self.chk_hide_factors.FlatAppearance.BorderColor = CustomColor.MPLightGray
        self.chk_hide_factors.Text = 'Hide threshold/scaling preferences'
        self.chk_hide_factors.AutoSize = True

        self.chk_sticky = CheckBox()
        self.chk_sticky.FlatAppearance.BorderSize = 1
        self.chk_sticky.FlatAppearance.BorderColor = CustomColor.MPLightGray
        self.chk_sticky.Text = 'Always on top'
        self.chk_sticky.AutoSize = True

        self.lbl_status = Label()
        self.lbl_status.Text = 'No messages received'
        self.lbl_status.BackColor = CustomColor.MPMediumGray
        self.lbl_status.Height = self.msg_widgets[0]['txt_min'].Height - 5

        # pseudo-responsive form layout
        x, y = start_x, start_y
        max_x = 0
        x = start_x + (self.msg_widgets[0]['cbo_msg_id'].Width +
                       self.msg_widgets[0]['cbo_msg_dataframes'].Width +
                       self.msg_widgets[0]['lbl_data'].Width) + self.margin * 4
        x, y, x_extent = \
            self.add_control_horizontal(self.lbl_min, x, y, self.margin)
        x, y, x_extent = \
            self.add_control_horizontal(self.lbl_max, x, y, self.margin)
        x, y, x_extent = \
            self.add_control_vertical(self.lbl_factor, x, y, self.margin)
        for widget in self.msg_widgets:
            x = start_x
            for control in widget.items():
                x, y, x_extent = self.add_control_horizontal(
                    control[1], x, y, self.margin)
            max_x = max([x_extent, max_x])
            y += widget.items()[0][1].Height + self.margin
        self.Width = max_x + self.margin * 4
        self.WideWidth = self.Width
        self.NarrowWidth = self.msg_widgets[0]['lbl_data'].Location.X + \
                           self.msg_widgets[0]['lbl_data'].Width + self.margin * 5
        y += 20
        x, y, x_extent = self.add_control_horizontal(self.spn_num_messages,
                                                     start_x, y, self.margin)
        x, y, x_extent = self.add_control_vertical(self.lbl_num_messages, x,
                                                   y + 3, self.margin)
        x, y, x_extent = self.add_control_vertical(self.chk_hide_factors,
                                                   start_x + 3, y + 5,
                                                   self.margin)
        x, y, x_extent = self.add_control_vertical(self.chk_sticky, x, y,
                                                   self.margin)
        self.lbl_status.Width = self.Width - self.margin * 7
        x, y, x_extent = self.add_control_vertical(self.lbl_status, start_x,
                                                   y + 3, self.margin)
        self.Height = y + self.lbl_status.Height + self.margin * 5
Exemplo n.º 18
0
 def __init__(self, contents):
     self.Contents = contents       
     self.BackColor = Color.FromArgb(25,25,25)
     self.ForeColor = Color.FromArgb(231,231,231)
     self.Size = Size(200, 425)
     self.Text = '{0} - v{1}'.format(self.ScriptName, self.CurVer)
     self.TopMost = True
     
     self.box = GroupBox()
     self.box.BackColor = Color.FromArgb(25,25,25)
     self.box.ForeColor = Color.FromArgb(23,221,23)
     self.box.Size = Size(180, 140)
     self.box.Location = Point(2, 2)
     self.box.Text = 'Options'
     
     self.box2 = GroupBox()
     self.box2.BackColor = Color.FromArgb(25,25,25)
     self.box2.ForeColor = Color.FromArgb(23,221,23)
     self.box2.Size = Size(180, 40)
     self.box2.Location = Point(02, 275)
     self.box2.Text = 'Weapon Type'
     
     self.box3 = GroupBox()
     self.box3.BackColor = Color.FromArgb(25,25,25)
     self.box3.ForeColor = Color.FromArgb(23,221,23)
     self.box3.Size = Size(180, 130)
     self.box3.Location = Point(02, 144)
     self.box3.Text = 'Dress/Arm'
     
     self.box4 = GroupBox()
     self.box4.BackColor = Color.FromArgb(25,25,25)
     self.box4.ForeColor = Color.FromArgb(23,221,23)
     self.box4.Size = Size(180, 60)
     self.box4.Location = Point(02, 315)
     
     self.cbA = CheckBox()
     self.cbA.Text = 'Conf/Evade'
     self.cbA.Checked = False
     self.cbA.BackColor = Color.FromArgb(25,25,25)
     self.cbA.Location = Point(10, 15)
     self.cbA.Size = Size(85, 20)
     
     self.cbB = CheckBox()
     self.cbB.Text = 'EoO'
     self.cbB.Checked = False
     self.cbB.BackColor = Color.FromArgb(25,25,25)
     self.cbB.Location = Point(95, 15)
     self.cbB.Size = Size(85, 20)
     
     self.cbC = CheckBox()
     self.cbC.Text = 'Band Heal'
     self.cbC.Checked = False
     self.cbC.BackColor = Color.FromArgb(25,25,25)
     self.cbC.Location = Point(10, 35)
     self.cbC.Size = Size(85, 20)
     
     self.cbD = CheckBox()
     self.cbD.Text = 'Cons Wep'
     self.cbD.Checked = False
     self.cbD.BackColor = Color.FromArgb(25,25,25)
     self.cbD.Location = Point(95, 35)
     self.cbD.Size = Size(85, 20)
     
     self.cbE = CheckBox()
     self.cbE.Text = 'Honor'
     self.cbE.Checked = False
     self.cbE.BackColor = Color.FromArgb(25,25,25)
     self.cbE.Location = Point(10, 55)
     self.cbE.Size = Size(85, 20)
     
     self.cbF = CheckBox()
     self.cbF.Text = 'Div Fury'
     self.cbF.Checked = False
     self.cbF.BackColor = Color.FromArgb(25,25,25)
     self.cbF.Location = Point(95, 55)
     self.cbF.Size = Size(85, 20)
     
     self.cbG = CheckBox()
     self.cbG.Text = 'Onslaught'
     self.cbG.Checked = False
     self.cbG.BackColor = Color.FromArgb(25,25,25)
     self.cbG.Location = Point(10, 75)
     self.cbG.Size = Size(85, 20)
     
     self.cbH = CheckBox()
     self.cbH.Text = 'Cntr Atk'
     self.cbH.Checked = False
     self.cbH.BackColor = Color.FromArgb(25,25,25)
     self.cbH.Location = Point(95, 75)
     self.cbH.Size = Size(85, 20)
     
     self.cbI = CheckBox()
     self.cbI.Text = 'OJ Petal'
     self.cbI.Checked = False
     self.cbI.BackColor = Color.FromArgb(25,25,25)
     self.cbI.Location = Point(10, 95)
     self.cbI.Size = Size(85, 20)
     
     self.rbD = RadioButton()
     self.rbD.Text = 'D Axe'
     self.rbD.Location = Point(25, 290)
     self.rbD.BackColor = Color.FromArgb(25,25,25)
     self.rbD.ForeColor = Color.FromArgb(231,231,231)
     self.rbD.Size = Size(65, 20)
     
     self.rbE = RadioButton()
     self.rbE.Text = 'B Staff'
     self.rbE.Location = Point(105, 290)
     self.rbE.BackColor = Color.FromArgb(25,25,25)
     self.rbE.ForeColor = Color.FromArgb(231,231,231)
     self.rbE.Size = Size(65, 20)
     
     self.btnA = Button()
     self.btnA.Text = 'Demon'
     self.btnA.BackColor = Color.FromArgb(50,24,25)
     self.btnA.Location = Point(10, 242)
     self.btnA.Size = Size(55, 25)
     self.btnA.FlatStyle = FlatStyle.Flat
     self.btnA.FlatAppearance.BorderSize = 1
     self.btnA.Click += self.btnDemonPressed
     
     self.btnB = Button()
     self.btnB.Text = 'Reptile'
     self.btnB.BackColor = Color.FromArgb(25,50,25)
     self.btnB.Location = Point(65, 242)
     self.btnB.Size = Size(55, 25)
     self.btnB.FlatStyle = FlatStyle.Flat
     self.btnB.FlatAppearance.BorderSize = 1 
     self.btnB.Click += self.btnReptilePressed
     
     self.btnC = Button()
     self.btnC.Text = 'Undead'
     self.btnC.BackColor = Color.FromArgb(50,25,25)
     self.btnC.Location = Point(120, 242)
     self.btnC.Size = Size(55, 25)
     self.btnC.FlatStyle = FlatStyle.Flat
     self.btnC.FlatAppearance.BorderSize = 1 
     self.btnC.Click += self.btnUndeadPressed
     
     self.btnD = Button()
     self.btnD.Text = 'Elemen'
     self.btnD.BackColor = Color.FromArgb(25,50,25)
     self.btnD.Location = Point(10, 217)
     self.btnD.Size = Size(55, 25)
     self.btnD.FlatStyle = FlatStyle.Flat
     self.btnD.FlatAppearance.BorderSize = 1 
     self.btnD.Click += self.btnElemenPressed
     
     self.btnE = Button()
     self.btnE.Text = 'Arach'
     self.btnE.BackColor = Color.FromArgb(50,25,25)
     self.btnE.Location = Point(65, 217)
     self.btnE.Size = Size(55, 25)
     self.btnE.FlatStyle = FlatStyle.Flat
     self.btnE.FlatAppearance.BorderSize = 1 
     self.btnE.Click += self.btnArachPressed
     
     self.btnF = Button()
     self.btnF.Text = 'Repond'
     self.btnF.BackColor = Color.FromArgb(25,50,25)
     self.btnF.Location = Point(120, 217)
     self.btnF.Size = Size(55, 25)
     self.btnF.FlatStyle = FlatStyle.Flat
     self.btnF.FlatAppearance.BorderSize = 1 
     self.btnF.Click += self.btnRepondPressed
     
     self.btnG = Button()
     self.btnG.Text = 'Main Dress'
     self.btnG.BackColor = Color.FromArgb(25,50,25)
     self.btnG.Location = Point(10, 160)
     self.btnG.Size = Size(165, 25)
     self.btnG.FlatStyle = FlatStyle.Flat
     self.btnG.FlatAppearance.BorderSize = 1 
     self.btnG.Click += self.btnDressPressed
     
     self.btnH = Button()
     self.btnH.Text = 'Luck Suit'
     self.btnH.BackColor = Color.FromArgb(50,50,10)
     self.btnH.Location = Point(10, 185)
     self.btnH.Size = Size(165, 25)
     self.btnH.FlatStyle = FlatStyle.Flat
     self.btnH.FlatAppearance.BorderSize = 1 
     self.btnH.Click += self.btnLuckPressed
     
     self.btnGet = Button()
     self.btnGet.Text = 'Stop'
     self.btnGet.BackColor = Color.FromArgb(100,10,10)
     self.btnGet.Location = Point(95, 330)
     self.btnGet.Size = Size(80, 35)
     self.btnGet.FlatStyle = FlatStyle.Flat
     self.btnGet.FlatAppearance.BorderSize = 1
     self.btnGet.Click += self.btnStopPressed
     
     self.startGet = Button()
     self.startGet.Text = 'Start'
     self.startGet.BackColor = Color.FromArgb(10,100,10)
     self.startGet.Location = Point(10, 330)
     self.startGet.Size = Size(80, 35)
     self.startGet.FlatStyle = FlatStyle.Flat
     self.startGet.FlatAppearance.BorderSize = 1
     self.startGet.Click += self.btnStartPressed
     
     
     self.Controls.Add(self.cbA)
     self.Controls.Add(self.cbB)
     self.Controls.Add(self.cbC)
     self.Controls.Add(self.cbD)
     self.Controls.Add(self.cbE)
     self.Controls.Add(self.cbF)
     self.Controls.Add(self.cbG)
     self.Controls.Add(self.cbH)
     self.Controls.Add(self.cbI)
     self.Controls.Add(self.btnA)
     self.Controls.Add(self.btnB)
     self.Controls.Add(self.btnC)
     self.Controls.Add(self.btnD)
     self.Controls.Add(self.btnE)
     self.Controls.Add(self.btnF)
     self.Controls.Add(self.btnG)
     self.Controls.Add(self.btnH)
     self.Controls.Add(self.btnGet)
     self.Controls.Add(self.startGet)
     self.Controls.Add(self.rbD)   
     self.Controls.Add(self.rbE)
     self.Controls.Add(self.box)
     self.Controls.Add(self.box2)
     self.Controls.Add(self.box3)
     self.Controls.Add(self.box4)
Exemplo n.º 19
0
        def setupMainWindow(self):
            self.MainWindow = self.Panel(0, 60)

            vert_spacer = 32
            offset = 15

            self.label_billes = Label()
            self.label_billes.Text = "Billes sur point de localisation"
            self.label_billes.Location = Point(15, offset)
            self.label_billes.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_billes.AutoSize = True

            self.check_billes = CheckBox()
            self.check_billes.Location = Point(410, offset - 2)
            self.check_billes.Width = 30
            self.check_billes.Checked = False

            button_ext = Button()
            button_ext.Text = "Contour 'External' et overrides"
            button_ext.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_ext.Location = Point(15, offset + vert_spacer)
            button_ext.Width = 375
            button_ext.Click += self.button_ext_Clicked

            self.check_ext = CheckBox()
            self.check_ext.Location = Point(410, offset + vert_spacer - 2)
            self.check_ext.Width = 30
            self.check_ext.Checked = False

            button_isoOK = Button()
            button_isoOK.Text = "Position de l'isocentre et point de localisation"
            button_isoOK.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_isoOK.Location = Point(15, offset + vert_spacer * 2)
            button_isoOK.Width = 375
            button_isoOK.Click += self.button_isoOK_Clicked

            self.check_isoOK = CheckBox()
            self.check_isoOK.Location = Point(410,
                                              offset + vert_spacer * 2 - 2)
            self.check_isoOK.Width = 30
            self.check_isoOK.Checked = False

            button_segments = Button()
            button_segments.Text = "Les segments sont corrects/flashé au besoin"
            button_segments.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_segments.Location = Point(15, offset + vert_spacer * 3)
            button_segments.Width = 375
            button_segments.Click += self.button_segments_Clicked

            self.check_segments = CheckBox()
            self.check_segments.Location = Point(410,
                                                 offset + vert_spacer * 3 - 2)
            self.check_segments.Width = 30
            self.check_segments.Checked = False

            button_beams_Rx = Button()
            button_beams_Rx.Text = "Faisceaux et prescription"
            button_beams_Rx.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_beams_Rx.Location = Point(15, offset + vert_spacer * 4)
            button_beams_Rx.Width = 375
            button_beams_Rx.Click += self.button_beams_Clicked

            self.check_beams_Rx = CheckBox()
            self.check_beams_Rx.Location = Point(410,
                                                 offset + vert_spacer * 4 - 2)
            self.check_beams_Rx.Width = 30
            self.check_beams_Rx.Checked = False

            button_grid = Button()
            button_grid.Text = "La grille de dose est correcte"
            button_grid.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_grid.Location = Point(15, offset + vert_spacer * 5)
            button_grid.Width = 375
            button_grid.Click += self.button_grid_Clicked

            self.check_grid = CheckBox()
            self.check_grid.Location = Point(410, offset + vert_spacer * 5 - 2)
            self.check_grid.Width = 30
            self.check_grid.Checked = False

            self.label_distribution_dose = Label()
            self.label_distribution_dose.Text = "Distribution de dose et clinical goals"
            self.label_distribution_dose.Location = Point(
                15, offset + vert_spacer * 6)
            self.label_distribution_dose.Font = Font("Arial", 10.25,
                                                     FontStyle.Bold)
            self.label_distribution_dose.AutoSize = True

            self.check_distribution_dose = CheckBox()
            self.check_distribution_dose.Location = Point(
                410, offset + vert_spacer * 6 - 2)
            self.check_distribution_dose.Width = 30
            self.check_distribution_dose.Checked = False

            self.label_noteMD = Label()
            self.label_noteMD.Text = "Vérif note de planif du MD                          NON"
            self.label_noteMD.Location = Point(15, offset + vert_spacer * 7)
            self.label_noteMD.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_noteMD.AutoSize = True

            self.check_noteMD_non = CheckBox()
            self.check_noteMD_non.Location = Point(
                340, offset + vert_spacer * 7 - 2)
            self.check_noteMD_non.Width = 30
            self.check_noteMD_non.Checked = False

            self.label_OK1 = Label()
            self.label_OK1.Text = "OK"
            self.label_OK1.Location = Point(370, offset + vert_spacer * 7)
            self.label_OK1.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_OK1.AutoSize = True

            self.check_noteMD_OK = CheckBox()
            self.check_noteMD_OK.Location = Point(410,
                                                  offset + vert_spacer * 7 - 2)
            self.check_noteMD_OK.Width = 30
            self.check_noteMD_OK.Checked = False

            self.label_DSP = Label()
            self.label_DSP.Text = "Vérif note positionnement: HT, DSPs, matching"
            self.label_DSP.Location = Point(15, offset + vert_spacer * 8)
            self.label_DSP.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_DSP.AutoSize = True

            self.check_DSP = CheckBox()
            self.check_DSP.Location = Point(410, offset + vert_spacer * 8 - 2)
            self.check_DSP.Width = 30
            self.check_DSP.Checked = False

            self.label_mise_en_place = Label()
            self.label_mise_en_place.Text = "Vérif mise en place: ISO DICOM, struct, phase"
            self.label_mise_en_place.Location = Point(15,
                                                      offset + vert_spacer * 9)
            self.label_mise_en_place.Font = Font("Arial", 10.25,
                                                 FontStyle.Bold)
            self.label_mise_en_place.AutoSize = True

            self.check_mise_en_place = CheckBox()
            self.check_mise_en_place.Location = Point(
                410, offset + vert_spacer * 9 - 2)
            self.check_mise_en_place.Width = 30
            self.check_mise_en_place.Checked = False

            self.label_doctx = Label()
            self.label_doctx.Text = "Vérification Document de Tx                      NON"
            self.label_doctx.Location = Point(15, offset + vert_spacer * 10)
            self.label_doctx.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_doctx.AutoSize = True

            self.check_doctx_non = CheckBox()
            self.check_doctx_non.Location = Point(
                340, offset + vert_spacer * 10 - 2)
            self.check_doctx_non.Width = 30
            self.check_doctx_non.Checked = False

            self.label_OK2 = Label()
            self.label_OK2.Text = "OK"
            self.label_OK2.Location = Point(370, offset + vert_spacer * 10)
            self.label_OK2.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_OK2.AutoSize = True

            self.check_doctx_OK = CheckBox()
            self.check_doctx_OK.Location = Point(410,
                                                 offset + vert_spacer * 10 - 2)
            self.check_doctx_OK.Width = 30
            self.check_doctx_OK.Checked = False

            self.label_codestat = Label()
            self.label_codestat.Text = "Vérification des codes statistiques"
            self.label_codestat.Location = Point(15, offset + vert_spacer * 11)
            self.label_codestat.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_codestat.AutoSize = True

            self.check_codestat = CheckBox()
            self.check_codestat.Location = Point(410,
                                                 offset + vert_spacer * 11 - 2)
            self.check_codestat.Width = 30
            self.check_codestat.Checked = False

            #Count up beamsets
            bs_text = ""
            num_bs = 0
            for bs in plan.BeamSets:
                bs_text += bs.DicomPlanLabel + ", "
                num_bs += 1

            self.label_results_header = Label()
            self.label_results_header.Text = "Résultats"
            self.label_results_header.Location = Point(
                15, offset + vert_spacer * 12.5)
            self.label_results_header.Font = Font("Arial", 11, FontStyle.Bold)
            self.label_results_header.AutoSize = True

            self.label_results = Label()
            self.label_results.Text = "Nombre de beamsets dans le plan: " + str(
                num_bs) + ' (' + bs_text[0:-2] + ')'
            self.label_results.Location = Point(15,
                                                offset + vert_spacer * 13.5)
            self.label_results.Font = Font(
                "Arial",
                10,
            )
            self.label_results.AutoSize = True

            self.label_reminder = Label()
            self.label_reminder.Text = "Rappel:\nRoulez le script de vérification pour chaque beamset"
            self.label_reminder.Location = Point(15,
                                                 offset + vert_spacer * 14.5)
            self.label_reminder.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_reminder.ForeColor = Color.Red
            self.label_reminder.AutoSize = True

            self.MainWindow.Controls.Add(self.label_billes)
            self.MainWindow.Controls.Add(self.check_billes)

            self.MainWindow.Controls.Add(button_ext)
            self.MainWindow.Controls.Add(self.check_ext)

            self.MainWindow.Controls.Add(button_isoOK)
            self.MainWindow.Controls.Add(self.check_isoOK)

            self.MainWindow.Controls.Add(button_segments)
            self.MainWindow.Controls.Add(self.check_segments)

            self.MainWindow.Controls.Add(button_beams_Rx)
            self.MainWindow.Controls.Add(self.check_beams_Rx)

            self.MainWindow.Controls.Add(button_grid)
            self.MainWindow.Controls.Add(self.check_grid)

            self.MainWindow.Controls.Add(self.label_distribution_dose)
            self.MainWindow.Controls.Add(self.check_distribution_dose)

            self.MainWindow.Controls.Add(self.label_noteMD)
            self.MainWindow.Controls.Add(self.check_noteMD_non)
            self.MainWindow.Controls.Add(self.label_OK1)
            self.MainWindow.Controls.Add(self.check_noteMD_OK)

            self.MainWindow.Controls.Add(self.label_DSP)
            self.MainWindow.Controls.Add(self.check_DSP)

            self.MainWindow.Controls.Add(self.label_mise_en_place)
            self.MainWindow.Controls.Add(self.check_mise_en_place)

            self.MainWindow.Controls.Add(self.label_doctx)
            self.MainWindow.Controls.Add(self.check_doctx_non)
            self.MainWindow.Controls.Add(self.label_OK2)
            self.MainWindow.Controls.Add(self.check_doctx_OK)

            self.MainWindow.Controls.Add(self.label_codestat)
            self.MainWindow.Controls.Add(self.check_codestat)

            self.MainWindow.Controls.Add(self.label_results_header)
            self.MainWindow.Controls.Add(self.label_results)
            self.MainWindow.Controls.Add(self.label_reminder)
Exemplo n.º 20
0
        def setupMainWindow(self):
            self.MainWindow = self.Panel(0, 60)

            vert_spacer = 35
            offset = 20

            self.label_bonscan = Label()
            self.label_bonscan.Text = "Le bon scan est utilisé pour la planification"
            self.label_bonscan.Location = Point(15, offset)
            self.label_bonscan.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_bonscan.AutoSize = True

            self.check_bonscan = CheckBox()
            self.check_bonscan.Location = Point(410, offset - 2)
            self.check_bonscan.Width = 30
            self.check_bonscan.Checked = False

            self.label_scanOK = Label()
            self.label_scanOK.Text = "Scan OK (artéfactes, étendu du scan, objets sur la table)"
            self.label_scanOK.Location = Point(15, offset + vert_spacer)
            self.label_scanOK.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_scanOK.AutoSize = True

            self.check_scanOK = CheckBox()
            self.check_scanOK.Location = Point(410, offset + vert_spacer - 2)
            self.check_scanOK.Width = 30
            self.check_scanOK.Checked = False

            button_ext = Button()
            button_ext.Text = "Contour 'External' + overrides"
            button_ext.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_ext.Location = Point(15, offset + vert_spacer * 2)
            button_ext.Width = 375
            button_ext.Click += self.button_ext_Clicked

            self.check_ext = CheckBox()
            self.check_ext.Location = Point(410, offset + vert_spacer * 2 - 2)
            self.check_ext.Width = 30
            self.check_ext.Checked = False

            self.label_contours = Label()
            self.label_contours.Text = "Les contours d'optimisation sont corrects"
            self.label_contours.Location = Point(15, offset + vert_spacer * 3)
            self.label_contours.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_contours.AutoSize = True

            self.check_contours = CheckBox()
            self.check_contours.Location = Point(410,
                                                 offset + vert_spacer * 3 - 2)
            self.check_contours.Width = 30
            self.check_contours.Checked = False

            button_isoOK = Button()
            button_isoOK.Text = "Position de l'isocentre"
            button_isoOK.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_isoOK.Location = Point(15, offset + vert_spacer * 4)
            button_isoOK.Width = 375
            button_isoOK.Click += self.button_isoOK_Clicked

            self.check_isoOK = CheckBox()
            self.check_isoOK.Location = Point(410,
                                              offset + vert_spacer * 4 - 2)
            self.check_isoOK.Width = 30
            self.check_isoOK.Checked = False

            button_beams_Rx = Button()
            button_beams_Rx.Text = "Faisceaux et prescription"
            button_beams_Rx.Font = Font("Arial", 10.25, FontStyle.Bold)
            button_beams_Rx.Location = Point(15, offset + vert_spacer * 5)
            button_beams_Rx.Width = 375
            button_beams_Rx.Click += self.button_beams_Clicked

            self.check_beams_Rx = CheckBox()
            self.check_beams_Rx.Location = Point(410,
                                                 offset + vert_spacer * 5 - 2)
            self.check_beams_Rx.Width = 30
            self.check_beams_Rx.Checked = False

            button_optimisation = Button()
            button_optimisation.Text = "Objectifs et paramètres d'optimisation"
            button_optimisation.Font = Font("Arial", 10.25, FontStyle.Bold)
            #button_optimisation.TextAlign = HorizontalAlignment.Center
            button_optimisation.Location = Point(15, offset + vert_spacer * 6)
            button_optimisation.Width = 375
            button_optimisation.Click += self.button_opt_Clicked

            self.check_optimisation = CheckBox()
            self.check_optimisation.Location = Point(
                410, offset + vert_spacer * 6 - 2)
            self.check_optimisation.Width = 30
            self.check_optimisation.Checked = False

            self.label_distribution_dose = Label()
            self.label_distribution_dose.Text = "Distribution de dose et clinical goals"
            self.label_distribution_dose.Location = Point(
                15, offset + vert_spacer * 7)
            self.label_distribution_dose.Font = Font("Arial", 10.25,
                                                     FontStyle.Bold)
            self.label_distribution_dose.AutoSize = True

            self.check_distribution_dose = CheckBox()
            self.check_distribution_dose.Location = Point(
                410, offset + vert_spacer * 7 - 2)
            self.check_distribution_dose.Width = 30
            self.check_distribution_dose.Checked = False

            #Count up beamsets
            bs_text = ""
            num_bs = 0
            for bs in plan.BeamSets:
                bs_text += bs.DicomPlanLabel + ", "
                num_bs += 1

            self.label_results_header = Label()
            self.label_results_header.Text = "Résultats"
            self.label_results_header.Location = Point(
                15, offset + vert_spacer * 9)
            self.label_results_header.Font = Font("Arial", 11, FontStyle.Bold)
            self.label_results_header.AutoSize = True

            self.label_results = Label()
            self.label_results.Text = "Nombre de beamsets dans le plan: " + str(
                num_bs) + ' (' + bs_text[0:-2] + ')'
            self.label_results.Location = Point(15, offset + vert_spacer * 10)
            self.label_results.Font = Font(
                "Arial",
                10,
            )
            self.label_results.AutoSize = True

            self.label_reminder = Label()
            self.label_reminder.Text = "Rappel:\nRoulez le script de vérification pour chaque beamset"
            self.label_reminder.Location = Point(15, offset + vert_spacer * 11)
            self.label_reminder.Font = Font("Arial", 10.25, FontStyle.Bold)
            self.label_reminder.ForeColor = Color.Red
            self.label_reminder.AutoSize = True

            self.MainWindow.Controls.Add(self.label_bonscan)
            self.MainWindow.Controls.Add(self.check_bonscan)

            self.MainWindow.Controls.Add(self.label_scanOK)
            self.MainWindow.Controls.Add(self.check_scanOK)

            self.MainWindow.Controls.Add(button_ext)
            self.MainWindow.Controls.Add(self.check_ext)

            self.MainWindow.Controls.Add(button_isoOK)
            self.MainWindow.Controls.Add(self.check_isoOK)

            self.MainWindow.Controls.Add(button_beams_Rx)
            self.MainWindow.Controls.Add(self.check_beams_Rx)

            self.MainWindow.Controls.Add(self.label_contours)
            self.MainWindow.Controls.Add(self.check_contours)

            self.MainWindow.Controls.Add(button_optimisation)
            self.MainWindow.Controls.Add(self.check_optimisation)

            self.MainWindow.Controls.Add(self.label_distribution_dose)
            self.MainWindow.Controls.Add(self.check_distribution_dose)

            self.MainWindow.Controls.Add(self.label_results_header)
            self.MainWindow.Controls.Add(self.label_results)
            self.MainWindow.Controls.Add(self.label_reminder)
        def setupPlanningScriptLauncher(self):
            self.LauncherPanel = self.newPanel(0, 0)

            self.PatientLabel = Label()
            self.PatientLabel.Text = "Patient: " + patient.PatientName.replace(
                '^', ', ')
            self.PatientLabel.Location = Point(25, 25)
            self.PatientLabel.Font = Font("Arial", 10, FontStyle.Bold)
            self.PatientLabel.AutoSize = True

            self.Label2 = Label()
            self.Label2.Text = ""
            self.Label2.Location = Point(300, 50)
            self.Label2.AutoSize = True
            self.Label2.Font = Font("Arial", 10)
            self.Label2.ForeColor = Color.Black

            self.Label3 = Label()
            self.Label3.Text = ""
            self.Label3.Location = Point(300, 70)
            self.Label3.AutoSize = True
            self.Label3.Font = Font("Arial", 10)
            self.Label3.ForeColor = Color.Black

            self.Label4 = Label()
            self.Label4.Text = ""
            self.Label4.Location = Point(300, 90)
            self.Label4.AutoSize = True
            self.Label4.Font = Font("Arial", 10)
            self.Label4.ForeColor = Color.Black

            self.Label5 = Label()
            self.Label5.Text = ""
            self.Label5.Location = Point(300, 110)
            self.Label5.AutoSize = True
            self.Label5.Font = Font("Arial", 10)
            self.Label5.ForeColor = Color.Black

            self.Reminder = Label()
            self.Reminder.Text = ""
            self.Reminder.Location = Point(300, 220)
            self.Reminder.AutoSize = True
            self.Reminder.Font = Font("Arial", 11, FontStyle.Italic)
            self.Reminder.ForeColor = Color.Black

            self.PTV1Label = Label()
            self.PTV1Label.Text = "PTV 1 (+haut):"
            self.PTV1Label.Location = Point(25, 60)
            self.PTV1Label.Font = Font("Arial", 10)
            self.PTV1Label.AutoSize = True

            self.PTV1name = TextBox()
            self.PTV1name.Text = " "
            self.PTV1name.Size = Size(60, 60)
            self.PTV1name.Location = Point(120, 60)

            self.dose1Label = Label()
            self.dose1Label.Text = "dose:"
            self.dose1Label.Location = Point(200, 60)
            self.dose1Label.Font = Font("Arial", 10)
            self.dose1Label.AutoSize = True

            self.PTV1dose = TextBox()
            self.PTV1dose.Text = " "
            self.PTV1dose.Size = Size(40, 30)
            self.PTV1dose.Location = Point(260, 60)

            self.fractionLabel = Label()
            self.fractionLabel.Text = "nbr fraction:"
            self.fractionLabel.Location = Point(320, 60)
            self.fractionLabel.Font = Font("Arial", 10)
            self.fractionLabel.AutoSize = True

            self.fraction = TextBox()
            self.fraction.Text = " "
            self.fraction.Size = Size(40, 30)
            self.fraction.Location = Point(430, 60)

            self.PTV2Label = Label()
            self.PTV2Label.Text = "PTV 2:"
            self.PTV2Label.Location = Point(25, 90)
            self.PTV2Label.Font = Font("Arial", 10)
            self.PTV2Label.AutoSize = True

            self.PTV2name = TextBox()
            self.PTV2name.Text = " "
            self.PTV2name.Size = Size(60, 60)
            self.PTV2name.Location = Point(120, 90)

            self.dose2Label = Label()
            self.dose2Label.Text = "dose:"
            self.dose2Label.Location = Point(200, 90)
            self.dose2Label.Font = Font("Arial", 10)
            self.dose2Label.AutoSize = True

            self.PTV2dose = TextBox()
            self.PTV2dose.Text = " "
            self.PTV2dose.Size = Size(40, 30)
            self.PTV2dose.Location = Point(260, 90)

            self.champLabel = Label()
            self.champLabel.Text = "nbr champs/arcs:"
            self.champLabel.Location = Point(320, 90)
            self.champLabel.Font = Font("Arial", 10)
            self.champLabel.AutoSize = True

            self.champ = TextBox()
            self.champ.Text = " "
            self.champ.Size = Size(40, 30)
            self.champ.Location = Point(430, 90)

            self.PTV3Label = Label()
            self.PTV3Label.Text = "PTV 3:"
            self.PTV3Label.Location = Point(25, 120)
            self.PTV3Label.Font = Font("Arial", 10)
            self.PTV3Label.AutoSize = True

            self.PTV3name = TextBox()
            self.PTV3name.Text = " "
            self.PTV3name.Size = Size(60, 60)
            self.PTV3name.Location = Point(120, 120)

            self.dose3Label = Label()
            self.dose3Label.Text = "dose:"
            self.dose3Label.Location = Point(200, 120)
            self.dose3Label.Font = Font("Arial", 10)
            self.dose3Label.AutoSize = True

            self.PTV3dose = TextBox()
            self.PTV3dose.Text = " "
            self.PTV3dose.Size = Size(40, 30)
            self.PTV3dose.Location = Point(260, 120)

            self.avertissement = Label()
            self.avertissement.Text = "(2 arcs maximum):"
            self.avertissement.Location = Point(320, 110)
            self.avertissement.Font = Font("Arial", 8)
            self.avertissement.AutoSize = True

            self.PTV4Label = Label()
            self.PTV4Label.Text = "PTV 4:"
            self.PTV4Label.Location = Point(25, 150)
            self.PTV4Label.Font = Font("Arial", 10)
            self.PTV4Label.AutoSize = True

            self.PTV4name = TextBox()
            self.PTV4name.Text = " "
            self.PTV4name.Size = Size(60, 60)
            self.PTV4name.Location = Point(120, 150)

            self.dose4Label = Label()
            self.dose4Label.Text = "dose:"
            self.dose4Label.Location = Point(200, 150)
            self.dose4Label.Font = Font("Arial", 10)
            self.dose4Label.AutoSize = True

            self.PTV4dose = TextBox()
            self.PTV4dose.Text = " "
            self.PTV4dose.Size = Size(40, 30)
            self.PTV4dose.Location = Point(260, 150)

            self.techniqueLabel = Label()
            self.techniqueLabel.Text = "Technique:"
            self.techniqueLabel.Location = Point(25, 180)
            self.techniqueLabel.Font = Font("Arial", 10)
            self.techniqueLabel.AutoSize = True

            self.techniquecombo = ComboBox()
            self.techniquecombo.Parent = self
            self.techniquecombo.Size = Size(55, 40)
            self.techniquecombo.Location = Point(135, 180)
            self.techniquecombo.Items.Add("IMRT")
            self.techniquecombo.Items.Add("VMAT")
            self.techniquecombo.Text = 'IMRT'

            self.SiteLabel = Label()
            self.SiteLabel.Text = "Nom du site:"
            self.SiteLabel.Location = Point(25, 210)
            self.SiteLabel.Font = Font("Arial", 10)
            self.SiteLabel.AutoSize = True

            self.SiteBox = TextBox()
            self.SiteBox.Text = "A1"
            self.SiteBox.Location = Point(135, 210)
            self.SiteBox.Width = 40

            self.scanLabel = Label()
            self.scanLabel.Text = "Scan de planif"
            self.scanLabel.Location = Point(25, 240)
            self.scanLabel.Font = Font("Arial", 10)
            self.scanLabel.AutoSize = True

            self.scancombo = ComboBox()
            self.scancombo.Parent = self
            self.scancombo.Size = Size(55, 40)
            self.scancombo.Location = Point(135, 240)
            self.scancombo.Text = 'Choissisez'

            self.OptionsLabel = Label()
            self.OptionsLabel.Text = "Options:"
            self.OptionsLabel.Location = Point(25, 300)
            self.OptionsLabel.Font = Font("Arial", 10)
            self.OptionsLabel.AutoSize = True

            self.check1 = CheckBox()
            self.check1.Text = "Double optimization initiale + extra?"
            self.check1.Location = Point(40, 330)
            self.check1.Width = 300
            self.check1.Checked = False

            self.check3 = CheckBox()
            self.check3.Text = "Inclure structures optiques?"
            self.check3.Location = Point(40, 360)
            self.check3.Width = 300
            self.check3.Checked = False

            self.check2 = CheckBox()
            self.check2.Text = "Adapter dose color table?"
            self.check2.Location = Point(40, 390)
            self.check2.Width = 300
            self.check2.Checked = True

            self.Entete = Label()
            self.Entete.Text = ""
            self.Entete.Location = Point(300, 25)
            self.Entete.AutoSize = True
            self.Entete.Font = Font("Arial", 12, FontStyle.Bold)
            self.Entete.ForeColor = Color.Black

            self.LauncherPanel.Controls.Add(self.PatientLabel)
            self.LauncherPanel.Controls.Add(self.Label2)
            self.LauncherPanel.Controls.Add(self.Label3)
            self.LauncherPanel.Controls.Add(self.Label4)
            self.LauncherPanel.Controls.Add(self.Label5)
            self.LauncherPanel.Controls.Add(self.Entete)
            self.LauncherPanel.Controls.Add(self.Reminder)
            #self.LauncherPanel.Controls.Add(self.RxLabel)
            self.LauncherPanel.Controls.Add(self.PTV1Label)
            self.LauncherPanel.Controls.Add(self.PTV1name)
            self.LauncherPanel.Controls.Add(self.dose1Label)
            self.LauncherPanel.Controls.Add(self.PTV1dose)
            self.LauncherPanel.Controls.Add(self.PTV2Label)
            self.LauncherPanel.Controls.Add(self.PTV2name)
            self.LauncherPanel.Controls.Add(self.dose2Label)
            self.LauncherPanel.Controls.Add(self.PTV2dose)
            self.LauncherPanel.Controls.Add(self.PTV3Label)
            self.LauncherPanel.Controls.Add(self.PTV3name)
            self.LauncherPanel.Controls.Add(self.dose3Label)
            self.LauncherPanel.Controls.Add(self.PTV3dose)
            self.LauncherPanel.Controls.Add(self.PTV4Label)
            self.LauncherPanel.Controls.Add(self.PTV4name)
            self.LauncherPanel.Controls.Add(self.dose4Label)
            self.LauncherPanel.Controls.Add(self.PTV4dose)
            self.LauncherPanel.Controls.Add(self.fractionLabel)
            self.LauncherPanel.Controls.Add(self.fraction)
            #self.LauncherPanel.Controls.Add(self.isodoseLabel)
            self.LauncherPanel.Controls.Add(self.scanLabel)
            self.LauncherPanel.Controls.Add(self.techniqueLabel)
            self.LauncherPanel.Controls.Add(self.champLabel)
            self.LauncherPanel.Controls.Add(self.champ)
            self.LauncherPanel.Controls.Add(self.avertissement)
            self.LauncherPanel.Controls.Add(self.SiteLabel)
            self.LauncherPanel.Controls.Add(self.SiteBox)
            self.LauncherPanel.Controls.Add(self.OptionsLabel)
            self.LauncherPanel.Controls.Add(self.check1)
            self.LauncherPanel.Controls.Add(self.check2)
            self.LauncherPanel.Controls.Add(self.check3)
            #self.LauncherPanel.Controls.Add(self.check3)

            exam_list = []
            for CT in patient.Examinations:
                exam_list.append(CT.Name)

            for contour in patient.PatientModel.RegionsOfInterest:
                if not roi.get_roi_approval(contour.Name,
                                            patient.Examinations["CT 1"]):
                    VolCT1 = roi.get_roi_volume(
                        contour.Name, exam=patient.Examinations["CT 1"])
                    if "CT 2" in exam_list:
                        VolCT2 = roi.get_roi_volume(
                            contour.Name, exam=patient.Examinations["CT 2"])
                    else:
                        VolCT2 = 0

                    if VolCT1 == 0 and VolCT2 == 0:
                        contour.Name = ("vide_" + contour.Name)

            self.trouvePTV()
Exemplo n.º 22
0
    def __init__(self, ref_obj):
        super(RevitPythonHelper, self).__init__()

        self.ref_obj = ref_obj
        self.filter_sys_memb = True

        self.Size = Size(650, 800)
        self.Text = 'Explorer'
        self.tooltips = ToolTip()
        self.StartPosition = FormStartPosition.Manual
        # self.Location = Point(600,0) # to display in your favorite corner

        self.panright = SplitContainer()
        self.panright.Parent = self
        self.panright.Dock = DockStyle.Fill
        self.panright.Orientation = Orientation.Horizontal
        self.panright.SplitterDistance = 100

        self.top_info = RichTextBox()
        self.top_info.Dock = DockStyle.Fill
        self.top_info.DetectUrls = True

        self.table = DataGridView()
        self.table.Dock = DockStyle.Fill
        self.table.RowHeadersVisible = False
        self.table.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCellsExceptHeaders
        self.table.RowTemplate.Height = 30
        self.table.SelectionMode = DataGridViewSelectionMode.RowHeaderSelect
        self.table.DefaultCellStyle.WrapMode = DataGridViewTriState. True
        self.table.DefaultCellStyle.BackColor = Color.GhostWhite
        self.table.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter

        col1 = DataGridViewTextBoxColumn()
        col1.HeaderText = 'Name'
        col1.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
        col1.FillWeight = 20
        col1.DefaultCellStyle.Font = Font(self.table.DefaultCellStyle.Font,
                                          FontStyle.Underline)

        col2 = DataGridViewTextBoxColumn()
        col2.HeaderText = 'Type'
        col2.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
        col2.FillWeight = 5
        col2.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter

        col3 = DataGridViewTextBoxColumn()
        col3.HeaderText = 'Value'
        col3.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
        col3.FillWeight = 15

        col4 = DataGridViewTextBoxColumn()
        col4.HeaderText = 'Infos'
        col4.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
        col4.FillWeight = 60

        self.table.Columns.AddRange((col1, col2, col3, col4))
        self.table.AutoGenerateColumns = False

        self.panright.Panel1.Controls.Add(self.top_info)
        self.panright.Panel2.Controls.Add(self.table)
        self.panright.FixedPanel = FixedPanel.Panel1

        self.toolpan = FlowLayoutPanel()
        self.toolpan.Parent = self
        self.toolpan.Dock = DockStyle.Top
        self.toolpan.Height = 25

        self.check = CheckBox()
        self.check.Parent = self.toolpan
        self.check.Text = "Hide Sys"
        self.check.Checked = True

        self.close = Button()
        self.close.Parent = self
        self.close.Dock = DockStyle.Bottom
        self.close.Text = 'Close'
        self.close.Height = 30

        # LOAD DATAS

        self.update_info(extract_main(self.ref_obj))
        self.update_table(extract_members(self.ref_obj, self.filter_sys_memb))
        self.Show()

        # EVENTS

        self.top_info.LinkClicked += self.on_link_clicked
        self.check.CheckedChanged += self.on_hide_member_clicked
        self.close.Click += self.on_close
        self.table.MouseEnter += self.get_focus
        self.table.CellContentDoubleClick += self.on_val_double_click
Exemplo n.º 23
0
    def __init__(self):
        self.Text = 'Ping & Traceroute & ARP & Netstat'
        startPosition = FormStartPosition()
        self.StartPosition = startPosition.CenterScreen
        #self.Height = 500
        #self.Width = 500
        self.MaximizeBox = False
        self.MinimumSize = Size(910, 570)
        self.MaximumSize = Size(910, 570)
        #TextBox Panel Wyswietlacz
        #self.utf = UTF8Encoding()
        scrollBars = ScrollBars()

        self.GrupaPing = GroupBox()
        self.GrupaPing.Text = "Parametry Ping"
        self.GrupaPing.Size = Size(150, 220)
        self.GrupaPing.Location = Point(5, 5)
        #self.GrupaPing.Parent = self

        self.Hostlb = Label()
        self.Hostlb.Size = Size(32, 20)
        self.Hostlb.Location = Point(17, 27)
        self.Hostlb.Text = "Host: "

        self.ParamPinglb = Label()
        self.ParamPinglb.Size = Size(80, 20)
        self.ParamPinglb.Location = Point(17, 47)
        self.ParamPinglb.Text = "Parametry:"

        self.ChbLiczbaPakietow = CheckBox()
        self.ChbLiczbaPakietow.Checked = False
        self.ChbLiczbaPakietow.Text = "-n:"
        self.ChbLiczbaPakietow.Location = Point(17, 80)

        self.ChbPakiWielkoscetow = CheckBox()
        self.ChbPakiWielkoscetow.Checked = False
        self.ChbPakiWielkoscetow.Text = "-l:"
        self.ChbPakiWielkoscetow.Location = Point(17, 117)

        self.ChbTTL = CheckBox()
        self.ChbTTL.Checked = False
        self.ChbTTL.Text = "-i:"
        self.ChbTTL.Location = Point(17, 155)

        self.pingNtb = TextBox()
        self.pingNtb.Height = 30
        self.pingNtb.Width = 50
        self.pingNtb.Location = Point(52, 83)

        self.pingLtb = TextBox()
        self.pingLtb.Height = 30
        self.pingLtb.Width = 50
        self.pingLtb.Location = Point(52, 120)

        self.pingIttl = TextBox()
        self.pingIttl.Height = 30
        self.pingIttl.Width = 50
        self.pingIttl.Location = Point(52, 158)

        self.Hosttb = TextBox()
        self.Hosttb.Location = Point(52, 25)
        self.Hosttb.Height = 30
        self.Hosttb.Width = 90
        self.Hosttb.Text = "8.8.8.8"

        self.pingNlb = Label()
        self.pingNlb.Size = Size(100, 20)
        self.pingNlb.Location = Point(15, 65)
        self.pingNlb.Text = "Liczba pakietow:"

        self.pingLlb = Label()
        self.pingLlb.Size = Size(110, 20)
        self.pingLlb.Location = Point(15, 102)
        self.pingLlb.Text = "Wielkosc pakietow:"

        self.pingIlb = Label()
        self.pingIlb.Size = Size(100, 20)
        self.pingIlb.Location = Point(15, 140)
        self.pingIlb.Text = "Czas wygasniecia:"

        self.count = 0

        button = Button()
        button.Text = "Ping !"
        button.Size = Size(130, 30)
        button.Location = Point(15, 185)

        button.Click += self.buttonPressed

        self.GrupaTracert = GroupBox()
        self.GrupaTracert.Text = "Parametry Traceroute"
        self.GrupaTracert.Size = Size(150, 150)
        self.GrupaTracert.Location = Point(5, 225)

        self.ParamTraclb = Label()
        self.ParamTraclb.Size = Size(80, 40)
        self.ParamTraclb.Location = Point(17, 270)
        self.ParamTraclb.Text = "Limit liczby przeskokow:"

        self.Host1lb = Label()
        self.Host1lb.Size = Size(32, 20)
        self.Host1lb.Location = Point(17, 248)
        self.Host1lb.Text = "Host: "

        self.HostTractb = TextBox()
        self.HostTractb.Location = Point(52, 245)
        self.HostTractb.Height = 30
        self.HostTractb.Width = 90
        self.HostTractb.Text = "8.8.8.8"

        self.LimitTractb = TextBox()
        self.LimitTractb.Location = Point(52, 309)
        self.LimitTractb.Height = 30
        self.LimitTractb.Width = 60
        self.LimitTractb.Text = "30"

        self.ChLimitPrzeskokow = CheckBox()
        self.ChLimitPrzeskokow.Checked = False
        self.ChLimitPrzeskokow.Text = "-h: "
        self.ChLimitPrzeskokow.Location = Point(17, 308)

        self.count = 0

        button1 = Button()
        button1.Text = "Tracert !"
        button1.Size = Size(130, 30)
        button1.Location = Point(15, 335)

        button1.Click += self.button1Pressed

        self.GrupaARP = GroupBox()
        self.GrupaARP.Text = "Parametry ARP"
        self.GrupaARP.Size = Size(150, 150)
        self.GrupaARP.Location = Point(5, 375)

        self.ParamA = Label()
        self.ParamA.Size = Size(70, 30)
        self.ParamA.Location = Point(17, 395)
        self.ParamA.Text = "Wyswietlenie tablicy ARP:"

        self.ParamV = Label()
        self.ParamV.Size = Size(70, 40)
        self.ParamV.Location = Point(17, 435)
        self.ParamV.Text = "Wyswietlenie pelnej tablicy ARP:"

        self.ChA = CheckBox()
        self.ChA.Checked = True
        self.ChA.Enabled = False
        self.ChA.Size = Size(37, 20)
        self.ChA.Text = "-a"
        self.ChA.Location = Point(115, 400)

        self.ChV = CheckBox()
        self.ChV.Checked = False
        self.ChV.Size = Size(37, 20)
        self.ChV.Text = "-v"
        self.ChV.Location = Point(115, 440)

        self.count = 0

        button2 = Button()
        button2.Text = "ARP !"
        button2.Size = Size(130, 30)
        button2.Location = Point(15, 485)

        button2.Click += self.button2Pressed

        self.GrupaNET = GroupBox()
        self.GrupaNET.Text = "Parametry Netstat"
        self.GrupaNET.Size = Size(155, 260)
        self.GrupaNET.Location = Point(735, 5)

        self.ParamAnetstat = Label()
        self.ParamAnetstat.Size = Size(90, 50)
        self.ParamAnetstat.Location = Point(745, 20)
        self.ParamAnetstat.Text = "Wszystkie aktywne polaczenia:"

        self.ChAnetstat = CheckBox()
        self.ChAnetstat.Checked = False
        self.ChAnetstat.Size = Size(37, 20)
        self.ChAnetstat.Text = "-a"
        self.ChAnetstat.Location = Point(845, 30)

        self.ParamE = Label()
        self.ParamE.Size = Size(90, 50)
        self.ParamE.Location = Point(745, 60)
        self.ParamE.Text = "Statystyki sieci Ethernet:"

        self.ChE = CheckBox()
        self.ChE.Checked = False
        self.ChE.Size = Size(37, 20)
        self.ChE.Text = "-e"
        self.ChE.Location = Point(845, 65)

        self.ParamF = Label()
        self.ParamF.Size = Size(90, 50)
        self.ParamF.Location = Point(745, 90)
        self.ParamF.Text = "Nazwy domen adresow obcych:"

        self.ChF = CheckBox()
        self.ChF.Checked = False
        self.ChF.Size = Size(37, 20)
        self.ChF.Text = "-f"
        self.ChF.Location = Point(845, 100)

        self.ParamO = Label()
        self.ParamO.Size = Size(90, 50)
        self.ParamO.Location = Point(745, 127)
        self.ParamO.Text = "Identyfikator polaczenia:"

        self.ChO = CheckBox()
        self.ChO.Checked = False
        self.ChO.Size = Size(37, 20)
        self.ChO.Text = "-o"
        self.ChO.Location = Point(845, 130)

        self.ParamR = Label()
        self.ParamR.Size = Size(90, 50)
        self.ParamR.Location = Point(745, 165)
        self.ParamR.Text = "Tabele routingu:  "

        self.ChR = CheckBox()
        self.ChR.Checked = False
        self.ChR.Size = Size(37, 20)
        self.ChR.Text = "-r"
        self.ChR.Location = Point(845, 165)

        self.ParamS = Label()
        self.ParamS.Size = Size(90, 50)
        self.ParamS.Location = Point(745, 185)
        self.ParamS.Text = "Statystyka protokolow:  "

        self.ChS = CheckBox()
        self.ChS.Checked = False
        self.ChS.Size = Size(37, 20)
        self.ChS.Text = "-s"
        self.ChS.Location = Point(845, 195)

        self.count = 0

        button3 = Button()
        button3.Text = "Netstat !"
        button3.Size = Size(130, 30)
        button3.Location = Point(745, 225)

        button3.Click += self.button3Pressed

        self.ipconfig = GroupBox()
        self.ipconfig.Text = "IPconfig"
        self.ipconfig.Size = Size(155, 260)
        self.ipconfig.Location = Point(735, 265)

        self.ParamPodst = Label()
        self.ParamPodst.Size = Size(80, 50)
        self.ParamPodst.Location = Point(745, 290)
        self.ParamPodst.Text = "IP dane podstawowe: "

        self.ChPod = CheckBox()
        self.ChPod.Checked = False
        self.ChPod.Size = Size(63, 30)
        self.ChPod.Text = "ipconfig"
        self.ChPod.Location = Point(820, 288)

        self.ParamALL = Label()
        self.ParamALL.Size = Size(80, 50)
        self.ParamALL.Location = Point(745, 320)
        self.ParamALL.Text = "IP dane szczegolowe: "

        self.ChAll = CheckBox()
        self.ChAll.Checked = False
        self.ChAll.Size = Size(50, 30)
        self.ChAll.Text = "all"
        self.ChAll.Location = Point(820, 322)

        self.ParamRelease = Label()
        self.ParamRelease.Size = Size(80, 50)
        self.ParamRelease.Location = Point(745, 350)
        self.ParamRelease.Text = "Zwolnienie adresów IPv4: "

        self.ChRelease = CheckBox()
        self.ChRelease.Checked = False
        self.ChRelease.Size = Size(67, 30)
        self.ChRelease.Text = "release"
        self.ChRelease.Location = Point(820, 352)

        self.ParamRenew = Label()
        self.ParamRenew.Size = Size(80, 50)
        self.ParamRenew.Location = Point(745, 380)
        self.ParamRenew.Text = "Odnowienie adresów IPv4: "

        self.ChRenew = CheckBox()
        self.ChRenew.Checked = False
        self.ChRenew.Size = Size(67, 30)
        self.ChRenew.Text = "renev"
        self.ChRenew.Location = Point(820, 382)

        self.ParamDisplaydns = Label()
        self.ParamDisplaydns.Size = Size(80, 50)
        self.ParamDisplaydns.Location = Point(745, 415)
        self.ParamDisplaydns.Text = "Pokaż wpisy DNS: "

        self.ChDisplaydns = CheckBox()
        self.ChDisplaydns.Checked = False
        self.ChDisplaydns.Size = Size(62, 30)
        self.ChDisplaydns.Text = "displaydns"
        self.ChDisplaydns.Location = Point(820, 417)

        self.ParamFlushdns = Label()
        self.ParamFlushdns.Size = Size(80, 50)
        self.ParamFlushdns.Location = Point(745, 445)
        self.ParamFlushdns.Text = "Czysc wpisy DNS: "

        self.ChFlushdns = CheckBox()
        self.ChFlushdns.Checked = False
        self.ChFlushdns.Size = Size(67, 30)
        self.ChFlushdns.Text = "flushdns"
        self.ChFlushdns.Location = Point(820, 447)

        self.count = 0

        button4 = Button()
        button4.Text = "Ipconfig !"
        button4.Size = Size(130, 30)
        button4.Location = Point(745, 485)

        button4.Click += self.button4Pressed

        #Okno niezale¿ne
        self.Wyswietlacz = TextBox()
        self.Wyswietlacz.Location = Point(159, 10)
        self.Wyswietlacz.Height = 515
        self.Wyswietlacz.Width = 570
        self.Wyswietlacz.Multiline = True
        self.Wyswietlacz.ScrollBars = scrollBars.Both
        self.Wyswietlacz.ScrollBars = scrollBars.Vertical

        #Pierwsza grupa#
        self.Controls.Add(self.Hostlb)
        self.Controls.Add(self.pingIttl)
        self.Controls.Add(self.pingNtb)
        self.Controls.Add(self.pingLtb)
        self.Controls.Add(self.ParamPinglb)
        self.Controls.Add(self.ChbTTL)
        self.Controls.Add(self.ChbLiczbaPakietow)
        self.Controls.Add(self.ChbPakiWielkoscetow)
        self.Controls.Add(self.pingIlb)
        self.Controls.Add(self.pingLlb)
        self.Controls.Add(self.pingNlb)
        self.Controls.Add(self.Hosttb)
        self.Controls.Add(button)
        self.Controls.Add(self.GrupaPing)
        #Druga grupa#
        self.Controls.Add(button1)
        self.Controls.Add(self.LimitTractb)
        self.Controls.Add(self.HostTractb)
        self.Controls.Add(self.ChLimitPrzeskokow)
        self.Controls.Add(self.Host1lb)
        self.Controls.Add(self.ParamTraclb)
        self.Controls.Add(self.GrupaTracert)
        #Trzecia grupa#
        self.Controls.Add(button2)
        self.Controls.Add(self.ChA)
        self.Controls.Add(self.ChV)
        self.Controls.Add(self.ParamA)
        self.Controls.Add(self.ParamV)
        self.Controls.Add(self.GrupaARP)
        #Czwarta grupa#
        self.Controls.Add(button3)
        self.Controls.Add(self.ChAnetstat)
        self.Controls.Add(self.ChF)
        self.Controls.Add(self.ChE)
        self.Controls.Add(self.ChO)
        self.Controls.Add(self.ChR)
        self.Controls.Add(self.ChS)
        self.Controls.Add(self.ParamS)
        self.Controls.Add(self.ParamR)
        self.Controls.Add(self.ParamO)
        self.Controls.Add(self.ParamF)
        self.Controls.Add(self.ParamE)
        self.Controls.Add(self.ParamAnetstat)
        self.Controls.Add(self.GrupaNET)
        #Wyswietlacz#
        self.Controls.Add(self.Wyswietlacz)
        #Piata grupa#
        self.Controls.Add(button4)
        self.Controls.Add(self.ChFlushdns)
        self.Controls.Add(self.ChDisplaydns)
        self.Controls.Add(self.ChRenew)
        self.Controls.Add(self.ChRelease)
        self.Controls.Add(self.ChAll)
        self.Controls.Add(self.ChPod)
        self.Controls.Add(self.ParamFlushdns)
        self.Controls.Add(self.ParamDisplaydns)
        self.Controls.Add(self.ParamRenew)
        self.Controls.Add(self.ParamRelease)
        self.Controls.Add(self.ParamALL)
        self.Controls.Add(self.ParamPodst)
        self.Controls.Add(self.ipconfig)
Exemplo n.º 24
0
    def setupPanel3(self):
        self.panel3 = Panel()
        self.panel3.Width = self.Width
        self.panel3.Height = 125
        self.panel3.Location = Point(0, 170)
        self.panel3.BorderStyle = BorderStyle.FixedSingle

        self.checkLabel1 = Label()
        self.checkLabel1.Text = "选择以下金属层材料进行创建:"
        self.checkLabel1.Location = Point(25, 25)
        self.checkLabel1.AutoSize = True

        self.P3button1 = Button()
        self.P3button1.Text = 'ok'
        self.P3button1.Location = Point(200, 20)
        self.P3button1.Width = 40
        self.P3button1.Click += self.P3_update1

        self.check1 = CheckBox()
        self.check1.Text = "M1"
        self.check1.Location = Point(25, 50)
        self.check1.Width = 90

        self.check2 = CheckBox()
        self.check2.Text = "M2-8"
        self.check2.Location = Point(115, 50)
        self.check2.Width = 90

        self.check3 = CheckBox()
        self.check3.Text = "M9"
        self.check3.Location = Point(205, 50)
        self.check3.Width = 90

        self.check4 = CheckBox()
        self.check4.Text = "M10(UTM)"
        self.check4.Location = Point(295, 50)
        self.check4.Width = 90

        self.check5 = CheckBox()
        self.check5.Text = "Via1-7"
        self.check5.Location = Point(25, 75)
        self.check5.Width = 90

        self.check6 = CheckBox()
        self.check6.Text = "Via8"
        self.check6.Location = Point(115, 75)
        self.check6.Width = 90

        self.check7 = CheckBox()
        self.check7.Text = "Via9"
        self.check7.Location = Point(205, 75)
        self.check7.Width = 90

        self.check8 = CheckBox()
        self.check8.Text = "全选"
        self.check8.Location = Point(295, 75)
        self.check8.Width = 90
        self.check8.CheckedChanged += self.P3C8_update

        self.panel3.Controls.Add(self.checkLabel1)
        self.panel3.Controls.Add(self.P3button1)
        self.panel3.Controls.Add(self.check1)
        self.panel3.Controls.Add(self.check2)
        self.panel3.Controls.Add(self.check3)
        self.panel3.Controls.Add(self.check4)
        self.panel3.Controls.Add(self.check5)
        self.panel3.Controls.Add(self.check6)
        self.panel3.Controls.Add(self.check7)
        self.panel3.Controls.Add(self.check8)
Exemplo n.º 25
0
    def __init__(self):
        self.file_path = DEFAULT_PATH
        self.Text = 'Waypoint File Tool'
        self.Location = Point(0, 0)
        self.TopMost = ALWAYS_ON_TOP
        screen_size = Screen.GetWorkingArea(self)
        num_buttons = 3
        btn_width = 150
        margin = 5
        start_x, start_y = 12, 10
        self.Height = screen_size.Height
        self.Width = btn_width * num_buttons + margin * (num_buttons + 7)
        self.BackColor = CustomColor.MPDarkGray
        self.ForeColor = CustomColor.White
        """ OpenFileDialog does not appear to work in Mission Planner scripts...
                so, we create a rudimentary file picker with a textbox and listbox """
        self.txt_path = TextBox()
        self.txt_path.Width = self.Width - (margin * 8)
        self.txt_path.BorderStyle = BorderStyle.FixedSingle
        self.txt_path.BackColor = CustomColor.MPLightGray
        self.txt_path.ForeColor = CustomColor.White
        self.txt_path.Text = self.file_path
        self.txt_path.LostFocus += self.refresh_filenames

        self.lst_files = ListBox()
        self.lst_files.Width = self.txt_path.Width
        self.lst_files.Height = self.Height / 5
        self.lst_files.BorderStyle = BorderStyle.FixedSingle
        self.lst_files.BackColor = CustomColor.MPLightGray
        self.lst_files.ForeColor = CustomColor.White
        self.lst_files.SelectedIndexChanged += self.file_selection_changed

        self.btn_output_wp = Button()
        self.btn_output_wp.Width = 150
        self.btn_output_wp.FlatStyle = FlatStyle.Flat
        self.btn_output_wp.FlatAppearance.BorderSize = 1
        self.btn_output_wp.FlatAppearance.BorderColor = CustomColor.MPLightGray
        self.btn_output_wp.BackColor = CustomColor.MPGreen
        self.btn_output_wp.ForeColor = CustomColor.Black
        self.btn_output_wp.Text = 'Output as WP'
        self.btn_output_wp.Click += self.convert_file

        self.btn_output_poly = Button()
        self.btn_output_poly.Width = 150
        self.btn_output_poly.FlatStyle = FlatStyle.Flat
        self.btn_output_poly.FlatAppearance.BorderSize = 1
        self.btn_output_poly.FlatAppearance.BorderColor = CustomColor.MPLightGray
        self.btn_output_poly.BackColor = CustomColor.MPGreen
        self.btn_output_poly.ForeColor = CustomColor.Black
        self.btn_output_poly.Text = 'Output as POLY'
        self.btn_output_poly.Click += self.convert_file

        self.btn_refresh_files = Button()
        self.btn_refresh_files.Width = 150
        self.btn_refresh_files.FlatStyle = FlatStyle.Flat
        self.btn_refresh_files.FlatAppearance.BorderSize = 1
        self.btn_refresh_files.FlatAppearance.BorderColor = CustomColor.MPLightGray
        self.btn_refresh_files.BackColor = CustomColor.MPGreen
        self.btn_refresh_files.ForeColor = CustomColor.Black
        self.btn_refresh_files.Text = 'Refresh Files'
        self.btn_refresh_files.Click += self.refresh_filenames
        self.AcceptButton = self.btn_refresh_files

        self.spn_num_perimeter_passes = NumericUpDown()
        self.spn_num_perimeter_passes.Width = 40
        self.spn_num_perimeter_passes.BorderStyle = BorderStyle.FixedSingle
        self.spn_num_perimeter_passes.BackColor = CustomColor.MPLightGray
        self.spn_num_perimeter_passes.ForeColor = CustomColor.White
        self.spn_num_perimeter_passes.Value = 3

        self.chk_reverse_perimeter = CheckBox()
        self.chk_reverse_perimeter.FlatAppearance.BorderSize = 1
        self.chk_reverse_perimeter.FlatAppearance.BorderColor = CustomColor.MPLightGray
        self.chk_reverse_perimeter.Text = 'Reverse Perimeter - Enter desired number of passes:'
        self.chk_reverse_perimeter.AutoSize = True
        self.chk_reverse_perimeter.CheckedChanged += self.set_txt_num_perimeter_passes_state
        self.chk_reverse_perimeter.Checked = True

        self.lbl_default_altitude = Label()
        self.lbl_default_altitude.Text = 'Waypoint Altitude (if unspecified):'
        self.lbl_default_altitude.AutoSize = True

        self.txt_default_altitude = TextBox()
        self.txt_default_altitude.Width = 50
        self.txt_default_altitude.BorderStyle = BorderStyle.FixedSingle
        self.txt_default_altitude.BackColor = CustomColor.MPLightGray
        self.txt_default_altitude.ForeColor = CustomColor.White
        self.txt_default_altitude.MaxLength = 5
        self.txt_default_altitude.TextAlign = HorizontalAlignment.Center
        self.txt_default_altitude.Text = str(
            round(DEFAULT_ALTITUDE * 3.28084, 2))[:5]
        self.txt_default_altitude.KeyPress += self.limit_to_decimal_digits

        self.cbo_default_altitude = ComboBox()
        self.cbo_default_altitude.Width = 60
        self.cbo_default_altitude.DropDownStyle = ComboBoxStyle.DropDownList
        self.cbo_default_altitude.FlatStyle = FlatStyle.Flat
        self.cbo_default_altitude.BackColor = CustomColor.MPLightGray
        self.cbo_default_altitude.ForeColor = CustomColor.White
        self.cbo_default_altitude.DataSource = ['Feet', 'Meters']
        self.cbo_default_altitude.SelectionChangeCommitted += self.convert_altitude_units

        self.lbl_status = Label()
        self.lbl_status.Text = 'Choose a file...'
        self.lbl_status.BackColor = CustomColor.MPMediumGray
        self.lbl_status.Width = self.txt_path.Width
        self.lbl_status.Height = self.txt_path.Height - 5

        # pseudo-responsive form layout
        x, y = start_x, start_y
        x, y = self.add_control_vertical(self.txt_path, x, y, margin)
        x, y = self.add_control_vertical(self.lst_files, x, y, margin)
        x, y = self.add_control_horizontal(self.btn_output_wp, x, y, margin)
        x, y = self.add_control_horizontal(self.btn_output_poly, x, y, margin)
        x, y = self.add_control_vertical(self.btn_refresh_files, x, y,
                                         margin + 10)
        x, y = self.add_control_horizontal(self.chk_reverse_perimeter, start_x,
                                           y, margin)
        x, y = self.add_control_vertical(self.spn_num_perimeter_passes, x - 5,
                                         y, margin + 10)
        x, y = self.add_control_horizontal(self.lbl_default_altitude, start_x,
                                           y + 3, margin)
        x, y = self.add_control_horizontal(self.txt_default_altitude, x, y - 3,
                                           margin + 3)
        x, y = self.add_control_vertical(self.cbo_default_altitude, x, y,
                                         margin)
        self.Height = y + 100
        self.add_control_vertical(self.lbl_status, start_x, self.Height - 60,
                                  margin)

        self.set_txt_num_perimeter_passes_state(None, None)
        self.refresh_filenames(None, None)
Exemplo n.º 26
0
    def __init__(self, contents):
        self.Contents = contents
        self.BackColor = Color.FromArgb(25, 25, 25)
        self.ForeColor = Color.FromArgb(231, 231, 231)
        self.Size = Size(200, 605)
        self.Text = '{0} - v{1}'.format(self.ScriptName, self.CurVer)
        self.TopMost = True

        self.box = GroupBox()
        self.box.BackColor = Color.FromArgb(25, 25, 25)
        self.box.ForeColor = Color.FromArgb(23, 221, 23)
        self.box.Size = Size(180, 140)
        self.box.Location = Point(2, 57)
        self.box.Text = 'Options'

        self.box2 = GroupBox()
        self.box2.BackColor = Color.FromArgb(25, 25, 25)
        self.box2.ForeColor = Color.FromArgb(23, 221, 23)
        self.box2.Size = Size(180, 50)
        self.box2.Location = Point(02, 400)
        self.box2.Text = 'Chase Mobile Options'

        self.box3 = GroupBox()
        self.box3.BackColor = Color.FromArgb(25, 25, 25)
        self.box3.ForeColor = Color.FromArgb(23, 221, 23)
        self.box3.Size = Size(180, 155)
        self.box3.Location = Point(02, 244)
        self.box3.Text = 'Dress/Arm'

        self.box4 = GroupBox()
        self.box4.BackColor = Color.FromArgb(25, 25, 25)
        self.box4.ForeColor = Color.FromArgb(23, 221, 23)
        self.box4.Size = Size(180, 60)
        self.box4.Location = Point(02, 505)

        self.box5 = GroupBox()
        self.box5.BackColor = Color.FromArgb(25, 25, 25)
        self.box5.ForeColor = Color.FromArgb(23, 221, 23)
        self.box5.Size = Size(180, 40)
        self.box5.Location = Point(02, 200)
        self.box5.Text = 'Weapon Type'

        self.box6 = GroupBox()
        self.box6.BackColor = Color.FromArgb(25, 25, 25)
        self.box6.ForeColor = Color.FromArgb(23, 221, 23)
        self.box6.Size = Size(180, 55)
        self.box6.Location = Point(2, 2)
        self.box6.Text = Player.Name

        self.box7 = GroupBox()
        self.box7.BackColor = Color.FromArgb(25, 25, 25)
        self.box7.ForeColor = Color.FromArgb(23, 221, 23)
        self.box7.Size = Size(180, 55)
        self.box7.Location = Point(02, 450)
        self.box7.Text = 'Rail Options'

        self.cbA = CheckBox()
        self.cbA.Text = 'Conf/Evade'
        self.cbA.Checked = False
        self.cbA.BackColor = Color.FromArgb(25, 25, 25)
        self.cbA.Location = Point(10, 70)
        self.cbA.Size = Size(85, 20)

        hb = ProgressBar()
        hb.Minimum = 1
        hb.Maximum = 100
        hb.Step = 1
        hb.Value = 1
        hb.Location = Point(10, 20)
        hb.Width = 165
        hb.Height = 25
        hb.BackColor = Color.FromArgb(5, 255, 25)
        hb.ForeColor = Color.FromArgb(233, 221, 23)
        self.prog = hb

        self.cbB = CheckBox()
        self.cbB.Text = 'EoO'
        self.cbB.Checked = False
        self.cbB.BackColor = Color.FromArgb(25, 25, 25)
        self.cbB.Location = Point(95, 70)
        self.cbB.Size = Size(85, 20)

        self.cbC = CheckBox()
        self.cbC.Text = 'Band Heal'
        self.cbC.Checked = False
        self.cbC.BackColor = Color.FromArgb(25, 25, 25)
        self.cbC.Location = Point(10, 90)
        self.cbC.Size = Size(85, 20)

        self.cbD = CheckBox()
        self.cbD.Text = 'Cons Wep'
        self.cbD.Checked = False
        self.cbD.BackColor = Color.FromArgb(25, 25, 25)
        self.cbD.Location = Point(95, 90)
        self.cbD.Size = Size(85, 20)

        self.cbE = CheckBox()
        self.cbE.Text = 'Honor'
        self.cbE.Checked = False
        self.cbE.BackColor = Color.FromArgb(25, 25, 25)
        self.cbE.Location = Point(10, 110)
        self.cbE.Size = Size(85, 20)

        self.cbF = CheckBox()
        self.cbF.Text = 'Div Fury'
        self.cbF.Checked = False
        self.cbF.BackColor = Color.FromArgb(25, 25, 25)
        self.cbF.Location = Point(95, 110)
        self.cbF.Size = Size(85, 20)

        self.cbG = CheckBox()
        self.cbG.Text = 'Onslaught'
        self.cbG.Checked = False
        self.cbG.BackColor = Color.FromArgb(25, 25, 25)
        self.cbG.Location = Point(10, 130)
        self.cbG.Size = Size(85, 20)

        self.cbH = CheckBox()
        self.cbH.Text = 'Cntr Atk'
        self.cbH.Checked = False
        self.cbH.BackColor = Color.FromArgb(25, 25, 25)
        self.cbH.Location = Point(95, 130)
        self.cbH.Size = Size(85, 20)

        self.cbI = CheckBox()
        self.cbI.Text = 'OJ Petal'
        self.cbI.Checked = False
        self.cbI.BackColor = Color.FromArgb(25, 25, 25)
        self.cbI.Location = Point(10, 150)
        self.cbI.Size = Size(85, 20)

        self.cbJ = CheckBox()
        self.cbJ.Text = 'Insure'
        self.cbJ.Checked = False
        self.cbJ.BackColor = Color.FromArgb(25, 25, 25)
        self.cbJ.Location = Point(95, 150)
        self.cbJ.Size = Size(85, 20)

        self.cbK = CheckBox()
        self.cbK.Text = 'Apple'
        self.cbK.Checked = False
        self.cbK.BackColor = Color.FromArgb(25, 25, 25)
        self.cbK.Location = Point(10, 170)
        self.cbK.Size = Size(85, 20)

        self.cbL = CheckBox()
        self.cbL.Text = 'On/Off'
        self.cbL.Checked = False
        self.cbL.BackColor = Color.FromArgb(25, 25, 25)
        self.cbL.Location = Point(10, 412)
        self.cbL.Size = Size(60, 20)

        self.cbM = CheckBox()
        self.cbM.Text = 'On/Off'
        self.cbM.Checked = False
        self.cbM.BackColor = Color.FromArgb(25, 25, 25)
        self.cbM.Location = Point(10, 463)
        self.cbM.Size = Size(60, 20)

        self.cbN = CheckBox()
        self.cbN.Text = 'Bone Cutter'
        self.cbN.Checked = False
        self.cbN.BackColor = Color.FromArgb(25, 25, 25)
        self.cbN.Location = Point(95, 170)
        self.cbN.Size = Size(85, 20)

        self.rbD = RadioButton()
        self.rbD.Text = 'D Axe'
        self.rbD.Location = Point(25, 213)
        self.rbD.BackColor = Color.FromArgb(25, 25, 25)
        self.rbD.ForeColor = Color.FromArgb(231, 231, 231)
        self.rbD.Size = Size(65, 20)

        self.rbE = RadioButton()
        self.rbE.Text = 'B Staff'
        self.rbE.Location = Point(105, 213)
        self.rbE.BackColor = Color.FromArgb(25, 25, 25)
        self.rbE.ForeColor = Color.FromArgb(231, 231, 231)
        self.rbE.Size = Size(65, 20)

        self.btnA = Button()
        self.btnA.Text = 'Demon'
        self.btnA.BackColor = Color.FromArgb(50, 24, 25)
        self.btnA.Location = Point(10, 342)
        self.btnA.Size = Size(55, 25)
        self.btnA.FlatStyle = FlatStyle.Flat
        self.btnA.FlatAppearance.BorderSize = 1
        self.btnA.Click += self.btnDemonPressed

        self.btnB = Button()
        self.btnB.Text = 'Reptile'
        self.btnB.BackColor = Color.FromArgb(25, 50, 25)
        self.btnB.Location = Point(65, 342)
        self.btnB.Size = Size(55, 25)
        self.btnB.FlatStyle = FlatStyle.Flat
        self.btnB.FlatAppearance.BorderSize = 1
        self.btnB.Click += self.btnReptilePressed

        self.btnC = Button()
        self.btnC.Text = 'Undead'
        self.btnC.BackColor = Color.FromArgb(50, 25, 25)
        self.btnC.Location = Point(120, 342)
        self.btnC.Size = Size(55, 25)
        self.btnC.FlatStyle = FlatStyle.Flat
        self.btnC.FlatAppearance.BorderSize = 1
        self.btnC.Click += self.btnUndeadPressed

        self.btnD = Button()
        self.btnD.Text = 'Elemen'
        self.btnD.BackColor = Color.FromArgb(25, 50, 25)
        self.btnD.Location = Point(10, 317)
        self.btnD.Size = Size(55, 25)
        self.btnD.FlatStyle = FlatStyle.Flat
        self.btnD.FlatAppearance.BorderSize = 1
        self.btnD.Click += self.btnElemenPressed

        self.btnE = Button()
        self.btnE.Text = 'Arach'
        self.btnE.BackColor = Color.FromArgb(50, 25, 25)
        self.btnE.Location = Point(65, 317)
        self.btnE.Size = Size(55, 25)
        self.btnE.FlatStyle = FlatStyle.Flat
        self.btnE.FlatAppearance.BorderSize = 1
        self.btnE.Click += self.btnArachPressed

        self.btnF = Button()
        self.btnF.Text = 'Repond'
        self.btnF.BackColor = Color.FromArgb(25, 50, 25)
        self.btnF.Location = Point(120, 317)
        self.btnF.Size = Size(55, 25)
        self.btnF.FlatStyle = FlatStyle.Flat
        self.btnF.FlatAppearance.BorderSize = 1
        self.btnF.Click += self.btnRepondPressed

        self.btnG = Button()
        self.btnG.Text = 'Main Dress'
        self.btnG.BackColor = Color.FromArgb(25, 50, 25)
        self.btnG.Location = Point(10, 260)
        self.btnG.Size = Size(165, 25)
        self.btnG.FlatStyle = FlatStyle.Flat
        self.btnG.FlatAppearance.BorderSize = 1
        self.btnG.Click += self.btnDressPressed

        self.btnH = Button()
        self.btnH.Text = 'Luck Suit'
        self.btnH.BackColor = Color.FromArgb(50, 50, 10)
        self.btnH.Location = Point(10, 285)
        self.btnH.Size = Size(165, 25)
        self.btnH.FlatStyle = FlatStyle.Flat
        self.btnH.FlatAppearance.BorderSize = 1
        self.btnH.Click += self.btnLuckPressed

        self.btnI = Button()
        self.btnI.Text = 'Repair Check'
        self.btnI.BackColor = Color.FromArgb(10, 10, 60)
        self.btnI.Location = Point(10, 367)
        self.btnI.Size = Size(165, 25)
        self.btnI.FlatStyle = FlatStyle.Flat
        self.btnI.FlatAppearance.BorderSize = 1
        self.btnI.Click += self.btnRepairPressed

        self.btnJ = Button()
        self.btnJ.Text = 'Chase by MobID'
        self.btnJ.BackColor = Color.FromArgb(0, 0, 0)
        self.btnJ.Location = Point(75, 415)
        self.btnJ.Size = Size(100, 30)
        self.btnJ.FlatStyle = FlatStyle.Flat
        self.btnJ.FlatAppearance.BorderSize = 1
        self.btnJ.Click += self.btnMobIDPressed

        self.btnGet = Button()
        self.btnGet.Text = 'Stop'
        self.btnGet.BackColor = Color.FromArgb(100, 10, 10)
        self.btnGet.Location = Point(95, 520)
        self.btnGet.Size = Size(80, 35)
        self.btnGet.FlatStyle = FlatStyle.Flat
        self.btnGet.FlatAppearance.BorderSize = 1
        self.btnGet.Click += self.btnStopPressed

        self.startGet = Button()
        self.startGet.Text = 'Start'
        self.startGet.BackColor = Color.FromArgb(10, 100, 10)
        self.startGet.Location = Point(10, 520)
        self.startGet.Size = Size(80, 35)
        self.startGet.FlatStyle = FlatStyle.Flat
        self.startGet.FlatAppearance.BorderSize = 1
        self.startGet.Click += self.btnStartPressed

        self.button4 = Button()
        self.button4.Text = 'Open Recorder'
        self.button4.Width = 100
        self.button4.Height = 30
        self.button4.Location = Point(75, 465)
        self.button4.FlatStyle = FlatStyle.Flat
        self.button4.Click += self.info

        self.textbox2 = TextBox()
        self.textbox2.Text = "Rail_Name"
        self.textbox2.Location = Point(10, 480)
        self.textbox2.Width = 60

        self.textbox3 = TextBox()
        self.textbox3.Text = "Delay (ms)"
        self.textbox3.Location = Point(10, 427)
        self.textbox3.Width = 60

        self.textbox4 = TextBox()
        self.textbox4.Text = "20"
        self.textbox4.Location = Point(15, 370)
        self.textbox4.Width = 30

        self.Controls.Add(self.textbox2)
        self.Controls.Add(self.textbox3)
        self.Controls.Add(self.textbox4)
        self.Controls.Add(self.button4)
        self.Controls.Add(self.cbA)
        self.Controls.Add(self.cbB)
        self.Controls.Add(self.cbC)
        self.Controls.Add(self.cbD)
        self.Controls.Add(self.cbE)
        self.Controls.Add(self.cbF)
        self.Controls.Add(self.cbG)
        self.Controls.Add(self.cbH)
        self.Controls.Add(self.cbI)
        self.Controls.Add(self.cbJ)
        self.Controls.Add(self.cbK)
        self.Controls.Add(self.cbL)
        self.Controls.Add(self.cbM)
        self.Controls.Add(self.cbN)

        self.Controls.Add(self.btnA)
        self.Controls.Add(self.btnB)
        self.Controls.Add(self.btnC)
        self.Controls.Add(self.btnD)
        self.Controls.Add(self.btnE)
        self.Controls.Add(self.btnF)
        self.Controls.Add(self.btnG)
        self.Controls.Add(self.btnH)
        self.Controls.Add(self.btnI)
        self.Controls.Add(self.btnJ)
        self.Controls.Add(self.btnGet)
        self.Controls.Add(self.startGet)

        self.Controls.Add(self.rbD)
        self.Controls.Add(self.rbE)

        self.Controls.Add(hb)

        self.Controls.Add(self.box)
        self.Controls.Add(self.box2)
        self.Controls.Add(self.box3)
        self.Controls.Add(self.box4)
        self.Controls.Add(self.box5)
        self.Controls.Add(self.box6)
        self.Controls.Add(self.box7)

        Misc.Pause(500)
        self.Shown += self.refresh
Exemplo n.º 27
0
                           (cbindex)][k.encode('utf-8').decode('utf-8')] = k
             cb.Items.Add(k)
     form.Controls.Add(cb)
     form.output.append(cb)
     cbindex += 1
 elif j == 's':
     tb = TextBox()
     tb.Text = 'Default'
     tb.Width = inputwidth
     tb.Height = inputheight
     tb.Location = Point(xinput, y)
     form.Controls.Add(tb)
     form.Controls.Add(label)
     form.output.append(tb)
 elif j == 'bool':
     yn = CheckBox()
     yn.Location = Point(xinput, y)
     yn.Text = 'Yes/No'
     form.Controls.Add(yn)
     form.output.append(yn)
 elif j == 'fp':
     fp = Button()
     fp.Width = inputwidth
     fp.Height = inputheight
     fp.Text = 'FilePath'
     fp.Location = Point(xinput, y)
     form.Controls.Add(fp)
     fp.Click += form.openfile
     form.output.append(fp)
 elif j == 'dp':
     dp = Button()
Exemplo n.º 28
0
  def __init__(self, curveId):
    
    label_width = 30
    offset = 30
    index = 0
    
    # header
    self.Text = "Annotate Curve"
    
    #label
    index += 1

    crvlabel = Label(Text="Curve ID = "+str(curveId), AutoSize=True)
    self.Controls.Add(crvlabel)
    width = crvlabel.Right
    pt = Point(crvlabel.Left,crvlabel.Bottom + offset)
    
    #textInput
    labelstart = Label(Text="Text at start", AutoSize=True)
    labelstart.Location = Point(label_width, offset* index)
    self.Controls.Add(labelstart)
    pt.X = labelstart.Right + offset
    inputstart = TextBox(Text="Start")
    inputstart.Location = pt
    self.Controls.Add(inputstart)
    if( inputstart.Right > width ):
      width = inputstart.Right
    self.m_inputstart = inputstart

    index += 1
    cb = CheckBox( AutoSize=True)
    cb.Parent = self
    cb.Location = Point(label_width, offset* index)
    cb.Text = "Show Title"
    cb.Checked = True

    
    
    index += 1
    cbb = ComboBox(Text="select tool", Location=Point(label_width, offset * index), Parent=self)
    cbb.Items.AddRange(("Inner contour",
            "Outer contour",
            "Pocket",
            "Engrave",
            "Clamex horizontal"))
    
    self.cbb_tool = cbb

    index += 1
    cbb = ComboBox(Text="Outer contour", Location=Point(label_width, offset * index), Parent=self)
    cbb.Items.AddRange(("Inner contour",
            "Outer contour",
            "Pocket",
            "Engrave",
            "Clamex horizontal"))    
    
    self.cbb_operation = cbb
            
    index += 1
    sb = NumericUpDown( AutoSize=True, Location=Point(label_width, offset * index), Parent=self , DecimalPlaces = 2) 
    sb.Parent = self
    sb.Location = Point(label_width, offset* index)
    sb.DecimalPlaces  = 2
    sb.Text = "Show Title"
  
            
      

    
    index += 1
    pt.X  = labelstart.Left
    pt.Y  = labelstart.Bottom + offset*index
    buttonApply = Button(Text="Apply", DialogResult=DialogResult.OK)
    buttonApply.Location = pt
    self.Controls.Add(buttonApply)
    pt.X = buttonApply.Right + offset
    buttonCancel = Button(Text="Cancel", DialogResult=DialogResult.Cancel)
    buttonCancel.Location = pt
    self.Controls.Add(buttonCancel)
    if( buttonCancel.Right > width ):
      width = buttonCancel.Right
    self.ClientSize = Size(width, buttonCancel.Bottom)
    self.AcceptButton = buttonApply
    self.CancelButton = buttonCancel
    def __build_behaviourtab(self):
        ''' builds and returns the "Behaviour" Tab for the TabControl '''

        tabpage = TabPage()
        tabpage.Text = i18n.get("ConfigFormBehaviourTab")

        # 1. --- build the 'When scraping for the first time' label
        first_scrape_label = Label()
        first_scrape_label.AutoSize = False
        first_scrape_label.FlatStyle = FlatStyle.System
        first_scrape_label.Location = Point(52, 27)
        first_scrape_label.Text = i18n.get("ConfigFormFirstScrapeLabel")
        first_scrape_label.Size = Size(300, 17)

        # 1. --- build the 'autochoose series' checkbox
        self.__autochoose_series_cb = CheckBox()
        self.__autochoose_series_cb.AutoSize = False
        self.__autochoose_series_cb.FlatStyle = FlatStyle.System
        self.__autochoose_series_cb.Location = Point(82, 45)
        self.__autochoose_series_cb.Size = Size(300, 34)
        self.__autochoose_series_cb.Text = i18n.get(
            "ConfigFormAutochooseSeriesCB")
        self.__autochoose_series_cb.CheckedChanged += self.__fired_update_gui

        # 2. --- build the 'confirm issue' checkbox
        self.__confirm_issue_cb = CheckBox()
        self.__confirm_issue_cb.AutoSize = False
        self.__confirm_issue_cb.FlatStyle = FlatStyle.System
        self.__confirm_issue_cb.Location = Point(82, 75)
        self.__confirm_issue_cb.Size = Size(300, 34)
        self.__confirm_issue_cb.Text = i18n.get("ConfigFormConfirmIssueCB")
        self.__confirm_issue_cb.CheckedChanged += self.__fired_update_gui

        # 3. -- build the 'use fast rescrape' checkbox
        self.__fast_rescrape_cb = CheckBox()
        self.__fast_rescrape_cb.AutoSize = False
        self.__fast_rescrape_cb.FlatStyle = FlatStyle.System
        self.__fast_rescrape_cb.Location = Point(52, 116)
        self.__fast_rescrape_cb.Size = Size(300, 34)
        self.__fast_rescrape_cb.Text = i18n.get("ConfigFormRescrapeCB")
        self.__fast_rescrape_cb.CheckedChanged += self.__fired_update_gui

        # 4. -- build the 'add rescrape hints to notes' checkbox
        self.__rescrape_notes_cb = CheckBox()
        self.__rescrape_notes_cb.AutoSize = False
        self.__rescrape_notes_cb.FlatStyle = FlatStyle.System
        self.__rescrape_notes_cb.Location = Point(82, 151)
        self.__rescrape_notes_cb.Size = Size(270, 17)
        self.__rescrape_notes_cb.Text = i18n.get("ConfigFormRescrapeNotesCB")
        self.__rescrape_notes_cb.CheckedChanged += self.__fired_update_gui

        # 5. -- build the 'add rescrape hints to tags' checkbox
        self.__rescrape_tags_cb = CheckBox()
        self.__rescrape_tags_cb.AutoSize = False
        self.__rescrape_tags_cb.FlatStyle = FlatStyle.System
        self.__rescrape_tags_cb.Location = Point(82, 181)
        self.__rescrape_tags_cb.Size = Size(270, 17)
        self.__rescrape_tags_cb.Text = i18n.get("ConfigFormRescrapeTagsCB")
        self.__rescrape_tags_cb.CheckedChanged += self.__fired_update_gui

        # 6. --- build the 'specify series name' checkbox
        self.__summary_dialog_cb = CheckBox()
        self.__summary_dialog_cb.AutoSize = False
        self.__summary_dialog_cb.FlatStyle = FlatStyle.System
        self.__summary_dialog_cb.Location = Point(52, 214)
        self.__summary_dialog_cb.Size = Size(300, 34)
        self.__summary_dialog_cb.Text = i18n.get("ConfigFormShowSummaryCB")
        self.__summary_dialog_cb.CheckedChanged += self.__fired_update_gui

        # 7. --- add 'em all to the tabpage
        tabpage.Controls.Add(first_scrape_label)
        tabpage.Controls.Add(self.__autochoose_series_cb)
        tabpage.Controls.Add(self.__confirm_issue_cb)
        tabpage.Controls.Add(self.__fast_rescrape_cb)
        tabpage.Controls.Add(self.__rescrape_tags_cb)
        tabpage.Controls.Add(self.__rescrape_notes_cb)
        tabpage.Controls.Add(self.__summary_dialog_cb)

        return tabpage
Exemplo n.º 30
0
    def InitializeComponent(self):
        self.Label = Label()
        self.Items = ListBox()
        self.Selection = ListBox()
        self.Okay = Button()
        self.Up = Button()
        self.Down = Button()
        self.UseRegardless = CheckBox()
        self.UseAsFolder = CheckBox()
        self.AlwaysUseDontAsk = CheckBox()
        self.Add = Button()
        self.Remove = Button()
        self.SLabel = Label()
        self.ILabel = Label()
        #
        # Label
        #
        self.Label.Location = Point(12, 8)
        self.Label.Size = Size(430, 30)
        #
        # Items Label
        #
        self.ILabel.Location = Point(12, 38)
        self.ILabel.TextAlign = ContentAlignment.MiddleCenter
        self.ILabel.Size = Size(159, 14)
        #
        # Items
        #
        self.Items.Location = Point(12, 55)
        self.Items.Name = "Items"
        self.Items.Size = Size(159, 134)
        self.Items.TabIndex = 0
        self.Items.Sorted = True
        self.Items.DoubleClick += self.AddItem
        #
        # Selection Label
        #
        self.SLabel.Location = Point(211, 38)
        self.SLabel.TextAlign = ContentAlignment.MiddleCenter
        self.SLabel.Size = Size(159, 14)
        #
        # Selection
        #
        self.Selection.Location = Point(211, 55)
        self.Selection.Name = "Selection"
        self.Selection.Size = Size(159, 134)
        self.Selection.TabIndex = 3
        self.Selection.DoubleClick += self.RemoveItem
        #
        # Up
        #
        self.Up.Location = Point(378, 70)
        self.Up.Name = "Up"
        self.Up.Size = Size(47, 23)
        self.Up.TabIndex = 4
        self.Up.Text = "Up"
        self.Up.UseVisualStyleBackColor = True
        self.Up.Click += self.MoveUp
        #
        # Down
        #
        self.Down.Location = Point(378, 130)
        self.Down.Name = "Down"
        self.Down.Size = Size(47, 23)
        self.Down.TabIndex = 5
        self.Down.Text = "Down"
        self.Down.UseVisualStyleBackColor = True
        self.Down.Click += self.MoveDown
        #
        # UseRegardless
        #
        self.UseRegardless.Location = Point(12, 190)
        self.UseRegardless.Name = "UseRegardless"
        self.UseRegardless.Size = Size(421, 34)
        self.UseRegardless.TabIndex = 7
        self.UseRegardless.UseVisualStyleBackColor = True
        self.UseRegardless.Enabled = True
        #
        # Always use
        #
        self.AlwaysUse = CheckBox()
        self.AlwaysUse.Location = Point(12, 190)
        self.AlwaysUse.Size = Size(413, 35)
        self.AlwaysUse.CheckedChanged += self.AlwaysUseCheckChanged
        #
        # Always use don't ask
        #
        self.AlwaysUseDontAsk.Location = Point(30, 230)
        self.AlwaysUseDontAsk.AutoSize = True
        self.AlwaysUseDontAsk.Checked = True
        self.AlwaysUseDontAsk.Enabled = False

        #
        # UseAsFolder
        #
        self.UseAsFolder.Location = Point(12, 260)
        self.UseAsFolder.Name = "UseAsFolder"
        self.UseAsFolder.Size = Size(252, 24)
        self.UseAsFolder.TabIndex = 8
        self.UseAsFolder.Text = "Seperate each item with a folder"
        self.UseAsFolder.UseVisualStyleBackColor = True
        #
        # Okay
        #
        self.Okay.Location = Point(267, 260)
        self.Okay.Name = "Okay"
        self.Okay.Size = Size(75, 23)
        self.Okay.TabIndex = 9
        self.Okay.Text = "Okay"
        self.Okay.UseVisualStyleBackColor = True
        self.Okay.DialogResult = DialogResult.OK
        #
        # Cancel
        #
        self.Cancel = Button()
        self.Cancel.Location = Point(350, 260)
        self.Cancel.Size = Size(75, 23)
        self.Cancel.Text = "Cancel"
        self.Cancel.DialogResult = DialogResult.Cancel
        #
        # Add
        #
        self.Add.Location = Point(179, 70)
        self.Add.Name = "Add"
        self.Add.Size = Size(24, 23)
        self.Add.TabIndex = 1
        self.Add.Text = "->"
        self.Add.UseVisualStyleBackColor = True
        self.Add.Click += self.AddItem
        #
        # Remove
        #
        self.Remove.Location = Point(179, 130)
        self.Remove.Name = "Remove"
        self.Remove.Size = Size(24, 23)
        self.Remove.TabIndex = 2
        self.Remove.Text = "<-"
        self.Remove.UseVisualStyleBackColor = True
        self.Remove.Click += self.RemoveItem
        #
        # SelectionForm
        #
        self.ClientSize = Size(437, 290)
        self.Controls.Add(self.Label)
        self.Controls.Add(self.UseAsFolder)
        self.Controls.Add(self.UseRegardless)
        self.Controls.Add(self.Remove)
        self.Controls.Add(self.Add)
        self.Controls.Add(self.Down)
        self.Controls.Add(self.Up)
        self.Controls.Add(self.Okay)
        self.Controls.Add(self.Selection)
        self.Controls.Add(self.AlwaysUse)
        self.Controls.Add(self.AlwaysUseDontAsk)
        self.Controls.Add(self.Cancel)
        self.Controls.Add(self.Items)
        self.Controls.Add(self.SLabel)
        self.Controls.Add(self.ILabel)
        self.FormBorderStyle = FormBorderStyle.FixedDialog
        self.ShowIcon = True
        self.AcceptButton = self.Okay
        self.MaximizeBox = False
        self.MinimizeBox = False
        self.Icon = System.Drawing.Icon(ICON)
        self.StartPosition = FormStartPosition.CenterParent
    def __build_datatab(self):
        ''' builds and returns the "Data" Tab for the TabControl '''

        tabpage = TabPage()
        tabpage.Text = i18n.get("ConfigFormDataTab")

        # 1. --- build the 'convert imprints checkbox'
        self.__convert_imprints_cb = CheckBox()
        self.__convert_imprints_cb.AutoSize = False
        self.__convert_imprints_cb.FlatStyle = FlatStyle.System
        self.__convert_imprints_cb.Location = Point(52, 35)
        self.__convert_imprints_cb.Size = Size(300, 34)
        self.__convert_imprints_cb.Text = i18n.get("ConfigFormImprintsCB")
        self.__convert_imprints_cb.CheckedChanged += self.__fired_update_gui

        # 2. -- build the 'overwrite existing' checkbox
        self.__ow_existing_cb = CheckBox()
        self.__ow_existing_cb.AutoSize = False
        self.__ow_existing_cb.FlatStyle = FlatStyle.System
        self.__ow_existing_cb.Location = Point(52, 85)
        self.__ow_existing_cb.Size = Size(310, 34)
        self.__ow_existing_cb.Text = i18n.get("ConfigFormOverwriteCB")
        self.__ow_existing_cb.CheckedChanged += self.__fired_update_gui

        # 3. --- build the 'ignore blanks' checkbox
        self.__ignore_blanks_cb = CheckBox()
        self.__ignore_blanks_cb.AutoSize = False
        self.__ignore_blanks_cb.FlatStyle = FlatStyle.System
        self.__ignore_blanks_cb.Location = Point(82, 125)
        self.__ignore_blanks_cb.Size = Size(270, 34)
        self.__ignore_blanks_cb.TextAlign = ContentAlignment.TopLeft
        self.__ignore_blanks_cb.Text = i18n.get("ConfigFormOverwriteEmptyCB")
        self.__ignore_blanks_cb.CheckedChanged += self.__fired_update_gui

        # 4. --- build the 'download thumbnails' checkbox
        self.__download_thumbs_cb = CheckBox()
        self.__download_thumbs_cb.AutoSize = False
        self.__download_thumbs_cb.FlatStyle = FlatStyle.System
        self.__download_thumbs_cb.Location = Point(52, 165)
        self.__download_thumbs_cb.Size = Size(300, 34)
        self.__download_thumbs_cb.Text = i18n.get("ConfigFormFilelessCB")
        self.__download_thumbs_cb.CheckedChanged += self.__fired_update_gui

        # 5. --- build the 'preserve thumbnails' checkbox
        self.__preserve_thumbs_cb = CheckBox()
        self.__preserve_thumbs_cb.AutoSize = False
        self.__preserve_thumbs_cb.FlatStyle = FlatStyle.System
        self.__preserve_thumbs_cb.Location = Point(82, 205)
        self.__preserve_thumbs_cb.Size = Size(270, 34)
        self.__preserve_thumbs_cb.TextAlign = ContentAlignment.TopLeft
        self.__preserve_thumbs_cb.Text = i18n.get(
            "ConfigFormFilelessOverwriteCB")
        self.__preserve_thumbs_cb.CheckedChanged += self.__fired_update_gui

        # 6. --- add 'em all to the tabpage
        tabpage.Controls.Add(self.__ow_existing_cb)
        tabpage.Controls.Add(self.__ignore_blanks_cb)
        tabpage.Controls.Add(self.__convert_imprints_cb)
        tabpage.Controls.Add(self.__download_thumbs_cb)
        tabpage.Controls.Add(self.__preserve_thumbs_cb)

        return tabpage