void ScanCommonInfoFiles() { var i = 0; _projects.ForEach(p => { var commonInfoFile = p.GetCommonAssemblyInfoFilePath(); if (commonInfoFile == null) { i++; return; } if (_fileToLink == null) { _fileToLink = commonInfoFile; _commonInfo = AssemblyInfoUtil.ReadCommonAssemblyInfo(_fileToLink); BindCommonInfo(); } if (_fileToLink == commonInfoFile) { projectGrid.Rows[i].Cells[0].Value = true; } i++; }); }
private void btnOK_Click(object sender, EventArgs e) { if (!projectGrid.EndEdit()) { return; } projectBindingSource.ResetBindings(false); toolStripStatusLabel.Text = "Saving..."; var i = 0; foreach (var assemblyInfo in _projectInfos) { if (assemblyInfo.CompareTo(_projectOriginalInfos[i]) == 0) { i++; continue; } string assemblyInfoFile = assemblyInfo.Project.GetAssemblyInfoFileName(); CheckOut(assemblyInfo, assemblyInfoFile); AssemblyInfoUtil.Save(assemblyInfo); i++; } toolStripStatusLabel.Text = "Saved successfully."; DialogResult = DialogResult.OK; }
private void btnOK_Click(object sender, EventArgs e) { toolStripStatusLabel.Text = "Saving..."; foreach (ProjectAssemblyInfo assemblyInfo in _projectInfos) { assemblyInfo.Product = txtProduct.Text; assemblyInfo.Company = txtCompany.Text; assemblyInfo.Copyright = txtCopyright.Text; AssemblyInfoUtil.Save(assemblyInfo); } DialogResult = DialogResult.OK; }
private void btnLink_Click(object sender, EventArgs e) { openAssemblyInfoFileDialog.DefaultExt = DefaultExt; openAssemblyInfoFileDialog.InitialDirectory = _fileToLink != null?Path.GetDirectoryName(_fileToLink) : Path.GetDirectoryName(Host.Instance.DTE.Solution.FileName); if (openAssemblyInfoFileDialog.ShowDialog() != DialogResult.OK) { return; } _commonInfo = AssemblyInfoUtil.ReadCommonAssemblyInfo(openAssemblyInfoFileDialog.FileName); _fileToLink = openAssemblyInfoFileDialog.FileName; BindCommonInfo(); }