Replace IFromWithIcon with IToolForm.HasIcon.
This commit is contained in:
@@ -153,7 +153,7 @@ namespace VAR.Toolbox.UI
|
|||||||
}
|
}
|
||||||
_forms.Add(frm);
|
_forms.Add(frm);
|
||||||
frm.FormClosing += frmChild_FormClosing;
|
frm.FormClosing += frmChild_FormClosing;
|
||||||
if ((frm is IFormWithIcon) == false)
|
if ((frm as IToolForm)?.HasIcon == false)
|
||||||
{
|
{
|
||||||
frm.Icon = Icon;
|
frm.Icon = Icon;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
namespace VAR.Toolbox.UI
|
|
||||||
{
|
|
||||||
public interface IFormWithIcon
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,5 +3,6 @@
|
|||||||
public interface IToolForm
|
public interface IToolForm
|
||||||
{
|
{
|
||||||
string ToolName { get; }
|
string ToolName { get; }
|
||||||
|
bool HasIcon { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ namespace VAR.Toolbox.UI
|
|||||||
{
|
{
|
||||||
public string ToolName { get { return "Coder"; } }
|
public string ToolName { get { return "Coder"; } }
|
||||||
|
|
||||||
|
public bool HasIcon { get { return false; } }
|
||||||
|
|
||||||
public FrmCoder()
|
public FrmCoder()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ namespace VAR.Toolbox.UI
|
|||||||
{
|
{
|
||||||
public string ToolName { get { return "IPScan"; } }
|
public string ToolName { get { return "IPScan"; } }
|
||||||
|
|
||||||
|
public bool HasIcon { get { return false; } }
|
||||||
|
|
||||||
public FrmIPScan()
|
public FrmIPScan()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ namespace VAR.Toolbox.UI
|
|||||||
{
|
{
|
||||||
public string ToolName { get { return "NetworkInfo"; } }
|
public string ToolName { get { return "NetworkInfo"; } }
|
||||||
|
|
||||||
|
public bool HasIcon { get { return false; } }
|
||||||
|
|
||||||
public FrmNetworkInfo()
|
public FrmNetworkInfo()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ namespace VAR.Toolbox.UI
|
|||||||
{
|
{
|
||||||
public string ToolName { get { return "ProxyCmd"; } }
|
public string ToolName { get { return "ProxyCmd"; } }
|
||||||
|
|
||||||
|
public bool HasIcon { get { return false; } }
|
||||||
|
|
||||||
#region Declarations
|
#region Declarations
|
||||||
|
|
||||||
private object _executionLock = new object();
|
private object _executionLock = new object();
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ namespace VAR.Toolbox.UI
|
|||||||
{
|
{
|
||||||
public string ToolName { get { return "Screenshooter"; } }
|
public string ToolName { get { return "Screenshooter"; } }
|
||||||
|
|
||||||
|
public bool HasIcon { get { return false; } }
|
||||||
|
|
||||||
private bool _repetitiveScreenshots = false;
|
private bool _repetitiveScreenshots = false;
|
||||||
private Timer timTicker;
|
private Timer timTicker;
|
||||||
private Bitmap bmpScreen = null;
|
private Bitmap bmpScreen = null;
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ namespace VAR.Toolbox.UI
|
|||||||
{
|
{
|
||||||
public string ToolName { get { return "TunnelTCP"; } }
|
public string ToolName { get { return "TunnelTCP"; } }
|
||||||
|
|
||||||
|
public bool HasIcon { get { return false; } }
|
||||||
|
|
||||||
private bool _running = false;
|
private bool _running = false;
|
||||||
|
|
||||||
private class ConnectedClient
|
private class ConnectedClient
|
||||||
@@ -229,25 +231,25 @@ namespace VAR.Toolbox.UI
|
|||||||
return string.Format("{0} B", number);
|
return string.Format("{0} B", number);
|
||||||
}
|
}
|
||||||
|
|
||||||
number = number / 1024.0;
|
number /= 1024.0;
|
||||||
if (number < 1024)
|
if (number < 1024)
|
||||||
{
|
{
|
||||||
return string.Format("{0:#.00} KiB", number);
|
return string.Format("{0:#.00} KiB", number);
|
||||||
}
|
}
|
||||||
|
|
||||||
number = number / 1024.0;
|
number /= 1024.0;
|
||||||
if (number < 1024)
|
if (number < 1024)
|
||||||
{
|
{
|
||||||
return string.Format("{0:#.00} MiB", number);
|
return string.Format("{0:#.00} MiB", number);
|
||||||
}
|
}
|
||||||
|
|
||||||
number = number / 1024.0;
|
number /= 1024.0;
|
||||||
if (number < 1024)
|
if (number < 1024)
|
||||||
{
|
{
|
||||||
return string.Format("{0:#.00} GiB", number);
|
return string.Format("{0:#.00} GiB", number);
|
||||||
}
|
}
|
||||||
|
|
||||||
number = number / 1024.0;
|
number /= 1024.0;
|
||||||
|
|
||||||
return string.Format("{0:#.00} TiB", number);
|
return string.Format("{0:#.00} TiB", number);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ namespace VAR.Toolbox.UI
|
|||||||
{
|
{
|
||||||
public string ToolName { get { return "Webcam"; } }
|
public string ToolName { get { return "Webcam"; } }
|
||||||
|
|
||||||
|
public bool HasIcon { get { return false; } }
|
||||||
|
|
||||||
private Webcam webcam = null;
|
private Webcam webcam = null;
|
||||||
|
|
||||||
public FrmWebcam()
|
public FrmWebcam()
|
||||||
|
|||||||
@@ -194,7 +194,6 @@
|
|||||||
<Compile Include="UI\Tools\FrmWebcam.Designer.cs">
|
<Compile Include="UI\Tools\FrmWebcam.Designer.cs">
|
||||||
<DependentUpon>FrmWebcam.cs</DependentUpon>
|
<DependentUpon>FrmWebcam.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="UI\IFormWithIcon.cs" />
|
|
||||||
<Compile Include="UI\IToolForm.cs" />
|
<Compile Include="UI\IToolForm.cs" />
|
||||||
<Compile Include="UI\Tools\PnlCover.cs">
|
<Compile Include="UI\Tools\PnlCover.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
|
|||||||
Reference in New Issue
Block a user