public EditConfigsViewModel EditConfigs(ProjectWindowViewModel project) { if (project.IsExistingProject) return EditConfigs(project.ConfigFilePath); SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(); builder.DataSource = project.SqlConnection.Server; builder.InitialCatalog = project.SqlConnection.Database; builder.IntegratedSecurity = !project.SqlConnection.IsSqlServerSecurity; if (project.SqlConnection.IsSqlServerSecurity) { builder.UserID = project.SqlConnection.Username; builder.Password = project.SqlConnection.Password; } EditConfigsViewModel result = CreateConfig(); result.Configs[0].ConnectionString = builder.ConnectionString; return result; }
public ProjectWindow() { InitializeComponent(); Model = new ProjectWindowViewModel(); }