Inheritance: Tanzu.Toolkit.ViewModels.TreeViewItemViewModel
        public CfInstanceViewModel(CloudFoundryInstance cloudFoundryInstance, TasExplorerViewModel parentTasExplorer, IServiceProvider services, bool expanded = false)
            : base(null, parentTasExplorer, services, expanded: expanded)
        {
            _dialogService       = services.GetRequiredService <IErrorDialog>();
            CloudFoundryInstance = cloudFoundryInstance;
            DisplayText          = CloudFoundryInstance.InstanceName;

            LoadingPlaceholder = new PlaceholderViewModel(parent: this, services)
            {
                DisplayText = _loadingMsg,
            };

            EmptyPlaceholder = new PlaceholderViewModel(parent: this, Services)
            {
                DisplayText = _emptyOrgsPlaceholderMsg,
            };
        }
コード例 #2
0
        public SpaceViewModel(CloudFoundrySpace space, OrgViewModel parentOrgViewModel, TasExplorerViewModel parentTasExplorer, IServiceProvider services, bool expanded = false)
            : base(parentOrgViewModel, parentTasExplorer, services, expanded: expanded)
        {
            _dialogService = services.GetRequiredService <IErrorDialog>();
            Space          = space;
            DisplayText    = Space.SpaceName;

            LoadingPlaceholder = new PlaceholderViewModel(parent: this, services)
            {
                DisplayText = LoadingMsg,
            };

            EmptyPlaceholder = new PlaceholderViewModel(parent: this, Services)
            {
                DisplayText = EmptyAppsPlaceholderMsg,
            };
        }
コード例 #3
0
        public OrgViewModel(CloudFoundryOrganization org, CfInstanceViewModel parentCfInstanceViewModel, TasExplorerViewModel parentTasExplorer, IServiceProvider services, bool expanded = false)
            : base(parentCfInstanceViewModel, parentTasExplorer, services, expanded: expanded)
        {
            _dialogService = services.GetRequiredService <IErrorDialog>();

            Org         = org;
            DisplayText = Org.OrgName;

            LoadingPlaceholder = new PlaceholderViewModel(parent: this, services)
            {
                DisplayText = _loadingMsg,
            };

            EmptyPlaceholder = new PlaceholderViewModel(parent: this, Services)
            {
                DisplayText = _emptySpacesPlaceholderMsg,
            };
        }
コード例 #4
0
        protected TreeViewItemViewModel(TreeViewItemViewModel parent, TasExplorerViewModel parentTasExplorer, IServiceProvider services, bool childless = false, bool expanded = false)
            : base(services)
        {
            _parent     = parent;
            _isExpanded = expanded;
            _isLoading  = false;

            _threadingService = services.GetRequiredService <IThreadingService>();

            if (!childless) // only create placeholder & assign children if this vm isn't a placeholder itself
            {
                LoadingPlaceholder = new PlaceholderViewModel(parent: this, services)
                {
                    DisplayText = _defaultLoadingMsg,
                };

                _children = new ObservableCollection <TreeViewItemViewModel>
                {
                    LoadingPlaceholder,
                };
            }

            ParentTasExplorer = parentTasExplorer;
        }