コード例 #1
0
ファイル: Program.cs プロジェクト: kolodkinv/SpicedCloud
        static void Main()
        {
            Console.WriteLine("{0,45}", "DropBox Client");
            line();

            DropboxClient client = new DropboxClient();

            DropboxApi api = client.connectDropbox("KsHXYcj-h_AAAAAAAAAAUr3Ebnrxv-Hrm8Vn7DYRZ5iEA3pw7xZG5jUs8E2UctRZ");


            var account = client.getInfoAccount(api);



            Console.WriteLine("{0,20}{1}", "Здравствуйте ", account.DisplayName);

            string command = "";

            help();

            while (true)
            {
                command = Console.ReadLine();

                switch (command)
                {
                case "VIEW_FILES": getFiles(api, client);
                    break;

                case "CREATE_FOLDER": createNewFolder(api, client);
                    break;

                case "DELETE": delete(api, client);
                    break;

                case "ADD_FILE": addFile(api, client);
                    break;

                case "DOWNLOAD_FILE": downloadFile(api, client);
                    break;

                default:
                    Console.WriteLine("Nothing");
                    break;
                }
            }
        }