Esempio n. 1
0
        private void TestDate()
        {
            Console.WriteLine("before create notebook");
            int uid = 0;

            UserApi.UserCreate("kingwl", "123456", ref uid);

            List <int> list = null;

            if (UserApi.UserNotebook("kingwl", "123456", ref list))
            {
                Console.WriteLine("user notebook list : ");
                foreach (var obj in list)
                {
                    Console.WriteLine(obj);
                }
            }

            Console.WriteLine("after create notebook");
            int noteid = 0;

            NotebookApi.NotebookCreate("kingwl", "123456", "test", "654321", ref noteid);

            if (UserApi.UserNotebook("kingwl", "123456", ref list))
            {
                Console.WriteLine("user notebook list : ");
                foreach (var obj in list)
                {
                    Console.WriteLine(obj);
                }
            }

            Console.WriteLine("after delete notebook");
            NotebookApi.NotebookDelete(noteid, "654321");

            if (UserApi.UserNotebook("kingwl", "123456", ref list))
            {
                Console.WriteLine("user notebook list : ");
                foreach (var obj in list)
                {
                    Console.WriteLine(obj);
                }
            }

            Console.WriteLine("hello world!");
            Console.ReadKey();
        }
Esempio n. 2
0
        private void OnCreateNotebook()
        {
            Console.WriteLine("输入NotebookName");
            string notebookname = Console.ReadLine();

            Console.WriteLine("输入NotebookPass");
            string notebookpass = Console.ReadLine();

            int notebookid = 0;

            if (NotebookApi.NotebookCreate(Username, Password, notebookname, notebookpass, ref notebookid))
            {
                Console.WriteLine("创建成功");
            }
            else
            {
                Console.WriteLine("创建失败");
            }
            Console.ReadKey();
        }