/// <summary> /// Renders window. /// </summary> /// <param name="graphics">graphics to render to</param> /// <param name="X">X position</param> /// <param name="Y">Y position</param> protected override void Render(Graphics graphics, int x, int y) { if (this.filesToLoad.Count > 0) { IVirtualFile fileToLoad = this.filesToLoad[0]; if (true == FilterFile(fileToLoad)) { FileListItem fileListItem = new FileListItem(fileToLoad, this); this.filesListListBox.AddControl(fileListItem); this.WindowControls.Add(fileListItem); fileListItem.Clicked += this.FileItemClicked; } this.filesToLoad.Remove(fileToLoad); } this.filesListListBox.Width = this.filesScrollPanel.Bounds.Width - 20; base.Render(graphics, x, y); }
private void FileItemClicked(Control sender, EventArgs args) { FileListItem listItem = (FileListItem)sender; if (null != listItem) { IVirtualFile file = listItem.File; if (null != file) { if (FileTypes.File != file.Type) { FillList(file); this.selectedVirtualFile = null; } else { this.fileNameTextBox.Text = file.Name; this.selectedVirtualFile = file; } } } }