Beispiel #1
0
        public Form2()
        {
            Program.ClientForm.addtoConsole("Initializing Form2");
            InitializeComponent();
            //Configuration.userInfo.containerURI = "null";
            VCThread vcThread = new VCThread();
            Thread thread = new Thread(() => vcThread.start());
            //thread.Start();
            Program.ClientForm.addtoConsole("vcThread Started");
            //thread.Join();

            VC = new VCmanager(Configuration.userInfo.containerURI);
            blobscollect = VC.list();
            listBox1.DataSource = blobscollect.blobNames;
        }
Beispiel #2
0
        private void pollFile(CloudBlockBlob file, string fileFullPath, DateTime timestamp)
        {
            string directoryPath = Path.GetDirectoryName(fileFullPath);
            // Determine whether the directory exists.
            if (!Directory.Exists(directoryPath))
            {
                // create the directory.
                DirectoryInfo di = Directory.CreateDirectory(directoryPath);
            }

            //*****comment out these lines if do not want to download from snapshot
            VCmanager vc = new VCmanager(this.sasUri);
            LocalFileSysAccess.LocalFileSys save = new LocalFileSys();
            save.downloadfile(vc.getLatestSnapshot(file), fileFullPath, timestamp);
            //*****comment out these lines if do not want to download from snapshot**

            /****download from original file************************
            LocalFileSysAccess.LocalFileSys save = new LocalFileSys();
            save.downloadfile(file, fileFullPath, timestamp);
            /******************************************************/

            //updatetimestamp.settimestamp(fileFullPath, timestamp);
        }