Esempio n. 1
0
    def __init__(self):
        """
        Constructor
        """

        # Inherit from QMainWindow.
        super().__init__()

        # Top-level config:
        self.setCentralWidget(ArgCheck(self))
        # Set relative window position (first two args) and size.
        self.setGeometry(50, 80, 425, 540)
        self.setWindowTitle("Logicheck")
        self.setWindowIcon(QIcon(resource_path("images/logicheck_icon_3.png")))

        # Create menu.
        # Create a help action which will go in a drop-down menu.
        # The "&" in "&Help" specifies the Alt- shortcut key.
        helpAction = QAction(
            QIcon(resource_path("images/logicheck_help_icon.png")), "&Help",
            self)
        helpAction.setShortcut("Ctrl+H")
        # Connect the selection of the action to displaying the manual
        helpAction.triggered.connect(self.show_info)
        # Create the status bar and the menu bar
        self.statusBar()
        menubar = self.menuBar()
        helpMenu = menubar.addMenu("&Help")
        # Link the menu item to the action.
        helpMenu.addAction(helpAction)
Esempio n. 2
0
    def __init__(self):
        """
        Constructor
        """

        # Inherit from QMainWindow.
        super().__init__()

        # Top-level config:
        self.setCentralWidget(ArgCheck(self))
        # Set relative window position (first two args) and size.
        self.setGeometry(50, 80, 425, 540)
        self.setWindowTitle("Logicheck")
        self.setWindowIcon(QIcon(resource_path("images/logicheck_icon_3.png")))

        # Create menu.
        # Create a help action which will go in a drop-down menu.
        # The "&" in "&Help" specifies the Alt- shortcut key.
        helpAction = QAction(QIcon(resource_path("images/logicheck_help_icon.png")),
                             "&Help", self)
        helpAction.setShortcut("Ctrl+H")
        # Connect the selection of the action to displaying the manual
        helpAction.triggered.connect(self.show_info)
        # Create the status bar and the menu bar
        self.statusBar()
        menubar = self.menuBar()
        helpMenu = menubar.addMenu("&Help")
        # Link the menu item to the action.
        helpMenu.addAction(helpAction)
Esempio n. 3
0
 def show_info(self):
     # Create window displaying the manual.
     info_file = open(resource_path("documents/manual.html"))
     # Get the contents (text).
     info = info_file.read()
     self.info_window = ManualWindow(info)
     font1 = QFont()
     font1.setPointSize(11)
     self.info_window.setFont(font1)
     self.info_window.setWindowIcon(QIcon(resource_path(
         "images/logicheck_icon_3.png")))
     self.info_window.show()
Esempio n. 4
0
 def show_info(self):
     # Create window displaying the manual.
     info_file = open(resource_path("documents/manual.html"))
     # Get the contents (text).
     info = info_file.read()
     self.info_window = ManualWindow(info)
     font1 = QFont()
     font1.setPointSize(11)
     self.info_window.setFont(font1)
     self.info_window.setWindowIcon(
         QIcon(resource_path("images/logicheck_icon_3.png")))
     self.info_window.show()
Esempio n. 5
0
    def run(self):
        self.maxSentries = 15
        if len(Connector.getPorts()) == 0:
            tkMessageBox.showerror(Local('Error'),
                                   Local('Serial port not found'))
            os._exit(0)
        self.reload = False
        self.protScanTask = None
        self.tempWindow = None
        self.histWindow = None

        #window
        root = self.root = Tkinter.Tk()
        root.resizable(False, False)
        root.title('GSMguard Configuration v.' + appVersion)
        root.iconbitmap(resource_path('./gg-icon.ico'))

        fleft = ttk.Frame(root)
        fleft.pack(side='left', anchor='n')
        fright = ttk.LabelFrame(root, text=Local('Schedule'))
        fright.pack(side='right', anchor='n', padx=3, pady=3, fill='y')

        self.makeLocaleSettings(fleft)
        self.makePortSettings(fleft)
        self.makeMainSettings(fleft)
        self.makeScheduleSettings(fright)

        self.updPortList()
        root.mainloop()
        return self.reload
Esempio n. 6
0
 def __readFunctionsFromFile(self):
     try:
         file = open(resource_path("functions.txt"), 'r')
     except OSError as e:
         print(e)
         return None
     functions = file.read().splitlines()
     file.close()
     return functions
Esempio n. 7
0
 def load(self, filename, volume = 0.5):
     # load a sound for playback
     relative = os.path.join('res', 'sound_effects', filename)
     path = resource_path.resource_path(relative)
     try:
         sound = pygame.mixer.Sound(path)
     except pygame.error, message:
         print 'Cannot load sound:', filename
         raise SystemExit, message
Esempio n. 8
0
    def __init__(self, parent):
        wx.Panel.__init__(self, parent=parent)

        vbox = wx.BoxSizer(wx.VERTICAL)

        logobox = wx.BoxSizer(wx.HORIZONTAL)
        titleImage = wx.StaticBitmap(self, size=(360, 65))
        titleImage.SetBitmap(
            wx.Bitmap(resource_path('resources/logotitle.gif')))
        logobox.Add(titleImage, 1, wx.TOP | wx.EXPAND, 10)

        instuctbox = wx.BoxSizer(wx.HORIZONTAL)
        instructtxt = wx.StaticText(self,
                                    id=-1,
                                    label="<EAD>      to      Spreadsheet",
                                    style=wx.ALIGN_CENTER)
        instuctbox.Add(instructtxt, 1, wx.ALL | wx.EXPAND, 5)

        middlebox = wx.BoxSizer(wx.VERTICAL)
        inputtxtbox = wx.BoxSizer(wx.HORIZONTAL)

        EADtxt = wx.StaticText(self, id=-1, label="Select EAD file:")
        inputtxtbox.Add(EADtxt, 1, wx.TOP | wx.EXPAND, 10)

        inputfilebox = wx.BoxSizer(wx.HORIZONTAL)
        self.EADinput = wx.TextCtrl(self, size=(450, 25))
        browseButton = wx.Button(self, label='Browse...', size=(75, 28))
        inputfilebox.Add(self.EADinput, 1, wx.ALL | wx.EXPAND, 1)
        inputfilebox.Add(browseButton, 1, wx.ALL | wx.EXPAND, 1)
        self.Bind(wx.EVT_BUTTON,
                  lambda event: self.browseClick(event, self.EADinput),
                  browseButton)

        #spacerbox = wx.BoxSizer(wx.VERTICAL)

        middlebox.Add(inputtxtbox, 1, wx.ALL | wx.EXPAND, 1)
        middlebox.Add(inputfilebox, 1, wx.BOTTOM | wx.EXPAND, 30)
        #middlebox.Add(spacerbox, 1, wx.ALL | wx.EXPAND, 1)

        convertbuttonbox = wx.BoxSizer(wx.HORIZONTAL)
        convertbuttonbox.Add((453, 10))
        convertButton = wx.Button(self, label='Convert', size=(175, 28))
        convertbuttonbox.Add(convertButton, 1, wx.RIGHT | wx.EXPAND, 1.5)
        self.Bind(wx.EVT_BUTTON,
                  lambda event: parent.convertClick(event, self.EADinput),
                  convertButton)

        vbox.Add(logobox, 1, wx.ALL | wx.EXPAND, 5)
        vbox.Add(instuctbox, 1, wx.ALL | wx.EXPAND, 5)
        vbox.Add(middlebox, 1, wx.ALL | wx.EXPAND, 5)
        vbox.Add(convertbuttonbox, 1, wx.ALL | wx.EXPAND, 5)

        self.SetSizer(vbox)
        vbox.Fit(self)
Esempio n. 9
0
    def load_image(self, filename, colorkey = None):
        # call pygame image load function

        # create platform independent path
        relative = os.path.join('res', 'images', filename)
        path = resource_path.resource_path(relative)
        try:
            image = pygame.image.load(path)
        except pygame.error, message:
            print 'Cannot load image:', filename
            raise SystemExit, message
Esempio n. 10
0
 def __init__(self, root, CSVdata):
     root.resizable(False, False)
     root.title('GSMguard event history')
     root.iconbitmap(resource_path('./gg-icon.ico'))
     ttk.Button(root,
                text=Local('Save as') + " *.csv",
                command=lambda: self.save()).pack(side='top',
                                                  anchor='w',
                                                  padx=3,
                                                  pady=3)
     et = EventTable(root)
     self.csv = CSVdata
     data = CSVdata.strip().split('\n')[1:]
     for row in data:
         et.add(row.strip().split(';'))
Esempio n. 11
0
 def __init__(self, root, CSVdata):
     root.resizable(False, False)
     root.title('GSMguard temperature')
     root.iconbitmap(resource_path('./gg-icon.ico'))
     ttk.Button(root, text = Local('Save as') + " *.csv", command = lambda: self.save()).pack(side = 'top', anchor = 'w', padx = 3, pady = 3)
     self.csv = CSVdata
     data = CSVdata.strip().split('\n')
     fields = data[0].strip().split(';')
     data = data[1:]
     smp = [[] for i in fields]
     for i in range(len(data)):
         es = data[i].strip().split(';')
         for j in range(len(es)):
             smp[j].append(es[j])
     temp = [[float(j) for j in i] for i in smp[1:]]
     makePlot(root, smp[0], temp, fields[1:])  
Esempio n. 12
0
    def __init__(self, table_data):
        """
        Constructor

        __init__(list<list<str>>)
        """

        # Inherit from QMainWindow.
        super().__init__()
        main_layout = QGridLayout()
        truth_table_graphic = TruthTableGraphic(table_data)
        # window_width = truth_table_graphic.width()
        # window_height = truth_table_graphic.height()
        main_layout.addWidget(truth_table_graphic, 0, 0)
        main_widget = QWidget()
        main_widget.setLayout(main_layout)

        self.setCentralWidget(main_widget)
        # Place this window slightly offset from the starting position of the
        # main window.
        self.setGeometry(80, 110, 425, 540)
        self.setWindowTitle("Logicheck - Truth Table")
        self.setWindowIcon(QIcon(resource_path("images/logicheck_icon_3.png")))
Esempio n. 13
0
	def __init__( self, parent ):
	
		screenSize = wx.DisplaySize()
		screenWidth = screenSize[0] * 0.85
		screenHeight = screenSize[1] * 0.95
	
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = "EADMachine 2.0", pos = wx.DefaultPosition, size = wx.Size( screenWidth, screenHeight ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
		panel = wx.Panel(self)
		#panel = wx.ScrolledWindow(self, -1)
		#panel.SetScrollbars(1, 1, screenWidth, screenHeight)
		
		favicon = wx.Icon(resource_path('resources/em.gif'), wx.BITMAP_TYPE_GIF, 16, 16)
		self.SetIcon(favicon)
		
		#default information:
		processor = "unprocessed"
		publishYear = str(date.today().year)
		todayMonth = str(date.today().month)
		todayDay = str(date.today().day)
		if len(todayMonth) == 1:
			todayMonth = "0" + todayMonth
		if len(todayDay) == 1:
			todayDay = "0" + todayDay
		faCreationDate = str(date.today().year) + "-" + todayMonth + "-" + todayDay
		histNoteLabel = "Historical Note"
		acqInfo = "All items in this collection were transferred to the University Libraries, M.E. Grenander Department of Special Collections and Archives."
		arrangeStmt = "The collection is unprocessed and is likely disorganized. Individual items may be difficult to find."
		accessStmt = "<p>Access to this collection is restricted because it is unprocessed. Portions of the collection may contain recent administrative records and/or personally identifiable information. Please contact an archivist for more information.</p><p>Red asterisks (***) denote restricted items.</p>"
		useStmt = "<p>This page may contain links to digital objects. Access to these images and the technical capacity to download them does not imply permission for re-use. Digital objects may be used freely for personal reference use, referred to, or linked to from other web sites.</p><p>Researchers do not have permission to publish or disseminate material from these collections without permission from an archivist and/or the copyright holder.</p><p>The researcher assumes full responsibility for conforming to the laws of copyright. Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.) and/or by the copyright or neighboring-rights laws of other nations. More information about U.S. Copyright is provided by the Copyright Office. Additionally, re-use may be restricted by terms of University Libraries gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks.</p><p>The University Archives are eager to hear from any copyright owners who are not properly identified so that appropriate information may be provided in the future.</p>"
		
		
		self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
		
		self.m_menubar1 = wx.MenuBar( 0 )
		self.m_menu1 = wx.Menu()
		self.saveAs = wx.MenuItem( self.m_menu1, wx.ID_ANY, u"Save As EAD", wx.EmptyString, wx.ITEM_NORMAL )
		self.m_menu1.AppendItem( self.saveAs )
		
		self.m_menubar1.Append( self.m_menu1, u"File" ) 
		
		self.SetMenuBar( self.m_menubar1 )
		
		bSizer2 = wx.BoxSizer( wx.VERTICAL )
		
		self.page2 = wx.Notebook( panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
		#self.page1 = wx.Panel( self.page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		self.page1 = wx.ScrolledWindow( self.page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.HSCROLL|wx.VSCROLL )
		self.page1.SetScrollRate( 5, 5 )
		bSizer5 = wx.BoxSizer( wx.HORIZONTAL )
		
		bSizer7 = wx.BoxSizer( wx.VERTICAL )
		
		fgSizer1 = wx.FlexGridSizer( 0, 2, 0, 0 )
		fgSizer1.SetFlexibleDirection( wx.BOTH )
		fgSizer1.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.m_staticText1 = wx.StaticText( self.page1, wx.ID_ANY, u"Collection:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText1.Wrap( -1 )
		fgSizer1.Add( self.m_staticText1, 0, wx.ALL, 5 )
		
		self.collectionName = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 350,-1 ), 0 )
		fgSizer1.Add( self.collectionName, 0, wx.ALL, 5 )
		
		self.m_staticText2 = wx.StaticText( self.page1, wx.ID_ANY, u"Collection ID:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText2.Wrap( -1 )
		fgSizer1.Add( self.m_staticText2, 0, wx.ALL, 5 )
		
		bSizer3 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.m_staticText5 = wx.StaticText( self.page1, wx.ID_ANY, u"nam_", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText5.Wrap( -1 )
		bSizer3.Add( self.m_staticText5, 0, wx.ALL, 5 )
		
		self.collectionID = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 211,-1 ), 0 )
		bSizer3.Add( self.collectionID, 0, wx.ALL, 5 )
		
		
		fgSizer1.Add( bSizer3, 1, wx.EXPAND, 5 )
		
		self.m_staticText3 = wx.StaticText( self.page1, wx.ID_ANY, u"Sponsor:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText3.Wrap( -1 )
		fgSizer1.Add( self.m_staticText3, 0, wx.ALL, 5 )
		
		self.sponsor = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 350,-1 ), 0 )
		fgSizer1.Add( self.sponsor, 0, wx.ALL, 5 )
		
		self.m_staticText4 = wx.StaticText( self.page1, wx.ID_ANY, u"Normal Date:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText4.Wrap( -1 )
		fgSizer1.Add( self.m_staticText4, 0, wx.ALL, 5 )
		
		self.collectionDate = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 350,-1 ), 0 )
		fgSizer1.Add( self.collectionDate, 0, wx.ALL, 5 )
		
		self.m_staticText6 = wx.StaticText( self.page1, wx.ID_ANY, u"Processed by:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText6.Wrap( -1 )
		fgSizer1.Add( self.m_staticText6, 0, wx.ALL, 5 )
		
		self.processedBy = wx.TextCtrl( self.page1, wx.ID_ANY, processor, wx.DefaultPosition, wx.Size( 350,-1 ), 0 )
		fgSizer1.Add( self.processedBy, 0, wx.ALL, 5 )
		
		self.m_staticText7 = wx.StaticText( self.page1, wx.ID_ANY, u"Processing Date Normal:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText7.Wrap( -1 )
		fgSizer1.Add( self.m_staticText7, 0, wx.ALL, 5 )
		
		self.processingDate = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 350,-1 ), 0 )
		fgSizer1.Add( self.processingDate, 0, wx.ALL, 5 )
		
		self.m_staticText11 = wx.StaticText( self.page1, wx.ID_ANY, u"Publish Year:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText11.Wrap( -1 )
		fgSizer1.Add( self.m_staticText11, 0, wx.ALL, 5 )
		
		self.publishedYear = wx.TextCtrl( self.page1, wx.ID_ANY,  publishYear, wx.DefaultPosition, wx.Size( 350,-1 ), 0 )
		fgSizer1.Add( self.publishedYear, 0, wx.ALL, 5 )
		
		self.m_staticText13 = wx.StaticText( self.page1, wx.ID_ANY, u"Finding Aid Author:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText13.Wrap( -1 )
		fgSizer1.Add( self.m_staticText13, 0, wx.ALL, 5 )
		
		self.faAuthor = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 350,-1 ), 0 )
		fgSizer1.Add( self.faAuthor, 0, wx.ALL, 5 )
		
		self.m_staticText14 = wx.StaticText( self.page1, wx.ID_ANY, u"Finding Aid Creation Date Normal:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText14.Wrap( -1 )
		fgSizer1.Add( self.m_staticText14, 0, wx.ALL, 5 )
		
		self.faDate = wx.TextCtrl( self.page1, wx.ID_ANY,  faCreationDate, wx.DefaultPosition, wx.Size( 350,-1 ), 0 )
		fgSizer1.Add( self.faDate, 0, wx.ALL, 5 )
		
		self.m_staticText19 = wx.StaticText( self.page1, wx.ID_ANY, u"Extent:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText19.Wrap( -1 )
		fgSizer1.Add( self.m_staticText19, 0, wx.ALL, 5 )
		
		bSizer141 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.collectionExtent = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 150,-1 ), 0 )
		bSizer141.Add( self.collectionExtent, 0, wx.ALL, 5 )
		
		self.extentUnitChoices = ["cubic ft.", "GB", "MB", "KB", "vol."]
		self.collectionExtentUnit = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, self.extentUnitChoices, 0 )
		self.collectionExtentUnit.SetSelection( 0 )
		bSizer141.Add( self.collectionExtentUnit, 0, wx.ALL, 5 )
		
		
		fgSizer1.Add( bSizer141, 1, wx.EXPAND, 5 )
		
		self.m_staticText22 = wx.StaticText( self.page1, wx.ID_ANY, u"Acquisition Information:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText22.Wrap( -1 )
		fgSizer1.Add( self.m_staticText22, 0, wx.ALL, 5 )
		
		self.acquisition = wx.TextCtrl( self.page1, wx.ID_ANY,  acqInfo, wx.DefaultPosition, wx.Size( 350, 75 ), wx.TE_MULTILINE )
		fgSizer1.Add( self.acquisition, 0, wx.ALL, 5 )
		
		self.m_staticText23 = wx.StaticText( self.page1, wx.ID_ANY, u"Acquisition Date Normal:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText23.Wrap( -1 )
		fgSizer1.Add( self.m_staticText23, 0, wx.ALL, 5 )
		
		self.acquisitionDate = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 350,-1 ), 0 )
		fgSizer1.Add( self.acquisitionDate, 0, wx.ALL, 5 )
		
		self.m_staticText24 = wx.StaticText( self.page1, wx.ID_ANY, u"Arrangement:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText24.Wrap( -1 )
		fgSizer1.Add( self.m_staticText24, 0, wx.ALL, 5 )
		
		self.collectionArrangement = wx.TextCtrl( self.page1, wx.ID_ANY,  arrangeStmt, wx.DefaultPosition, wx.Size( 350, 75 ), wx.TE_MULTILINE )
		fgSizer1.Add( self.collectionArrangement, 0, wx.ALL, 5 )
		
		self.access = wx.StaticText( self.page1, wx.ID_ANY, u"Access Statement:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.access.Wrap( -1 )
		fgSizer1.Add( self.access, 0, wx.ALL, 5 )
		
		self.collectionAccess = wx.TextCtrl( self.page1, wx.ID_ANY,  accessStmt, wx.DefaultPosition, wx.Size( 350, 75 ), wx.TE_MULTILINE )
		fgSizer1.Add( self.collectionAccess, 0, wx.ALL, 5 )
		
		self.m_staticText26 = wx.StaticText( self.page1, wx.ID_ANY, u"Use Statement:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText26.Wrap( -1 )
		fgSizer1.Add( self.m_staticText26, 0, wx.ALL, 5 )
		
		self.collectionUse = wx.TextCtrl( self.page1, wx.ID_ANY,  useStmt, wx.DefaultPosition, wx.Size( 350, 75 ), wx.TE_MULTILINE )
		fgSizer1.Add( self.collectionUse, 0, wx.ALL, 5 )
		
		
		bSizer7.Add( fgSizer1, 1, wx.EXPAND, 5 )
		
		
		bSizer5.Add( bSizer7, 1, wx.EXPAND, 5 )
		
		bSizer81 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer13 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer8 = wx.BoxSizer( wx.VERTICAL )
		
		gSizer3 = wx.FlexGridSizer( 2, 2, 0, 0 )
		
		self.m_staticText15 = wx.StaticText( self.page1, wx.ID_ANY, u"Revisions:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText15.Wrap( -1 )
		self.m_staticText15.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 92, True, wx.EmptyString ) )
		
		gSizer3.Add( self.m_staticText15, 0, wx.ALL, 5 )
		
		gSizer4 = wx.GridSizer( 2, 2, 0, 0 )
		
		self.newEvent = wx.StaticText( self.page1, wx.ID_ANY, u"Event", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.newEvent.Wrap( -1 )
		self.newEvent.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 90, True, wx.EmptyString ) )
		
		gSizer4.Add( self.newEvent, 0, wx.ALL, 5 )
		
		self.newDate = wx.StaticText( self.page1, wx.ID_ANY, u"Normal Date", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.newDate.Wrap( -1 )
		self.newDate.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 90, True, wx.EmptyString ) )
		
		gSizer4.Add( self.newDate, 0, wx.ALL, 5 )
		
		self.addEvent = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 200,-1 ), 0 )
		gSizer4.Add( self.addEvent, 0, wx.ALL, 5 )
		
		self.addRevisionDate = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 100,-1 ), 0 )
		gSizer4.Add( self.addRevisionDate, 0, wx.ALL, 5 )
		
		
		gSizer3.Add( gSizer4, 1, wx.EXPAND, 5 )
		
		revisionSize = wx.BoxSizer( wx.VERTICAL )
		
		self.addRevision = wx.Button( self.page1, wx.ID_ANY, u"Add Revision >", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.removeRevision = wx.Button( self.page1, wx.ID_ANY, u"Remove Revision <", wx.DefaultPosition, wx.DefaultSize, 0 )
		revisionSize.Add( self.addRevision, 0, wx.ALL, 5 )
		revisionSize.Add( self.removeRevision, 0, wx.ALL, 5 )
		
		gSizer3.Add( revisionSize, 1, wx.EXPAND, 5 )
		
		self.revisionReference = []
		
		self.revisionList = wx.ListCtrl( self.page1, size=( 350,100), style=wx.LC_REPORT|wx.BORDER_SUNKEN)
		self.revisionList.InsertColumn(0, 'Date', width=60)
		self.revisionList.InsertColumn(1, 'Revision', width=286)
		self.revisionIndex = 0
		gSizer3.Add( self.revisionList, 0, wx.ALL, 5 )
		
		
		bSizer8.Add( gSizer3, 0, 0, 0)
		
		self.m_staticline3 = wx.StaticLine( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer8.Add( self.m_staticline3, 0, wx.EXPAND |wx.ALL, 5 )
		bSizer88 = wx.BoxSizer( wx.VERTICAL )
			
		self.m_staticText241 = wx.StaticText( self.page1, wx.ID_ANY, u"Languages in Collection:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText241.Wrap( -1 )
		self.m_staticText241.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 92, True, wx.EmptyString ) )
		
		bSizer88.Add( self.m_staticText241, 0, wx.ALL, 5 )
		
		gSizer11 = wx.BoxSizer( wx.HORIZONTAL )
				
		
		self.english = wx.CheckBox( self.page1, wx.ID_ANY, u"English", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.english.SetValue(True) 
		gSizer11.Add( self.english, 0, wx.ALL, 5 )
		
		self.german = wx.CheckBox( self.page1, wx.ID_ANY, u"German", wx.DefaultPosition, wx.DefaultSize, 0 )
		gSizer11.Add( self.german, 0, wx.ALL, 5 )
		
		self.spanish = wx.CheckBox( self.page1, wx.ID_ANY, u"Spanish", wx.DefaultPosition, wx.DefaultSize, 0 )
		gSizer11.Add( self.spanish, 0, wx.ALL, 5 )
		
		self.french = wx.CheckBox( self.page1, wx.ID_ANY, u"French", wx.DefaultPosition, wx.DefaultSize, 0 )
		gSizer11.Add( self.french, 0, wx.ALL, 5 )
		
		self.dutch = wx.CheckBox( self.page1, wx.ID_ANY, u"Dutch", wx.DefaultPosition, wx.DefaultSize, 0 )
		gSizer11.Add( self.dutch, 0, wx.ALL, 5 )
		
		self.italian = wx.CheckBox( self.page1, wx.ID_ANY, u"Italian", wx.DefaultPosition, wx.DefaultSize, 0 )
		gSizer11.Add( self.italian, 0, wx.ALL, 5 )
		
		
		
		bSizer88.Add( gSizer11, 0, 0, 0 )
		
		self.m_staticline21 = wx.StaticLine( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer88.Add( self.m_staticline21, 0, wx.EXPAND |wx.ALL, 5 )		
		
		bSizer13.Add( bSizer8, 1, wx.EXPAND, 5 )
		
		
		bSizer81.Add( bSizer13, 0, 0, 0 )
		
		bSizer16 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer4 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText25 = wx.StaticText( self.page1, wx.ID_ANY, u"Creator:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText25.Wrap( -1 )
		self.m_staticText25.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 92, True, wx.EmptyString ) )
		
		bSizer88.Add( self.m_staticText25, 0, 0, 0)
		
		gSizer9 = wx.FlexGridSizer( 2, 3, 0, 0 )
		
		self.m_staticText261 = wx.StaticText( self.page1, wx.ID_ANY, u"Element Name", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText261.Wrap( -1 )
		self.m_staticText261.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 90, True, wx.EmptyString ) )
		
		gSizer9.Add( self.m_staticText261, 0, wx.ALL, 5 )
		
		self.m_staticText271 = wx.StaticText( self.page1, wx.ID_ANY, u"Creator", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText271.Wrap( -1 )
		self.m_staticText271.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 90, True, wx.EmptyString ) )
		
		gSizer9.Add( self.m_staticText271, 0, wx.ALL, 5 )
		
		self.m_staticText281 = wx.StaticText( self.page1, wx.ID_ANY, u"Source", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText281.Wrap( -1 )
		self.m_staticText281.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 90, True, wx.EmptyString ) )
		
		gSizer9.Add( self.m_staticText281, 0, wx.ALL, 5 )
		
		creatorElementChoices = ["persname", "corpname"]
		self.creatorElement = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, creatorElementChoices, 0 )
		self.creatorElement.SetSelection( 0 )
		gSizer9.Add( self.creatorElement, 0, wx.ALL, 5 )
		
		self.creator = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400,-1 ), 0 )
		gSizer9.Add( self.creator, 0, wx.ALL, 5 )
		
		creatorSourceChoices = ["lcsh", "local"]
		self.creatorSource = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, creatorSourceChoices, 0 )
		self.creatorSource.SetSelection( 0 )
		gSizer9.Add( self.creatorSource, 0, wx.ALL, 5 )
		
		
		bSizer88.Add( gSizer9, 0, 0, 0 )
		bSizer81.Add( bSizer88, 0, 0, 0 )
		
		self.m_staticline2 = wx.StaticLine( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer4.Add( self.m_staticline2, 0, wx.EXPAND |wx.ALL, 5 )
		
		self.m_staticText30 = wx.StaticText( self.page1, wx.ID_ANY, u"Controlled Access Headings:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText30.Wrap( -1 )
		self.m_staticText30.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 92, True, wx.EmptyString ) )
		
		bSizer4.Add( self.m_staticText30, 0, wx.ALL, 5 )
		
		gSizer10 = wx.FlexGridSizer( 11, 3, 0, 0 )
		
		self.m_staticText31 = wx.StaticText( self.page1, wx.ID_ANY, u"Element Name", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText31.Wrap( -1 )
		self.m_staticText31.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 90, True, wx.EmptyString ) )
		
		gSizer10.Add( self.m_staticText31, 0, wx.ALL, 5 )
		
		self.m_staticText32 = wx.StaticText( self.page1, wx.ID_ANY, u"Heading", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText32.Wrap( -1 )
		self.m_staticText32.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 90, True, wx.EmptyString ) )
		
		gSizer10.Add( self.m_staticText32, 0, wx.ALL, 5 )
		
		self.m_staticText33 = wx.StaticText( self.page1, wx.ID_ANY, u"Source", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText33.Wrap( -1 )
		self.m_staticText33.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 90, True, wx.EmptyString ) )
		
		gSizer10.Add( self.m_staticText33, 0, wx.ALL, 5 )
		
		elementChoices = ["persname", "corpname", "subject", "geogname", "famname", "title", "genreform"]
		self.element1 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, elementChoices, 0 )
		self.element1.SetSelection( 0 )
		gSizer10.Add( self.element1, 0, wx.ALL, 5 )
		
		self.heading1 = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400,-1 ), 0 )
		gSizer10.Add( self.heading1, 0, wx.ALL, 5 )
		
		sourceChoices = ["lcsh", "local", "aat", "meg"]
		self.source1 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, sourceChoices, 0 )
		self.source1.SetSelection( 0 )
		gSizer10.Add( self.source1, 0, wx.ALL, 5 )
		
		self.element2 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, elementChoices, 0 )
		self.element2.SetSelection( 0 )
		gSizer10.Add( self.element2, 0, wx.ALL, 5 )
		
		self.heading2 = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400,-1 ), 0 )
		gSizer10.Add( self.heading2, 0, wx.ALL, 5 )
		
		self.source2 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, sourceChoices, 0 )
		self.source2.SetSelection( 0 )
		gSizer10.Add( self.source2, 0, wx.ALL, 5 )
		
		self.element3 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, elementChoices, 0 )
		self.element3.SetSelection( 0 )
		gSizer10.Add( self.element3, 0, wx.ALL, 5 )
		
		self.heading3 = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400,-1 ), 0 )
		gSizer10.Add( self.heading3, 0, wx.ALL, 5 )
		
		self.source3 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, sourceChoices, 0 )
		self.source3.SetSelection( 0 )
		gSizer10.Add( self.source3, 0, wx.ALL, 5 )
		
		self.element4 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, elementChoices, 0 )
		self.element4.SetSelection( 0 )
		gSizer10.Add( self.element4, 0, wx.ALL, 5 )
		
		self.heading4 = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400,-1 ), 0 )
		gSizer10.Add( self.heading4, 0, wx.ALL, 5 )
		
		self.source4 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, sourceChoices, 0 )
		self.source4.SetSelection( 0 )
		gSizer10.Add( self.source4, 0, wx.ALL, 5 )
		
		self.element5 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, elementChoices, 0 )
		self.element5.SetSelection( 0 )
		gSizer10.Add( self.element5, 0, wx.ALL, 5 )
		
		self.heading5 = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400,-1 ), 0 )
		gSizer10.Add( self.heading5, 0, wx.ALL, 5 )
		
		self.source5 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, sourceChoices, 0 )
		self.source5.SetSelection( 0 )
		gSizer10.Add( self.source5, 0, wx.ALL, 5 )
		
		element6Choices = []
		self.element6 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, elementChoices, 0 )
		self.element6.SetSelection( 0 )
		gSizer10.Add( self.element6, 0, wx.ALL, 5 )
		
		self.heading6 = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400,-1 ), 0 )
		gSizer10.Add( self.heading6, 0, wx.ALL, 5 )
		
		source6Choices = []
		self.source6 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, sourceChoices, 0 )
		self.source6.SetSelection( 0 )
		gSizer10.Add( self.source6, 0, wx.ALL, 5 )
		
		element7Choices = []
		self.element7 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, elementChoices, 0 )
		self.element7.SetSelection( 0 )
		gSizer10.Add( self.element7, 0, wx.ALL, 5 )
		
		self.heading7 = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400,-1 ), 0 )
		gSizer10.Add( self.heading7, 0, wx.ALL, 5 )
		
		source7Choices = []
		self.source7 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, sourceChoices, 0 )
		self.source7.SetSelection( 0 )
		gSizer10.Add( self.source7, 0, wx.ALL, 5 )
		
		element8Choices = []
		self.element8 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, elementChoices, 0 )
		self.element8.SetSelection( 0 )
		gSizer10.Add( self.element8, 0, wx.ALL, 5 )
		
		self.heading8 = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400,-1 ), 0 )
		gSizer10.Add( self.heading8, 0, wx.ALL, 5 )
		
		source8Choices = []
		self.source8 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, sourceChoices, 0 )
		self.source8.SetSelection( 0 )
		gSizer10.Add( self.source8, 0, wx.ALL, 5 )
		
		element9Choices = []
		self.element9 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, elementChoices, 0 )
		self.element9.SetSelection( 0 )
		gSizer10.Add( self.element9, 0, wx.ALL, 5 )
		
		self.heading9 = wx.TextCtrl( self.page1, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400,-1 ), 0 )
		gSizer10.Add( self.heading9, 0, wx.ALL, 5 )
		
		source9Choices = []
		self.source9 = wx.Choice( self.page1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, sourceChoices, 0 )
		self.source9.SetSelection( 0 )
		gSizer10.Add( self.source9, 0, wx.ALL, 5 )
		
		
		
		bSizer4.Add( gSizer10, 1, wx.EXPAND, 5 )
		
		
		bSizer16.Add( bSizer4, 1, wx.EXPAND, 5 )
		
		
		bSizer81.Add( bSizer16, 1, wx.EXPAND, 5 )
		
		
		bSizer5.Add( bSizer81, 1, wx.EXPAND, 5 )
		
		
		self.page1.SetSizer( bSizer5 )
		self.page1.Layout()
		bSizer5.Fit( self.page1 )
		self.page2.AddPage( self.page1, u"Collection Information", True )
		#self.m_panel5 = wx.Panel( self.page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		self.m_panel5 = wx.ScrolledWindow( self.page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.HSCROLL|wx.VSCROLL )
		self.m_panel5.SetScrollRate( 5, 5 )
		bSizer12 = wx.BoxSizer( wx.HORIZONTAL )
		
		bSizer131 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText331 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Abstract:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText331.Wrap( -1 )
		self.m_staticText331.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 92, True, wx.EmptyString ) )
		
		bSizer131.Add( self.m_staticText331, 0, wx.ALL, 5 )
		
		self.abstract = wx.TextCtrl( self.m_panel5, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 600, 75 ), wx.TE_MULTILINE )
		bSizer131.Add( self.abstract, 0, wx.ALL, 5 )
		
		self.m_staticline5 = wx.StaticLine( self.m_panel5, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer131.Add( self.m_staticline5, 0, wx.EXPAND |wx.ALL, 5 )
		
		bSizer20 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.m_staticText37 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Historical Note:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText37.Wrap( -1 )
		self.m_staticText37.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 92, True, wx.EmptyString ) )
		
		bSizer20.Add( self.m_staticText37, 0, wx.ALL, 5 )
		
		
		bSizer20.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
		
		self.m_staticText39 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Label:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText39.Wrap( -1 )
		bSizer20.Add( self.m_staticText39, 0, wx.ALL, 5 )
		
		self.historicalLabel = wx.TextCtrl( self.m_panel5, wx.ID_ANY,  histNoteLabel, wx.DefaultPosition, wx.Size( 250,-1 ), 0 )
		bSizer20.Add( self.historicalLabel, 0, wx.ALL, 5 )
		
		
		bSizer131.Add( bSizer20, 1, wx.EXPAND, 5 )
		
		self.historicalNote = wx.TextCtrl( self.m_panel5, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 600, 270 ), wx.TE_MULTILINE )
		bSizer131.Add( self.historicalNote, 0, wx.ALL, 5 )
		
		self.m_staticline4 = wx.StaticLine( self.m_panel5, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer131.Add( self.m_staticline4, 0, wx.EXPAND |wx.ALL, 5 )
		
		self.m_staticText38 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Scope and Content Note:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText38.Wrap( -1 )
		self.m_staticText38.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 92, True, wx.EmptyString ) )
		
		bSizer131.Add( self.m_staticText38, 0, wx.ALL, 5 )
		
		self.scopeNote = wx.TextCtrl( self.m_panel5, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 600, 270 ), wx.TE_MULTILINE )
		bSizer131.Add( self.scopeNote, 0, wx.ALL, 5 )
		
		
		bSizer12.Add( bSizer131, 1, wx.EXPAND, 5 )
		
		bSizer14 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText35 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Collection Contents:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText35.Wrap( -1 )
		self.m_staticText35.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 92, True, wx.EmptyString ) )
		
		bSizer14.Add( self.m_staticText35, 0, wx.ALL, 5 )
		
		self.seriesList = wx.ListCtrl( self.m_panel5, size=( 450, 150), style=wx.LC_REPORT|wx.BORDER_SUNKEN)
		self.seriesList.InsertColumn(0, '#', width=50)
		self.seriesList.InsertColumn(1, 'Series', width=392)
		self.seriesIndex = 0
		bSizer14.Add( self.seriesList, 0, wx.ALL, 5 )
		
		self.seriesReference = []
		
		self.deleteSeries = wx.Button( self.m_panel5, wx.ID_ANY, u"Delete Selected Series", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer14.Add( self.deleteSeries, 0, wx.ALL, 5 )
		
		fgSizer2 = wx.FlexGridSizer( 7, 2, 0, 0 )
		fgSizer2.SetFlexibleDirection( wx.BOTH )
		fgSizer2.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.m_staticText36 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Series:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText36.Wrap( -1 )
		fgSizer2.Add( self.m_staticText36, 0, wx.ALL, 5 )
		
		self.seriesName = wx.TextCtrl( self.m_panel5, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 250,-1 ), 0 )
		fgSizer2.Add( self.seriesName, 0, wx.ALL, 5 )
		
		self.m_staticText371 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Series #:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText371.Wrap( -1 )
		fgSizer2.Add( self.m_staticText371, 0, wx.ALL, 5 )
		
		self.seriesNumber = wx.TextCtrl( self.m_panel5, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 250,-1 ), 0 )
		fgSizer2.Add( self.seriesNumber, 0, wx.ALL, 5 )
		
		self.m_staticText381 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Normal Date:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText381.Wrap( -1 )
		fgSizer2.Add( self.m_staticText381, 0, wx.ALL, 5 )
		
		self.seriesNormal = wx.TextCtrl( self.m_panel5, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 250,-1 ), 0 )
		fgSizer2.Add( self.seriesNormal, 0, wx.ALL, 5 )
		
		self.m_staticText42 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Extent:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText42.Wrap( -1 )
		fgSizer2.Add( self.m_staticText42, 0, wx.ALL, 5 )
		
		bSizer15 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.seriesExtent = wx.TextCtrl( self.m_panel5, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 180,-1 ), 0 )
		bSizer15.Add( self.seriesExtent, 0, wx.ALL, 5 )
		
		self.seriesExtentUnits = wx.Choice( self.m_panel5, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, self.extentUnitChoices, 0 )
		self.seriesExtentUnits.SetSelection( 0 )
		bSizer15.Add( self.seriesExtentUnits, 0, wx.ALL, 5 )
		
		
		fgSizer2.Add( bSizer15, 1, wx.EXPAND, 5 )
		
		self.m_staticText391 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Scope and Content:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText391.Wrap( -1 )
		fgSizer2.Add( self.m_staticText391, 0, wx.ALL, 5 )
		
		self.seriesScope = wx.TextCtrl( self.m_panel5, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400, 90 ), wx.TE_MULTILINE )
		fgSizer2.Add( self.seriesScope, 0, wx.ALL, 5 )
		
		self.m_staticText40 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Arrangement:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText40.Wrap( -1 )
		fgSizer2.Add( self.m_staticText40, 0, wx.ALL, 5 )
		
		self.seriesArrangement = wx.TextCtrl( self.m_panel5, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400, 90 ), wx.TE_MULTILINE )
		fgSizer2.Add( self.seriesArrangement, 0, wx.ALL, 5 )
		
		self.m_staticText41 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Access:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText41.Wrap( -1 )
		fgSizer2.Add( self.m_staticText41, 0, wx.ALL, 5 )
		
		self.seriesAccess = wx.TextCtrl( self.m_panel5, wx.ID_ANY,  wx.EmptyString, wx.DefaultPosition, wx.Size( 400, 90 ), wx.TE_MULTILINE )
		fgSizer2.Add( self.seriesAccess, 0, wx.ALL, 5 )
		
		
		bSizer14.Add( fgSizer2, 1, wx.EXPAND, 5 )
		
		self.addSeries = wx.Button( self.m_panel5, wx.ID_ANY, u"Add/Update Series", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer14.Add( self.addSeries, 0, wx.ALL, 5 )
		
		
		bSizer12.Add( bSizer14, 0,0,0 )
		
		
		self.m_panel5.SetSizer( bSizer12 )
		self.m_panel5.Layout()
		bSizer12.Fit( self.m_panel5 )
		self.page2.AddPage( self.m_panel5, u"More Details", False )
		
		bSizer2.Add( self.page2, 1, wx.EXPAND |wx.ALL, 5 )
		
		
		self.SetSizer( bSizer2 )
		self.Layout()
		
		self.Centre( wx.BOTH )
		
		self.Bind( wx.EVT_CLOSE, self.closeWindow )
		self.Bind(wx.EVT_MENU, self.Export_EAD, self.saveAs)
		self.addRevision.Bind( wx.EVT_BUTTON, self.Add_Revision )
		self.removeRevision.Bind( wx.EVT_BUTTON, self.Remove_Revision )
		self.deleteSeries.Bind( wx.EVT_BUTTON, self.Delete_Series )
		self.addSeries.Bind( wx.EVT_BUTTON, self.Update_Series )
		self.seriesList.Bind( wx.EVT_LIST_ITEM_SELECTED, self.Show_Series )
Esempio n. 14
0
    def __init__(self, parent):
        wx.Panel.__init__(self, parent=parent)

        def scale_bitmap(bitmap, width, height):
            image = wx.ImageFromBitmap(bitmap)
            image = image.Scale(width, height, wx.IMAGE_QUALITY_HIGH)
            result = wx.BitmapFromImage(image)
            return result

        vbox = wx.BoxSizer(wx.VERTICAL)

        logobox = wx.BoxSizer(wx.HORIZONTAL)
        titleImage = wx.StaticBitmap(self, size=(360, 65))
        titleImage.SetBitmap(
            wx.Bitmap(resource_path('resources/logotitle.gif')))
        logobox.Add(titleImage, 1, wx.TOP | wx.EXPAND, 10)

        instuctbox = wx.BoxSizer(wx.HORIZONTAL)
        instructtxt = wx.StaticText(
            self,
            id=-1,
            label=
            "Spreadsheet     +     XML Template     =     <EAD> and <HTML>",
            style=wx.ALIGN_CENTER)
        instuctbox.Add(instructtxt, 1, wx.ALL | wx.EXPAND, 5)

        middlebox = wx.BoxSizer(wx.VERTICAL)
        inputtxtbox = wx.BoxSizer(wx.HORIZONTAL)

        FAtxt = wx.StaticText(
            self,
            id=-1,
            label="Select Finding Aid Data exported from spreadsheet:")
        inputtxtbox.Add(FAtxt, 1, wx.TOP | wx.EXPAND, 10)

        inputfilebox = wx.BoxSizer(wx.HORIZONTAL)
        self.FAinput = wx.TextCtrl(self, size=(450, 25))
        browseButton = wx.Button(self, label='Browse...', size=(75, 28))
        inputfilebox.Add(self.FAinput, 1, wx.ALL | wx.EXPAND, 1)
        inputfilebox.Add(browseButton, 1, wx.ALL | wx.EXPAND, 1)
        self.Bind(wx.EVT_BUTTON,
                  lambda event: self.browseClick(event, self.FAinput),
                  browseButton)

        temtxtbox = wx.BoxSizer(wx.HORIZONTAL)
        Temtxt = wx.StaticText(self, id=-1, label="Select Template:")
        temtxtbox.Add(Temtxt, 1, wx.TOP | wx.EXPAND, 1)

        temfilebox = wx.BoxSizer(wx.HORIZONTAL)
        self.Teminput = wx.TextCtrl(self, size=(450, 25))
        tempButton = wx.Button(self, label='Browse...')
        temfilebox.Add(self.Teminput, 1, wx.ALL | wx.EXPAND, 1)
        temfilebox.Add(tempButton, 1, wx.ALL | wx.EXPAND, 1)
        self.Bind(wx.EVT_BUTTON,
                  lambda event: self.tempClick(event, self.Teminput),
                  tempButton)

        middlebox.Add(inputtxtbox, 1, wx.ALL | wx.EXPAND, 1)
        middlebox.Add(inputfilebox, 1, wx.ALL | wx.EXPAND, 1)
        middlebox.Add(temtxtbox, 1, wx.ALL | wx.EXPAND, 1)
        middlebox.Add(temfilebox, 1, wx.BOTTOM | wx.EXPAND, 1)

        nextbuttonbox = wx.BoxSizer(wx.HORIZONTAL)
        nextbuttonbox.Add((453, 10))
        nextButton = wx.Button(self, label='Next >', size=(175, 28))
        nextbuttonbox.Add(nextButton, 1, wx.RIGHT | wx.EXPAND, 1.5)
        self.Bind(
            wx.EVT_BUTTON,
            lambda event: parent.nextClick(event, self.FAinput, self.Teminput),
            nextButton)

        vbox.Add(logobox, 1, wx.ALL | wx.EXPAND, 5)
        vbox.Add(instuctbox, 1, wx.ALL | wx.EXPAND, 5)
        vbox.Add(middlebox, 1, wx.ALL | wx.EXPAND, 5)
        vbox.Add(nextbuttonbox, 1, wx.ALL | wx.EXPAND, 5)

        self.SetSizer(vbox)
        vbox.Fit(self)
Esempio n. 15
0
	def __init__( self, parent, configData, sourceDir ):
		displaySize= wx.DisplaySize()
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"ANTS: Archives Network Transfer System", pos = wx.DefaultPosition, size=(displaySize[0]/1.45, displaySize[1]/1.30), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
		self.SetBackgroundColour(wx.Colour(221, 221, 221, 255))
		self.SetSizeHints(400,450)
		txtSize = displaySize[1]/1.30 / float(6.5)
		self.sourceDir = sourceDir
		
		favicon = wx.Icon(resource_path('A.gif'), wx.BITMAP_TYPE_GIF, 16, 16)
		self.SetIcon(favicon)
		
		bSizer1 = wx.BoxSizer( wx.VERTICAL )
		
		self.mainNotebook = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
		self.fileTab = wx.Panel( self.mainNotebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		self.fileTab.SetBackgroundColour(wx.Colour(255, 255, 255, 255))
		
		bSizer99 = wx.BoxSizer( wx.VERTICAL )	
		self.instructText = wx.StaticText( self.fileTab, wx.ID_ANY, u"Click on the directory to describe the records you want to transfer:", wx.DefaultPosition, wx.DefaultSize, 0 )
		fileFont = wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD)
		self.instructText.SetFont(fileFont)
		self.instructText.Wrap( -1 )
		bSizer99.Add( self.instructText, 0, wx.ALL|wx.ALIGN_LEFT, 5 )
		
		bSizer4 = wx.BoxSizer( wx.HORIZONTAL )
		bSizer99.Add( bSizer4, 1, wx.EXPAND, 5 )
		
		self.descDirCtrl = CT.CustomTreeCtrl( self.fileTab, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, agwStyle= wx.TR_DEFAULT_STYLE | CT.TR_FULL_ROW_HIGHLIGHT)
		self.descDirCtrl.SetBackgroundColour(wx.Colour(255, 255, 255, 255))
		dirFile = os.path.join(self.appData, "~directory.xml")
		parser = ET.XMLParser(remove_blank_text=True)
		dirParse = ET.parse(dirFile, parser)
		dirXML = dirParse.getroot()
		def dir2tree(dir, rootPoint):
			for item in dir:
				if "name" in item.attrib:
					if item.tag.lower() == "folder":
						child = self.descDirCtrl.AppendItem(rootPoint, item.attrib['name'], ct_type=1)
						self.descDirCtrl.SetPyData(child, item.find('id').text)
						if item.attrib["check"] == "True":
							self.descDirCtrl.CheckItem(child)
						dir2tree(item, child)
					elif item.tag.lower() == "file":
						child = self.descDirCtrl.AppendItem(rootPoint, item.attrib['name'], ct_type=1)
						self.descDirCtrl.SetPyData(child, item.find('id').text)
						if item.attrib["check"] == "True":
							self.descDirCtrl.CheckItem(child)
					else:
						print "error: " + item.tag
		self.root = self.descDirCtrl.AddRoot(dirXML.find('folder').attrib['name'], ct_type=1)
		self.descDirCtrl.SetPyData(self.root, dirXML.find('folder/id').text)
		dir2tree(dirXML.find('folder'), self.root)
		if dirXML.find('folder').attrib["check"] == "True":
			self.descDirCtrl.CheckItem(self.root)
		self.descDirCtrl.ExpandAll()
		self.descDirCtrl.ScrollTo(self.root)
		
		
		bSizer4.Add( self.descDirCtrl, 1, wx.ALL|wx.EXPAND, 5 )
		
		bSizer7 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer14 = wx.BoxSizer( wx.VERTICAL )
		firstFile = os.path.basename(sourceDir)
		self.fileNameText = wx.StaticText( self.fileTab, wx.ID_ANY, firstFile, wx.DefaultPosition, wx.DefaultSize, 0 )
		fileFont = wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD)
		self.fileNameText.SetFont(fileFont)
		self.fileNameText.Wrap( -1 )
		bSizer14.Add( self.fileNameText, 0, wx.ALL|wx.ALIGN_LEFT, 5 )
		
		fgSizer6 = wx.FlexGridSizer( 2, 2, 0, 0 )
		fgSizer6.SetFlexibleDirection( wx.BOTH )
		fgSizer6.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.m_staticText12 = wx.StaticText( self.fileTab, wx.ID_ANY, u"Record Description:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText12.Wrap( -1 )
		fgSizer6.Add( self.m_staticText12, 0, wx.ALL, 5 )
		
		self.rcdDescInput = wx.TextCtrl( self.fileTab, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 300,txtSize ), wx.TE_MULTILINE )
		fgSizer6.Add( self.rcdDescInput, 0, wx.ALL, 5 )
		self.rcdDescInput.SetFocus()
		
		bSizer91 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText13 = wx.StaticText( self.fileTab, wx.ID_ANY, u"Access Concerns:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText13.Wrap( -1 )
		bSizer91.Add( self.m_staticText13, 0, wx.ALL, 5 )
		
		self.m_button6 = wx.Button( self.fileTab, wx.ID_ANY, u"Examples >", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer91.Add( self.m_button6, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )
		
		
		fgSizer6.Add( bSizer91, 1, wx.EXPAND, 5 )
		
		self.rcdAccessInput = wx.TextCtrl( self.fileTab, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 300,txtSize ), wx.TE_MULTILINE )
		fgSizer6.Add( self.rcdAccessInput, 0, wx.ALL, 5 )
		
		
		bSizer14.Add( fgSizer6, 1, wx.EXPAND, 5 )
		
		
		bSizer7.Add( bSizer14, 1, wx.EXPAND, 5 )
		
		self.m_staticline3 = wx.StaticLine( self.fileTab, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer7.Add( self.m_staticline3, 0, wx.EXPAND |wx.ALL, 5 )
		
		bSizer9 = wx.BoxSizer( wx.VERTICAL )
		
		self.notesInput = wx.StaticText( self.fileTab, wx.ID_ANY, u"Notes for Archivist:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.notesInput.Wrap( -1 )
		bSizer9.Add( self.notesInput, 0, wx.ALL, 5 )
		
		self.notesInput = wx.TextCtrl( self.fileTab, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 320,120 ), wx.TE_MULTILINE )
		bSizer9.Add( self.notesInput, 0, wx.ALL, 5 )
		
		
		bSizer7.Add( bSizer9, 1, wx.EXPAND, 5 )
		
		self.m_staticline4 = wx.StaticLine( self.fileTab, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer7.Add( self.m_staticline4, 0, wx.EXPAND |wx.ALL, 5 )
		
		bSizer12 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.transferBtn = wx.Button( self.fileTab, wx.ID_ANY, u"Submit", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer12.Add( self.transferBtn, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
		
		#check to see if compression option is locked as true
		if configData["compressCheckList"].lower() == "true":
			pass
		else:
			self.compressCheck = wx.CheckBox( self.fileTab, wx.ID_ANY, u"Compress files", wx.DefaultPosition, wx.DefaultSize, 0 )
			if "compressDefault" in configData:
				if configData["compressDefault"].lower().strip() == "false":
					self.compressCheck.SetValue(False)
				else:
					self.compressCheck.SetValue(True) 
			else:
				self.compressCheck.SetValue(True) 
			bSizer12.Add( self.compressCheck, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
		
		
		bSizer7.Add( bSizer12, 1, wx.EXPAND, 5 )
		
		
		bSizer4.Add( bSizer7, 1, wx.EXPAND, 5 )
		
		
		self.fileTab.SetSizer( bSizer99 )
		self.fileTab.Layout()
		bSizer4.Fit( self.fileTab )
		self.mainNotebook.AddPage( self.fileTab, u"Files to Transfer", True )
		self.creatorTab = wx.Panel( self.mainNotebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		self.creatorTab.SetBackgroundColour(wx.Colour(255, 255, 255, 255))
		bSizer2 = wx.BoxSizer( wx.VERTICAL )
		
		fgSizer2 = wx.FlexGridSizer( 2, 2, 0, 0 )
		fgSizer2.SetFlexibleDirection( wx.BOTH )
		fgSizer2.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.m_staticText1 = wx.StaticText( self.creatorTab, wx.ID_ANY, u"Records Creator", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText1.Wrap( -1 )
		fgSizer2.Add( self.m_staticText1, 0, wx.ALL, 5 )
		
		self.creatorInput = wx.TextCtrl( self.creatorTab, wx.ID_ANY, configData["creator"], wx.DefaultPosition, wx.Size( 300,-1 ), 0 )
		fgSizer2.Add( self.creatorInput, 0, wx.ALL, 5 )
		
		self.m_staticText2 = wx.StaticText( self.creatorTab, wx.ID_ANY, u"Creator ID", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText2.Wrap( -1 )
		fgSizer2.Add( self.m_staticText2, 0, wx.ALL, 5 )
		
		self.creatorIdInput = wx.TextCtrl( self.creatorTab, wx.ID_ANY, configData["creatorId"], wx.DefaultPosition, wx.Size( 300,-1 ), 0 )
		fgSizer2.Add( self.creatorIdInput, 0, wx.ALL, 5 )
		
		
		bSizer2.Add( fgSizer2, 1, wx.EXPAND, 5 )
		
		self.m_staticline1 = wx.StaticLine( self.creatorTab, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer2.Add( self.m_staticline1, 0, wx.EXPAND |wx.ALL, 5 )
		
		fgSizer3 = wx.FlexGridSizer( 7, 2, 0, 0 )
		fgSizer3.SetFlexibleDirection( wx.BOTH )
		fgSizer3.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.m_staticText3 = wx.StaticText( self.creatorTab, wx.ID_ANY, u"Donor", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText3.Wrap( -1 )
		fgSizer3.Add( self.m_staticText3, 0, wx.ALL, 5 )
		
		self.donorInput = wx.TextCtrl( self.creatorTab, wx.ID_ANY, configData["donor"], wx.DefaultPosition, wx.Size( 300,-1 ), 0 )
		fgSizer3.Add( self.donorInput, 0, wx.ALL, 5 )
		
		self.m_staticText4 = wx.StaticText( self.creatorTab, wx.ID_ANY, u"Position/Role", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText4.Wrap( -1 )
		fgSizer3.Add( self.m_staticText4, 0, wx.ALL, 5 )
		
		self.positionInput = wx.TextCtrl( self.creatorTab, wx.ID_ANY, configData["role"], wx.DefaultPosition, wx.Size( 300,-1 ), 0 )
		fgSizer3.Add( self.positionInput, 0, wx.ALL, 5 )
		
		self.m_staticText5 = wx.StaticText( self.creatorTab, wx.ID_ANY, u"Email", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText5.Wrap( -1 )
		fgSizer3.Add( self.m_staticText5, 0, wx.ALL, 5 )
		
		self.emailInput = wx.TextCtrl( self.creatorTab, wx.ID_ANY, configData["email"], wx.DefaultPosition, wx.Size( 300,-1 ), 0 )
		fgSizer3.Add( self.emailInput, 0, wx.ALL, 5 )
		
		self.m_staticText6 = wx.StaticText( self.creatorTab, wx.ID_ANY, u"Office", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText6.Wrap( -1 )
		fgSizer3.Add( self.m_staticText6, 0, wx.ALL, 5 )
		
		self.officeInput = wx.TextCtrl( self.creatorTab, wx.ID_ANY, configData["office"], wx.DefaultPosition, wx.Size( 300,-1 ), 0 )
		fgSizer3.Add( self.officeInput, 0, wx.ALL, 5 )
		
		self.m_staticText7 = wx.StaticText( self.creatorTab, wx.ID_ANY, u"Address Line 1", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText7.Wrap( -1 )
		fgSizer3.Add( self.m_staticText7, 0, wx.ALL, 5 )
		
		self.address1Input = wx.TextCtrl( self.creatorTab, wx.ID_ANY, configData["address1"], wx.DefaultPosition, wx.Size( 300,-1 ), 0 )
		fgSizer3.Add( self.address1Input, 0, wx.ALL, 5 )
		
		self.m_staticText8 = wx.StaticText( self.creatorTab, wx.ID_ANY, u"Address Line 2", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText8.Wrap( -1 )
		fgSizer3.Add( self.m_staticText8, 0, wx.ALL, 5 )
		
		self.address2Input = wx.TextCtrl( self.creatorTab, wx.ID_ANY, configData["address2"], wx.DefaultPosition, wx.Size( 300,-1 ), 0 )
		fgSizer3.Add( self.address2Input, 0, wx.ALL, 5 )
		
		self.m_staticText9 = wx.StaticText( self.creatorTab, wx.ID_ANY, u"Address Line 3", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText9.Wrap( -1 )
		fgSizer3.Add( self.m_staticText9, 0, wx.ALL, 5 )
		
		self.address3Input = wx.TextCtrl( self.creatorTab, wx.ID_ANY, configData["address3"], wx.DefaultPosition, wx.Size( 300,-1 ), 0 )
		fgSizer3.Add( self.address3Input, 0, wx.ALL, 5 )
		
		
		bSizer2.Add( fgSizer3, 1, wx.EXPAND, 5 )
		
		self.creatorUpdateBtn = wx.Button( self.creatorTab, wx.ID_ANY, u"Set as Default", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer2.Add( self.creatorUpdateBtn, 0, wx.ALL, 5 )
		
		
		bSizer2.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
		
		
		self.creatorTab.SetSizer( bSizer2 )
		self.creatorTab.Layout()
		bSizer2.Fit( self.creatorTab )
		self.mainNotebook.AddPage( self.creatorTab, u"Creator Profile", False )
		self.transferTab = wx.Panel( self.mainNotebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		self.transferTab.SetBackgroundColour(wx.Colour(255, 255, 255, 255))
		bSizer3 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer33 = wx.BoxSizer( wx.HORIZONTAL )
		m_radioBox1Choices = [ u"Network Share", u"File Transfer Protocol (FTP)", u"File Transfer Protocol (FTP) with TLS", u"GoogleDrive" ]
		self.m_radioBox1 = wx.RadioBox( self.transferTab, wx.ID_ANY, u"Transfer Method", wx.DefaultPosition, wx.DefaultSize, m_radioBox1Choices, 1, wx.RA_SPECIFY_COLS )
		if configData["transferMethod"].lower() == "ftp":
			self.m_radioBox1.SetSelection( 1 )
		elif configData["transferMethod"].lower() == "ftptls":
			self.m_radioBox1.SetSelection( 2 )
		elif configData["transferMethod"].lower() == "googledrive":
			self.m_radioBox1.SetSelection( 3 )
		else:
			self.m_radioBox1.SetSelection( 0 )
		bSizer33.Add( self.m_radioBox1, 0, wx.ALL, 5 )
		bSizer34 = wx.BoxSizer( wx.VERTICAL )
		bSizer34.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
		self.receiveFiles = wx.Button( self.transferTab, wx.ID_ANY, u"Receive Files", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer34.Add( self.receiveFiles, 0, wx.ALL, 5 )
		bSizer34.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
		bSizer33.Add( bSizer34, 1, wx.EXPAND, 5 )
		bSizer3.Add( bSizer33, 1, wx.EXPAND, 5 )
		
		fgSizer9 = wx.FlexGridSizer( 4, 3, 0, 0 )
		fgSizer9.SetFlexibleDirection( wx.BOTH )
		fgSizer9.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.m_staticText18 = wx.StaticText( self.transferTab, wx.ID_ANY, u"Transfer Location (PATH or FTP URL)", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText18.Wrap( -1 )
		fgSizer9.Add( self.m_staticText18, 0, wx.ALL, 5 )
		
		self.transferLocInput = wx.TextCtrl( self.transferTab, wx.ID_ANY, configData["transferLocation"], wx.DefaultPosition, wx.Size( 400,-1 ), 0 )
		fgSizer9.Add( self.transferLocInput, 0, wx.ALL, 5 )
		
		self.checkLocation = wx.Button( self.transferTab, wx.ID_ANY, u"Test Transfer Location", wx.DefaultPosition, wx.DefaultSize, 0 )
		fgSizer9.Add( self.checkLocation, 0, wx.ALL, 5 )
		
		self.m_staticText21 = wx.StaticText( self.transferTab, wx.ID_ANY, u"Receive Location (PATH or FTP URL)", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText21.Wrap( -1 )
		fgSizer9.Add( self.m_staticText21, 0, wx.ALL, 5 )
		
		self.receiveInput = wx.TextCtrl( self.transferTab, wx.ID_ANY, configData["receiveLocation"], wx.DefaultPosition, wx.Size( 400,-1 ) )
		fgSizer9.Add( self.receiveInput, 0, wx.ALL, 5 )
		
		self.checkReceiveLocation = wx.Button( self.transferTab, wx.ID_ANY, u"Test Receive Location", wx.DefaultPosition, wx.DefaultSize, 0 )
		fgSizer9.Add( self.checkReceiveLocation, 0, wx.ALL, 5 )
		
		if configData["loginStore"].lower() == "true":
			self.m_staticText19 = wx.StaticText( self.transferTab, wx.ID_ANY, u"Login (FTP only)", wx.DefaultPosition, wx.DefaultSize, 0 ) # or OneDrive®
			self.m_staticText19.Wrap( -1 )
			fgSizer9.Add( self.m_staticText19, 0, wx.ALL, 5 )
			self.loginInput = wx.TextCtrl( self.transferTab, wx.ID_ANY, configData["login"], wx.DefaultPosition, wx.Size( 200,-1 ) )
			fgSizer9.Add( self.loginInput, 0, wx.ALL, 5 )
		else:
			fgSizer9.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
			fgSizer9.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
		
		
		fgSizer9.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
		
		
		if configData["pwStore"].lower() == "true":
			self.m_staticText20 = wx.StaticText( self.transferTab, wx.ID_ANY, u"Password (FTP only)", wx.DefaultPosition, wx.DefaultSize, 0 ) # or OneDrive®
			self.m_staticText20.Wrap( -1 )
			fgSizer9.Add( self.m_staticText20, 0, wx.ALL, 5 )
			self.passwordInput = wx.TextCtrl( self.transferTab, wx.ID_ANY, configData["password"], wx.DefaultPosition, wx.Size( 200,-1 ), wx.TE_PASSWORD )
			fgSizer9.Add( self.passwordInput, 0, wx.ALL, 5 )
		else:
			fgSizer9.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
			fgSizer9.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
			
		
		bSizer3.Add( fgSizer9, 1, wx.EXPAND, 5 )
		
		bSizer95 = wx.BoxSizer( wx.HORIZONTAL )
		bSizer10 = wx.BoxSizer( wx.HORIZONTAL )
		
		timestampChoices = [ u"Python os.stat", u"Plaso Engine" ]
		self.timestampOption = wx.RadioBox( self.transferTab, wx.ID_ANY, u"Non-Admin Timestamp Tool", wx.DefaultPosition, wx.DefaultSize, timestampChoices, 1, wx.RA_SPECIFY_COLS )
		if configData["timestampTool"].lower() == "plaso":
			self.timestampOption.SetSelection( 1 )
		else:
			self.timestampOption.SetSelection( 0 )
		bSizer95.Add( self.timestampOption, 0, wx.ALL, 5 )
		
		timeZoneChoices = [ u"Local Time", u"POSIX time", u"UTC" ]
		self.timeZoneOption = wx.RadioBox( self.transferTab, wx.ID_ANY, u"Timestamp Options", wx.DefaultPosition, wx.DefaultSize, timeZoneChoices, 1, wx.RA_SPECIFY_COLS )
		if configData["timeZone"].lower() == "posix":
			self.timeZoneOption.SetSelection( 1 )
		elif configData["timeZone"].lower() == "utc":
			self.timeZoneOption.SetSelection( 2 )
		else:
			self.timeZoneOption.SetSelection( 0 )
		bSizer95.Add( self.timeZoneOption, 0, wx.ALL, 5 )
		
		errorChoices = [ u"Minimal", u"Verbose" ]
		self.errorOption = wx.RadioBox( self.transferTab, wx.ID_ANY, u"Error Output", wx.DefaultPosition, wx.DefaultSize, errorChoices, 1, wx.RA_SPECIFY_COLS )
		if configData["error"].lower() == "verbose":
			self.errorOption.SetSelection( 1 )
		else:
			self.errorOption.SetSelection( 0 )
		bSizer95.Add( self.errorOption, 0, wx.ALL, 5 )
		
		compressOptionChoices = [ u"ZIP", u"TAR.GZIP" ]
		self.compressOption = wx.RadioBox( self.transferTab, wx.ID_ANY, u"Compression", wx.DefaultPosition, wx.DefaultSize, compressOptionChoices, 1, wx.RA_SPECIFY_COLS )
		if configData["compress"].lower() == "gzip":
			self.compressOption.SetSelection( 1 )
		else:
			self.compressOption.SetSelection( 0 )
		bSizer10.Add( self.compressOption, 0, wx.ALL, 5 )
		
		hashOptionChoices = [ u"MD5", u"SHA256" ]
		self.hashOption = wx.RadioBox( self.transferTab, wx.ID_ANY, u"Checksum", wx.DefaultPosition, wx.DefaultSize, hashOptionChoices, 1, wx.RA_SPECIFY_COLS )
		if configData["checksum"].lower() == "sha256":
			self.hashOption.SetSelection( 1 )
		else:
			self.hashOption.SetSelection( 0 )
		bSizer10.Add( self.hashOption, 0, wx.ALL, 5 )
		
		receiptOptionChoices = [ u"HTML/Bootstrap", u"CSV", u"XML" ]
		self.receiptOption = wx.RadioBox( self.transferTab, wx.ID_ANY, u"Receipt Format", wx.DefaultPosition, wx.DefaultSize, receiptOptionChoices, 1, wx.RA_SPECIFY_COLS )
		if configData["receipt"].lower() == "csv":
			self.receiptOption.SetSelection( 1 )
		elif configData["receipt"].lower() == "xml":
			self.receiptOption.SetSelection( 2 )
		else:
			self.receiptOption.SetSelection( 0 )
		bSizer10.Add( self.receiptOption, 0, wx.ALL, 5 )
		
		bSizer11 = wx.BoxSizer( wx.VERTICAL )
		
		
		
		self.m_button5 = wx.Button( self.transferTab, wx.ID_ANY, u"View Receipt", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer11.Add( self.m_button5, 0, wx.ALL, 5 )
		
		self.m_button61 = wx.Button( self.transferTab, wx.ID_ANY, u"Export Receipt", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer11.Add( self.m_button61, 0, wx.ALL, 5 )
		
		
		bSizer10.Add( bSizer11, 1, wx.EXPAND, 5 )
		
		bSizer3.Add( bSizer95, 1, wx.EXPAND, 5 )
		bSizer3.Add( bSizer10, 1, wx.EXPAND, 5 )
		
		self.m_button9 = wx.Button( self.transferTab, wx.ID_ANY, u"Set as Default", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer3.Add( self.m_button9, 0, wx.ALL, 5 )
		
		
		
		
		bSizer3.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
		bSizer3.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
		
		
		self.transferTab.SetSizer( bSizer3 )
		self.transferTab.Layout()
		bSizer3.Fit( self.transferTab )
		self.mainNotebook.AddPage( self.transferTab, u"Options", False )
		
		bSizer1.Add( self.mainNotebook, 1, wx.EXPAND |wx.ALL, 5 )
		
		
		self.SetSizer( bSizer1 )
		self.Layout()
		
		self.Centre( wx.BOTH )
		
		# Connect Events
		
		self.Bind( wx.EVT_CLOSE, self.closeWindow )
		self.descDirCtrl.Bind( wx.EVT_TREE_SEL_CHANGED, self.descRecord )
		self.descDirCtrl.Bind( CT.EVT_TREE_ITEM_CHECKED, self.itemChecked )
		self.rcdDescInput.Bind( wx.EVT_TEXT, self.updateRcrdDesc )
		self.rcdAccessInput.Bind( wx.EVT_TEXT, self.updateRcrdAccess )
		self.m_button6.Bind( wx.EVT_BUTTON, self.accessOptions )
		self.transferBtn.Bind( wx.EVT_BUTTON, self.transferFiles )
		self.creatorUpdateBtn.Bind( wx.EVT_BUTTON, self.updateConfig )
		self.m_button5.Bind( wx.EVT_BUTTON, self.viewReceipt )
		self.m_button61.Bind( wx.EVT_BUTTON, self.saveReceipt )
		self.m_button9.Bind( wx.EVT_BUTTON, self.updateConfig )
		self.checkLocation.Bind( wx.EVT_BUTTON, self.testTransferLocation )
		self.receiveFiles.Bind( wx.EVT_BUTTON, self.checkforFiles )
		self.checkReceiveLocation.Bind( wx.EVT_BUTTON, self.testReceiveLocation )
		self.Bind( wx.EVT_CLOSE, self.closeANTS )
		
		#show info from old ~directory.xml on load
		self.descRecord(self)
Esempio n. 16
0
from resource_path import resource_path

filename = resource_path('data/words_alpha.txt')

with open(filename, 'r') as f:
    DICT = [d.split()[0] for d in f]
Esempio n. 17
0
import re
import collections

from resource_path import resource_path


def words(text):
    return re.findall('[a-z]+', text.lower())


def train(features):
    model = collections.defaultdict(lambda: 0)

    for f in features:
        model[f] += 1
    return model


filename = resource_path('data/big.txt')

f = open(filename, 'r')

NWORDS = train(words(f.read()))

f.close()
Esempio n. 18
0
            if ret and not _last:
                self.progress_items[keys[index + 1]] = -1
                self.status = self.PROGRESS_MESSAGES[index + 1]
            # colored text
            self.progress_items[keys[index]] = ret
            # reload todo-list
            self.root.ids.todo.items = self.progress_items
            self.root.ids.todo.reload()
            # error
            if not ret:
                success = False
                self.root.ids.install_btn.disabled = False
                self.error = True
                self.status = ("I'm sorry.. I was not a good boy this time. "
                               'An error occured, please contact our support.')
                break

        # Animate progressbar
        Animation(color=((not success) * .7 + .3, success * .7 + .3, .3, 1),
                  d=.5).start(self.root.ids.progressbar)
        self.root.ids.progressbar.normal = 1
        if success:
            self.status = 'You can now use [i]XtremeUpdater[/i]. Nice!'

        Clock.schedule_once(self.stop, 5)


if __name__ == '__main__':
    resource_add_path(resource_path())
    Window.clearcolor = Theme.dark
    InstallerApp().run()
Esempio n. 19
0
					boot = [os.path.join(fullPath, "antsFromBoot.exe"), openDir]
				elif __file__:
					boot = ["python", os.path.join(fullPath, "antsFromBoot.py"), openDir]
				try:
					admin.runAsAdmin(self, boot)
				except TypeError, e:
					raise
				except:
					subprocess.Popen(boot, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
			else:
				#opened from exe, no parameters
				
				wx.Dialog.__init__ ( self, None, id = wx.ID_ANY, title = "Welcome to ANTS", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
				
				self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
				favicon = wx.Icon(resource_path('A.gif'), wx.BITMAP_TYPE_GIF, 16, 16)
				self.SetIcon(favicon)
				
				bSizer1 = wx.BoxSizer( wx.VERTICAL )
				
				self.m_panel1 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
				bSizer2 = wx.BoxSizer( wx.VERTICAL )
				
				img = wx.Image(resource_path("ANTS.gif"), wx.BITMAP_TYPE_ANY)
				img = img.Scale(400, 143)
				result = wx.BitmapFromImage(img)
				self.m_bitmap1 = wx.StaticBitmap( self.m_panel1, wx.ID_ANY,result, wx.DefaultPosition, wx.Size( 400, 143 ), 0 )
				bSizer2.Add( self.m_bitmap1, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )
				
				self.m_staticText1 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"ANTS: Archives Network Transfer System", wx.DefaultPosition, wx.DefaultSize, 0 )
				self.m_staticText1.Wrap( -1 )
Esempio n. 20
0
#!/usr/bin/python3
from sys import path
from PyQt5 import QtWidgets
from resource_path import resource_path
from mainwindow import MainWindow
import sys


path.append('/ui')

app = QtWidgets.QApplication(sys.argv)
with open(resource_path("style.css"), "r") as style:
    app.setStyleSheet(style.read())
mainWindow = QtWidgets.QMainWindow()
ui = MainWindow()
ui.setupUi(mainWindow)
mainWindow.show()
sys.exit(app.exec_())