~xibo-maintainers/xibo/halley

« back to all changes in this revision

Viewing changes to client/dotNET/Schedule.cs

MergedĀ lp:~dangarner/xibo/105-client-filecorruption

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    /// </summary>
34
34
    class Schedule
35
35
    {
 
36
        public delegate void ScheduleChangeDelegate(string layoutPath, int scheduleId, int layoutId);
 
37
        public event ScheduleChangeDelegate ScheduleChangeEvent;
 
38
 
 
39
        private Collection<LayoutSchedule> layoutSchedule;
 
40
        private int currentLayout = 0;
 
41
        private string scheduleLocation;
 
42
 
 
43
        //FileCollector
 
44
        private XiboClient.xmds.xmds xmds2;
 
45
        private bool xmdsProcessing;
 
46
        private bool forceChange = false;
 
47
 
 
48
        // Key
 
49
        private HardwareKey hardwareKey;
 
50
 
 
51
        // Cache Manager
 
52
        private CacheManager _cacheManager;
 
53
 
 
54
        /// <summary>
 
55
        /// Create a schedule
 
56
        /// </summary>
 
57
        /// <param name="scheduleLocation"></param>
36
58
        public Schedule(string scheduleLocation)
37
59
        {
38
60
            // Save the schedule location
40
62
 
41
63
            // Create a new collection for the layouts in the schedule
42
64
            layoutSchedule = new Collection<LayoutSchedule>();
 
65
            
 
66
            // Create a new cache manager
 
67
            _cacheManager = new CacheManager();
43
68
 
44
69
            // Create a new Xmds service object
45
70
            xmds2 = new XiboClient.xmds.xmds();
119
144
                try
120
145
                {
121
146
                    // Load the result into XML
122
 
                    FileCollector fileCollector = new FileCollector(e.Result);
 
147
                    FileCollector fileCollector = new FileCollector(_cacheManager, e.Result);
123
148
 
124
149
                    // Bind some events that the fileCollector will raise
125
150
                    fileCollector.LayoutFileChanged += new FileCollector.LayoutFileChangedDelegate(fileCollector_LayoutFileChanged);
380
405
            public int id;
381
406
            public int scheduleid;
382
407
        }
383
 
 
384
 
        public delegate void ScheduleChangeDelegate(string layoutPath, int scheduleId, int layoutId);
385
 
        public event ScheduleChangeDelegate ScheduleChangeEvent;
386
 
 
387
 
        private Collection<LayoutSchedule> layoutSchedule;
388
 
        private int currentLayout = 0;
389
 
        private string scheduleLocation;
390
 
 
391
 
        //FileCollector
392
 
        private XiboClient.xmds.xmds xmds2;
393
 
        private bool xmdsProcessing;
394
 
        private bool forceChange = false;
395
 
 
396
 
        // Key
397
 
        private HardwareKey hardwareKey;
398
408
    }
399
409
}