Merge branch 'develop'
This commit is contained in:
@@ -21,7 +21,6 @@ namespace EveOPreview.Configuration
|
|||||||
this.HideThumbnailsOnLostFocus = false;
|
this.HideThumbnailsOnLostFocus = false;
|
||||||
this.EnablePerClientThumbnailLayouts = false;
|
this.EnablePerClientThumbnailLayouts = false;
|
||||||
|
|
||||||
this.SyncThumbnailsSize = true;
|
|
||||||
this.ThumbnailSize = new Size(250, 150);
|
this.ThumbnailSize = new Size(250, 150);
|
||||||
this.ThumbnailMinimumSize = new Size(100, 80);
|
this.ThumbnailMinimumSize = new Size(100, 80);
|
||||||
this.ThumbnailMaximumSize = new Size(640, 400);
|
this.ThumbnailMaximumSize = new Size(640, 400);
|
||||||
@@ -50,7 +49,6 @@ namespace EveOPreview.Configuration
|
|||||||
public bool HideThumbnailsOnLostFocus { get; set; }
|
public bool HideThumbnailsOnLostFocus { get; set; }
|
||||||
public bool EnablePerClientThumbnailLayouts { get; set; }
|
public bool EnablePerClientThumbnailLayouts { get; set; }
|
||||||
|
|
||||||
public bool SyncThumbnailsSize { get; set; }
|
|
||||||
public Size ThumbnailSize { get; set; }
|
public Size ThumbnailSize { get; set; }
|
||||||
public Size ThumbnailMaximumSize { get; set; }
|
public Size ThumbnailMaximumSize { get; set; }
|
||||||
public Size ThumbnailMinimumSize { get; set; }
|
public Size ThumbnailMinimumSize { get; set; }
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ namespace EveOPreview.Configuration
|
|||||||
bool HideThumbnailsOnLostFocus { get; set; }
|
bool HideThumbnailsOnLostFocus { get; set; }
|
||||||
bool EnablePerClientThumbnailLayouts { get; set; }
|
bool EnablePerClientThumbnailLayouts { get; set; }
|
||||||
|
|
||||||
bool SyncThumbnailsSize { get; set; }
|
|
||||||
Size ThumbnailSize { get; set; }
|
Size ThumbnailSize { get; set; }
|
||||||
Size ThumbnailMinimumSize { get; set; }
|
Size ThumbnailMinimumSize { get; set; }
|
||||||
Size ThumbnailMaximumSize { get; set; }
|
Size ThumbnailMaximumSize { get; set; }
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace EveOPreview.UI
|
|||||||
public class MainPresenter : Presenter<IMainView>
|
public class MainPresenter : Presenter<IMainView>
|
||||||
{
|
{
|
||||||
#region Private constants
|
#region Private constants
|
||||||
private const string ForumUrl = @"https://forums.eveonline.com/default.aspx?g=posts&t=389086";
|
private const string ForumUrl = @"https://forums.eveonline.com/default.aspx?g=posts&t=484927";
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Private fields
|
#region Private fields
|
||||||
@@ -106,7 +106,7 @@ namespace EveOPreview.UI
|
|||||||
this.View.HideThumbnailsOnLostFocus = this._configuration.HideThumbnailsOnLostFocus;
|
this.View.HideThumbnailsOnLostFocus = this._configuration.HideThumbnailsOnLostFocus;
|
||||||
this.View.EnablePerClientThumbnailsLayouts = this._configuration.EnablePerClientThumbnailLayouts;
|
this.View.EnablePerClientThumbnailsLayouts = this._configuration.EnablePerClientThumbnailLayouts;
|
||||||
|
|
||||||
this.View.SyncThumbnailsSize = this._configuration.SyncThumbnailsSize;
|
this.View.SetThumbnailSizeLimitations(this._configuration.ThumbnailMinimumSize, this._configuration.ThumbnailMaximumSize);
|
||||||
this.View.ThumbnailSize = this._configuration.ThumbnailSize;
|
this.View.ThumbnailSize = this._configuration.ThumbnailSize;
|
||||||
|
|
||||||
this.View.EnableThumbnailZoom = this._configuration.EnableThumbnailZoom;
|
this.View.EnableThumbnailZoom = this._configuration.EnableThumbnailZoom;
|
||||||
@@ -115,8 +115,6 @@ namespace EveOPreview.UI
|
|||||||
|
|
||||||
this.View.ShowThumbnailOverlays = this._configuration.ShowThumbnailOverlays;
|
this.View.ShowThumbnailOverlays = this._configuration.ShowThumbnailOverlays;
|
||||||
this.View.ShowThumbnailFrames = this._configuration.ShowThumbnailFrames;
|
this.View.ShowThumbnailFrames = this._configuration.ShowThumbnailFrames;
|
||||||
|
|
||||||
this.View.SetThumbnailSizeLimitations(this._configuration.ThumbnailMinimumSize, this._configuration.ThumbnailMaximumSize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveApplicationSettings()
|
private void SaveApplicationSettings()
|
||||||
@@ -131,7 +129,6 @@ namespace EveOPreview.UI
|
|||||||
this._configuration.HideThumbnailsOnLostFocus = this.View.HideThumbnailsOnLostFocus;
|
this._configuration.HideThumbnailsOnLostFocus = this.View.HideThumbnailsOnLostFocus;
|
||||||
this._configuration.EnablePerClientThumbnailLayouts = this.View.EnablePerClientThumbnailsLayouts;
|
this._configuration.EnablePerClientThumbnailLayouts = this.View.EnablePerClientThumbnailsLayouts;
|
||||||
|
|
||||||
this._configuration.SyncThumbnailsSize = this.View.SyncThumbnailsSize;
|
|
||||||
this._configuration.ThumbnailSize = this.View.ThumbnailSize;
|
this._configuration.ThumbnailSize = this.View.ThumbnailSize;
|
||||||
|
|
||||||
this._configuration.EnableThumbnailZoom = this.View.EnableThumbnailZoom;
|
this._configuration.EnableThumbnailZoom = this.View.EnableThumbnailZoom;
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ namespace EveOPreview.UI
|
|||||||
|
|
||||||
foreach (KeyValuePair<IntPtr, IThumbnailView> entry in this._thumbnailViews)
|
foreach (KeyValuePair<IntPtr, IThumbnailView> entry in this._thumbnailViews)
|
||||||
{
|
{
|
||||||
entry.Value.Size = size;
|
entry.Value.ThumbnailSize = size;
|
||||||
entry.Value.Refresh(false);
|
entry.Value.Refresh(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ namespace EveOPreview.UI
|
|||||||
if (!this._isHoverEffectActive)
|
if (!this._isHoverEffectActive)
|
||||||
{
|
{
|
||||||
// No need to move Thumbnails while one of them is highlighted
|
// No need to move Thumbnails while one of them is highlighted
|
||||||
view.Location = this._configuration.GetThumbnailLocation(view.Title, this._activeClientTitle, view.Location);
|
view.ThumbnailLocation = this._configuration.GetThumbnailLocation(view.Title, this._activeClientTitle, view.ThumbnailLocation);
|
||||||
view.SetOpacity(this._configuration.ThumbnailsOpacity);
|
view.SetOpacity(this._configuration.ThumbnailsOpacity);
|
||||||
view.SetTopMost(this._configuration.ShowThumbnailsAlwaysOnTop);
|
view.SetTopMost(this._configuration.ShowThumbnailsAlwaysOnTop);
|
||||||
}
|
}
|
||||||
@@ -152,7 +152,7 @@ namespace EveOPreview.UI
|
|||||||
|
|
||||||
foreach (KeyValuePair<IntPtr, IThumbnailView> entry in this._thumbnailViews)
|
foreach (KeyValuePair<IntPtr, IThumbnailView> entry in this._thumbnailViews)
|
||||||
{
|
{
|
||||||
entry.Value.SetWindowFrames(this._configuration.ShowThumbnailFrames);
|
entry.Value.SetFrames(this._configuration.ShowThumbnailFrames);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.EnableViewEvents();
|
this.EnableViewEvents();
|
||||||
@@ -206,8 +206,8 @@ namespace EveOPreview.UI
|
|||||||
view.IsOverlayEnabled = this._configuration.ShowThumbnailOverlays;
|
view.IsOverlayEnabled = this._configuration.ShowThumbnailOverlays;
|
||||||
view.SetSizeLimitations(this._configuration.ThumbnailMinimumSize, this._configuration.ThumbnailMaximumSize);
|
view.SetSizeLimitations(this._configuration.ThumbnailMinimumSize, this._configuration.ThumbnailMaximumSize);
|
||||||
view.SetTopMost(this._configuration.ShowThumbnailsAlwaysOnTop);
|
view.SetTopMost(this._configuration.ShowThumbnailsAlwaysOnTop);
|
||||||
view.SetWindowFrames(this._configuration.ShowThumbnailFrames);
|
view.SetFrames(this._configuration.ShowThumbnailFrames);
|
||||||
view.Location = this._configuration.GetThumbnailLocation(processTitle, this._activeClientTitle, view.Location);
|
view.ThumbnailLocation = this._configuration.GetThumbnailLocation(processTitle, this._activeClientTitle, view.ThumbnailLocation);
|
||||||
|
|
||||||
view.ThumbnailResized = this.ThumbnailViewResized;
|
view.ThumbnailResized = this.ThumbnailViewResized;
|
||||||
view.ThumbnailMoved = this.ThumbnailViewMoved;
|
view.ThumbnailMoved = this.ThumbnailViewMoved;
|
||||||
@@ -349,7 +349,7 @@ namespace EveOPreview.UI
|
|||||||
|
|
||||||
IThumbnailView view = this._thumbnailViews[id];
|
IThumbnailView view = this._thumbnailViews[id];
|
||||||
|
|
||||||
this.SetThumbnailsSize(view.Size);
|
this.SetThumbnailsSize(view.ThumbnailSize);
|
||||||
|
|
||||||
view.Refresh(false);
|
view.Refresh(false);
|
||||||
}
|
}
|
||||||
@@ -363,7 +363,7 @@ namespace EveOPreview.UI
|
|||||||
|
|
||||||
IThumbnailView view = this._thumbnailViews[id];
|
IThumbnailView view = this._thumbnailViews[id];
|
||||||
|
|
||||||
this._configuration.SetThumbnailLocation(view.Title, this._activeClientTitle, view.Location);
|
this._configuration.SetThumbnailLocation(view.Title, this._activeClientTitle, view.ThumbnailLocation);
|
||||||
|
|
||||||
view.Refresh(false);
|
view.Refresh(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace EveOPreview.UI
|
|||||||
|
|
||||||
view.Id = id;
|
view.Id = id;
|
||||||
view.Title = title;
|
view.Title = title;
|
||||||
view.Size = size;
|
view.ThumbnailSize = size;
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|||||||
159
Eve-O-Preview/UI/Implementation/MainForm.Designer.cs
generated
159
Eve-O-Preview/UI/Implementation/MainForm.Designer.cs
generated
@@ -37,6 +37,8 @@ namespace EveOPreview.UI
|
|||||||
System.Windows.Forms.FlowLayoutPanel ContentFlowLayoutPanel;
|
System.Windows.Forms.FlowLayoutPanel ContentFlowLayoutPanel;
|
||||||
System.Windows.Forms.Panel OpacityPanel;
|
System.Windows.Forms.Panel OpacityPanel;
|
||||||
System.Windows.Forms.Panel ResizeOptionsPanel;
|
System.Windows.Forms.Panel ResizeOptionsPanel;
|
||||||
|
System.Windows.Forms.Label HeigthLabel;
|
||||||
|
System.Windows.Forms.Label WidthLabel;
|
||||||
System.Windows.Forms.Panel ZoomOptionsPanel;
|
System.Windows.Forms.Panel ZoomOptionsPanel;
|
||||||
System.Windows.Forms.Label ZoomFactorLabel;
|
System.Windows.Forms.Label ZoomFactorLabel;
|
||||||
System.Windows.Forms.Label ZoomAnchorLabel;
|
System.Windows.Forms.Label ZoomAnchorLabel;
|
||||||
@@ -52,7 +54,6 @@ namespace EveOPreview.UI
|
|||||||
this.ShowThumbnailsAlwaysOnTopCheckBox = new System.Windows.Forms.CheckBox();
|
this.ShowThumbnailsAlwaysOnTopCheckBox = new System.Windows.Forms.CheckBox();
|
||||||
this.HideThumbnailsOnLostFocusCheckBox = new System.Windows.Forms.CheckBox();
|
this.HideThumbnailsOnLostFocusCheckBox = new System.Windows.Forms.CheckBox();
|
||||||
this.EnablePerClientThumbnailsLayoutsCheckBox = new System.Windows.Forms.CheckBox();
|
this.EnablePerClientThumbnailsLayoutsCheckBox = new System.Windows.Forms.CheckBox();
|
||||||
this.SyncThumbnailsSizeCheckBox = new System.Windows.Forms.CheckBox();
|
|
||||||
this.ThumbnailsWidthNumericEdit = new System.Windows.Forms.NumericUpDown();
|
this.ThumbnailsWidthNumericEdit = new System.Windows.Forms.NumericUpDown();
|
||||||
this.ThumbnailsHeightNumericEdit = new System.Windows.Forms.NumericUpDown();
|
this.ThumbnailsHeightNumericEdit = new System.Windows.Forms.NumericUpDown();
|
||||||
this.ZoomAnchorPanel = new System.Windows.Forms.Panel();
|
this.ZoomAnchorPanel = new System.Windows.Forms.Panel();
|
||||||
@@ -79,6 +80,8 @@ namespace EveOPreview.UI
|
|||||||
ContentFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
|
ContentFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
OpacityPanel = new System.Windows.Forms.Panel();
|
OpacityPanel = new System.Windows.Forms.Panel();
|
||||||
ResizeOptionsPanel = new System.Windows.Forms.Panel();
|
ResizeOptionsPanel = new System.Windows.Forms.Panel();
|
||||||
|
HeigthLabel = new System.Windows.Forms.Label();
|
||||||
|
WidthLabel = new System.Windows.Forms.Label();
|
||||||
ZoomOptionsPanel = new System.Windows.Forms.Panel();
|
ZoomOptionsPanel = new System.Windows.Forms.Panel();
|
||||||
ZoomFactorLabel = new System.Windows.Forms.Label();
|
ZoomFactorLabel = new System.Windows.Forms.Label();
|
||||||
ZoomAnchorLabel = new System.Windows.Forms.Label();
|
ZoomAnchorLabel = new System.Windows.Forms.Label();
|
||||||
@@ -140,7 +143,7 @@ namespace EveOPreview.UI
|
|||||||
ContentFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
ContentFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
ContentFlowLayoutPanel.Location = new System.Drawing.Point(0, 0);
|
ContentFlowLayoutPanel.Location = new System.Drawing.Point(0, 0);
|
||||||
ContentFlowLayoutPanel.Name = "ContentFlowLayoutPanel";
|
ContentFlowLayoutPanel.Name = "ContentFlowLayoutPanel";
|
||||||
ContentFlowLayoutPanel.Size = new System.Drawing.Size(252, 487);
|
ContentFlowLayoutPanel.Size = new System.Drawing.Size(252, 481);
|
||||||
ContentFlowLayoutPanel.TabIndex = 25;
|
ContentFlowLayoutPanel.TabIndex = 25;
|
||||||
//
|
//
|
||||||
// MinimizeToTrayCheckBox
|
// MinimizeToTrayCheckBox
|
||||||
@@ -240,88 +243,83 @@ namespace EveOPreview.UI
|
|||||||
// ResizeOptionsPanel
|
// ResizeOptionsPanel
|
||||||
//
|
//
|
||||||
ResizeOptionsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
ResizeOptionsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
ResizeOptionsPanel.Controls.Add(this.SyncThumbnailsSizeCheckBox);
|
ResizeOptionsPanel.Controls.Add(HeigthLabel);
|
||||||
|
ResizeOptionsPanel.Controls.Add(WidthLabel);
|
||||||
ResizeOptionsPanel.Controls.Add(this.ThumbnailsWidthNumericEdit);
|
ResizeOptionsPanel.Controls.Add(this.ThumbnailsWidthNumericEdit);
|
||||||
ResizeOptionsPanel.Controls.Add(this.ThumbnailsHeightNumericEdit);
|
ResizeOptionsPanel.Controls.Add(this.ThumbnailsHeightNumericEdit);
|
||||||
ResizeOptionsPanel.Location = new System.Drawing.Point(3, 173);
|
ResizeOptionsPanel.Location = new System.Drawing.Point(3, 173);
|
||||||
ResizeOptionsPanel.Name = "ResizeOptionsPanel";
|
ResizeOptionsPanel.Name = "ResizeOptionsPanel";
|
||||||
ResizeOptionsPanel.Size = new System.Drawing.Size(246, 30);
|
ResizeOptionsPanel.Size = new System.Drawing.Size(246, 28);
|
||||||
ResizeOptionsPanel.TabIndex = 26;
|
ResizeOptionsPanel.TabIndex = 26;
|
||||||
//
|
//
|
||||||
// SyncThumbnailsSizeCheckBox
|
// HeigthLabel
|
||||||
//
|
//
|
||||||
this.SyncThumbnailsSizeCheckBox.AutoSize = true;
|
HeigthLabel.AutoSize = true;
|
||||||
this.SyncThumbnailsSizeCheckBox.Checked = true;
|
HeigthLabel.Location = new System.Drawing.Point(152, 5);
|
||||||
this.SyncThumbnailsSizeCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
|
HeigthLabel.Name = "HeigthLabel";
|
||||||
this.SyncThumbnailsSizeCheckBox.Location = new System.Drawing.Point(1, 3);
|
HeigthLabel.Size = new System.Drawing.Size(38, 13);
|
||||||
this.SyncThumbnailsSizeCheckBox.Name = "SyncThumbnailsSizeCheckBox";
|
HeigthLabel.TabIndex = 14;
|
||||||
this.SyncThumbnailsSizeCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
HeigthLabel.Text = "Heigth";
|
||||||
this.SyncThumbnailsSizeCheckBox.Size = new System.Drawing.Size(108, 17);
|
//
|
||||||
this.SyncThumbnailsSizeCheckBox.TabIndex = 4;
|
// WidthLabel
|
||||||
this.SyncThumbnailsSizeCheckBox.Text = "Syncronize resize";
|
//
|
||||||
this.SyncThumbnailsSizeCheckBox.UseVisualStyleBackColor = true;
|
WidthLabel.AutoSize = true;
|
||||||
this.SyncThumbnailsSizeCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
|
WidthLabel.Location = new System.Drawing.Point(2, 5);
|
||||||
|
WidthLabel.Name = "WidthLabel";
|
||||||
|
WidthLabel.Size = new System.Drawing.Size(87, 13);
|
||||||
|
WidthLabel.TabIndex = 13;
|
||||||
|
WidthLabel.Text = "Thumbnail Width";
|
||||||
//
|
//
|
||||||
// ThumbnailsWidthNumericEdit
|
// ThumbnailsWidthNumericEdit
|
||||||
//
|
//
|
||||||
this.ThumbnailsWidthNumericEdit.BackColor = System.Drawing.SystemColors.Window;
|
this.ThumbnailsWidthNumericEdit.BackColor = System.Drawing.SystemColors.Window;
|
||||||
this.ThumbnailsWidthNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
this.ThumbnailsWidthNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.ThumbnailsWidthNumericEdit.CausesValidation = false;
|
||||||
this.ThumbnailsWidthNumericEdit.Increment = new decimal(new int[] {
|
this.ThumbnailsWidthNumericEdit.Increment = new decimal(new int[] {
|
||||||
10,
|
10,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.ThumbnailsWidthNumericEdit.Location = new System.Drawing.Point(137, 3);
|
this.ThumbnailsWidthNumericEdit.Location = new System.Drawing.Point(95, 3);
|
||||||
this.ThumbnailsWidthNumericEdit.Maximum = new decimal(new int[] {
|
this.ThumbnailsWidthNumericEdit.Maximum = new decimal(new int[] {
|
||||||
640,
|
999999,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.ThumbnailsWidthNumericEdit.Minimum = new decimal(new int[] {
|
|
||||||
80,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0});
|
|
||||||
this.ThumbnailsWidthNumericEdit.Name = "ThumbnailsWidthNumericEdit";
|
this.ThumbnailsWidthNumericEdit.Name = "ThumbnailsWidthNumericEdit";
|
||||||
this.ThumbnailsWidthNumericEdit.Size = new System.Drawing.Size(48, 20);
|
this.ThumbnailsWidthNumericEdit.Size = new System.Drawing.Size(48, 20);
|
||||||
this.ThumbnailsWidthNumericEdit.TabIndex = 11;
|
this.ThumbnailsWidthNumericEdit.TabIndex = 11;
|
||||||
this.ThumbnailsWidthNumericEdit.Value = new decimal(new int[] {
|
this.ThumbnailsWidthNumericEdit.Value = new decimal(new int[] {
|
||||||
100,
|
100,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.ThumbnailsWidthNumericEdit.TextChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler);
|
|
||||||
this.ThumbnailsWidthNumericEdit.ValueChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler);
|
this.ThumbnailsWidthNumericEdit.ValueChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler);
|
||||||
//
|
//
|
||||||
// ThumbnailsHeightNumericEdit
|
// ThumbnailsHeightNumericEdit
|
||||||
//
|
//
|
||||||
this.ThumbnailsHeightNumericEdit.BackColor = System.Drawing.SystemColors.Window;
|
this.ThumbnailsHeightNumericEdit.BackColor = System.Drawing.SystemColors.Window;
|
||||||
this.ThumbnailsHeightNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
this.ThumbnailsHeightNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.ThumbnailsHeightNumericEdit.CausesValidation = false;
|
||||||
this.ThumbnailsHeightNumericEdit.Increment = new decimal(new int[] {
|
this.ThumbnailsHeightNumericEdit.Increment = new decimal(new int[] {
|
||||||
10,
|
10,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.ThumbnailsHeightNumericEdit.Location = new System.Drawing.Point(196, 3);
|
this.ThumbnailsHeightNumericEdit.Location = new System.Drawing.Point(196, 3);
|
||||||
this.ThumbnailsHeightNumericEdit.Maximum = new decimal(new int[] {
|
this.ThumbnailsHeightNumericEdit.Maximum = new decimal(new int[] {
|
||||||
480,
|
99999999,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.ThumbnailsHeightNumericEdit.Minimum = new decimal(new int[] {
|
|
||||||
60,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0});
|
|
||||||
this.ThumbnailsHeightNumericEdit.Name = "ThumbnailsHeightNumericEdit";
|
this.ThumbnailsHeightNumericEdit.Name = "ThumbnailsHeightNumericEdit";
|
||||||
this.ThumbnailsHeightNumericEdit.Size = new System.Drawing.Size(42, 20);
|
this.ThumbnailsHeightNumericEdit.Size = new System.Drawing.Size(42, 20);
|
||||||
this.ThumbnailsHeightNumericEdit.TabIndex = 12;
|
this.ThumbnailsHeightNumericEdit.TabIndex = 12;
|
||||||
this.ThumbnailsHeightNumericEdit.Value = new decimal(new int[] {
|
this.ThumbnailsHeightNumericEdit.Value = new decimal(new int[] {
|
||||||
70,
|
70,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.ThumbnailsHeightNumericEdit.TextChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler);
|
|
||||||
this.ThumbnailsHeightNumericEdit.ValueChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler);
|
this.ThumbnailsHeightNumericEdit.ValueChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler);
|
||||||
//
|
//
|
||||||
// ZoomOptionsPanel
|
// ZoomOptionsPanel
|
||||||
@@ -333,7 +331,7 @@ namespace EveOPreview.UI
|
|||||||
ZoomOptionsPanel.Controls.Add(ZoomAnchorLabel);
|
ZoomOptionsPanel.Controls.Add(ZoomAnchorLabel);
|
||||||
ZoomOptionsPanel.Controls.Add(this.EnableThumbnailZoomCheckBox);
|
ZoomOptionsPanel.Controls.Add(this.EnableThumbnailZoomCheckBox);
|
||||||
ZoomOptionsPanel.Controls.Add(this.ThumbnailZoomFactorNumericEdit);
|
ZoomOptionsPanel.Controls.Add(this.ThumbnailZoomFactorNumericEdit);
|
||||||
ZoomOptionsPanel.Location = new System.Drawing.Point(3, 209);
|
ZoomOptionsPanel.Location = new System.Drawing.Point(3, 207);
|
||||||
ZoomOptionsPanel.Name = "ZoomOptionsPanel";
|
ZoomOptionsPanel.Name = "ZoomOptionsPanel";
|
||||||
ZoomOptionsPanel.Size = new System.Drawing.Size(246, 82);
|
ZoomOptionsPanel.Size = new System.Drawing.Size(246, 82);
|
||||||
ZoomOptionsPanel.TabIndex = 27;
|
ZoomOptionsPanel.TabIndex = 27;
|
||||||
@@ -341,11 +339,11 @@ namespace EveOPreview.UI
|
|||||||
// ZoomFactorLabel
|
// ZoomFactorLabel
|
||||||
//
|
//
|
||||||
ZoomFactorLabel.AutoSize = true;
|
ZoomFactorLabel.AutoSize = true;
|
||||||
ZoomFactorLabel.Location = new System.Drawing.Point(49, 43);
|
ZoomFactorLabel.Location = new System.Drawing.Point(8, 43);
|
||||||
ZoomFactorLabel.Name = "ZoomFactorLabel";
|
ZoomFactorLabel.Name = "ZoomFactorLabel";
|
||||||
ZoomFactorLabel.Size = new System.Drawing.Size(37, 13);
|
ZoomFactorLabel.Size = new System.Drawing.Size(67, 13);
|
||||||
ZoomFactorLabel.TabIndex = 29;
|
ZoomFactorLabel.TabIndex = 29;
|
||||||
ZoomFactorLabel.Text = "Factor";
|
ZoomFactorLabel.Text = "Zoom Factor";
|
||||||
//
|
//
|
||||||
// ZoomAnchorPanel
|
// ZoomAnchorPanel
|
||||||
//
|
//
|
||||||
@@ -489,25 +487,25 @@ namespace EveOPreview.UI
|
|||||||
//
|
//
|
||||||
this.ThumbnailZoomFactorNumericEdit.BackColor = System.Drawing.SystemColors.Window;
|
this.ThumbnailZoomFactorNumericEdit.BackColor = System.Drawing.SystemColors.Window;
|
||||||
this.ThumbnailZoomFactorNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
this.ThumbnailZoomFactorNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
this.ThumbnailZoomFactorNumericEdit.Location = new System.Drawing.Point(9, 40);
|
this.ThumbnailZoomFactorNumericEdit.Location = new System.Drawing.Point(81, 41);
|
||||||
this.ThumbnailZoomFactorNumericEdit.Maximum = new decimal(new int[] {
|
this.ThumbnailZoomFactorNumericEdit.Maximum = new decimal(new int[] {
|
||||||
10,
|
10,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.ThumbnailZoomFactorNumericEdit.Minimum = new decimal(new int[] {
|
this.ThumbnailZoomFactorNumericEdit.Minimum = new decimal(new int[] {
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.ThumbnailZoomFactorNumericEdit.Name = "ThumbnailZoomFactorNumericEdit";
|
this.ThumbnailZoomFactorNumericEdit.Name = "ThumbnailZoomFactorNumericEdit";
|
||||||
this.ThumbnailZoomFactorNumericEdit.Size = new System.Drawing.Size(34, 20);
|
this.ThumbnailZoomFactorNumericEdit.Size = new System.Drawing.Size(34, 20);
|
||||||
this.ThumbnailZoomFactorNumericEdit.TabIndex = 24;
|
this.ThumbnailZoomFactorNumericEdit.TabIndex = 24;
|
||||||
this.ThumbnailZoomFactorNumericEdit.Value = new decimal(new int[] {
|
this.ThumbnailZoomFactorNumericEdit.Value = new decimal(new int[] {
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.ThumbnailZoomFactorNumericEdit.ValueChanged += new System.EventHandler(this.OptionChanged_Handler);
|
this.ThumbnailZoomFactorNumericEdit.ValueChanged += new System.EventHandler(this.OptionChanged_Handler);
|
||||||
//
|
//
|
||||||
// ShowThumbnailOverlaysCheckBox
|
// ShowThumbnailOverlaysCheckBox
|
||||||
@@ -515,7 +513,7 @@ namespace EveOPreview.UI
|
|||||||
this.ShowThumbnailOverlaysCheckBox.AutoSize = true;
|
this.ShowThumbnailOverlaysCheckBox.AutoSize = true;
|
||||||
this.ShowThumbnailOverlaysCheckBox.Checked = true;
|
this.ShowThumbnailOverlaysCheckBox.Checked = true;
|
||||||
this.ShowThumbnailOverlaysCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.ShowThumbnailOverlaysCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.ShowThumbnailOverlaysCheckBox.Location = new System.Drawing.Point(3, 297);
|
this.ShowThumbnailOverlaysCheckBox.Location = new System.Drawing.Point(3, 295);
|
||||||
this.ShowThumbnailOverlaysCheckBox.Name = "ShowThumbnailOverlaysCheckBox";
|
this.ShowThumbnailOverlaysCheckBox.Name = "ShowThumbnailOverlaysCheckBox";
|
||||||
this.ShowThumbnailOverlaysCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
this.ShowThumbnailOverlaysCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||||
this.ShowThumbnailOverlaysCheckBox.Size = new System.Drawing.Size(90, 17);
|
this.ShowThumbnailOverlaysCheckBox.Size = new System.Drawing.Size(90, 17);
|
||||||
@@ -529,7 +527,7 @@ namespace EveOPreview.UI
|
|||||||
this.ShowThumbnailFramesCheckBox.AutoSize = true;
|
this.ShowThumbnailFramesCheckBox.AutoSize = true;
|
||||||
this.ShowThumbnailFramesCheckBox.Checked = true;
|
this.ShowThumbnailFramesCheckBox.Checked = true;
|
||||||
this.ShowThumbnailFramesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.ShowThumbnailFramesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.ShowThumbnailFramesCheckBox.Location = new System.Drawing.Point(99, 297);
|
this.ShowThumbnailFramesCheckBox.Location = new System.Drawing.Point(99, 295);
|
||||||
this.ShowThumbnailFramesCheckBox.Name = "ShowThumbnailFramesCheckBox";
|
this.ShowThumbnailFramesCheckBox.Name = "ShowThumbnailFramesCheckBox";
|
||||||
this.ShowThumbnailFramesCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
this.ShowThumbnailFramesCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||||
this.ShowThumbnailFramesCheckBox.Size = new System.Drawing.Size(127, 17);
|
this.ShowThumbnailFramesCheckBox.Size = new System.Drawing.Size(127, 17);
|
||||||
@@ -543,7 +541,7 @@ namespace EveOPreview.UI
|
|||||||
ThumbnailsListPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
ThumbnailsListPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
ThumbnailsListPanel.Controls.Add(this.ThumbnailsList);
|
ThumbnailsListPanel.Controls.Add(this.ThumbnailsList);
|
||||||
ThumbnailsListPanel.Controls.Add(ThumbnailsListLabel);
|
ThumbnailsListPanel.Controls.Add(ThumbnailsListLabel);
|
||||||
ThumbnailsListPanel.Location = new System.Drawing.Point(3, 320);
|
ThumbnailsListPanel.Location = new System.Drawing.Point(3, 318);
|
||||||
ThumbnailsListPanel.Name = "ThumbnailsListPanel";
|
ThumbnailsListPanel.Name = "ThumbnailsListPanel";
|
||||||
ThumbnailsListPanel.Size = new System.Drawing.Size(246, 125);
|
ThumbnailsListPanel.Size = new System.Drawing.Size(246, 125);
|
||||||
ThumbnailsListPanel.TabIndex = 31;
|
ThumbnailsListPanel.TabIndex = 31;
|
||||||
@@ -572,13 +570,13 @@ namespace EveOPreview.UI
|
|||||||
// ForumLinkLabel
|
// ForumLinkLabel
|
||||||
//
|
//
|
||||||
this.ForumLinkLabel.AutoSize = true;
|
this.ForumLinkLabel.AutoSize = true;
|
||||||
this.ForumLinkLabel.Location = new System.Drawing.Point(3, 448);
|
this.ForumLinkLabel.Location = new System.Drawing.Point(3, 446);
|
||||||
this.ForumLinkLabel.Name = "ForumLinkLabel";
|
this.ForumLinkLabel.Name = "ForumLinkLabel";
|
||||||
this.ForumLinkLabel.Size = new System.Drawing.Size(241, 26);
|
this.ForumLinkLabel.Size = new System.Drawing.Size(241, 26);
|
||||||
this.ForumLinkLabel.TabIndex = 10;
|
this.ForumLinkLabel.TabIndex = 10;
|
||||||
this.ForumLinkLabel.TabStop = true;
|
this.ForumLinkLabel.TabStop = true;
|
||||||
this.ForumLinkLabel.Text = "to be set from prresenter to be set from prresenter to be set from prresenter to " +
|
this.ForumLinkLabel.Text = "to be set from prresenter to be set from prresenter to be set from prresenter to " +
|
||||||
"be set from prresenter";
|
"be set from prresenter";
|
||||||
this.ForumLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.ForumLinkLabelClicked_Handler);
|
this.ForumLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.ForumLinkLabelClicked_Handler);
|
||||||
//
|
//
|
||||||
// TitleMenuItem
|
// TitleMenuItem
|
||||||
@@ -604,10 +602,10 @@ namespace EveOPreview.UI
|
|||||||
// TrayMenu
|
// TrayMenu
|
||||||
//
|
//
|
||||||
this.TrayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.TrayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
TitleMenuItem,
|
TitleMenuItem,
|
||||||
RestoreWindowMenuItem,
|
RestoreWindowMenuItem,
|
||||||
SeparatorMenuItem,
|
SeparatorMenuItem,
|
||||||
ExitMenuItem});
|
ExitMenuItem});
|
||||||
this.TrayMenu.Name = "contextMenuStrip1";
|
this.TrayMenu.Name = "contextMenuStrip1";
|
||||||
this.TrayMenu.Size = new System.Drawing.Size(152, 76);
|
this.TrayMenu.Size = new System.Drawing.Size(152, 76);
|
||||||
//
|
//
|
||||||
@@ -616,7 +614,7 @@ namespace EveOPreview.UI
|
|||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
|
this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||||
this.ClientSize = new System.Drawing.Size(252, 487);
|
this.ClientSize = new System.Drawing.Size(252, 481);
|
||||||
this.Controls.Add(ContentFlowLayoutPanel);
|
this.Controls.Add(ContentFlowLayoutPanel);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
@@ -653,7 +651,6 @@ namespace EveOPreview.UI
|
|||||||
private CheckBox HideActiveClientThumbnailCheckBox;
|
private CheckBox HideActiveClientThumbnailCheckBox;
|
||||||
private CheckBox HideThumbnailsOnLostFocusCheckBox;
|
private CheckBox HideThumbnailsOnLostFocusCheckBox;
|
||||||
private CheckBox EnablePerClientThumbnailsLayoutsCheckBox;
|
private CheckBox EnablePerClientThumbnailsLayoutsCheckBox;
|
||||||
private CheckBox SyncThumbnailsSizeCheckBox;
|
|
||||||
private CheckBox ShowThumbnailsAlwaysOnTopCheckBox;
|
private CheckBox ShowThumbnailsAlwaysOnTopCheckBox;
|
||||||
private CheckBox ShowThumbnailFramesCheckBox;
|
private CheckBox ShowThumbnailFramesCheckBox;
|
||||||
private LinkLabel ForumLinkLabel;
|
private LinkLabel ForumLinkLabel;
|
||||||
|
|||||||
@@ -7,10 +7,14 @@ namespace EveOPreview.UI
|
|||||||
{
|
{
|
||||||
public partial class MainForm : Form, IMainView
|
public partial class MainForm : Form, IMainView
|
||||||
{
|
{
|
||||||
|
#region Private fields
|
||||||
private readonly ApplicationContext _context;
|
private readonly ApplicationContext _context;
|
||||||
private readonly Dictionary<ViewZoomAnchor, RadioButton> _zoomAnchorMap;
|
private readonly Dictionary<ViewZoomAnchor, RadioButton> _zoomAnchorMap;
|
||||||
private ViewZoomAnchor _cachedThumbnailZoomAnchor;
|
private ViewZoomAnchor _cachedThumbnailZoomAnchor;
|
||||||
private bool _suppressEvents;
|
private bool _suppressEvents;
|
||||||
|
private Size _minimumSize;
|
||||||
|
private Size _maximumSize;
|
||||||
|
#endregion
|
||||||
|
|
||||||
public MainForm(ApplicationContext context)
|
public MainForm(ApplicationContext context)
|
||||||
{
|
{
|
||||||
@@ -18,6 +22,8 @@ namespace EveOPreview.UI
|
|||||||
this._zoomAnchorMap = new Dictionary<ViewZoomAnchor, RadioButton>();
|
this._zoomAnchorMap = new Dictionary<ViewZoomAnchor, RadioButton>();
|
||||||
this._cachedThumbnailZoomAnchor = ViewZoomAnchor.NW;
|
this._cachedThumbnailZoomAnchor = ViewZoomAnchor.NW;
|
||||||
this._suppressEvents = false;
|
this._suppressEvents = false;
|
||||||
|
this._minimumSize = new Size(80, 60);
|
||||||
|
this._maximumSize = new Size(80, 60);
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
@@ -110,18 +116,6 @@ namespace EveOPreview.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool SyncThumbnailsSize
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.SyncThumbnailsSizeCheckBox.Checked;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
this.SyncThumbnailsSizeCheckBox.Checked = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Size ThumbnailSize
|
public Size ThumbnailSize
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -228,11 +222,8 @@ namespace EveOPreview.UI
|
|||||||
|
|
||||||
public void SetThumbnailSizeLimitations(Size minimumSize, Size maximumSize)
|
public void SetThumbnailSizeLimitations(Size minimumSize, Size maximumSize)
|
||||||
{
|
{
|
||||||
this.ThumbnailsWidthNumericEdit.Minimum = minimumSize.Width;
|
this._minimumSize = minimumSize;
|
||||||
this.ThumbnailsWidthNumericEdit.Maximum = maximumSize.Width;
|
this._maximumSize = maximumSize;
|
||||||
|
|
||||||
this.ThumbnailsHeightNumericEdit.Minimum = minimumSize.Height;
|
|
||||||
this.ThumbnailsHeightNumericEdit.Maximum = maximumSize.Height;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Minimize()
|
public void Minimize()
|
||||||
@@ -329,6 +320,14 @@ namespace EveOPreview.UI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Perform some View work that is not properly done in the Control
|
||||||
|
this._suppressEvents = true;
|
||||||
|
Size thumbnailSize = this.ThumbnailSize;
|
||||||
|
thumbnailSize.Width = Math.Min(Math.Max(thumbnailSize.Width, this._minimumSize.Width), this._maximumSize.Width);
|
||||||
|
thumbnailSize.Height = Math.Min(Math.Max(thumbnailSize.Height, this._minimumSize.Height), this._maximumSize.Height);
|
||||||
|
this.ThumbnailSize = thumbnailSize;
|
||||||
|
this._suppressEvents = false;
|
||||||
|
|
||||||
this.ThumbnailsSizeChanged?.Invoke();
|
this.ThumbnailsSizeChanged?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -168,7 +168,16 @@
|
|||||||
<metadata name="ResizeOptionsPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="ResizeOptionsPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="SyncThumbnailsSizeCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="HeigthLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>False</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="HeigthLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="WidthLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>False</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="WidthLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="ThumbnailsWidthNumericEdit.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="ThumbnailsWidthNumericEdit.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
|||||||
@@ -14,27 +14,8 @@ namespace EveOPreview.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.RenderAreaPictureBox = new System.Windows.Forms.PictureBox();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.RenderAreaPictureBox)).BeginInit();
|
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// RenderAreaPictureBox
|
|
||||||
//
|
|
||||||
this.RenderAreaPictureBox.BackColor = System.Drawing.Color.Transparent;
|
|
||||||
this.RenderAreaPictureBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
|
||||||
this.RenderAreaPictureBox.Cursor = System.Windows.Forms.Cursors.Hand;
|
|
||||||
this.RenderAreaPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
||||||
this.RenderAreaPictureBox.Location = new System.Drawing.Point(0, 0);
|
|
||||||
this.RenderAreaPictureBox.Margin = new System.Windows.Forms.Padding(0);
|
|
||||||
this.RenderAreaPictureBox.Name = "RenderAreaPictureBox";
|
|
||||||
this.RenderAreaPictureBox.Size = new System.Drawing.Size(153, 89);
|
|
||||||
this.RenderAreaPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
|
||||||
this.RenderAreaPictureBox.TabIndex = 0;
|
|
||||||
this.RenderAreaPictureBox.TabStop = false;
|
|
||||||
this.RenderAreaPictureBox.MouseLeave += new System.EventHandler(this.LostFocus_Handler);
|
|
||||||
this.RenderAreaPictureBox.MouseHover += new System.EventHandler(this.Focused_Handler);
|
|
||||||
this.RenderAreaPictureBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.ThumbnailActivated_Handler);
|
|
||||||
//
|
|
||||||
// ThumbnailView
|
// ThumbnailView
|
||||||
//
|
//
|
||||||
this.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
|
this.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
|
||||||
@@ -42,7 +23,6 @@ namespace EveOPreview.UI
|
|||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(153, 89);
|
this.ClientSize = new System.Drawing.Size(153, 89);
|
||||||
this.ControlBox = false;
|
this.ControlBox = false;
|
||||||
this.Controls.Add(this.RenderAreaPictureBox);
|
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
@@ -53,18 +33,17 @@ namespace EveOPreview.UI
|
|||||||
this.ShowInTaskbar = false;
|
this.ShowInTaskbar = false;
|
||||||
this.Text = "Preview";
|
this.Text = "Preview";
|
||||||
this.TopMost = true;
|
this.TopMost = true;
|
||||||
|
this.MouseLeave += new System.EventHandler(this.LostFocus_Handler);
|
||||||
|
this.MouseHover += new System.EventHandler(this.Focused_Handler);
|
||||||
|
this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.ThumbnailActivated_Handler);
|
||||||
this.Move += new System.EventHandler(this.Move_Handler);
|
this.Move += new System.EventHandler(this.Move_Handler);
|
||||||
this.Resize += new System.EventHandler(this.Resize_Handler);
|
this.Resize += new System.EventHandler(this.Resize_Handler);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.RenderAreaPictureBox)).EndInit();
|
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private System.Windows.Forms.PictureBox RenderAreaPictureBox;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,15 +12,13 @@ namespace EveOPreview.UI
|
|||||||
//private readonly IThumbnailManager _manager;
|
//private readonly IThumbnailManager _manager;
|
||||||
private readonly ThumbnailOverlay _overlay;
|
private readonly ThumbnailOverlay _overlay;
|
||||||
|
|
||||||
//private Size _baseSize;
|
|
||||||
//private Point _basePosition;
|
|
||||||
|
|
||||||
// This is pure brainless View
|
// This is pure brainless View
|
||||||
// Just somewhat more complex than usual
|
// Just somewhat more complex than usual
|
||||||
private bool _isThumbnailSetUp;
|
private bool _isThumbnailSetUp;
|
||||||
private bool _isOverlayVisible;
|
private bool _isOverlayVisible;
|
||||||
private bool _isPositionChanged;
|
private bool _isPositionChanged;
|
||||||
private bool _isSizeChanged;
|
private bool _isSizeChanged;
|
||||||
|
private DateTime _suppressResizeEventsTimestamp;
|
||||||
private DWM_THUMBNAIL_PROPERTIES _thumbnail;
|
private DWM_THUMBNAIL_PROPERTIES _thumbnail;
|
||||||
private IntPtr _thumbnailHandle;
|
private IntPtr _thumbnailHandle;
|
||||||
private Size _baseSize;
|
private Size _baseSize;
|
||||||
@@ -40,6 +38,8 @@ namespace EveOPreview.UI
|
|||||||
this._isPositionChanged = true;
|
this._isPositionChanged = true;
|
||||||
this._isSizeChanged = true;
|
this._isSizeChanged = true;
|
||||||
|
|
||||||
|
this._suppressResizeEventsTimestamp = DateTime.UtcNow;
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this._overlay = new ThumbnailOverlay(this, this.ThumbnailActivated_Handler);
|
this._overlay = new ThumbnailOverlay(this, this.ThumbnailActivated_Handler);
|
||||||
@@ -66,11 +66,11 @@ namespace EveOPreview.UI
|
|||||||
|
|
||||||
public bool IsOverlayEnabled { get; set; }
|
public bool IsOverlayEnabled { get; set; }
|
||||||
|
|
||||||
public new Point Location
|
public Point ThumbnailLocation
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return base.Location;
|
return this.Location;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
@@ -78,7 +78,19 @@ namespace EveOPreview.UI
|
|||||||
{
|
{
|
||||||
this.StartPosition = FormStartPosition.Manual;
|
this.StartPosition = FormStartPosition.Manual;
|
||||||
}
|
}
|
||||||
base.Location = value;
|
this.Location = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Size ThumbnailSize
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.ClientSize;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.ClientSize = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,11 +149,14 @@ namespace EveOPreview.UI
|
|||||||
this.Opacity = opacity;
|
this.Opacity = opacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetWindowFrames(bool enable)
|
public void SetFrames(bool enable)
|
||||||
{
|
{
|
||||||
|
// Fix for WinForms issue with the Resize event being fired with inconsistent ClientSize value
|
||||||
|
// Any Resize events fired before this timestamp will be ignored
|
||||||
|
this._suppressResizeEventsTimestamp = DateTime.UtcNow.AddMilliseconds(450);
|
||||||
this.FormBorderStyle = enable ? FormBorderStyle.SizableToolWindow : FormBorderStyle.None;
|
this.FormBorderStyle = enable ? FormBorderStyle.SizableToolWindow : FormBorderStyle.None;
|
||||||
|
|
||||||
// Notify about windo contents position change
|
// Notify about possible contents position change
|
||||||
this._isSizeChanged = true;
|
this._isSizeChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,11 +241,9 @@ namespace EveOPreview.UI
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
this._hotkeyHandler.Register();
|
this._hotkeyHandler.Register();
|
||||||
System.Diagnostics.Debug.WriteLine("Registered shortcut for " + this.Title);
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
System.Diagnostics.Debug.WriteLine("Failed to register shortcut for " + this.Title);
|
|
||||||
// There can be a lot of possible exception reasons here
|
// There can be a lot of possible exception reasons here
|
||||||
// In case of any of them the hotkey setting is silently ignored
|
// In case of any of them the hotkey setting is silently ignored
|
||||||
}
|
}
|
||||||
@@ -265,7 +278,7 @@ namespace EveOPreview.UI
|
|||||||
|
|
||||||
if (sizeChanged)
|
if (sizeChanged)
|
||||||
{
|
{
|
||||||
this._thumbnail.rcDestination = new RECT(0, 0, this.ClientRectangle.Right, this.ClientRectangle.Bottom);
|
this._thumbnail.rcDestination = new RECT(0, 0, this.ClientSize.Width, this.ClientSize.Height);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DwmApiNativeMethods.DwmUpdateThumbnailProperties(this._thumbnailHandle, this._thumbnail);
|
DwmApiNativeMethods.DwmUpdateThumbnailProperties(this._thumbnailHandle, this._thumbnail);
|
||||||
@@ -304,14 +317,14 @@ namespace EveOPreview.UI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Size overlaySize = this.RenderAreaPictureBox.Size;
|
Size overlaySize = this.ClientSize;
|
||||||
overlaySize.Width -= 2 * 5;
|
overlaySize.Width -= 2 * 5;
|
||||||
overlaySize.Height -= 2 * 5;
|
overlaySize.Height -= 2 * 5;
|
||||||
|
|
||||||
Point overlayLocation = this.Location;
|
Point overlayLocation = this.Location;
|
||||||
|
|
||||||
overlayLocation.X += 5 + (this.Size.Width - this.RenderAreaPictureBox.Size.Width) / 2;
|
overlayLocation.X += 5 + (this.Size.Width - this.ClientSize.Width) / 2;
|
||||||
overlayLocation.Y += 5 + (this.Size.Height - this.RenderAreaPictureBox.Size.Height) - (this.Size.Width - this.RenderAreaPictureBox.Size.Width) / 2;
|
overlayLocation.Y += 5 + (this.Size.Height - this.ClientSize.Height) - (this.Size.Width - this.ClientSize.Width) / 2;
|
||||||
|
|
||||||
this._isPositionChanged = false;
|
this._isPositionChanged = false;
|
||||||
this._overlay.Size = overlaySize;
|
this._overlay.Size = overlaySize;
|
||||||
@@ -337,7 +350,13 @@ namespace EveOPreview.UI
|
|||||||
|
|
||||||
private void Resize_Handler(object sender, EventArgs e)
|
private void Resize_Handler(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
if (DateTime.UtcNow < this._suppressResizeEventsTimestamp)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this._isSizeChanged = true;
|
this._isSizeChanged = true;
|
||||||
|
|
||||||
this.ThumbnailResized?.Invoke(this.Id);
|
this.ThumbnailResized?.Invoke(this.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,12 +382,12 @@ namespace EveOPreview.UI
|
|||||||
// // do smth cool?
|
// // do smth cool?
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if (e.Button == MouseButtons.Middle)
|
//if (e.Button == MouseButtons.Middle)
|
||||||
{
|
//{
|
||||||
//// Trigger full thumbnail refresh
|
//// Trigger full thumbnail refresh
|
||||||
//this.UnregisterThumbnail();
|
//this.UnregisterThumbnail();
|
||||||
//this.Refresh();
|
//this.Refresh();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HotkeyPressed_Handler(object sender, HandledEventArgs e)
|
private void HotkeyPressed_Handler(object sender, HandledEventArgs e)
|
||||||
@@ -405,47 +424,5 @@ namespace EveOPreview.UI
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//private Hotkey _hotkey; // This field stores the hotkey reference
|
|
||||||
//public void RegisterShortcut(string shortcut)
|
|
||||||
//{
|
|
||||||
//if (String.IsNullOrEmpty(shortcut))
|
|
||||||
//{
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//KeysConverter converter = new KeysConverter();
|
|
||||||
//object keysObject = converter.ConvertFrom(shortcut);
|
|
||||||
//if (keysObject == null)
|
|
||||||
//{
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//Keys key = (Keys)keysObject;
|
|
||||||
|
|
||||||
//Hotkey hotkey = new Hotkey();
|
|
||||||
|
|
||||||
//if ((key & Keys.Shift) == Keys.Shift)
|
|
||||||
//{
|
|
||||||
// hotkey.Shift = true;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if ((key & Keys.Alt) == Keys.Alt)
|
|
||||||
//{
|
|
||||||
// hotkey.Alt = true;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if ((key & Keys.Control) == Keys.Control)
|
|
||||||
//{
|
|
||||||
// hotkey.Control = true;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//key = key & ~Keys.Shift & ~Keys.Alt & ~Keys.Control;
|
|
||||||
//hotkey.KeyCode = key;
|
|
||||||
//hotkey.Pressed += Hotkey_Pressed;
|
|
||||||
//hotkey.Register(this);
|
|
||||||
|
|
||||||
//this._hotkey = hotkey;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,6 @@ namespace EveOPreview.UI
|
|||||||
bool HideThumbnailsOnLostFocus { get; set; }
|
bool HideThumbnailsOnLostFocus { get; set; }
|
||||||
bool EnablePerClientThumbnailsLayouts { get; set; }
|
bool EnablePerClientThumbnailsLayouts { get; set; }
|
||||||
|
|
||||||
bool SyncThumbnailsSize { get; set; }
|
|
||||||
Size ThumbnailSize { get; set; }
|
Size ThumbnailSize { get; set; }
|
||||||
|
|
||||||
bool EnableThumbnailZoom { get; set; }
|
bool EnableThumbnailZoom { get; set; }
|
||||||
|
|||||||
@@ -11,15 +11,15 @@ namespace EveOPreview.UI
|
|||||||
|
|
||||||
bool IsEnabled { get; set; }
|
bool IsEnabled { get; set; }
|
||||||
bool IsActive { get; set; }
|
bool IsActive { get; set; }
|
||||||
Point Location { get; set; }
|
Point ThumbnailLocation { get; set; }
|
||||||
Size Size { get; set; }
|
Size ThumbnailSize { get; set; }
|
||||||
bool IsOverlayEnabled { get; set; }
|
bool IsOverlayEnabled { get; set; }
|
||||||
|
|
||||||
bool IsKnownHandle(IntPtr handle);
|
bool IsKnownHandle(IntPtr handle);
|
||||||
|
|
||||||
void SetSizeLimitations(Size minimumSize, Size maximumSize);
|
void SetSizeLimitations(Size minimumSize, Size maximumSize);
|
||||||
void SetOpacity(double opacity);
|
void SetOpacity(double opacity);
|
||||||
void SetWindowFrames(bool enable);
|
void SetFrames(bool enable);
|
||||||
void SetTopMost(bool enableTopmost);
|
void SetTopMost(bool enableTopmost);
|
||||||
|
|
||||||
void ZoomIn(ViewZoomAnchor anchor, int zoomFactor);
|
void ZoomIn(ViewZoomAnchor anchor, int zoomFactor);
|
||||||
|
|||||||
Reference in New Issue
Block a user