public MainControl()
		{

            long time = 50; 
            
            this.InitializeComponent();

            Logger.Source = "Scoreboard";

            string configFileName = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Scoreboard.config";
            try
            {
                Configuration myConfig = new Configuration(configFileName);

                theScoreboardUrl = myConfig["ScoreboardURL"];
                theTimeclockUrl = myConfig["TimeclockURL"];
                time = Int64.Parse(myConfig["refreshTime"]);
            }
            catch(Exception e)
            {
                Logger.Log("Could not read config file or property not present'" + configFileName + "': " + e.Message, EventLogEntryType.Error, Logger.Type.InitFailure);
            }

            theScoreboardRetriever = new ScoreboardRetriever(this.Dispatcher, ScoreboardUpdate, time, theScoreboardUrl);
            theTimeclockRetriever = new TimeclockRetriever(this.Dispatcher, TimeclockUpdate, time, theTimeclockUrl);

        }		
        public MainControl()
		{

            long time = 50; 
            
            this.InitializeComponent();

            Logger.Source = "Scoreboard";

            string baseFolder = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            string configFileName = baseFolder + "\\Scoreboard.config";
            string backgroundImageFile = "";
            string zeroSubstitutionImageFile = "";

            try
            {
                Configuration myConfig = new Configuration(configFileName);

                theScoreboardUrl = myConfig["ScoreboardURL"];
                theTimeclockUrl = myConfig["TimeclockURL"];
                theShotclockUrl = myConfig["ShotclockURL"];
                time = Int64.Parse(myConfig["refreshTime"]);
                theAttentionTime = Int64.Parse(myConfig["attentionTime"]);
                backgroundImageFile = myConfig["backgroundImageFile"];
                zeroSubstitutionImageFile = myConfig["zeroSubstitutionImageFile"];
            }
            catch(Exception e)
            {
                Logger.Log("Could not read config file or property not present'" + configFileName + "': " + e.Message, EventLogEntryType.Error, Logger.Type.InitFailure);
            }

            if (theScoreboardUrl != "")
            {
                theScoreboardRetriever = new ScoreboardRetriever(this.Dispatcher, ScoreboardUpdate, time, theScoreboardUrl);
            }

            if (theTimeclockUrl != "")
            {
                theTimeclockRetriever = new TimeclockRetriever(this.Dispatcher, TimeclockUpdate, time, theTimeclockUrl);
            }

            if (theShotclockUrl != "")
            {
                theShotclockRetriever = new ShotclockRetriever(this.Dispatcher, ShotclockUpdate, time, theShotclockUrl);
            }

            if (backgroundImageFile == "")
            {
                backgroundImageFile = baseFolder + @"/Images/scoreboard.png";
            }

            if (zeroSubstitutionImageFile == "")
            {
                zeroSubstitutionImageFile = baseFolder + @"/Images/s0.png";
            }

            // Initialise source
            InitImageSource(BGIMG, backgroundImageFile );
            InitImageSource(HOME_SUBSTITUTE_IMAGE, zeroSubstitutionImageFile);
            InitImageSource(GUEST_SUBSTITUTE_IMAGE, zeroSubstitutionImageFile);
            
            BitmapImage mySource = new BitmapImage();
       
        }