Testing a Merge fix

This commit is contained in:
Eric Vasquez
2024-11-10 18:24:17 -06:00
parent 63fe0846aa
commit 1eafad0159
37 changed files with 1605 additions and 2013 deletions

View File

@@ -10,7 +10,9 @@ namespace EveOPreview.View
#region Private fields
private readonly ApplicationContext _context;
private readonly Dictionary<ViewZoomAnchor, RadioButton> _zoomAnchorMap;
private readonly Dictionary<ViewZoomAnchor, RadioButton> _overlayLabelMap;
private ViewZoomAnchor _cachedThumbnailZoomAnchor;
private ViewZoomAnchor _cachedOverlayLabelAnchor;
private bool _suppressEvents;
private Size _minimumSize;
private Size _maximumSize;
@@ -20,6 +22,7 @@ namespace EveOPreview.View
{
this._context = context;
this._zoomAnchorMap = new Dictionary<ViewZoomAnchor, RadioButton>();
this._overlayLabelMap = new Dictionary<ViewZoomAnchor, RadioButton>();
this._cachedThumbnailZoomAnchor = ViewZoomAnchor.NW;
this._suppressEvents = false;
this._minimumSize = new Size(80, 60);
@@ -30,6 +33,7 @@ namespace EveOPreview.View
this.ThumbnailsList.DisplayMember = "Title";
this.InitZoomAnchorMap();
this.InitOverlayLabelMap();
}
public bool MinimizeToTray
@@ -74,6 +78,11 @@ namespace EveOPreview.View
get => this.MinimizeInactiveClientsCheckBox.Checked;
set => this.MinimizeInactiveClientsCheckBox.Checked = value;
}
public bool MinimizeInactiveClientsAnimation
{
get => this.MinimizeInactiveClientsAnimationCheckBox.Checked;
set => this.MinimizeInactiveClientsAnimationCheckBox.Checked = value;
}
public bool ShowThumbnailsAlwaysOnTop
{
@@ -149,6 +158,36 @@ namespace EveOPreview.View
}
}
public ViewZoomAnchor OverlayLabelAnchor
{
get
{
if (this._overlayLabelMap[this._cachedOverlayLabelAnchor].Checked)
{
return this._cachedOverlayLabelAnchor;
}
foreach (KeyValuePair<ViewZoomAnchor, RadioButton> valuePair in this._overlayLabelMap)
{
if (!valuePair.Value.Checked)
{
continue;
}
this._cachedOverlayLabelAnchor = valuePair.Key;
return this._cachedOverlayLabelAnchor;
}
// Default Value
return ViewZoomAnchor.NW;
}
set
{
this._cachedOverlayLabelAnchor = value;
this._overlayLabelMap[this._cachedOverlayLabelAnchor].Checked = true;
}
}
public bool ShowThumbnailOverlays
{
get => this.ShowThumbnailOverlaysCheckBox.Checked;
@@ -160,6 +199,26 @@ namespace EveOPreview.View
get => this.ShowThumbnailFramesCheckBox.Checked;
set => this.ShowThumbnailFramesCheckBox.Checked = value;
}
public bool LockThumbnailLocation
{
get => this.LockThumbnailLocationCheckbox.Checked;
set => this.LockThumbnailLocationCheckbox.Checked = value;
}
public bool ThumbnailSnapToGrid
{
get => this.ThumbnailSnapToGridCheckBox.Checked;
set => this.ThumbnailSnapToGridCheckBox.Checked = value;
}
public int ThumbnailSnapToGridSizeX
{
get => (int)ThumbnailSnapToGridSizeXNumericEdit.Value;
set => ThumbnailSnapToGridSizeXNumericEdit.Value = value;
}
public int ThumbnailSnapToGridSizeY
{
get => (int)ThumbnailSnapToGridSizeYNumericEdit.Value;
set => ThumbnailSnapToGridSizeYNumericEdit.Value = value;
}
public bool EnableActiveClientHighlight
{
@@ -178,6 +237,26 @@ namespace EveOPreview.View
}
private Color _activeClientHighlightColor;
public Color OverlayLabelColor
{
get => this._OverlayLabelColor;
set
{
this._OverlayLabelColor = value;
this.OverlayLabelColorButton.BackColor = value;
}
}
private Color _OverlayLabelColor;
public int OverlayLabelSize
{
get => (int)this.OverlayLabelSizeNumericEdit.Value;
set
{
this.OverlayLabelSizeNumericEdit.Value = value;
}
}
public new void Show()
{
// Registers the current instance as the application's Main Form
@@ -329,6 +408,22 @@ namespace EveOPreview.View
this.OptionChanged_Handler(sender, e);
}
private void OverlayLabelColorButton_Click(object sender, EventArgs e)
{
using (ColorDialog dialog = new ColorDialog())
{
dialog.Color = this.OverlayLabelColor;
if (dialog.ShowDialog() != DialogResult.OK)
{
return;
}
this.OverlayLabelColor = dialog.Color;
}
this.OptionChanged_Handler(sender, e);
}
private void ThumbnailsList_ItemCheck_Handler(object sender, ItemCheckEventArgs e)
{
if (!(this.ThumbnailsList.Items[e.Index] is IThumbnailDescription selectedItem))
@@ -391,5 +486,17 @@ namespace EveOPreview.View
this._zoomAnchorMap[ViewZoomAnchor.S] = this.ZoomAanchorSRadioButton;
this._zoomAnchorMap[ViewZoomAnchor.SE] = this.ZoomAanchorSERadioButton;
}
private void InitOverlayLabelMap()
{
this._overlayLabelMap[ViewZoomAnchor.NW] = this.OverlayLabelNWRadioButton;
this._overlayLabelMap[ViewZoomAnchor.N] = this.OverlayLabelNRadioButton;
this._overlayLabelMap[ViewZoomAnchor.NE] = this.OverlayLabelNERadioButton;
this._overlayLabelMap[ViewZoomAnchor.W] = this.OverlayLabelWRadioButton;
this._overlayLabelMap[ViewZoomAnchor.C] = this.OverlayLabelCRadioButton;
this._overlayLabelMap[ViewZoomAnchor.E] = this.OverlayLabelERadioButton;
this._overlayLabelMap[ViewZoomAnchor.SW] = this.OverlayLabelSWRadioButton;
this._overlayLabelMap[ViewZoomAnchor.S] = this.OverlayLabelSRadioButton;
this._overlayLabelMap[ViewZoomAnchor.SE] = this.OverlayLabelSERadioButton;
}
}
}