public SolutionItem(Connect connect, Solution solution, bool recursive) { this._subItems = new List <SolutionItem>(); this._projectType = LanguageType.None; if (connect == null) { throw new ArgumentNullException("connect"); } if (solution == null) { throw new ArgumentNullException("solution"); } this._incrementSetting = new SolutionItemIncrementSettings(this); this._connect = connect; this._item = solution; this._itemType = SolutionItemType.Solution; this._name = Path.GetFileNameWithoutExtension(solution.FileName); this._filename = solution.FileName; this._uniqueName = this._name; this.GetGlobalVariables(); if (recursive) { SolutionItem.FillSolutionTree(connect, this, solution.Projects); } }
/// <summary> /// Initializes a new instance of the <see cref="SolutionItem"/> class. /// </summary> /// <param name="solution">The solution.</param> /// <param name="recursive">if set to <c>true</c> the item will fill it's <see cref="SubItems"/>.</param> public SolutionItem(Connect connect, Solution solution, bool recursive) { if (connect == null) { throw (new ArgumentNullException("connect")); } if (solution == null) { throw (new ArgumentNullException("solution")); } _incrementSetting = new SolutionItemIncrementSettings(this); _connect = connect; _item = solution; _itemType = SolutionItemType.Solution; _name = Path.GetFileNameWithoutExtension(solution.FileName); _filename = solution.FileName; _uniqueName = _name; //_autoUpdateAssemblyVersion = bool.Parse(GetGlobalVariable(Resources.GlobalVarName_updateAssemblyVersion, "false")); //_autoUpdateFileVersion = bool.Parse(GetGlobalVariable(Resources.GlobalVarName_updateFileVersion, "false")); GetGlobalVariables(); if (recursive) { FillSolutionTree(connect, this, solution.Projects); } }
public SolutionItem(Connect connect, Solution solution, bool recursive) { this._subItems = new List<SolutionItem>(); this._projectType = LanguageType.None; if (connect == null) { throw new ArgumentNullException("connect"); } if (solution == null) { throw new ArgumentNullException("solution"); } this._incrementSetting = new SolutionItemIncrementSettings(this); this._connect = connect; this._item = solution; this._itemType = SolutionItemType.Solution; this._name = Path.GetFileNameWithoutExtension(solution.FileName); this._filename = solution.FileName; this._uniqueName = this._name; this.GetGlobalVariables(); if (recursive) { SolutionItem.FillSolutionTree(connect, this, solution.Projects); } }
/// <summary> /// Copies settings from another instance. /// </summary> /// <param name="source">The source to copy the settings from.</param> public override void CopyFrom(BaseIncrementSettings source) { base.CopyFrom(source); if (source.GetType().IsAssignableFrom(typeof(SolutionItemIncrementSettings))) { SolutionItemIncrementSettings solutionItemSettings = (SolutionItemIncrementSettings)source; AssemblyInfoFilename = solutionItemSettings.AssemblyInfoFilename; ConfigurationName = solutionItemSettings.ConfigurationName; UseGlobalSettings = solutionItemSettings.UseGlobalSettings; } }
private void copyToGlobalSettingsToolStripMenuItem_Click(object sender, EventArgs e) { SolutionItemIncrementSettings solutionItemIncrementSettings = this.SelectedIncrementSettings as SolutionItemIncrementSettings; if (solutionItemIncrementSettings != null) { DialogResult dialogResult = MessageBox.Show(this, "Set the increment settings of \"" + solutionItemIncrementSettings.Name + "\" as global settings?", "Set as global settings", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialogResult == DialogResult.Yes) { Logger.Write("Copying from \"" + this.solutionTreeView.SelectedNode.Text + "\" to global settings", LogLevel.Debug); this._globalSettings.CopyFrom(solutionItemIncrementSettings); } } }
/// <summary> /// Initializes a new instance of the <see cref="SolutionItem"/> class. /// </summary> /// <param name="project">The project.</param> /// <param name="recursive">if set to <c>true</c> the item will fill it's <see cref="SubItems"/>.</param> private SolutionItem(Connect connect, Project project, bool recursive) { if (project == null) { throw (new ArgumentNullException("project")); } if (connect == null) { throw (new ArgumentNullException("connect")); } _incrementSetting = new SolutionItemIncrementSettings(this); _connect = connect; _item = project; _name = project.Name; _filename = project.FileName; _uniqueName = project.UniqueName; if (!string.IsNullOrEmpty(_filename) && string.IsNullOrEmpty(Path.GetExtension(_filename))) { _filename += Path.GetExtension(project.UniqueName); } if (string.IsNullOrEmpty(project.FullName)) { _itemType = SolutionItemType.Folder; if (recursive) { FillSolutionTree(connect, this, project.ProjectItems); } } else { _itemType = SolutionItemType.Project; GetGlobalVariables(); } }
private SolutionItem(Connect connect, Project project, bool recursive) { this._subItems = new List <SolutionItem>(); this._projectType = LanguageType.None; if (project == null) { throw new ArgumentNullException("project"); } if (connect == null) { throw new ArgumentNullException("connect"); } this._incrementSetting = new SolutionItemIncrementSettings(this); this._connect = connect; this._item = project; this._name = project.Name; this._filename = project.FileName; this._uniqueName = project.UniqueName; if (!string.IsNullOrEmpty(this._filename) && string.IsNullOrEmpty(Path.GetExtension(this._filename))) { this._filename += Path.GetExtension(project.UniqueName); } if (string.IsNullOrEmpty(project.FullName)) { this._itemType = SolutionItemType.Folder; if (recursive) { SolutionItem.FillSolutionTree(connect, this, project.ProjectItems); } } else { this._itemType = SolutionItemType.Project; this.GetGlobalVariables(); } }
private SolutionItem(Connect connect, Project project, bool recursive) { this._subItems = new List<SolutionItem>(); this._projectType = LanguageType.None; if (project == null) { throw new ArgumentNullException("project"); } if (connect == null) { throw new ArgumentNullException("connect"); } this._incrementSetting = new SolutionItemIncrementSettings(this); this._connect = connect; this._item = project; this._name = project.Name; this._filename = project.FileName; this._uniqueName = project.UniqueName; if (!string.IsNullOrEmpty(this._filename) && string.IsNullOrEmpty(Path.GetExtension(this._filename))) { this._filename += Path.GetExtension(project.UniqueName); } if (string.IsNullOrEmpty(project.FullName)) { this._itemType = SolutionItemType.Folder; if (recursive) { SolutionItem.FillSolutionTree(connect, this, project.ProjectItems); } } else { this._itemType = SolutionItemType.Project; this.GetGlobalVariables(); } }