示例#1
0
    def __init__(self, master):
        """Create about dialog."""
        Toplevel.__init__(self, master, class_='MyNotes')

        self.title(_("About MyNotes"))
        self.image = PhotoImage(file=IM_ICON_48, master=self)
        style = Style(self)
        style.configure("url.TLabel", foreground="blue")

        Label(self, image=self.image).grid(row=0, columnspan=2, pady=10)

        Label(self, text=_("MyNotes %(version)s") % ({
            "version": __version__
        })).grid(row=1, columnspan=2)
        Label(self, text=_("Sticky notes/post-it system tray app")).grid(
            row=2, columnspan=2, padx=10)
        Label(self, text="Copyright (C) Juliette Monsel 2016-2019").grid(
            row=3, columnspan=2, padx=10)
        Label(self, text="*****@*****.**").grid(row=4,
                                                       columnspan=2,
                                                       padx=10)
        github = Label(self,
                       text="https://github.com/j4321/MyNotes",
                       cursor="hand1",
                       style="url.TLabel",
                       font="TkDefaultFont 10 underline")
        github.grid(row=5, columnspan=2, padx=10, pady=(10, 0), sticky="w")
        sourceforge = Label(self,
                            cursor="hand1",
                            style="url.TLabel",
                            text="https://sourceforge.net/projects/my-notes",
                            font="TkDefaultFont 10 underline")
        sourceforge.grid(row=6,
                         columnspan=2,
                         padx=10,
                         pady=(0, 10),
                         sticky="w")
        github.bind("<Button-1>",
                    lambda e: webOpen("https://github.com/j4321/MyNotes"))
        sourceforge.bind(
            "<Button-1>",
            lambda e: webOpen("https://sourceforge.net/projects/my-notes/"))
        Button(self, text=_("License"), command=self._license).grid(row=7,
                                                                    column=0,
                                                                    pady=10,
                                                                    padx=6,
                                                                    sticky="e")
        Button(self, text=_("Close"), command=self.exit).grid(row=7,
                                                              column=1,
                                                              pady=10,
                                                              padx=6,
                                                              sticky="w")

        self.initial_focus = self

        self.protocol("WM_DELETE_WINDOW", self.exit)
        self.resizable(0, 0)
        self.initial_focus.focus_set()
        self.wait_window(self)
示例#2
0
    def help(usage=False, documentation=False, report=False):
        """ This function serves the commands at the help menu of the application. The functions serves a few commands as per listed : documentation, usage, report. The function serves the tasks as per the arguments specified. Below are mentioned all those steps to execute a particular tasks using this function :
		* Usage -> MenubarFunctions.help(usage = True)
		* Documentation -> MenubarFunctions.help(documentation = True)
		* Report -> MenubarFunctions.help(report = True) 

		For further more information, check out the documentation for this tool. """

        # Checking the task specified
        if usage:
            # If the function was called to display the usage of this tool, then we continue to do so

            # Giving the user the proper instructions on the usage for this function
            mb.showinfo(
                'Usage - IP-Tracker (Python3)',
                """
Below are listed the steps for properly using this tool.
	1. On launching the tool, either using terminal (command : python3 main.py), or by direct execution. The first screen that is loaded is a form asking us to enter the required IP address to track.
	2. Enter the IP address on the input box and press the continue button. The required information will be loaded via a new window. Note all the information.
	3. The application also tracks the history of search i.e. List of all the IP addresses ever tracked using this tool. To view the history, check the tools menu.
	4 To close the tool, prefer to press the exit command on the menubar instead of the close window button. (This exit command first saves the history and then closes the tool, unlike the window close button directly closes the tool without saving the history).

For more in-depth information, check out the documentation.
				""",
            )
        elif documentation:
            # If the function was called to display the documentation, then we continue to do so

            # Asking the user whether to redirect to the documentation pages available on the github mirror of this project's repository
            choice = mb.askyesno(
                'Redirection to documentation',
                'To get the documentation of this tool, we will be redirecting to an external link (https://github.com/wsb-org/ip-tracker-gui-py/). Press yes to continue, and no to abort.'
            )
            if choice:
                # If the user choosed to redirect to the documentation, then we continue

                webOpen(
                    'https://github.com/wsb-org/ip-tracker-gui-py/blob/main/docs/'
                )
        elif report:
            # If the function was called to submit a report, then we continue to do so

            # Giving the user proper instructions on submitting a report
            mb.showinfo(
                'Submitting a report - IP-Tracker (Python3)',
                """
In order to submit a proper report, first your report must be of a valid reason like bugs, errors, etc. If you are concerned with what errors might occur or already occured, then you can proceed to submit a report. Also, you can submit a report if you are unsatisfied of the features or any function of this tool. Follow the below steps to submit report. There are two ways to submit a report, both are listed below :
1. Via Github Issue :
In order to submit a report, there is a way of doing so by creating a github issue on this repository at https://github.com/wsb-org/ip-tracker-gui-py/. For executing this task, you would also require a github account.

2. Via E-Mail :
In order to submit a report, there is a way of doing so by sending a proper email to the author. All the points should be mentioned and also the mail should be send in a proper way otherwise the mail would be considered as spam and ignored. Send the report via mail at the address - [email protected].
				""",
            )
示例#3
0
 def _on_click(self, event):
     self._start_selection(event)
     try:
         node_handle, offset = self.node(True, event.x, event.y)
         # open link in web browser
         if self._get_node_tag(node_handle) == "a":
             webOpen(self._get_node_attribute(node_handle, "href"))
         elif self._get_node_tag(self._get_node_parent(node_handle)) == "a":
             webOpen(
                 self._get_node_attribute(
                     self._get_node_parent(node_handle), "href"))
     except ValueError:
         # self.node returned None
         pass
示例#4
0
 def run(self, string):
     if string == "hotspot":
         system("PowerShell.exe -ExecutionPolicy Bypass -Command \" & "
                "\'C:\\Users\\Atakan\\Desktop\\tkinter\\hotspot.ps1\'\"")
     elif string == "gmail":
         webOpen("https://mail.google.com/mail/u/0/")
     elif string == "youtube":
         webOpen("https://www.youtube.com/")
     elif string == "spotify":
         system("explorer.exe shell:appsFolder\\"
                "SpotifyAB.SpotifyMusic_zpdnekdrzrea0!Spotify")
     elif string == "calendar":
         system("explorer.exe shell:appsFolder\\"
                "microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.calendar")
     elif string == "calculator":
         system("calc")
     return self
示例#5
0
 def execute(self, dic):
     for key, value in dic.items():
         if value == 1:
             if key == "hotspot_var":
                 system("PowerShell.exe -ExecutionPolicy Bypass -Command \" & "
                        "\'C:\\Users\\Atakan\\Desktop\\hotspot.ps1\'\"")  # "\'" + abspath("hotspot.ps1") + "\'\""
             elif key == "gmail_var":
                 webOpen("https://mail.google.com/mail/u/0/")
             elif key == "youtube_var":
                 webOpen("https://www.youtube.com/")
             elif key == "spotify_var":
                 system("explorer.exe shell:appsFolder\\"
                        "SpotifyAB.SpotifyMusic_zpdnekdrzrea0!Spotify")
             elif key == "calendar_var":
                 system("explorer.exe shell:appsFolder\\"
                        "microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.calendar")
             elif key == "calculator_var":
                 system("calc")
     return self
示例#6
0
    def _license(self):
        """ affiche la licence dans une nouvelle fenêtre """
        def close():
            """ ferme la fenêtre """
            self.focus_set()
            fen.destroy()

        fen = Toplevel(self)
        fen.title(_("License"))
        fen.transient(self)
        fen.protocol("WM_DELETE_WINDOW", close)
        fen.resizable(0, 0)
        fen.grab_set()

        texte = Text(fen, width=50, height=18)
        texte.pack()
        texte.insert(
            "end",
            _("FolderSync is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\n"
              ))
        texte.insert(
            "end",
            _("FolderSync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\n"
              ))
        texte.insert(
            "end",
            _("You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/."
              ))

        i = int(texte.index("5.end").split(".")[1])
        texte.tag_add("link", "5.%i" % (i - 29), "5.%i" % (i - 1))
        texte.tag_configure("link", foreground="#0000ff", underline=1)
        texte.tag_bind("link", "<Button - 1>",
                       lambda event: webOpen("http://www.gnu.org/licenses/"))
        texte.tag_bind("link", "<Enter>",
                       lambda event: texte.config(cursor="hand1"))
        texte.tag_bind("link", "<Leave>",
                       lambda event: texte.config(cursor=""))
        texte.configure(state="disabled", wrap="word")

        b_close = Button(fen, text=_("Close"), command=close)
        b_close.pack(side="bottom")
        b_close.focus_set()
        fen.wait_window(fen)
示例#7
0
文件: about.py 项目: j4321/Sudoku-Tk
    def _license(self):
        """ affiche la licence dans une nouvelle fenêtre """
        def close():
            """ ferme la fenêtre """
            self.focus_set()
            fen.destroy()

        fen = Toplevel(self)
        fen.title(_("License"))
        fen.transient(self)
        fen.protocol("WM_DELETE_WINDOW", close)
        fen.resizable(0, 0)
        fen.grab_set()
#        set_icon(fen)
        texte = Text(fen, width=50, height=18)
        texte.pack()
        texte.insert("end",
                     _("Sudoku-Tk is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\n"))
        texte.insert("end",
                     _("Sudoku-Tk is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\n"))
        texte.insert("end",
                     _("You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/."))

        i = int(texte.index("5.end").split(".")[1])
        texte.tag_add("link", "5.%i" % (i - 29), "5.%i" % (i - 1))
        texte.tag_configure("link", foreground="#0000ff", underline=1)
        texte.tag_bind("link", "<Button - 1>",
                       lambda event: webOpen("http://www.gnu.org/licenses/"))
        texte.tag_bind("link", "<Enter>",
                       lambda event: texte.config(cursor="hand1"))
        texte.tag_bind("link",
                       "<Leave>", lambda event: texte.config(cursor=""))
        texte.configure(state="disabled", wrap="word")

        b_close = Button(fen, text=_("Close"), command=close)
        b_close.pack(side="bottom")
        b_close.focus_set()
        fen.wait_window(fen)
示例#8
0
 def download(self):
     webOpen("https://sourceforge.net/projects/checkmails/files")
     self.quit()
示例#9
0
 def download(self):
     webOpen("https://sourceforge.net/projects/my-notes/files")
     self.quit()
示例#10
0
def help_web(event=None):
    """ ouvre l'aide en ligne dans la langue de l'interface """
    if LANGUE[:2] == "fr":
        webOpen("https://braceletgenerator.sourceforge.io/index_fr.html")
    else:
        webOpen("https://braceletgenerator.sourceforge.io/")
示例#11
0
def help(event=None):
    """ ouvre l'aide en .html dans la langue de l'interface """
    if LANGUE[:2] == "fr":
        webOpen(DOC_FR)
    else:
        webOpen(DOC)
示例#12
0
文件: aide.py 项目: j4321/Sudoku-Tk
    def __init__(self, master, **options):
        """Display help dialog."""

        Toplevel.__init__(self, master, class_="Sudoku-Tk", **options)

        self.title(_("Sudoku-Tk Help"))
        self.transient(master)
        self.grab_set()

        self.geometry(self.master.geometry())
        txt = Text(self,
                   wrap="word",
                   font="Arial 10",
                   tabs=("6"),
                   padx=15,
                   pady=15,
                   relief='flat',
                   highlightthickness=0)
        scroll = Scrollbar(self, orient='vertical', command=txt.yview)
        txt.configure(yscrollcommand=scroll.set)
        scroll.pack(side='right', fill='y')
        txt.pack(fill="both", expand=True)

        txt.insert("end", _("Sudoku-Tk Help") + '\n', ("titre1"))
        txt.insert(
            "end",
            _("Sudoku-Tk is a software written in python and using the Tcl/Tk graphical libraries. It enables you to play sudoku and can also solve sudoku puzzles."
              ))
        txt.insert(
            "end",
            _(" The puzzles can be loaded from files, entered by the user or generated by the software. I apologize for the slowness of the generation algorithm. It generates minimal puzzles, which means that if you remove any value from the puzzle it will not have a unique solution any more. See "
              ))
        txt.insert("end", _("https://en.wikipedia.org/wiki/Sudoku"), ("link"))
        txt.insert("end", _(" for more information on sudoku.") + '\n\n')

        txt.insert("end", _("Puzzle levels") + '\n', ("titre2"))
        txt.insert(
            "end",
            _("The levels given are only indicative, there might be significative variations in the difficulty of puzzles of the same level. The criteria used to define the levels are the following:"
              ) + '\n')
        txt.insert("end", "\t• ")
        txt.insert("end", _("Easy"), ("it"))
        txt.insert("end", ": ")
        txt.insert(
            "end",
            _("The puzzle is solvable using only simple elimination rules.") +
            '\n')
        txt.insert("end", "\t• ")
        txt.insert("end", _("Medium"), ("it"))
        txt.insert("end", ": ")
        txt.insert(
            "end",
            _("The puzzle is solvable using more complexe elimination rules.")
            + '\n')
        txt.insert("end", "\t• ")
        txt.insert("end", _("Difficult"), ("it"))
        txt.insert("end", ": ")
        txt.insert(
            "end",
            _("This software had to use a backtracking method to solve the puzzle."
              ) + '\n\n')

        txt.insert("end", _("Starting a game") + '\n', ("titre2"))
        txt.insert("end", _("To start a game go to "))
        txt.insert("end", _("New -> Generate a puzzle"), ("it"))
        txt.insert(
            "end",
            _(" or open an existing game / puzzle. You can also start from an empty grid."
              ))
        txt.insert("end", _("You can find puzzles files in the "))
        txt.insert("end", "Sudoku-Tk/Puzzles", ("it"))
        txt.insert("end", _(" folder.") + '\n\n')

        txt.insert("end", _("Filling the grid") + '\n', ("titre2"))
        txt.insert(
            "end",
            _("\t• Left mouse click in the cell to show the keypad to enter a value."
              ) + '\n')
        txt.insert(
            "end",
            _("\t• Right mouse click in the cell to show the keypad to enter a possibility."
              + '\n'))
        txt.insert(
            "end",
            _("Clicking on a number already in the cell removes it.") + '\n',
            ("space"))
        txt.insert(
            "end",
            _("The game can be saved at any time to continue it later. To open a saved game, go to "
              ))
        txt.insert("end", _("Open -> Game"), ("it"))
        txt.insert("end", _(" and select the desired .sudoku file.") + '\n\n')

        txt.insert("end", _("Printing a puzzle") + '\n', ("titre2"))
        txt.insert(
            "end",
            _("You cannot print directly a puzzle but you can export it as .png or .jpg in order to put several puzzles in a document editor of your choice and print them."
              ))
        txt.insert(
            "end",
            _("Only the values are printed (not the possibilities) and to save ink, there is no grey background for the initial values."
              ) + '\n\n')

        txt.insert("end", _("Solving a puzzle") + '\n', ("titre2"))
        txt.insert("end", _("The "))
        txt.insert("end", _("Game -> Solve"), ("it"))
        txt.insert(
            "end",
            _(" command in the menubar computes the solution of the current puzzle. First, it takes into account all the values in the grid, but if there is a mistake, the solution can be computed from the initial values only. In this case, the right value will be displayed in red in the cells that contained a wrong value."
              ))

        txt.tag_configure("link", foreground="#0000ff", underline=1)
        txt.tag_bind(
            "link", "<Button-1>",
            lambda event: webOpen(_("https://en.wikipedia.org/wiki/Sudoku")))
        txt.tag_bind("link", "<Enter>",
                     lambda event: txt.config(cursor="hand1"))
        txt.tag_bind("link", "<Leave>", lambda event: txt.config(cursor=""))
        txt.tag_configure("it", font="Arial 10 italic")
        txt.tag_configure("space", spacing3=4)
        txt.tag_configure("titre1",
                          font="Arial 14 bold",
                          justify="center",
                          spacing3=10)
        txt.tag_configure("titre2", font="Arial 11 bold", spacing3=4)
        txt.configure(state="disabled")

        self.protocol("WM_DELETE_WINDOW", self._quitter)
        self.resizable(0, 0)
        self.focus_set()
        self.wait_window(self)
 def OpenHelp():
     webOpen("https://github.com/Braden1996/garrysmod-fastdl-generator")
示例#14
0
 def download(self):
     webOpen("https://sourceforge.net/projects/braceletgenerator/files")
     self.quit()
示例#15
0
 def download(self):
     webOpen("https://github.com/j4321/{app_name}/releases/tag/v{version}".
             format(app_name=APP_NAME, version=self._version))
     self.quit()