Пример #1
0
    def __init__(self, parent):
        MyWizPage.__init__(self, parent)

        vb = wm.vbox()

        l = wm.label(
            self,
            """Set the server parameters. Make sure to set a port number\nthat is not already in use."""
        )
        vb.add(l, 0)

        hb = wm.hbox()

        l = wm.label(self, 'Address:')
        hb.add(l, 0)

        s = wm.string(self, '127.0.0.1')
        hb.add(s, 5)
        self.s_addr = s

        l = wm.label(self, 'Port:')
        hb.add(l, 0)

        s = wm.string(self, '8000')
        hb.add(s, 5)
        self.s_port = s

        vb.add(hb, 0)

        self.SetSizer(vb)
Пример #2
0
    def __init__(self, parent):
        MyWizPage.__init__(self, parent)

        vb = wm.vbox()

        l = wm.label(
            self,
            """Choose a location to store your wiki. I recommend\ncreating a new folder, or picking an empty folder here."""
        )
        vb.add(l, 0)

        hb = wm.hbox()

        l = wm.label(self, 'Folder:')
        hb.add(l, 0)

        s = wm.string(self, '')
        hb.add(s, 5)
        self.s_rootdir = s

        b = wm.button(self, 'Browse ...', self.on_browse)
        hb.add(b, 2)

        vb.add(hb, 0)

        self.SetSizer(vb)

        self.Bind(wiz.EVT_WIZARD_PAGE_CHANGING, self.on_changing)
Пример #3
0
    def __init__(self, parent):
        MyWizPage.__init__(self, parent)

        vb = wm.vbox()

        l = wm.label(self, """Pick a name for your wiki SQLite file.""")
        vb.add(l, 0)

        hb = wm.hbox()

        l = wm.label(self, 'Filename:')
        hb.add(l, 0)

        s = wm.string(self, 'wiki.db')
        hb.add(s, 5)
        self.s_filename = s

        vb.add(hb, 0)

        l = wm.label(
            self,
            "Your wiki will be stored in as a single SQLite database file.\nThis file will be stored in your wiki folder."
        )
        fn = l.GetFont()
        fn.SetStyle(wx.FONTSTYLE_SLANT)
        l.SetFont(fn)

        vb.add(l, 0)

        self.SetSizer(vb)
Пример #4
0
    def __init__(self, parent):
        MyWizPage.__init__(self, parent)

        vb = wm.vbox()

        l = wm.label(
            self,
            """Choose a storage format. Don't worry too much\nabout your choice here, you can always change it later."""
        )
        vb.add(l, 0)

        h = hlink.HyperLinkCtrl(
            self,
            label="More about storage formats",
            URL="http://wikklytext.com/wiki/WhichFormat_.html")
        vb.add(h, 0)

        rb = wm.radiobox(
            self,
            "Storage Format", [
                'Text files. Creates one .txt file per wiki item.',
                'TiddlyWiki file. Entire wiki is stored in a single .html file.',
                'SQLite Database. Wiki is stored in a single database file.'
            ],
            nr_cols=1)
        vb.add(rb, 0)
        rb.set(2)
        self.rb_format = rb

        self.SetSizer(vb)
Пример #5
0
    def __init__(self, parent):
        MyWizPage.__init__(self, parent)

        vb = wm.vbox()

        l = wm.label(
            self,
            """Welcome to WikklyText!\n\nTo get started, I need to know where you'd like me to store your personal settings."""
        )
        vb.add(l, 0)

        h = hlink.HyperLinkCtrl(
            self,
            label="More about these options",
            URL="http://wikklytext.com/wiki/WikGuiConfigFolder.html")
        vb.add(h, 0)

        rb = wm.radiobox(
            self,
            "Choose a Configuration Path", [
                "User folder (%s)" % CfgPathUser(),
                "Executable folder (%s)" % CfgPathExe(), "Other folder"
            ],
            nr_cols=1)
        vb.add(rb, 0)

        self.rb = rb

        self.SetSizer(vb)
Пример #6
0
    def __init__(self, parent):
        MyWizPage.__init__(self, parent)

        vb = wm.vbox()

        l = wm.label(
            self,
            """I will set some parameters to optimize performance for your\nintended usage. Please select the most appropriate choice below:"""
        )
        vb.add(l, 0)

        #h = hlink.HyperLinkCtrl(self, label="More about storage formats", URL="http://wikklytext.com/wiki/WhichFormat_.html")
        #vb.add(h,0)

        rb = wm.radiobox(
            self,
            "Storage Media",
            ['Local Hard Drive', 'Networked Hard Drive', 'USB Device'],
            nr_cols=1)
        vb.add(rb, 0)
        rb.set(0)
        self.rb_storage = rb

        self.SetSizer(vb)
Пример #7
0
	def __init__(self, parent):
		wx.Dialog.__init__(self, parent, -1, "Wiki Configuration")
		
		vb = wm.vbox()
		
		hb = wm.hbox()
		
		l = wm.label(self, 'Location:')
		hb.add(l,0)
		
		s = wm.string(self, '')
		hb.add(s, 5)
		self.s_rootdir = s
		
		b = wm.button(self, 'Browse ...', self.on_choose_rootdir)
		hb.add(b, 2)
		self.b_browse_rootdir = b
		
		vb.add(hb,1)
		
		hb = wm.hbox()
		
		l = wm.label(self, 'Storage format:')
		hb.add(l,0)
		self.l_format = l
		
		cb = wm.combo(self, ['Text (.txt) files', 'TiddlyWiki (.html) file', 'SQLite database'],
					self.on_choose_format)
		hb.add(cb,1)
		self.cb_format = cb
		
		vb.add(hb,1)
		
		hb = wm.hbox()
		
		l = wm.label(self, 'Filename:')
		hb.add(l,0)
		self.l_filename = l
		
		s = wm.string(self, '')
		hb.add(s, 5)
		self.s_filename = s
		
		b = wm.button(self, 'Browse ...')
		hb.add(b, 2)
		self.b_browse_file = b
		
		vb.add(hb,1)

		hb = wm.hbox()

		l = wm.label(self, 'Server address:')
		hb.add(l,0)
		self.l_server_addr = l
		
		s = wm.string(self, '127.0.0.1')
		hb.add(s, 5)
		self.s_server_addr = s
		
		l = wm.label(self, 'Port:')
		hb.add(l,0)
		self.l_server_port = l
		
		s = wm.string(self, '8000')
		hb.add(s, 5)
		self.s_server_port = s
		
		vb.add(hb,1)

		hb = wm.hbox()
		
		b = wm.button(self,'Save',self.on_save)
		hb.add(b,1)
		
		b = wm.button(self, 'Cancel',self.on_cancel)
		hb.add(b,1)
		
		b = wm.button(self, 'Help')
		hb.add(b,1)
		
		vb.add(hb,1)
		
		self.SetSizer(vb)
		vb.SetSizeHints(self)
		self.SetAutoLayout(True)
		
		wx.CallAfter(self.update_enables)
Пример #8
0
    def __init__(self, parent):
        wx.Dialog.__init__(self, parent, -1, "Wiki Configuration")

        vb = wm.vbox()

        hb = wm.hbox()

        l = wm.label(self, 'Location:')
        hb.add(l, 0)

        s = wm.string(self, '')
        hb.add(s, 5)
        self.s_rootdir = s

        b = wm.button(self, 'Browse ...', self.on_choose_rootdir)
        hb.add(b, 2)
        self.b_browse_rootdir = b

        vb.add(hb, 1)

        hb = wm.hbox()

        l = wm.label(self, 'Storage format:')
        hb.add(l, 0)
        self.l_format = l

        cb = wm.combo(self, [
            'Text (.txt) files', 'TiddlyWiki (.html) file', 'SQLite database'
        ], self.on_choose_format)
        hb.add(cb, 1)
        self.cb_format = cb

        vb.add(hb, 1)

        hb = wm.hbox()

        l = wm.label(self, 'Filename:')
        hb.add(l, 0)
        self.l_filename = l

        s = wm.string(self, '')
        hb.add(s, 5)
        self.s_filename = s

        b = wm.button(self, 'Browse ...')
        hb.add(b, 2)
        self.b_browse_file = b

        vb.add(hb, 1)

        hb = wm.hbox()

        l = wm.label(self, 'Server address:')
        hb.add(l, 0)
        self.l_server_addr = l

        s = wm.string(self, '127.0.0.1')
        hb.add(s, 5)
        self.s_server_addr = s

        l = wm.label(self, 'Port:')
        hb.add(l, 0)
        self.l_server_port = l

        s = wm.string(self, '8000')
        hb.add(s, 5)
        self.s_server_port = s

        vb.add(hb, 1)

        hb = wm.hbox()

        b = wm.button(self, 'Save', self.on_save)
        hb.add(b, 1)

        b = wm.button(self, 'Cancel', self.on_cancel)
        hb.add(b, 1)

        b = wm.button(self, 'Help')
        hb.add(b, 1)

        vb.add(hb, 1)

        self.SetSizer(vb)
        vb.SetSizeHints(self)
        self.SetAutoLayout(True)

        wx.CallAfter(self.update_enables)