MS Rework
This commit is contained in:
@@ -137,12 +137,29 @@
|
||||
'New Font(fontfamily, fontsize, CType(fontstyle, FontStyle))
|
||||
Dim fontfamily As String
|
||||
Dim fontstyle, fontcolor, fontsize As Integer
|
||||
Dim backcolor
|
||||
fontfamily = MAIN_NODES(i)("FONT_FAMILY").ToString
|
||||
fontsize = CInt(MAIN_NODES(i)("FONT_SIZE"))
|
||||
fontstyle = MAIN_NODES(i)("FONT_STYLE")
|
||||
fontcolor = MAIN_NODES(i)("FONT_COLOR")
|
||||
backcolor = MAIN_NODES(i)("BACK_COLOR")
|
||||
MAIN_NODE.NodeFont = New Font(fontfamily, fontsize, CType(fontstyle, FontStyle))
|
||||
MAIN_NODE.ForeColor = IntToColor(fontcolor)
|
||||
|
||||
Try
|
||||
If IsNumeric(backcolor) Then
|
||||
If backcolor = 16711680 Then
|
||||
Console.WriteLine("16711680")
|
||||
End If
|
||||
MAIN_NODE.BackColor = IntToColor(backcolor)
|
||||
Else
|
||||
If backcolor <> String.Empty Then MAIN_NODE.BackColor = Color.FromName(backcolor)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Unexpected Error in Formatting NodeColor (CreateTreViewNodes): " & ex.Message, True)
|
||||
End Try
|
||||
|
||||
|
||||
MAIN_NODE = CheckSubNodes(DT_TREEVIEW_NODES, MAIN_NODES(i)("GUID"), TREEVIEW_IMAGELIST, MAIN_NODE, MAIN_NODES(i)("EXPAND_NODE"))
|
||||
'Add the node
|
||||
mytrv.Nodes.Add(MAIN_NODE)
|
||||
@@ -151,7 +168,7 @@
|
||||
sw.Done()
|
||||
Return mytrv
|
||||
Catch ex As System.Exception
|
||||
ClassLogger.Add(">> Unexpected Error in CreateTreeViewNodes (NodeNavigation): " & ex.Message, True)
|
||||
ClassLogger.Add(">> Unexpected Error in CreateTreeViewNodes (NodeNavigation-CreateTreViewNodes): " & ex.Message, True)
|
||||
MsgBox("Error in CreateTreeViewNodes (NodeNavigation):" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return Nothing
|
||||
End Try
|
||||
@@ -192,15 +209,28 @@
|
||||
SUB_NODE.ImageIndex = index
|
||||
SUB_NODE.SelectedImageIndex = index
|
||||
Dim fontfamily As String
|
||||
Dim fontstyle, fontcolor, fontsize As Integer
|
||||
Dim fontstyle, fontcolor, fontsize, backcolor As Integer
|
||||
|
||||
fontfamily = SUB_NODE_ROW(i)("FONT_FAMILY").ToString
|
||||
fontsize = CInt(SUB_NODE_ROW(i)("FONT_SIZE"))
|
||||
fontstyle = SUB_NODE_ROW(i)("FONT_STYLE")
|
||||
fontcolor = SUB_NODE_ROW(i)("FONT_COLOR")
|
||||
|
||||
backcolor = SUB_NODE_ROW(i)("BACK_COLOR")
|
||||
SUB_NODE.NodeFont = New Font(fontfamily, fontsize, CType(fontstyle, FontStyle))
|
||||
SUB_NODE.ForeColor = IntToColor(fontcolor)
|
||||
|
||||
Try
|
||||
If IsNumeric(backcolor) Then
|
||||
If backcolor = 255 Then
|
||||
Console.WriteLine("255")
|
||||
End If
|
||||
Dim col = IntToColor(backcolor)
|
||||
SUB_NODE.BackColor = IntToColor(backcolor)
|
||||
Else
|
||||
If backcolor <> String.Empty Then SUB_NODE.BackColor = Color.FromName(backcolor)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Unexpected Error in Formatting NodeColor (Subnodes): " & ex.Message, True)
|
||||
End Try
|
||||
CheckSubNodes(DT_TREEVIEW_NODES, SUB_NODE_ROW(i)("GUID"), TREEVIEW_IMAGELIST, SUB_NODE, SUB_NODE_ROW(i)("EXPAND_NODE"))
|
||||
'Add the node
|
||||
MY_NODE.Nodes.Add(SUB_NODE)
|
||||
|
||||
Reference in New Issue
Block a user