Exemple #1
0
 def createnewdoc(self):
     print("new document")
     from tkinter import simpledialog
     doc_name = simpledialog.askstring("Document Name",
                                       "Name of new document?")
     versionNo = 0
     init_contents = ""
     doc_cli.create_document(doc_name, self.user, init_contents)
     doc_cli.get_document(doc_name, self.user, versionNo)
     DocumentFileTest.DocumentScreen(
         user(user), doc_cli.get_document(doc_name, self.user, versionNo))
Exemple #2
0
 def openDoc3(self):
     documentname = self.userDocs[2][0]
     usern = self.userDocs[2][1]
     versionNo = self.userDocs[2][2]
     DocumentFileTest.DocumentScreen(
         user(usern),
         doc_cli.get_document(documentname, self.user, versionNo))
Exemple #3
0
 def opendocument(self):
     item = self.searchResultDocs.curselection()
     idx = item[0]
     docdetail = self.documentSearch[idx]
     document = docdetail[0]
     usern = docdetail[1]
     versionNo = docdetail[2]
     doc = doc_cli.get_document(document, usern, versionNo)
     DocumentFileTest.DocumentScreen(user(usern), doc)
import DocumentFileTest
import DocumentModel


class user:
    def __init__(self, name):
        self.name = name

    def getRank(self):
        return self.name

    def getUserName(self):
        return self.name


tmpSList = [
    "SentanceOne", "SentanceTwo", "SentanceThree", "SentanceFour",
    "SentanceArif"
]
guestUser = user("GU")
ordUser = user("OU")
superUser = user("SU")

if __name__ == '__main__':
    from DocumentDB import doc_cli
    testDoc = doc_cli.get_document("ASD", "me", 0)
    testScreen1 = DocumentFileTest.DocumentScreen(ordUser, testDoc)
    # testScreen2 = DocumentFileTest.DocumentScreen(ordUser,tmpSList)
    # testScreen3 = DocumentFileTest.DocumentScreen(superUser)