private void Tree_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { var excels = this.Tree.GetDataRecordByNode(e.Node) as Excels; if (excels == null) { return; } if (!excels.State.HasValue) { return; } switch (excels.State) { case IdentityResultStateEnum.Success: e.Appearance.BeginUpdate(); e.Appearance.BackColor = Color.FromArgb(100, 189, 100); e.Appearance.BackColor2 = Color.FromArgb(100, 189, 100); e.Appearance.EndUpdate(); break; default: e.Appearance.BackColor = Color.FromArgb(255, 255, 255); e.Appearance.BackColor = Color.FromArgb(155, 155, 155); e.Appearance.ForeColor = Color.FromArgb(0, 0, 0); break; } }
private void treeList1_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { if (e.Node.ParentNode == null) { e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); } }
private void treeList1_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { if (!e.Node.HasChildren) { e.Appearance.FontStyleDelta = FontStyle.Bold; } }
private void treeList1_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { if (e.Node.HasChildren) { e.Appearance.Font = treeList1.Appearance.EvenRow.Font; } }
private void treeListReferencedFiles_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { if (e.Node.ParentNode == null) { e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); SetFocusedNodeProperties(e); } }
private void treeData_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { int parentID = TextUtils.ToInt(e.Node.GetValue(colParentID)); if (parentID == 0) { e.Appearance.BackColor = Color.LemonChiffon; } }
private void treeList1_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { if (e.Column.FieldName.IndexOf("y") > -1) { if (commonhelp.HasValue(e.Node["ID"].ToString(), e.Column.FieldName)) { e.Appearance.ForeColor = Color.Salmon; } } }
private void treeList1_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { if (e.Column.FieldName.IndexOf("y") > -1 && firstyear != "Title" && endyear != "Title") { if (Convert.ToInt32(e.Column.FieldName.Replace("y", "")) >= Convert.ToInt32(firstyear.Replace("y", "")) && Convert.ToInt32(endyear.Replace("y", "")) >= Convert.ToInt32(e.Column.FieldName.Replace("y", ""))) { e.Appearance.BackColor = Color.FromArgb(152, 122, 254); } } }
private void treeList1_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { //Text = e.Node.Level.ToString(); //if (e.Node.Level == 2) if (!e.Node.HasChildren) { e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); } if (e.Node.Level == 0) { e.Appearance.Font = new Font(e.Appearance.Font.FontFamily, 10.0F); } }
/// <summary> /// TreeList的样式处理方法 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tlBoi_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { ContractBoiChangeNode boiNode = tlBoi.GetDataRecordByNode(e.Node) as ContractBoiChangeNode; if (boiNode != null && boiNode.StatId == 0) { e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Italic); e.Appearance.ForeColor = Color.Gray; } if (viewModel.Editing) { // if(boiNode.StatId==1) } }
private void treeList1_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; if (doc == null) { return; } var node = getProjectNode(e.Node); if (node == Project.Instance.getCurrentSurface(doc)) { e.Appearance.BackColor = Color.Gray; } }
private void TvwOutputs_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { if (e.Node.Tag is FeedbackEncoderInput input) { if (input.FeedbackConnection != null) { e.Appearance.BackColor = Color.LightSalmon; e.Appearance.BackColor2 = Color.LightSalmon; } } else if (e.Node.Tag == null || e.Node.Tag is Module) { e.Appearance.FontStyleDelta = FontStyle.Bold; } }
private void treeList1_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { try { if (Convert.ToString(e.Node.GetValue(e.Column.AbsoluteIndex)) == "I") { e.Appearance.ForeColor = Color.Red; } } catch (Exception ex) { string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name; MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ex.Message + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString()); } }
private void treeList1_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { if (e.Node.Tag != null) { if (e.Node.Checked) { e.Appearance.ForeColor = Color.FromArgb(77, 8, 141); } else { e.Appearance.ForeColor = Color.Empty; } } else { e.Appearance.ForeColor = Color.Empty; } }
private void treeList1_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { if (e.Column.FieldName.IndexOf("y") > -1) { if (Convert.ToInt32(e.Column.FieldName.Replace("y", "")) >= Convert.ToInt32(firstyear.Replace("y", "")) && Convert.ToInt32(endyear.Replace("y", "")) >= Convert.ToInt32(e.Column.FieldName.Replace("y", ""))) { e.Appearance.BackColor = Color.FromArgb(152, 122, 254); } if (commonhelp.HasValue(e.Node["ID"].ToString(), e.Column.FieldName)) { e.Appearance.ForeColor = Color.Salmon; } if (e.Column.FieldName == "y1990" && double.Parse(e.Node["y1990"].ToString()) > 1) { e.Appearance.BackColor = Color.Red; } } }
private void Tree_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { var excels = this.Tree.GetDataRecordByNode(e.Node) as Excel; if (excels == null) { return; } if (excels.CanIdentity) { e.Appearance.BeginUpdate(); e.Appearance.BackColor = Color.FromArgb(100, 189, 100); e.Appearance.BackColor2 = Color.FromArgb(100, 189, 100); e.Appearance.EndUpdate(); } else { e.Appearance.BackColor = Color.FromArgb(255, 255, 255); e.Appearance.BackColor = Color.FromArgb(155, 155, 155); e.Appearance.ForeColor = Color.FromArgb(0, 0, 0); } }
private static void SetFocusedNodeProperties(DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { double brightness = Slyce.Common.Colors.GetBrightness(e.Appearance.BackColor); double lightBrightness = brightness > 0.5 ? brightness - 0.2 : brightness + 0.1; double darkBrightness = brightness > 0.5 ? brightness - 0.6 : brightness - 0.4; if (lightBrightness > 1) { lightBrightness = 1; } if (darkBrightness < 0) { darkBrightness = 0; } Color lightColor = Slyce.Common.Colors.ChangeBrightness(e.Appearance.BackColor, lightBrightness); Color darkColor = Slyce.Common.Colors.ChangeBrightness(e.Appearance.BackColor, darkBrightness); e.Appearance.ForeColor = Slyce.Common.Colors.IdealTextColor(darkColor); e.Appearance.BackColor = lightColor; e.Appearance.BackColor2 = darkColor; e.Appearance.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; e.Appearance.Options.UseBackColor = true; }
/// <summary> /// Handles the 1 event of the treeList_NodeCellStyle control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs"/> instance containing the event data.</param> private void treeList_NodeCellStyle_1(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { e.Appearance.Font = Convert.ToBoolean(e.Node["IsParent"]) ? new Font(e.Appearance.Font.FontFamily, e.Appearance.Font.Size, FontStyle.Bold) : new Font(e.Appearance.Font.FontFamily, e.Appearance.Font.Size, FontStyle.Regular); }
private void ucseg_menu_x_empresa_x_usuario1_event_delegate_treeList_menu_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { try { if (e.Node.GetValue("info_menu.IdMenu_padre") as int? == 0) { e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); } } catch (Exception) { MessageBox.Show("Ha ocurrido un error, comuníquese con sistemas", param.nom_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void Tree_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { }
private void ucseg_menu_x_empresa_x_usuario1_event_delegate_treeList_menu_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { try { if (e.Node.GetValue("info_menu.IdMenu_padre") as int? == 0) { e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); } } catch (Exception ex) { MessageBox.Show("La aplicacion necesita ser reiniciada, se reiniciara..", "Efixed", MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Restart(); } }
void ucSeg_Menu_x_Usuario_x_Empresa1_event_treeListMenu_x_Usuario_x_Empresa_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { try { if (e.Node.GetValue("IdMenuPadre") as int? == 0) { e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); } } catch (Exception ex) { string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name; NameMetodo = NameMetodo + " - " + ex.ToString(); MessageBox.Show(NameMetodo + " " + param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) , param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString()); } }
/// <summary> /// Handles the NodeCellStyle event of the treeList control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs"/> instance containing the event data.</param> private void treeList_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e) { e.Appearance.Font = e.Node.HasChildren ? //e.Node["ParentId"] == null ? new Font(e.Appearance.Font.FontFamily, e.Appearance.Font.Size, FontStyle.Bold) : new Font(e.Appearance.Font.FontFamily, e.Appearance.Font.Size, FontStyle.Regular); }