This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.cs
31 lines (27 loc) · 1.38 KB
/
Form1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Windows.Forms;
using DevExpress.XtraScheduler;
using DevExpress.XtraTreeList;
namespace SchedulerResourcesTreeColors {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e) {
// TODO: This line of code loads data into the 'tasksDataSet1.Resources' table. You can move, or remove it, as needed.
this.resourcesTableAdapter.Fill(this.tasksDataSet1.Resources);
// TODO: This line of code loads data into the 'tasksDataSet1.TaskDependencies' table. You can move, or remove it, as needed.
this.taskDependenciesTableAdapter.Fill(this.tasksDataSet1.TaskDependencies);
// TODO: This line of code loads data into the 'tasksDataSet1.Tasks' table. You can move, or remove it, as needed.
this.tasksTableAdapter.Fill(this.tasksDataSet1.Tasks);
schedulerControl1.Storage.Appointments.CommitIdToDataSource = false;
}
private void resourcesTree1_CustomDrawNodeCell(object sender, CustomDrawNodeCellEventArgs e) {
if (schedulerControl1.Storage != null)
{
Resource resource = schedulerControl1.Storage.Resources.Items.Find(r => r.Caption == e.CellText);
e.Appearance.BackColor = resource.GetColor();
}
}
}
}