Пример #1
0
        public static CustomResource CreateCustomResource(int res_id, string caption, Color ResColor)
        {
            CustomResource cr = new CustomResource();

            cr.ResID = res_id;
            cr.Name  = caption;
            return(cr);
        }
Пример #2
0
        public static void GenerateEvents(BindingList <CustomAppointment> eventList, BindingList <CustomResource> resources)
        {
            int count = 2;

            for (int i = 0; i < count; i++)
            {
                CustomResource resource   = resources[i];
                string         subjPrefix = resource.Name + "'s ";
                eventList.Add(CreateEvent(subjPrefix + "meeting", resource.ResID, 2, 5));
                eventList.Add(CreateEvent(subjPrefix + "travel", resource.ResID, 3, 6));
                eventList.Add(CreateEvent(subjPrefix + "special", resource.ResID, 0, 10));
            }
        }