Example #1
0
        public static async void DeleteElement(string hash, Lobby lobby)
        {
            CLog.Log("DeleteElement()");
            if (CloudClientChannel == null)
            {
                CreateCloudClientChannel();
            }
            CloudClientChannel.DeleteElement(hash);


            lobby._currentFolder = await CloudClientChannel.GetFolderAsync(lobby._currentFolder.Hash, lobby.user.Login);
        }
Example #2
0
        public static async void UploadFile(string userLogin, string fileName, string folderHash, byte[] file, Lobby lobby)
        {
            try
            {
                if (CloudClientChannel == null)
                {
                    CreateCloudClientChannel();
                }

                fList.Add(new File {
                    Name = fileName, ParentHash = folderHash, Hash = folderHash, ElementType = 0
                });

                CloudClientChannel.UploadFile(userLogin, fileName, folderHash, file);
                lobby._currentFolder = await CloudClientChannel.GetFolderAsync(lobby._currentFolder.Hash, lobby.user.Login);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Example #3
0
        public static async void CreateFolder(string name, string hash, string userLogin, Lobby lobby)
        {
            await CloudClientChannel.CreateFolderAsync(name, hash, userLogin);

            lobby._currentFolder = await CloudClientChannel.GetFolderAsync(lobby._currentFolder.Hash, lobby.user.Login);
        }