private void editButton_Click (object sender, System.EventArgs e) { if (assembliesListView.SelectedItems.Count > 0) { AssemblySlashDocForm form = new AssemblySlashDocForm(); int nIndex = assembliesListView.SelectedItems[0].Index; form.Text = "Edit Assembly Filename and XML Documentation Filename"; form.StartPosition = FormStartPosition.CenterParent; form.AssySlashDoc=project.AssemblySlashDocs[nIndex]; if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { project.AssemblySlashDocs[nIndex]=form.AssySlashDoc; string[] subItems = new string[1]; assembliesListView.SelectedItems[0].Text = Path.GetFileName(project.AssemblySlashDocs[nIndex].Assembly.Path); subItems[0] = Path.GetFileName(project.AssemblySlashDocs[nIndex].SlashDoc.Path); } } }
private void editButton_Click (object sender, System.EventArgs e) { if ( assembliesListView.SelectedItems.Count > 0 ) { using ( AssemblySlashDocForm form = new AssemblySlashDocForm() ) { form.Text = "Edit Assembly Filename and XML Documentation Filename"; form.StartPosition = FormStartPosition.CenterParent; ListViewItem item = assembliesListView.SelectedItems[0]; form.AssySlashDoc = ((AssemblySlashDoc)item.Tag).Clone() as AssemblySlashDoc; if ( form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK ) { this.assembliesListView.BeginUpdate(); this._AssemblySlashDocs.Remove( (AssemblySlashDoc)item.Tag ); this._AssemblySlashDocs.Add( form.AssySlashDoc ); this.assembliesListView.EndUpdate(); } } this.Refresh(); } }
private void addButton_Click (object sender, System.EventArgs e) { AssemblySlashDocForm form = new AssemblySlashDocForm(); form.Text = "Add Assembly Filename and XML Documentation Filename"; form.StartPosition = FormStartPosition.CenterParent; if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { AssemblySlashDoc assemblySlashDoc = form.AssySlashDoc; if (project.AssemblySlashDocs.Contains(assemblySlashDoc.Assembly.Path)) { DialogResult result = MessageBox.Show(this,"The assembly you are trying to add already exists in this project.","Duplicate Assembly",MessageBoxButtons.OK,MessageBoxIcon.Error); } else { project.AssemblySlashDocs.Add(assemblySlashDoc); AddRowToListView(assemblySlashDoc); } EnableMenuItems(true); } EnableAssemblyItems(); }
private void addButton_Click (object sender, System.EventArgs e) { using ( AssemblySlashDocForm form = new AssemblySlashDocForm() ) { form.Text = "Add Assembly Filename and XML Documentation Filename"; form.StartPosition = FormStartPosition.CenterParent; if ( form.ShowDialog( this ) == System.Windows.Forms.DialogResult.OK ) { if ( this._AssemblySlashDocs.Contains( form.AssySlashDoc ) ) MessageBox.Show( this, "The selected assembly already exists in this project", "Duplicate Entry", MessageBoxButtons.OK, MessageBoxIcon.Asterisk ); else _AssemblySlashDocs.Add( form.AssySlashDoc ); } } }