コード例 #1
0
        public AccountViewModel(string displayName, string key, bool useHttps, bool blobContainersUpgraded, ICommand command)
        {
            if (command == null)
                throw new ArgumentNullException("command");

            _account = new StorageAccount(displayName, key, useHttps, blobContainersUpgraded);

            base.DisplayName = displayName;
            this.Key = key;
            this.Command = command;
        }
コード例 #2
0
        void ViewStorageAccount(StorageAccount account)
        {
            // See if the storage account is already displayed in a tab. If it is, select it.

            foreach (WorkspaceViewModel wvm in this.Workspaces)
            {
                if (wvm.DisplayName == account.Name)
                {
                    this.SetActiveWorkspace(wvm);
                    return;
                }
            }

            // Add a new workspace tab for the selected storage account.

            StorageAccountViewModel workspace = new StorageAccountViewModel(account);

            this.Workspaces.Add(workspace);

            this.SetActiveWorkspace(workspace);
        }
コード例 #3
0
        // Create a view model from a storage account.
        public StorageAccountViewModel(StorageAccount account)
        {
            if (account == null)
                throw new ArgumentNullException("account");

            this.Account = account;
            base.DisplayName = account.Name;

            this.BlobContainersUpgraded = account.BlobContainersUpgraded;

            if (OpenAccount())
            {
                this.ViewBlobContainers();
            }
        }