예제 #1
0
        internal List <Entity.Notebook> ReadEvernoteNotebooks(String edamBaseUrl, AuthenticationResult authResult)
        {
            string authToken = authResult.AuthenticationToken;

            NoteStore.Client noteStore = EvernoteHelper.GetNoteStoreClient(edamBaseUrl, authResult.User);
            List <Notebook>  notebooks = noteStore.listNotebooks(authToken);

            UpdateProgress("Retrieving Notebook List");

            foreach (Notebook notebook in notebooks)
            {
                Entity.Notebook enNotebook = new Entity.Notebook();
                enNotebook.Name = (notebook.Stack + " " + notebook.Name).Trim();
                enNotebook.Guid = notebook.Guid;

                int intProgress = Helper.GetNotebookProgress(enNotebooks.Count, notebooks.Count, 1, 20);
                UpdateProgress(intProgress);

                NoteFilter nf = new NoteFilter();
                nf.NotebookGuid = enNotebook.Guid;

                NoteList nl = noteStore.findNotes(authToken, nf, 0, 1);
                if (nl.Notes.Count > 0)
                {
                    enNotebooks.Add(enNotebook);
                }
            }
            enNotebooks.Sort(delegate(Entity.Notebook p1, Entity.Notebook p2) { return(p1.Name.CompareTo(p2.Name)); });
            return(enNotebooks);
        }
예제 #2
0
        private void CopyNotebooks()
        {
            for (int i = 0; i < cbNotebookList.CheckedItems.Count; i++)
            {
                Notebook nb = new Notebook();
                nb.Name = cbNotebookList.CheckedItems[i].ToString();
                nbListKeep.Add(nb);
            }

            foreach (Notebook nbInc in nbListIncoming)
            {
                foreach (Notebook nbKeep in nbListKeep)
                {
                    if (nbKeep.Name == nbInc.Name)
                    {
                        nbKeep.Guid = nbInc.Guid;
                    }
                }
            }
        }
예제 #3
0
파일: Form1.cs 프로젝트: bvp/en2ki
        internal List<Entity.Notebook> ReadEvernoteNotebooks(String edamBaseUrl, AuthenticationResult authResult)
        {
            string authToken = authResult.AuthenticationToken;
            NoteStore.Client noteStore = EvernoteHelper.GetNoteStoreClient(edamBaseUrl, authResult.User);
            List<Notebook> notebooks = noteStore.listNotebooks(authToken);
            UpdateProgress("Retrieving Notebook List");

            foreach (Notebook notebook in notebooks)
            {
                Entity.Notebook enNotebook = new Entity.Notebook();
                enNotebook.Name = (notebook.Stack + " " + notebook.Name).Trim();
                enNotebook.Guid = notebook.Guid;

                int intProgress = Helper.GetNotebookProgress(enNotebooks.Count, notebooks.Count, 1, 20);
                UpdateProgress(intProgress);

                NoteFilter nf = new NoteFilter();
                nf.NotebookGuid = enNotebook.Guid;

                NoteList nl = noteStore.findNotes(authToken, nf, 0, 1);
                if (nl.Notes.Count > 0)
                {
                    enNotebooks.Add(enNotebook);
                }
            }
            enNotebooks.Sort(delegate(Entity.Notebook p1, Entity.Notebook p2) { return p1.Name.CompareTo(p2.Name); });
            return enNotebooks;
        }