/// <summary> /// Returns UI control for editing of configuration. /// </summary> /// <returns> /// UI control instance. /// </returns> public IConfigirationControl GetConfigControl() { var control = new HudsonPollerConfigurationControl(); control.DataContext = new HudsonPollerConfigurationControl.ViewModel { Address = configuration.Address, Username = configuration.Username, Password = configuration.Password, PollInterval = configuration.PollInterval, Project = configuration.Project }; return control; }
public IConfigirationControl GetConfigControl(ConfigurationBase config) { var control = new HudsonPollerConfigurationControl(); var hudsonConfig = (HudsonPollerConfiguration)config; control.DataContext = new HudsonPollerConfigurationControl.ViewModel { Address = hudsonConfig.Address, Username = hudsonConfig.Username, Password = hudsonConfig.Password, PollInterval = hudsonConfig.PollInterval, Project = hudsonConfig.Project }; return control; }