當前位置: 首頁>>代碼示例>>Python>>正文


Python Form.__init__方法代碼示例

本文整理匯總了Python中System.Windows.Forms.Form.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python Form.__init__方法的具體用法?Python Form.__init__怎麽用?Python Form.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Windows.Forms.Form的用法示例。


在下文中一共展示了Form.__init__方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
    def __init__(self, openFileDialog=None):
        Form.__init__(self)
        if openFileDialog:
            self.openFileDialog = openFileDialog
        else:
            self.openFileDialog = OpenFileDialog()
        self.Text = 'Tabbed Image Viewer'
        self.Width = 450
        self.Height = 400
        self.StartPosition = FormStartPosition.CenterScreen
        self.Icon = Icon(Path.Combine(IMAGEPATH, "pictures.ico"))
        self.AllowDrop = True
        self.justCopied = False
        self.paths = []
        
        self.initTabControl()
        self.initToolBar()
        self.initMenu()
        self.initContextMenu()
        
        self._clipboardViewerNext = None
        if SetClipboardViewer is not None:
            self._clipboardViewerNext = SetClipboardViewer.SetClipboardViewer(self.Handle)

        for fileName in sys.argv[1:]:
            self.openFile(fileName)

        self.updateToolbar()
        
        self.DragEnter += self.onDragEnter
        self.DragDrop += self.onDragDrop
開發者ID:arnonkehat,項目名稱:tabbedimages,代碼行數:33,代碼來源:main.py

示例2: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
    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)
開發者ID:cdfarrow,項目名稱:FLExTools,代碼行數:11,代碼來源:UIModuleBrowser.py

示例3: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
 def __init__(self, bitmap):
     Form.__init__(self)
     picBox  = PictureBox()
     picBox.SizeMode = PictureBoxSizeMode.AutoSize
     picBox.Image    = bitmap
     picBox.Dock     = DockStyle.Fill
     
     self.Controls.Add(picBox)
     self.Show()
     self.Width = bitmap.Width + 20
     self.Height = bitmap.Height + 20
開發者ID:jasongwq,項目名稱:WaveSyn,代碼行數:13,代碼來源:barcode.py

示例4: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
    def __init__(self):
        Form.__init__(self)
        self.Text = 'MultiDoc Editor'
        self.MinimumSize = Size(150, 150)
        
        self.tabControl = TabControl()
        self.tabControl.Dock = DockStyle.Fill
        self.tabControl.Alignment = TabAlignment.Bottom
        self.Controls.Add(self.tabControl)

        self.addTabPage("New Page", '')
開發者ID:madlinux,項目名稱:ironpython,代碼行數:13,代碼來源:MultiDoc.py

示例5: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
    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())
開發者ID:cdfarrow,項目名稱:FLExTools,代碼行數:16,代碼來源:Help.py

示例6: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
    def __init__(self, name, rename):
        Form.__init__(self)

        title = "Name Tab"
        if rename:
            title = "Rename Tab"
        self.Text = title
        self.Size = Size(170, 85)
        self.FormBorderStyle = FormBorderStyle.FixedDialog
        self.ShowInTaskbar = False
        self.Padding = Padding(5)

        self.initialiseTextBox(name)
        self.initialiseButtons()
開發者ID:rachmatg,項目名稱:ironpython,代碼行數:16,代碼來源:renamedialog.py

示例7: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
    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)
開發者ID:cdfarrow,項目名稱:FLExTools,代碼行數:17,代碼來源:UIDbChooser.py

示例8: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
    def __init__(self):
        Form.__init__(self)
        self.Text = 'stutter'
        self.Height = self.INITIAL_HEIGHT
        self.Width = self.INITIAL_WIDTH

        self.postTextBox = TextBox()
        self.postTextBox.Multiline = True

        self.postButton = Button()
        self.postButton.Text = "Post"

        self.friendsListBox = ListBox()

        self._addMenu()
        self._layout()
開發者ID:madlinux,項目名稱:ironpython,代碼行數:18,代碼來源:MainForm.py

示例9: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
    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
開發者ID:cdfarrow,項目名稱:FLExTools,代碼行數:18,代碼來源:UICollections.py

示例10: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
    def __init__(self, imagePath):
        Form.__init__(self)

        self.Width = 346
        self.Height = 215

        self.images = dict((name, loadImage(imagePath, name + '.jpg'))
            for name in ('pycon', 'andrzej', 'michael', 'christian'))

        self.pictureBox = PictureBox()
        self.pictureBox.Parent = self
        self.pictureBox.Location = Point(234, 12)
        self.pictureBox.TabStop = False
        self.switchImage("pycon")

        self.mainText = Label()
        self.mainText.Parent = self
        self.mainText.AutoSize = True
        self.mainText.Location = Point(12, 12);
        self.mainText.Text = ("Tabbed Image Viewer\r\n\r\nWritten for PyCon 2007\r\n"
                              "Using IronPython and Windows Forms\r\n\r\nBy:")

        self.addNameLabel("Andrzej Krzywda", "andrzej", Point(36, 90))
        self.addNameLabel("Christian Muirhead", "christian", Point(36, 105))
        self.addNameLabel("Michael Foord", "michael", Point(36, 120))

        versionLabel = Label()
        versionLabel.Parent = self
        versionLabel.AutoSize = True
        versionLabel.Location = Point(12, 151)
        versionLabel.Text = "Version: " + __revision__

        self.okButton = Button()
        self.okButton.Parent = self
        self.okButton.Text = "OK"
        self.okButton.Location = Point(251, 146)
        self.okButton.Click += self.onOK

        self.AcceptButton = self.okButton

        self.Text = "About"

        self.FormBorderStyle = FormBorderStyle.FixedDialog
        self.MinimizeBox = False
        self.MaximizeBox = False
開發者ID:arnonkehat,項目名稱:tabbedimages,代碼行數:47,代碼來源:about.py

示例11: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
    def __init__(self):
        Form.__init__(self)
        self.Text = 'MultiDoc Editor'
        self.MinimumSize = Size(150, 150)
        self.iconPath = Path.Combine(executableDirectory, 'icons')
        self.Icon = self.loadImage('copy_clipboard_16.dat')
        
        tab = self.tabControl = TabControl()
        self.tabControl.Dock = DockStyle.Fill
        self.tabControl.Alignment = TabAlignment.Bottom
        self.Controls.Add(self.tabControl)

        self.tabController = TabController(tab)
        
        self.initialiseCommands()
        self.initialiseToolbar()
        self.initialiseMenus()
        self.initialiseObservers()
        self.document = Document()
開發者ID:madlinux,項目名稱:ironpython,代碼行數:21,代碼來源:MultiDoc.py

示例12: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
    def __init__(self):
        Form.__init__(self)
        self.ClientSize = Size(700, 500)
        self.Text = "FLExTools " + Version.number

        ## Get configurables - current DB, current collection
        self.configuration = ConfigStore(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.currentProject,
                               listOfModules,
                               self.__LoadModules,
                               self.__ProgressBar
                               )
        self.UIPanel.SetChooseProjectHandler(self.ChooseProject)
        self.UIPanel.SetEditCollectionsHandler(self.EditCollections)
        self.FormClosed += self.__OnFormClosed

        self.Controls.Add(self.UIPanel)
        self.Controls.Add(self.StatusBar)
開發者ID:cdfarrow,項目名稱:FLExTools,代碼行數:43,代碼來源:FLExTools.py

示例13: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
 def __init__(self):
     Form.__init__(self)
開發者ID:richlewis42,項目名稱:openbabel,代碼行數:4,代碼來源:pybel.py

示例14: __initialize

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
 def __initialize(self):
    ''' intial configuration for new instances of this class '''
    
    Form.__init__(self)
    self.StartPosition = FormStartPosition.Manual
    self.Load += self.__install_persistent_bounds
開發者ID:Blackbird88,項目名稱:comic-vine-scraper,代碼行數:8,代碼來源:persistentform.py

示例15: __init__

# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import __init__ [as 別名]
 def __init__(self):
     Form.__init__(self)
     self.Text = "Tai-Pan Chart"
     self.Name = "Tai-Pan Chart"
     self.Width = 640
     self.Height = 480
開發者ID:jamesjrg,項目名稱:taipan,代碼行數:8,代碼來源:rslWPFChart.py


注:本文中的System.Windows.Forms.Form.__init__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。