Changes recommended by Rider/Resharper
This commit is contained in:
@@ -8,7 +8,7 @@ namespace VAR.ScreenAutomation.Controls
|
||||
{
|
||||
#region Declarations
|
||||
|
||||
private Image _imageShow = null;
|
||||
private Image _imageShow;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -16,7 +16,8 @@ namespace VAR.ScreenAutomation.Controls
|
||||
|
||||
public Image ImageShow
|
||||
{
|
||||
get { return _imageShow; }
|
||||
// ReSharper disable once InconsistentlySynchronizedField
|
||||
get => _imageShow;
|
||||
set
|
||||
{
|
||||
lock (this)
|
||||
@@ -32,6 +33,11 @@ namespace VAR.ScreenAutomation.Controls
|
||||
#region Control life cycle
|
||||
|
||||
public CtrImageViewer()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
BackColor = Color.Black;
|
||||
}
|
||||
@@ -59,6 +65,7 @@ namespace VAR.ScreenAutomation.Controls
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
lock (_imageShow)
|
||||
{
|
||||
if (graph == null)
|
||||
@@ -71,7 +78,7 @@ namespace VAR.ScreenAutomation.Controls
|
||||
int imgDrawHeight;
|
||||
float imgDrawX = 0;
|
||||
float imgDrawY = 0;
|
||||
float relation = (float)_imageShow.Width / (float)_imageShow.Height;
|
||||
float relation = _imageShow.Width / (float)_imageShow.Height;
|
||||
if (relation > 0)
|
||||
{
|
||||
// Imagen mas ancha que alta
|
||||
@@ -110,6 +117,5 @@ namespace VAR.ScreenAutomation.Controls
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user