Example #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);
        }
Example #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);
        }
Example #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);
		}
Example #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);
		}