public void Initialize()
 {
     if (configurationService == null)
     {
         configurationService = (ConfigurationService)ContextRegistry.GetContext().GetObject("ConfigurationService");
     }
     SoundPath = configurationService.GetSoundPath(Status);
 }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            // designer mode
            if (DesignMode)
                return;

            configurationService = (ConfigurationService)ContextRegistry.GetContext().GetObject("ConfigurationService");

            treatUnstableAsFailedCheckBox.Checked = configurationService.IsTreadUnstableAsFailed();
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            // designer mode (workaround: DesignMode is not chained to child controls)
            if (DesignMode || Process.GetCurrentProcess().ProcessName == "devenv")
                return;

            configurationService = (ConfigurationService)ContextRegistry.GetContext().GetObject("ConfigurationService");

            statusLabel.Text = HudsonTrayTrackerResources.ResourceManager.GetString("NotificationSettings_" + Status);
            SoundPath = configurationService.GetSoundPath(Status);
        }
        public ServersSettingsController(ServerListControl serverListControl,
            ProjectListControl projectListControl,
            BarStaticItem statusTextItem, 
            BarEditItem statusProgressItem)
        {
            this.serverListControl = serverListControl;
            this.projectListControl = projectListControl;
            this.statusTextItem = statusTextItem;
            this.statusProgressItem = statusProgressItem;

            configurationService = (ConfigurationService)ContextRegistry.GetContext().GetObject("ConfigurationService");
            hudsonService = (HudsonService)ContextRegistry.GetContext().GetObject("HudsonService");
            serverListControl.ConfigurationService = configurationService;
            projectListControl.ConfigurationService = configurationService;
            projectListControl.HudsonService = hudsonService;
        }
        private void SetPath(string path)
        {
            if (configurationService == null)
            {
                configurationService = (ConfigurationService)ContextRegistry.GetContext().GetObject("ConfigurationService");
            }

            configurationService.SetSoundPath(Status, path);
            SoundPath = path;
        }