Exemplo n.º 1
0
        public static List <SynoFileSummary> GetFileSummariesFromMainFolder()
        {
            SynoFTPClient Client = SynoFTPClient.GetSynoFtpClient();

            Client.LoginSecurely();
            string mainFolderName = ConfigurationManager.AppSettings["MainFolderName"].ToString();

            Client.LoadTargetFolder(mainFolderName);
            List <SynoFileSummary> fileSummaries = Client.GetFilesFromFolder();

            Client.Logoff();
            return(fileSummaries);
        }
Exemplo n.º 2
0
        public bool StartProcessingClick(string TagValue)
        {
            folder = new SynoFTPFolder("/" + mainFolderName);
            client = SynoFTPClient.GetSynoFtpClient();
            client.LoginSecurely();
            string[] stringSeparators = new string[] { "--" };
            string[] commandParts     = TagValue.Split(stringSeparators, StringSplitOptions.None);
            bool     result           = true;

            if (commandParts[0] == "UploadRecording")
            {
                result = MergeRecordingsAndUploadFile(commandParts[1]);
            }
            else if (commandParts[0] == "DownloadFile")
            {
                result = DownloadFileToSavePath(commandParts[1]);
            }
            return(result);
        }