private void OptionsControl_Load(object sender, EventArgs e) { try { lblInfo.Text = String.Empty; _scripterConfig = _scripterConfigStorage.Load(); cbScriptDatabaseContext.Checked = _scripterConfig.ScriptDatabaseContext; cbScriptDatabaseContext.CheckedChanged += cbScriptDatabaseContext_CheckedChanged; _runConfig = _runConfigStorage.Load(); lblRunnerTool.Text = _runConfig.IsUndefined() || String.IsNullOrEmpty(_runConfig.RunTool) ? "none" : _runConfig.RunTool; if (_runConfig.IsUndefined()) { _runConfig.RunArgs = "$(Server) $(Database) $(User) $(Password)"; } lblRunnerArgs.Text = _runConfig.RunArgs; } catch (Exception ex) { cbScriptDatabaseContext.Enabled = false; lblInfo.Text = ex.Message; } }
public RunnerConfigForm(RunConfig runConfig) : this() { _runConfig = runConfig; tbTool.Text = _runConfig.IsUndefined() ? String.Empty : (_runConfig.RunTool ?? String.Empty); tbArgs.Text = _runConfig.RunArgs ?? String.Empty; }