private void Page_Load(object sender, System.EventArgs e) { Save.Click += new EventHandler(OnSave); ISourceControl[] sourceControls = SourceControlManager.AvailableSourceControl(); if (!IsPostBack) { SelectedSourceControl = -1; sc.AutoPostBack = true; sc.DataSource = sourceControls; sc.DataTextField = "Name"; sc.DataValueField = "Key"; sc.DataBind(); bs.DataSource = BuildSystemManager.AvailableBuildSystems(); bs.DataTextField = "Name"; bs.DataValueField = "Key"; bs.DataBind(); } if (sc.SelectedIndex != SelectedSourceControl) { // If the user changed the combo, we rebind the // properties for the selected source control ISourceControl control = sourceControls[sc.SelectedIndex]; SelectedSourceControl = sc.SelectedIndex; dynRep.DataSource = control.ParametersDefinition; dynRep.DataBind(); } }
public ProjectController(PestControlModel model, PrevalenceEngine engine, SourceControlManager scm, BuildSystemManager bsm) { _engine = engine; _model = model; _scm = scm; _bsm = bsm; }