The root view for Google App Engine for the Cloud Explorer.
Inheritance: GoogleCloudExtension.CloudExplorer.SourceRootViewModelBase
コード例 #1
0
        public VersionViewModel(
            ServiceViewModel owner, Google.Apis.Appengine.v1.Data.Version version)
        {
            _owner       = owner;
            this.version = version;
            root         = _owner.root;

            Initialize();
        }
コード例 #2
0
        public ServiceViewModel(GaeSourceRootViewModel owner, Service service, IList <VersionViewModel> versions)
        {
            _owner    = owner;
            _versions = versions;
            _service  = service;

            Caption = Service.Id;
            Icon    = s_serviceIcon.Value;

            UpdateContextMenu();
            PresentViewModels();
        }
コード例 #3
0
        public ServiceViewModel(GaeSourceRootViewModel owner, Service service)
        {
            _owner  = owner;
            Service = service;
            root    = _owner;

            Children.Add(s_loadingPlaceholder);

            Caption = Service.Id;
            Icon    = s_serviceIcon.Value;

            UpdateContextMenu();
        }
        public InstanceViewModel(VersionViewModel owner, Instance instance)
        {
            _owner = owner;
            _instance = instance;
            root = _owner.root;

            Caption = _instance.VmName;
            UpdateIcon();

            var menuItems = new List<MenuItem>
            {
                new MenuItem { Header = Resources.UiPropertiesMenuHeader, Command = new ProtectedCommand(OnPropertiesWindowCommand) },
            };
            ContextMenu = new ContextMenu { ItemsSource = menuItems };
        }
コード例 #5
0
        public VersionViewModel(
            GaeSourceRootViewModel owner,
            Service service,
            Google.Apis.Appengine.v1.Data.Version version,
            bool isLastVersion)
        {
            _owner             = owner;
            _service           = service;
            _version           = version;
            _trafficAllocation = GaeServiceExtensions.GetTrafficAllocation(_service, _version.Id);
            _isLastVersion     = isLastVersion;

            // Update the view.
            Caption = GetCaption();
            UpdateIcon();
            UpdateMenu();
        }
コード例 #6
0
        public InstanceViewModel(VersionViewModel owner, Instance instance)
        {
            _owner    = owner;
            _instance = instance;
            root      = _owner.root;

            Caption = _instance.VmName;
            UpdateIcon();

            var menuItems = new List <MenuItem>
            {
                new MenuItem {
                    Header = Resources.UiPropertiesMenuHeader, Command = new ProtectedCommand(OnPropertiesWindowCommand)
                },
            };

            ContextMenu = new ContextMenu {
                ItemsSource = menuItems
            };
        }
        public ServiceViewModel(GaeSourceRootViewModel owner, Service service)
        {
            _owner = owner;
            Service = service;
            root = _owner;

            Children.Add(s_loadingPlaceholder);

            Caption = Service.Id;
            Icon = s_serviceIcon.Value;

            UpdateContextMenu();
        }