public ResourcePickerDialog(
			IResourceManager resourceManager, IEditorEnvironment editorEnvironment, uint type, bool fileReferencesAllowed)
		{
			this.resourceManager = resourceManager;
			this.editorEnvironment = editorEnvironment;
			this.type = type;
			this.fileReferencesAllowed = fileReferencesAllowed;
			this.InitializeComponent();

			foreach (var i in resourceManager.GetAllResourcesOfType(type))
			{
				this.list.Items.Add(i);
			}
			if (fileReferencesAllowed)
			{
				this.btnOpenFile.Visible = true;
			}
		}