public TreeNode CreateTreeViewNode(TemplateNodeInfo node, out ConcreteTemplateNodeDefinition nodeDef)
		{
			Debug.Assert(node.IsInstance);

			ConnectionData connection = node.Connection;

			nodeDef = new ConcreteTemplateNodeDefinition(node, connection.ConnectionGroup);

			UserSettingsManager settingsManager = new UserSettingsManager(
				Program.Model.Settings.InterfaceLanguage
			);

			UserSettingsRow nodeSettings = settingsManager.LoadUserSettings(
				node.TemplateNodeId.GetValueOrDefault()
			);

			if (nodeSettings != null)
			{
				if (!string.IsNullOrEmpty(nodeSettings.NodeUIName))
				{
					node.Title = nodeSettings.NodeUIName;
				}

				node.UIcon      = nodeSettings.NodeUIIcon;
				node.FontColor  = nodeSettings.NodeFontColor;
				node.IsDisabled = !nodeSettings.NodeEnabled;
			}

			string iconName = GetIcon(nodeDef);

			TreeNode treeNode = new TreeNode
			{
				Tag              = nodeDef,
				Text             = nodeDef.FormatNodeText(),
				ImageKey         = iconName,
				SelectedImageKey = iconName,
			};

			if (node.FontColor != null)
			{
				Color color = Colors.FromString(node.FontColor);

				treeNode.ForeColor = color;
			}

			if (node.FontStyle != null)
			{
				treeNode.NodeFont = new Font(treeTemplate.Font, ParseFontStyle(node.FontStyle));
			}

			if (node.Template.Childs.Any())
			{
				if (treeNode.Nodes.Count == 0)
				{
					// to make it expandable
					treeNode.Nodes.Add(
						new TreeNode { Tag = _MakeExpandableNodeTag }
					);
				}
			}

			nodeDef.NodeActivated = !node.IsDisabled;

			SetNodeOnLoading(treeNode);

			return treeNode;
		}