Пример #1
0
 public MainWindowViewModel()
 {
     SourceFileToLoad             = @".\Data\SampleData\big.txt";
     TargetBlobLocation           = @".\Data\SampleBlob";
     ApplicationState             = new ApplicationState(TargetBlobLocation);
     AuthenticatedTreeViewModel   = new AuthenticatedTreeViewModel(ApplicationState);
     PreProcessPhaseViewModel     = new PreProcessPhaseViewModel(ApplicationState);
     ProofOfStoragePhaseViewModel = new ProofOfStoragePhaseViewModel(ApplicationState);
     UpdatePhaseViewModel         = new UpdatePhaseViewModel(ApplicationState);
     UploadPhaseViewModel         = new UploadPhaseViewModel(ApplicationState);
     MenuItemViewModel            = new MenuItemViewModel(ApplicationState);
     HomomorphicExampleViewModel  = new HomomorphicExampleViewModel();
 }
Пример #2
0
        private void ExecuteLoadFileCommand(Object data)
        {
            MessageBox.Show("Execute Load : Source :" + SourceFileToLoad + ", Target Blob: " + TargetBlobLocation);
            ApplicationState.FileManager.CloudLocation = TargetBlobLocation;

            FileProperties fileInfo = ApplicationState.FileManager.CreateFileInfo(SourceFileToLoad, ApplicationState.UserManager.CurrentUser);

            ApplicationState.FileManager.CurrentSelectedFile = fileInfo;

            AuthenticatedTreeViewModel   = new AuthenticatedTreeViewModel(ApplicationState);
            PreProcessPhaseViewModel     = new PreProcessPhaseViewModel(ApplicationState);
            ProofOfStoragePhaseViewModel = new ProofOfStoragePhaseViewModel(ApplicationState);
            UpdatePhaseViewModel         = new UpdatePhaseViewModel(ApplicationState);
            UploadPhaseViewModel         = new UploadPhaseViewModel(ApplicationState);
            RaisePropertyChanged(() => FileBlocks);
            RaisePropertyChanged(() => string.Empty);
        }