private void BuildCrewVeiw(string crewFileName) { CrewListParser crewListParser = new CrewListParser(crewFileName); DataTable crewTable = crewListParser.Read(); //to-do if (crewTable.Rows == null) { return; } crew.Clear(); for (int i = 0; i < crewTable.Rows.Count; i++) { AppointmentGroup ag = new AppointmentGroup(); ag.GroupTitle = crewTable.Rows[i].ItemArray[0].ToString(); ag.GroupId = i; if (i == 2) { Appointment ap = new Appointment() { Title = "test", GroupId = i, StartTime = DateTime.Now, EndTime = DateTime.Now.AddHours(1), Percent = 0.7f, Tooltip = "test" }; ag.Add(ap); } crew.Add(ag); } this.rosterGanttControl1.StartTime = _startTime; if (_totalHour > 1) { this.rosterGanttControl1.TotalHour = _totalHour; } this.rosterGanttControl1.Invalidate(); }
private void BuildCrewVeiw(string crewFileName) { CrewListParser crewListParser = new CrewListParser(crewFileName); DataTable crewTable = crewListParser.Read(); //to-do if (crewTable.Rows == null) { return; } crew.Clear(); for (int i = 0; i < crewTable.Rows.Count; i++) { AppointmentGroup ag = new AppointmentGroup(); ag.GroupTitle = crewTable.Rows[i].ItemArray[0].ToString(); ag.GroupId = i; if (i == 2) { Appointment ap = new Appointment() { Title = "test", GroupId = i, StartTime = DateTime.Now, EndTime = DateTime.Now.AddHours(1), Percent = 0.7f, Tooltip = "test" }; ag.Add(ap); } crew.Add(ag); } this.rosterGanttControl1.StartTime = _startTime; if (_totalHour > 1) this.rosterGanttControl1.TotalHour = _totalHour; this.rosterGanttControl1.Invalidate(); }