예제 #1
0
    def __init__(self, RB_print):
        self.RB_print = RB_print
        self.Text = 'RedBim'
        self.Name = 'RedBimPrinter'
        self.Height = 500
        self.Width = 700
        self.AutoScroll = True
        self.AutoScaleMode = AutoScaleMode.Font
        self.BackColor = Color.FromArgb(67, 67, 67)
        # self.BackgroundImage = Image.FromFile(os.path.join(STATIC_IMAGE, "bg.png"))
        # self.BackgroundImageLayout = ImageLayout.Center
        self.Icon = Icon(os.path.join(STATIC_IMAGE, "icon.ico"), 16, 16)
        self.StartPosition = FormStartPosition.CenterScreen

        self.label = Label()
        self.label.Anchor = (AnchorStyles.Top | AnchorStyles.Left
                             | AnchorStyles.Right)
        self.label.BackColor = Color.FromArgb(0, 0, 0, 0)
        self.label.Font = Font("ISOCPEUR", 12, FontStyle.Italic)
        self.label.ForeColor = Color.White
        self.label.Location = Point(0, 0)
        self.label.Name = "text"
        self.label.Dock = DockStyle.Top
        self.label.AutoSize = True
        self.Controls.Add(self.label)
        self.label.Click += self.add_to_clipboard
예제 #2
0
    def icon(self):
        """Creating icon in system tray"""
        AddReference('System.ComponentModel')
        AddReference('System.Windows.Forms')
        AddReference('System.Drawing')
        from System.ComponentModel import Container
        from System.Windows.Forms import NotifyIcon, MenuItem, ContextMenu
        from System.Drawing import Icon

        self.components = Container()
        context_menu = ContextMenu()
        menu_item = MenuItem('Show')
        menu_item.Click += self.open_from_tray
        context_menu.MenuItems.Add(menu_item)
        menu_item = MenuItem('Quit')
        menu_item.Click += self.quit
        context_menu.MenuItems.Add(menu_item)
        notifyIcon = NotifyIcon(self.components)
        notifyIcon.Icon = Icon(ico_path)
        notifyIcon.Text = title
        notifyIcon.Visible = True
        notifyIcon.ContextMenu = context_menu
        notifyIcon.DoubleClick += self.open_from_tray

        return notifyIcon
예제 #3
0
    def __init__(self):
        self.Text = "Hello World (" + __file__ + ")"
        self._txtMessage = TextBox()
        msgButton = Button(Text="Message")
        msgButton.Click += self.OnmsgButtonClick

        #
        # Create FlowPanelLayout and add controls
        #
        self._flowLayoutPanel1 = FlowLayoutPanel(Dock=DockStyle.Fill)
        self._flowLayoutPanel1.Controls.Add(Label(Text="Enter Message:"))
        self._flowLayoutPanel1.Controls.Add(self._txtMessage)
        self._flowLayoutPanel1.Controls.Add(msgButton)
        self.Controls.Add(self._flowLayoutPanel1)

        self._components = System.ComponentModel.Container()

        #
        # Add component - ContextMenu
        #
        self._contextMenuStrip1 = ContextMenuStrip(self._components)
        self._exitToolStripMenuItem = ToolStripMenuItem(Text="Exit")
        self._exitToolStripMenuItem.Click += self.OnExitClick
        self._contextMenuStrip1.Items.Add(self._exitToolStripMenuItem)

        #
        # add Component - NotifyIcon
        #
        self._notifyIcon1 = NotifyIcon(self._components,
                                       Visible=True,
                                       Text="Test")
        self._notifyIcon1.Icon = Icon(
            System.IO.Path.Combine(sys.path[0], "app.ico"))
        self._notifyIcon1.ContextMenuStrip = self._contextMenuStrip1
        self.Closed += self.OnNotifyIconExit
예제 #4
0
    def __init__(self, docs):
        Form.__init__(self)
        self.ClientSize = Size(400, 400)
        self.Text = "Module Details"
        self.Icon = Icon(UIGlobal.ApplicationIcon)

        infoPane = ModuleInfoPane()
        infoPane.SetFromDocs(docs)
        self.Controls.Add(infoPane)
예제 #5
0
def application_main():
    global icon

    icon = NotifyIcon()
    icon.Text = "Hello World"
    icon.Icon = Icon(SystemIcons.Application, 40, 40)
    icon.Visible = True

    Application().Run()
예제 #6
0
    def __init__(self):
        self.Text = "Icon"
        self.Width = 250
        self.Height = 200

        try:
            self.Icon = Icon("Web.ico")

        except Exception, e:
            print e
            sys.exit(1)
예제 #7
0
    def __init__(self):
        Form.__init__(self)
        self.ClientSize = Size(400, 250)
        self.Text = "About FLExTools"
        self.FormBorderStyle  = FormBorderStyle .Fixed3D
        self.Icon = Icon(UIGlobal.ApplicationIcon)

        pb = PictureBox()
        pb.Image = Image.FromFile(UIGlobal.ApplicationIcon)
        pb.BackColor = UIGlobal.helpDialogColor
        pb.SizeMode = PictureBoxSizeMode.CenterImage

        self.Controls.Add(pb)
        self.Controls.Add(AboutInfo())
예제 #8
0
    def __init__(self, currentProject=None):
        Form.__init__(self)

        self.ClientSize = Size(350, 250)
        self.Text = "Choose Project"
        self.Icon = Icon(UIGlobal.ApplicationIcon)

        self.projectName = currentProject

        self.projectList = ProjectList(currentProject)
        self.projectList.SetActivatedHandler(self.__OnProjectActivated)

        self.Load += self.__OnLoad

        self.Controls.Add(self.projectList)
예제 #9
0
    def __init__(self, cm, mm, currentCollection):
        Form.__init__(self)
        self.ClientSize = Size(600, 600)
        self.Text = "Collections Manager"
        self.Icon = Icon(UIGlobal.ApplicationIcon)

        self.activatedCollection = None

        self.cmPanel = CollectionsManagerUI(cm, mm, currentCollection)
        self.cmPanel.SetActivatedHandler(self.__OnCollectionActivated)

        self.Load += self.__OnLoad

        self.Controls.Add(self.cmPanel)
        self.FormClosing += self.__OnFormClosing
예제 #10
0
    def __init__(self, currentDatabase=None):
        Form.__init__(self)

        self.ClientSize = Size(300, 250)
        self.Text = "Choose Database"
        self.Icon = Icon(UIGlobal.ApplicationIcon)

        self.databaseName = currentDatabase

        self.databaseList = DatabaseList(currentDatabase)
        self.databaseList.SetActivatedHandler(self.__OnDatabaseActivated)

        self.Load += self.__OnLoad

        self.Controls.Add(self.databaseList)
예제 #11
0
    def __init__(self):
        Form.__init__(self)
        self.ClientSize = Size(700, 500)
        self.Text = "FLExTools " + Version.number

        ## Get configurables - current DB, current collection
        self.configuration = CDFConfigStore(FTPaths.CONFIG_PATH)

        self.collectionsManager = FTCollections.CollectionsManager()

        self.__LoadModules()
        
        try:
            listOfModules = self.collectionsManager.ListOfModules(
                                   self.configuration.currentCollection)
        except FTCollections.FTC_NameError:
            # The configuration value is bad...
            self.configuration.currentCollection = None
            listOfModules = []

        self.Icon = Icon(UIGlobal.ApplicationIcon)
        
        self.InitMainMenu()

        self.progressPercent = -1
        self.progressMessage = None
        self.StatusBar = StatusBar()
        self.__UpdateStatusBar()

        self.UIPanel = FTPanel(self.moduleManager,
                               self.configuration.currentDatabase,
                               listOfModules,
                               self.__LoadModules,
                               self.__ProgressBar
                               )
        self.UIPanel.SetChooseDatabaseHandler(self.ChooseDatabase)
        self.UIPanel.SetEditCollectionsHandler(self.EditCollections)
        self.FormClosed += self.__OnFormClosed

        self.Controls.Add(self.UIPanel)
        self.Controls.Add(self.StatusBar)
예제 #12
0
    def __init__(self):
        self.pushbutons = []

        self.Text = 'RedBim набор плагинов'
        self.Name = 'RedBimSetting'
        self.Height = 450
        self.Width = 400
        self.AutoScroll = True
        self.AutoScaleMode = AutoScaleMode.Font
        self.BackColor = Color.FromArgb(67, 67, 67)
        # self.BackgroundImage = Image.FromFile(os.path.join(STATIC_IMAGE, "bg.png"))
        # self.BackgroundImageLayout = ImageLayout.Center
        self.Icon = Icon(os.path.join(STATIC_IMAGE, "icon.ico"), 16, 16)
        self.StartPosition = FormStartPosition.CenterScreen
        self.tree = RB_TreeView()
        self.tree.CollapseAll()
        self.tree.BackColor = Color.FromArgb(67, 67, 67)
        self.tree.BackgroundImage = Image.FromFile(
            os.path.join(STATIC_IMAGE, "bg.png"))
        self.tree.BackgroundImageLayout = ImageLayout.Center
        self.tree.Font = Font("ISOCPEUR", 12, FontStyle.Italic)
        self.tree.ForeColor = Color.White
        self.tree.CheckBoxes = True
        self.tree.Height = 378
        self.tree.Dock = DockStyle.Top
        self.find_all_pushbuttons()
        self.button = Button()
        self.button.Dock = DockStyle.Bottom
        self.button.Text = "Сохранить настройки"
        self.button.Height = 32
        self.button.Font = Font("ISOCPEUR", 12, FontStyle.Italic)
        self.button.ForeColor = Color.White
        self.button.BackColor = Color.Green
        self.button.Click += self.active_button

        self.Controls.Add(self.button)
        self.Controls.Add(self.tree)
예제 #13
0
파일: formv4.py 프로젝트: ife/IronLanguages
    def __init__(self):
        self.Text = "Hello World (" + __file__ + ")"

        # Create Label
        self.Controls.Add(Label(Text="Enter Message:"))

        # Create TextBox
        self._txtMessage = TextBox(Left=100)
        self.Controls.Add(self._txtMessage)

        # Create Button
        msgButton = Button(Text="Message", Left=20, Top=25)
        msgButton.Click += self.OnMsgButtonClick
        self.Controls.Add(msgButton)

        # Create Component Container
        self._components = System.ComponentModel.Container()

        #
        # Add component - ContextMenu
        #
        self._contextMenuStrip1 = ContextMenuStrip(self._components)
        self._exitToolStripMenuItem = ToolStripMenuItem(Text="Exit")
        self._contextMenuStrip1.Items.Add(self._exitToolStripMenuItem)
        self._exitToolStripMenuItem.Click += self.OnExitClick

        #
        # add Component - NotifyIcon
        #
        self._notifyIcon1 = NotifyIcon(self._components,
                                       Visible=True,
                                       Text="Test")
        self._notifyIcon1.Icon = Icon(
            System.IO.Path.Combine(sys.path[0], "app.ico"))
        self._notifyIcon1.ContextMenuStrip = self._contextMenuStrip1
        self.Closed += self.OnNotifyIconExit
예제 #14
0
    from System.Windows.Forms import View as winView
    from System.Windows.Forms import Form
    from System.Windows.Forms import Application, Form, CheckBox, Form, Label
    from System.Windows.Forms import DialogResult, GroupBox, FormBorderStyle
    from System.Windows.Forms import ComboBox, Button, DialogResult, SaveFileDialog

    UserName = []
    UserPass = []
    SelectedItem = []

    # create a link to the wework icon
    # just add self.Icon = icon to your form
    scriptDirectory = os.path.dirname(__main__.__file__)
    iconFilename = os.path.join(scriptDirectory, 'wework_we.ico')
    logoFilename = os.path.join(scriptDirectory, 'wework_logo.png')
    icon = Icon(iconFilename)
    logo = Bitmap(logoFilename)

    class FlexibleDropDownMenu(Form):
        """
        This menu expands and contracts based on the number of dictionaries
        that it is given. A list of headings provides labels for each dropdown
        and default values are the keys which you want to be default for each
        dropdown.
        """
        def __init__(self, dropDownDictList, dropDownHeadings, defaultValues=[], sort=True):

            topOffset = 20
            spacing = 45

            # Create the Form
예제 #15
0
 def icon(self, new_icon: str):
     self.__icon = new_icon
     self.__cef_form.Icon = Icon(self.__icon)
예제 #16
0
 def initNotifyIcon(self):
     self.notifyIcon = NotifyIcon()
     self.notifyIcon.Icon = Icon("dvd.ico")
     self.notifyIcon.Visible = True
     self.notifyIcon.ContextMenu = self.initContextMenu()
예제 #17
0
    def __init__(self):

        # Colors
        self.color_title = Color.FromArgb(135, 189, 68)
        self.color_button_sel = Color.FromArgb(153, 198, 91)
        self.color_button = Color.FromArgb(103, 148, 41)
        self.color_window = Color.FromArgb(48, 48, 48)
        self.color_panel = Color.FromArgb(124, 124, 124)

        # Window parameters
        self.Text = "PyNettr 0.1.0"
        self.Name = "Test"
        self.Size = Size(500, 550)
        self.MinimumSize = Size(460, 480)
        self.BackColor = self.color_window
        self.Icon = Icon("res\\icon.ico")

        # Top Main Label
        self.top_label = Label()
        self.top_label.Anchor = AnchorStyles.Top
        self.top_label.Text = "PyNettr"
        self.top_label.Size = Size(120, 30)
        self.top_label.ForeColor = self.color_title
        self.top_label.Font = Font("Lucida Console", 16, FontStyle.Bold)
        self.top_label.Location = Point(185, 3)

        # Console box to write to
        self.console_box = self.new_textbox()
        self.console_box.Multiline = True
        self.console_box.ReadOnly = True
        self.console_box.BackColor = Color.FromArgb(65, 65, 65)
        self.console_box.ScrollBars = ScrollBars.Vertical
        self.console_box.Size = Size(420, 120)
        self.console_box.Location = Point(30, 360)
        self.console_box.Anchor = (AnchorStyles.Left | AnchorStyles.Right
                                   | AnchorStyles.Bottom)

        self.acl_panel_new = self.setup_acl_tool()

        # Placeholder_1 Tool panel#################################
        self.placeholder_panel_1 = self.new_panel()
        self.placeholder_panel_1.Name = "placeholder_panel_1"

        # Placeholder_2 Tool Panel##################################
        self.placeholder_panel_2 = self.new_panel()
        self.placeholder_panel_2.Name = "placeholder_panel_2"

        # Placeholder_3 Tool Panel##################################
        self.placeholder_panel_3 = self.new_panel()
        self.placeholder_panel_3.Name = "placeholder_panel_3"

        # Main Tool Buttons######################################
        # Button to activate ACL tool panel
        self.button_acl_tool = self.new_button()
        self.button_acl_tool.Text = "ACL Tool"
        self.button_acl_tool.Location = Point(30, 37)
        self.button_acl_tool.Click += self.acl_tool

        # Button to activate X tool panel
        self.button_ph_tool_1 = self.new_button()
        self.button_ph_tool_1.Text = "Test"
        self.button_ph_tool_1.Location = Point(138, 37)
        self.button_ph_tool_1.Click += self.placeholder_tool_1

        # Button for phtool2
        self.button_ph_tool_2 = self.new_button()
        self.button_ph_tool_2.Location = Point(247, 37)
        self.button_ph_tool_2.Text = "Test2"
        #self.button_ph_tool_2.Click += self.placeholder_tool_2

        # Button for tool_4
        self.button_tool_4 = self.new_button()
        self.button_tool_4.Location = Point(358, 37)
        self.button_tool_4.Text = "Tool_4"
        self.button_tool_4.Click += self.activate_tool_4

        self.tool_4_panel = self.setup_tool_4()

        # Adding initial layout##################################
        self.Controls.Add(self.top_label)
        # buttons
        self.Controls.Add(self.button_acl_tool)
        self.Controls.Add(self.button_ph_tool_1)
        self.Controls.Add(self.button_ph_tool_2)
        self.Controls.Add(self.button_tool_4)
        # panels
        self.Controls.Add(self.placeholder_panel_1)
        self.Controls.Add(self.placeholder_panel_2)

        self.Controls.Add(self.tool_4_panel)
        self.Controls.Add(self.acl_panel_new)
        self.Controls.Add(self.console_box)