public void Decrease() { if (SelectedSize == ExplorerThumbSize.ExtraSmall) { return; } DeselectAll(); switch (SelectedSize) { case ExplorerThumbSize.Small: SelectedSize = ExplorerThumbSize.ExtraSmall; break; case ExplorerThumbSize.Medium: SelectedSize = ExplorerThumbSize.Small; break; case ExplorerThumbSize.Large: SelectedSize = ExplorerThumbSize.Medium; break; case ExplorerThumbSize.ExtraLarge: SelectedSize = ExplorerThumbSize.Large; break; } buttons[SelectedSize].BackColor = selectedColor; if (SelectionChanged != null) { SelectionChanged(this, EventArgs.Empty); } }
public void ReadXML(XmlReader reader) { reader.ReadStartElement(); while (reader.NodeType == XmlNodeType.Element) { switch (reader.Name) { case "MaxRecentFiles": maxRecentFiles = reader.ReadElementContentAsInt(); break; case "RecentFiles": ParseRecentFiles(reader, recentFiles, "RecentFile"); break; case "MaxRecentCapturedFiles": maxRecentCapturedFiles = reader.ReadElementContentAsInt(); break; case "RecentCapturedFiles": ParseRecentFiles(reader, recentCapturedFiles, "RecentCapturedFile"); break; case "Shortcuts": ParseShortcuts(reader); break; case "ThumbnailSize": explorerThumbsSize = (ExplorerThumbSize)Enum.Parse(typeof(ExplorerThumbSize), reader.ReadElementContentAsString()); break; case "ExplorerFilesSplitterDistance": explorerFilesSplitterDistance = reader.ReadElementContentAsInt(); break; case "ShortcutsFilesSplitterDistance": shortcutsFilesSplitterDistance = reader.ReadElementContentAsInt(); break; case "ActiveTab": activeTab = (ActiveFileBrowserTab)Enum.Parse(typeof(ActiveFileBrowserTab), reader.ReadElementContentAsString()); break; case "FilePropertyVisibility": filePropertyVisibility = FilePropertyVisibility.FromXML(reader); break; case "LastReplayFolder": lastReplayFolder = reader.ReadElementContentAsString(); break; default: reader.ReadOuterXml(); break; } } reader.ReadEndElement(); }
public void UpdateThumbnailsSize(ExplorerThumbSize newSize) { this.columns = (int)newSize; if (thumbnailControls.Count > 0) { DoLayout(); } }
public void UpdateThumbnailsSize(ExplorerThumbSize newSize) { this.columns = (int)newSize; if (thumbnails.Count == 0) { return; } PopulateViewer(); }
private void buttons_Click(object sender, EventArgs e) { Button btn = sender as Button; if (btn == null || SelectionChanged == null) { return; } foreach (ExplorerThumbSize ets in buttons.Keys) { if (buttons[ets] != btn) { continue; } ForceSelect(ets); SelectedSize = ets; SelectionChanged(this, EventArgs.Empty); } }
private void InitializeViewers() { ExplorerThumbSize newSize = PreferencesManager.FileExplorerPreferences.ExplorerThumbsSize; sizeSelector.ForceSelect(newSize); viewerFiles.UpdateThumbnailsSize(newSize); viewerFiles.FileLoadAsked += Viewer_FileLoadAsked; viewerFiles.BeforeLoad += Viewer_BeforeLoad; viewerFiles.ProgressChanged += Viewer_ProgressChanged; viewerFiles.AfterLoad += Viewer_AfterLoad; viewerShortcuts.UpdateThumbnailsSize(newSize); viewerShortcuts.FileLoadAsked += Viewer_FileLoadAsked; viewerShortcuts.BeforeLoad += Viewer_BeforeLoad; viewerShortcuts.ProgressChanged += Viewer_ProgressChanged; viewerShortcuts.AfterLoad += Viewer_AfterLoad; viewerCameras.UpdateThumbnailsSize(newSize); viewerCameras.BeforeLoad += Viewer_BeforeLoad; viewerCameras.ProgressChanged += Viewer_ProgressChanged; viewerCameras.AfterLoad += Viewer_AfterLoad; }
public void ForceSelect(ExplorerThumbSize newSize) { DeselectAll(); SelectedSize = newSize; buttons[newSize].BackColor = selectedColor; }
public SizeSelector() { InitializeComponent(); InitButtons(); SelectedSize = ExplorerThumbSize.Large; }