示例#1
0
        private void AddTenantNode(AuthTokenDto tokenDto, TenantDto tenant)
        {
            var node = new TenantNode(tokenDto.ServerDto, tenant.Name)
            {
                DisplayName = tenant.Name,
                Tag         = tenant.Guid,
                Parent      = this
            };

            node.Refresh(this, EventArgs.Empty);
            AddTenantNode(node);
        }
示例#2
0
        private void AddTenantNode(TenantNode node)
        {
            var nodeWithSameNameExists = false;
            var index = 0;

            while (index < Children.Count)
            {
                var tenantNode = (TenantNode)Children [index++];
                if (tenantNode.DisplayName == node.DisplayName)
                {
                    nodeWithSameNameExists = true;
                    break;
                }
            }

            if (nodeWithSameNameExists)
            {
                Children.RemoveAt(index - 1);
            }
            Children.Add(node);
            NSNotificationCenter.DefaultCenter.PostNotificationName("ReloadOutlineView", this);
        }
示例#3
0
		private void AddTenantNode (TenantNode node)
		{
			var nodeWithSameNameExists = false;
			var index = 0;
			while (index < Children.Count) {
				var tenantNode = (TenantNode)Children [index++];
				if (tenantNode.DisplayName == node.DisplayName) {
					nodeWithSameNameExists = true;
					break;
				}
			}

			if (nodeWithSameNameExists)
				Children.RemoveAt (index - 1);
			Children.Add (node);
			NSNotificationCenter.DefaultCenter.PostNotificationName ("ReloadOutlineView", this);
		}
示例#4
0
		private void AddTenantNode (AuthTokenDto tokenDto, TenantDto tenant)
		{
			var node = new TenantNode (tokenDto.ServerDto, tenant.Name) {
				DisplayName = tenant.Name,
				Tag = tenant.Guid,
				Parent = this
			};
			node.Refresh (this, EventArgs.Empty);
			AddTenantNode (node);
		}