Resizing thumbnail too big or too small results in an immediate program crash
This commit is contained in:
@@ -122,27 +122,16 @@ namespace EveOPreview.UI
|
||||
}
|
||||
}
|
||||
|
||||
public int ThumbnailsWidth
|
||||
public Size ThumbnailSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)this.ThumbnailsWidthNumericEdit.Value;
|
||||
return new Size((int)this.ThumbnailsWidthNumericEdit.Value, (int)this.ThumbnailsHeightNumericEdit.Value);
|
||||
}
|
||||
set
|
||||
{
|
||||
this.ThumbnailsWidthNumericEdit.Value = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int ThumbnailsHeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)this.ThumbnailsHeightNumericEdit.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.ThumbnailsHeightNumericEdit.Value = value;
|
||||
this.ThumbnailsWidthNumericEdit.Value = value.Width;
|
||||
this.ThumbnailsHeightNumericEdit.Value = value.Height;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +144,7 @@ namespace EveOPreview.UI
|
||||
set
|
||||
{
|
||||
this.EnableThumbnailZoomCheckBox.Checked = value;
|
||||
this.UpdateZoomSettingsView();
|
||||
this.RefreshZoomSettings();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,6 +226,15 @@ namespace EveOPreview.UI
|
||||
Application.Run(this._context);
|
||||
}
|
||||
|
||||
public void SetThumbnailSizeLimitations(Size minimumSize, Size maximumSize)
|
||||
{
|
||||
this.ThumbnailsWidthNumericEdit.Minimum = minimumSize.Width;
|
||||
this.ThumbnailsWidthNumericEdit.Maximum = maximumSize.Width;
|
||||
|
||||
this.ThumbnailsHeightNumericEdit.Minimum = minimumSize.Height;
|
||||
this.ThumbnailsHeightNumericEdit.Maximum = maximumSize.Height;
|
||||
}
|
||||
|
||||
public void Minimize()
|
||||
{
|
||||
this.WindowState = FormWindowState.Minimized;
|
||||
@@ -290,13 +288,7 @@ namespace EveOPreview.UI
|
||||
this.ThumbnailsList.EndUpdate();
|
||||
}
|
||||
|
||||
public void UpdateThumbnailsSizeView(Size size)
|
||||
{
|
||||
this.ThumbnailsWidth = size.Width;
|
||||
this.ThumbnailsHeight = size.Height;
|
||||
}
|
||||
|
||||
public void UpdateZoomSettingsView()
|
||||
public void RefreshZoomSettings()
|
||||
{
|
||||
bool enableControls = this.EnableThumbnailZoom;
|
||||
this.ThumbnailZoomFactorNumericEdit.Enabled = enableControls;
|
||||
|
||||
@@ -115,6 +115,12 @@ namespace EveOPreview.UI
|
||||
return (this.Id == handle) || (this.Handle == handle) || (this._overlay.Handle == handle);
|
||||
}
|
||||
|
||||
public void SetSizeLimitations(Size minimumSize, Size maximumSize)
|
||||
{
|
||||
this.MinimumSize = minimumSize;
|
||||
this.MaximumSize = maximumSize;
|
||||
}
|
||||
|
||||
public void SetOpacity(double opacity)
|
||||
{
|
||||
this.Opacity = opacity;
|
||||
|
||||
@@ -21,8 +21,7 @@ namespace EveOPreview.UI
|
||||
bool EnablePerClientThumbnailsLayouts { get; set; }
|
||||
|
||||
bool SyncThumbnailsSize { get; set; }
|
||||
int ThumbnailsWidth { get; set; }
|
||||
int ThumbnailsHeight { get; set; }
|
||||
Size ThumbnailSize { get; set; }
|
||||
|
||||
bool EnableThumbnailZoom { get; set; }
|
||||
int ThumbnailZoomFactor { get; set; }
|
||||
@@ -32,14 +31,14 @@ namespace EveOPreview.UI
|
||||
bool ShowThumbnailFrames { get; set; }
|
||||
|
||||
void SetForumUrl(string url);
|
||||
void SetThumbnailSizeLimitations(Size minimumSize, Size maximumSize);
|
||||
|
||||
void Minimize();
|
||||
|
||||
void AddThumbnails(IList<IThumbnailDescriptionView> thumbnails);
|
||||
void UpdateThumbnails(IList<IThumbnailDescriptionView> thumbnails);
|
||||
void RemoveThumbnails(IList<IThumbnailDescriptionView> thumbnails);
|
||||
void UpdateThumbnailsSizeView(Size size);
|
||||
void UpdateZoomSettingsView();
|
||||
void RefreshZoomSettings();
|
||||
|
||||
event Action ApplicationExitRequested;
|
||||
event Action FormActivated;
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace EveOPreview.UI
|
||||
|
||||
bool IsKnownHandle(IntPtr handle);
|
||||
|
||||
void SetSizeLimitations(Size minimumSize, Size maximumSize);
|
||||
void SetOpacity(double opacity);
|
||||
void SetWindowFrames(bool enable);
|
||||
void SetTopMost(bool enableTopmost);
|
||||
|
||||
Reference in New Issue
Block a user