System.Collections.Generic.List.Remove(Workspace)

Here are the examples of the csharp api System.Collections.Generic.List.Remove(Workspace) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 Source : WorkspaceDialog.cs
with MIT License
from MattFiler

private void editButton_Click(object sender, EventArgs e)
		{
			EditWorkspaceDialog dialog= new EditWorkspaceDialog();
			dialog.EditWorkspace( (Workspace) comboBox.SelectedItem );
			dialog.ShowDialog();

			// check if we have a valid result
			if(dialog.Workspace !=null)
			{
				// remove the old workspace
				_workspaces.Remove( (Workspace) comboBox.SelectedItem );
				comboBox.Items.Remove(comboBox.SelectedItem);

				// add the nedited workspace
				_workspaces.Add(dialog.Workspace);
				comboBox.Items.Add(dialog.Workspace);

				// select the edited workspace
				comboBox.SelectedItem= dialog.Workspace;

				_needsToSaveFile= true;
			}
		}

19 Source : WorkspaceDialog.cs
with MIT License
from MattFiler

private void removeButton_Click(object sender, EventArgs e)
		{
			if(comboBox.SelectedItem !=null)
			{
				// remove the selected workspace
				_workspaces.Remove( (Workspace) comboBox.SelectedItem );
				comboBox.Items.Remove(comboBox.SelectedItem);

				// check if we have any workspaces to edit
				editButton.Enabled= comboBox.SelectedItem !=null;
				removeButton.Enabled= comboBox.SelectedItem !=null;

				_needsToSaveFile= true;
			}
		}