/// <summary> /// 重置树项目图标 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnTreeItemGetImageIndex(object sender, TreeItemGetImageIndexEventArgs e) { var obj = oTree1.GetUserObject(e.Node); if (obj is OrTmplCaDO) { OrTmplCaDO caDO = obj as OrTmplCaDO; e.ImageKey = caDO.Fg_routine == true ? ImageKeyRoutine : ImageKeyModel; } else if (obj is OrTmplDTO) { OrTmplDTO dto = obj as OrTmplDTO; switch (dto.Sd_ortmpltp) { case BdSrvDictCodeConst.SD_ORTMPLTP_FHMBA: e.ImageKey = ImageKeyFHMB; break; case BdSrvDictCodeConst.SD_ORTMPLTP_CZXCY: e.ImageKey = ImageKeyXY; break; case BdSrvDictCodeConst.SD_ORTMPLTP_CYFJ: e.ImageKey = ImageKeyCY; break; } } else { e.ImageKey = ImageKeyCa; } }
/// <summary> /// 树节点去除图片 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void oTree1_TreeItemGetImageIndex(object sender, TreeItemGetImageIndexEventArgs e) { e.ImageKey = ""; }