예제 #1
0
 public ScheduleManager(CacheManager cacheManager, string scheduleLocation)
 {
     this._cacheManager = cacheManager;
     this._location = scheduleLocation;
     this._layoutSchedule = new Collection<LayoutSchedule>();
     this._currentSchedule = new Collection<LayoutSchedule>();
     this.IsNewScheduleAvailable();
 }
예제 #2
0
파일: Schedule.cs 프로젝트: afrog33k/eAd
 public Schedule(string scheduleLocation, CacheManager cacheManager)
 {
     this._scheduleLocation = scheduleLocation;
     this._layoutSchedule = new Collection<LayoutSchedule>();
     this._cacheManager = cacheManager;
     this._scheduleManager = new ClientApp.ScheduleManager(this._cacheManager, scheduleLocation);
     this._xmds2 = new ServiceClient();
 }
예제 #3
0
    /// <summary>
    /// Creates a new schedule Manager
    /// </summary>
    /// <param name="scheduleLocation"></param>
    public ScheduleManager(CacheManager cacheManager, string scheduleLocation)
    {
        _cacheManager = cacheManager;
        _location = scheduleLocation;

        // Create an empty layout schedule
        _layoutSchedule = new Collection<LayoutSchedule>();
        _currentSchedule = new Collection<LayoutSchedule>();

        // Evaluate the Schedule
        IsNewScheduleAvailable();
    }
예제 #4
0
파일: Region.cs 프로젝트: afrog33k/eAd
 public Region(StatLog statLog, CacheManager cacheManager) : base(0, 0, 0, 0)
 {
     this.currentSequence = -1;
     this._statLog = statLog;
     this._cacheManager = cacheManager;
     this.options.Width = 0x400;
     this.options.Height = 0x300;
     this.options.Left = 0;
     this.options.Top = 0;
     this.options.Uri = null;
     this.Size = new System.Windows.Size((double) this.options.Width, (double) this.options.Height);
     this.Location = new Point((double) this.options.Left, (double) this.options.Top);
     base.Background = new SolidColorBrush(Colors.Transparent);
     bool doubleBuffering = Settings.Default.DoubleBuffering;
     this.blackList = new BlackList();
 }
예제 #5
0
파일: Schedule.cs 프로젝트: afrog33k/eAd
    /// <summary>
    /// Create a schedule
    /// </summary>
    /// <param name="scheduleLocation"></param>
    public Schedule(string scheduleLocation,  CacheManager cacheManager)
    {
        Debug.WriteLine(string.Format("XMDS DisplayLocation: {0}", Settings.Default.Xmds));

        // Save the schedule location
        _scheduleLocation = scheduleLocation;

        // Create a new collection for the layouts in the schedule
        _layoutSchedule = new Collection<LayoutSchedule>();

        // Set cachemanager
        _cacheManager = cacheManager;

        // Create a schedule manager
        _scheduleManager = new ScheduleManager(_cacheManager, scheduleLocation);

        // Create a new Xmds service object
        _xmds2 = new ServiceClient();
    }
예제 #6
0
    /// <summary>
    /// Sets the CacheManager
    /// </summary>
    private void SetCacheManager()
    {
        try
        {
            using (FileStream fileStream = File.Open(App.UserAppDataPath + "\\" + Settings.Default.CacheManagerFile, FileMode.Open))
            {
                var xmlSerializer = new XmlSerializer(typeof(CacheManager));

                _cacheManager = (CacheManager)xmlSerializer.Deserialize(fileStream);
            }
        }
        catch (Exception ex)
        {
            Trace.WriteLine(new LogMessage("AdvertPlayer - SetCacheManager", "Unable to reuse the Cache Manager because: " + ex.Message));

            // Create a new cache manager
            _cacheManager = new CacheManager();
        }

        try
        {
            _cacheManager.Regenerate();
        }
        catch (Exception ex)
        {
            Trace.WriteLine(new LogMessage("AdvertPlayer - SetCacheManager", "Regenerate failed because: " + ex.Message));
        }
    }