Remove all build messages.
This commit is contained in:
18
VAR.Toolbox/UI/FrmToolbox.Designer.cs
generated
18
VAR.Toolbox/UI/FrmToolbox.Designer.cs
generated
@@ -50,7 +50,7 @@
|
||||
this.btnCoder.TabIndex = 0;
|
||||
this.btnCoder.Text = "Coder";
|
||||
this.btnCoder.UseVisualStyleBackColor = true;
|
||||
this.btnCoder.Click += new System.EventHandler(this.btnCoder_Click);
|
||||
this.btnCoder.Click += new System.EventHandler(this.BtnCoder_Click);
|
||||
//
|
||||
// btnProxyCmd
|
||||
//
|
||||
@@ -60,7 +60,7 @@
|
||||
this.btnProxyCmd.TabIndex = 1;
|
||||
this.btnProxyCmd.Text = "ProxyCmd";
|
||||
this.btnProxyCmd.UseVisualStyleBackColor = true;
|
||||
this.btnProxyCmd.Click += new System.EventHandler(this.btnProxyCmd_Click);
|
||||
this.btnProxyCmd.Click += new System.EventHandler(this.BtnProxyCmd_Click);
|
||||
//
|
||||
// btnWebcam
|
||||
//
|
||||
@@ -70,7 +70,7 @@
|
||||
this.btnWebcam.TabIndex = 2;
|
||||
this.btnWebcam.Text = "Webcam";
|
||||
this.btnWebcam.UseVisualStyleBackColor = true;
|
||||
this.btnWebcam.Click += new System.EventHandler(this.btnWebcam_Click);
|
||||
this.btnWebcam.Click += new System.EventHandler(this.BtnWebcam_Click);
|
||||
//
|
||||
// btnTunnelTCP
|
||||
//
|
||||
@@ -81,7 +81,7 @@
|
||||
this.btnTunnelTCP.TabIndex = 5;
|
||||
this.btnTunnelTCP.Text = "TunnelTCP";
|
||||
this.btnTunnelTCP.UseVisualStyleBackColor = true;
|
||||
this.btnTunnelTCP.Click += new System.EventHandler(this.btnTunnelTCP_Click);
|
||||
this.btnTunnelTCP.Click += new System.EventHandler(this.BtnTunnelTCP_Click);
|
||||
//
|
||||
// lblToolbox
|
||||
//
|
||||
@@ -124,7 +124,7 @@
|
||||
this.btnExit.TabIndex = 7;
|
||||
this.btnExit.Text = "Exit";
|
||||
this.btnExit.UseVisualStyleBackColor = true;
|
||||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
|
||||
this.btnExit.Click += new System.EventHandler(this.BtnExit_Click);
|
||||
//
|
||||
// btnTestWebService
|
||||
//
|
||||
@@ -135,7 +135,7 @@
|
||||
this.btnTestWebService.TabIndex = 8;
|
||||
this.btnTestWebService.Text = "TestWebService";
|
||||
this.btnTestWebService.UseVisualStyleBackColor = true;
|
||||
this.btnTestWebService.Click += new System.EventHandler(this.btnTestWebService_Click);
|
||||
this.btnTestWebService.Click += new System.EventHandler(this.BtnTestWebService_Click);
|
||||
//
|
||||
// btnScreenshooter
|
||||
//
|
||||
@@ -146,7 +146,7 @@
|
||||
this.btnScreenshooter.TabIndex = 10;
|
||||
this.btnScreenshooter.Text = "Screenshooter";
|
||||
this.btnScreenshooter.UseVisualStyleBackColor = true;
|
||||
this.btnScreenshooter.Click += new System.EventHandler(this.btnScreenshooter_Click);
|
||||
this.btnScreenshooter.Click += new System.EventHandler(this.BtnScreenshooter_Click);
|
||||
//
|
||||
// btnIPScan
|
||||
//
|
||||
@@ -157,7 +157,7 @@
|
||||
this.btnIPScan.TabIndex = 11;
|
||||
this.btnIPScan.Text = "IPScan";
|
||||
this.btnIPScan.UseVisualStyleBackColor = true;
|
||||
this.btnIPScan.Click += new System.EventHandler(this.btnIPScan_Click);
|
||||
this.btnIPScan.Click += new System.EventHandler(this.BtnIPScan_Click);
|
||||
//
|
||||
// btnNetworkInfo
|
||||
//
|
||||
@@ -168,7 +168,7 @@
|
||||
this.btnNetworkInfo.TabIndex = 12;
|
||||
this.btnNetworkInfo.Text = "NetworkInfo";
|
||||
this.btnNetworkInfo.UseVisualStyleBackColor = true;
|
||||
this.btnNetworkInfo.MouseClick += new System.Windows.Forms.MouseEventHandler(this.btnNetworkInfo_MouseClick);
|
||||
this.btnNetworkInfo.MouseClick += new System.Windows.Forms.MouseEventHandler(this.BtnNetworkInfo_MouseClick);
|
||||
//
|
||||
// FrmToolbox
|
||||
//
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
#pragma warning disable IDE0019
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
@@ -34,10 +36,12 @@ namespace VAR.Toolbox.UI
|
||||
|
||||
private void InitializeCustomControls()
|
||||
{
|
||||
niTray = new NotifyIcon();
|
||||
niTray.Text = "VAR.Toolbox";
|
||||
niTray.Visible = true;
|
||||
niTray.MouseClick += niTray_MouseClick;
|
||||
niTray = new NotifyIcon
|
||||
{
|
||||
Text = "VAR.Toolbox",
|
||||
Visible = true
|
||||
};
|
||||
niTray.MouseClick += NiTray_MouseClick;
|
||||
}
|
||||
|
||||
private void FrmToolbox_Load(object sender, EventArgs e)
|
||||
@@ -73,7 +77,7 @@ namespace VAR.Toolbox.UI
|
||||
}
|
||||
}
|
||||
|
||||
private void btnExit_Click(object sender, EventArgs e)
|
||||
private void BtnExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult dialogResult = MessageBox.Show("Are you sure want to exit?", "Exit?", MessageBoxButtons.YesNo);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
@@ -85,7 +89,7 @@ namespace VAR.Toolbox.UI
|
||||
}
|
||||
}
|
||||
|
||||
private void niTray_MouseClick(object sender, MouseEventArgs e)
|
||||
private void NiTray_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (Visible)
|
||||
{
|
||||
@@ -100,42 +104,42 @@ namespace VAR.Toolbox.UI
|
||||
WindowState = FormWindowState.Normal;
|
||||
}
|
||||
|
||||
private void btnCoder_Click(object sender, EventArgs e)
|
||||
private void BtnCoder_Click(object sender, EventArgs e)
|
||||
{
|
||||
CreateWindow(typeof(FrmCoder));
|
||||
}
|
||||
|
||||
private void btnProxyCmd_Click(object sender, EventArgs e)
|
||||
private void BtnProxyCmd_Click(object sender, EventArgs e)
|
||||
{
|
||||
CreateWindow(typeof(FrmProxyCmd));
|
||||
}
|
||||
|
||||
private void btnWebcam_Click(object sender, EventArgs e)
|
||||
private void BtnWebcam_Click(object sender, EventArgs e)
|
||||
{
|
||||
CreateWindow(typeof(FrmWebcam));
|
||||
}
|
||||
|
||||
private void btnTunnelTCP_Click(object sender, EventArgs e)
|
||||
private void BtnTunnelTCP_Click(object sender, EventArgs e)
|
||||
{
|
||||
CreateWindow(typeof(FrmTunnelTCP));
|
||||
}
|
||||
|
||||
private void btnTestWebService_Click(object sender, EventArgs e)
|
||||
private void BtnTestWebService_Click(object sender, EventArgs e)
|
||||
{
|
||||
CreateWindow(typeof(FrmTestWebService));
|
||||
}
|
||||
|
||||
private void btnScreenshooter_Click(object sender, EventArgs e)
|
||||
private void BtnScreenshooter_Click(object sender, EventArgs e)
|
||||
{
|
||||
CreateWindow(typeof(FrmScreenshooter));
|
||||
}
|
||||
|
||||
private void btnIPScan_Click(object sender, EventArgs e)
|
||||
private void BtnIPScan_Click(object sender, EventArgs e)
|
||||
{
|
||||
CreateWindow(typeof(FrmIPScan));
|
||||
}
|
||||
|
||||
private void btnNetworkInfo_MouseClick(object sender, MouseEventArgs e)
|
||||
private void BtnNetworkInfo_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
CreateWindow(typeof(FrmNetworkInfo));
|
||||
}
|
||||
@@ -146,13 +150,13 @@ namespace VAR.Toolbox.UI
|
||||
|
||||
private Form CreateWindow(Type type)
|
||||
{
|
||||
Form frm = Activator.CreateInstance(type) as Form;
|
||||
var frm = Activator.CreateInstance(type) as Form;
|
||||
if (frm == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
_forms.Add(frm);
|
||||
frm.FormClosing += frmChild_FormClosing;
|
||||
frm.FormClosing += FrmChild_FormClosing;
|
||||
if ((frm as IToolForm)?.HasIcon == false)
|
||||
{
|
||||
frm.Icon = Icon;
|
||||
@@ -161,9 +165,9 @@ namespace VAR.Toolbox.UI
|
||||
return frm;
|
||||
}
|
||||
|
||||
private List<Form> _forms = new List<Form>();
|
||||
private readonly List<Form> _forms = new List<Form>();
|
||||
|
||||
private void frmChild_FormClosing(object sender, FormClosingEventArgs e)
|
||||
private void FrmChild_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
_forms.Remove((Form)sender);
|
||||
}
|
||||
|
||||
8
VAR.Toolbox/UI/Tools/FrmCoder.Designer.cs
generated
8
VAR.Toolbox/UI/Tools/FrmCoder.Designer.cs
generated
@@ -63,7 +63,7 @@
|
||||
this.btnDecode.TabIndex = 1;
|
||||
this.btnDecode.Text = "Decode";
|
||||
this.btnDecode.UseVisualStyleBackColor = true;
|
||||
this.btnDecode.Click += new System.EventHandler(this.btnDecodeBase64_Click);
|
||||
this.btnDecode.Click += new System.EventHandler(this.BtnDecode_Click);
|
||||
//
|
||||
// txtOutput
|
||||
//
|
||||
@@ -123,7 +123,7 @@
|
||||
this.cboCode.Name = "cboCode";
|
||||
this.cboCode.Size = new System.Drawing.Size(131, 21);
|
||||
this.cboCode.TabIndex = 4;
|
||||
this.cboCode.SelectedIndexChanged += new System.EventHandler(this.cboCode_SelectedIndexChanged);
|
||||
this.cboCode.SelectedIndexChanged += new System.EventHandler(this.CboCode_SelectedIndexChanged);
|
||||
//
|
||||
// btnEncode
|
||||
//
|
||||
@@ -134,7 +134,7 @@
|
||||
this.btnEncode.TabIndex = 3;
|
||||
this.btnEncode.Text = "Encode";
|
||||
this.btnEncode.UseVisualStyleBackColor = true;
|
||||
this.btnEncode.Click += new System.EventHandler(this.btnEncodeBase64_Click);
|
||||
this.btnEncode.Click += new System.EventHandler(this.BtnEncode_Click);
|
||||
//
|
||||
// btnSwap
|
||||
//
|
||||
@@ -145,7 +145,7 @@
|
||||
this.btnSwap.TabIndex = 4;
|
||||
this.btnSwap.Text = "Swap";
|
||||
this.btnSwap.UseVisualStyleBackColor = true;
|
||||
this.btnSwap.Click += new System.EventHandler(this.btnSwap_Click);
|
||||
this.btnSwap.Click += new System.EventHandler(this.BtnSwap_Click);
|
||||
//
|
||||
// FrmCoder
|
||||
//
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace VAR.Toolbox.UI
|
||||
|
||||
private ITextCoder _coder = null;
|
||||
|
||||
private void btnDecodeBase64_Click(object sender, EventArgs e)
|
||||
private void BtnDecode_Click(object sender, EventArgs e)
|
||||
{
|
||||
string output = string.Empty;
|
||||
try
|
||||
@@ -34,7 +34,7 @@ namespace VAR.Toolbox.UI
|
||||
txtOutput.Text = output;
|
||||
}
|
||||
|
||||
private void btnEncodeBase64_Click(object sender, EventArgs e)
|
||||
private void BtnEncode_Click(object sender, EventArgs e)
|
||||
{
|
||||
string output = string.Empty;
|
||||
try
|
||||
@@ -48,14 +48,14 @@ namespace VAR.Toolbox.UI
|
||||
txtOutput.Text = output;
|
||||
}
|
||||
|
||||
private void btnSwap_Click(object sender, EventArgs e)
|
||||
private void BtnSwap_Click(object sender, EventArgs e)
|
||||
{
|
||||
string temp = txtOutput.Text;
|
||||
txtOutput.Text = txtInput.Text;
|
||||
txtInput.Text = temp;
|
||||
}
|
||||
|
||||
private void cboCode_SelectedIndexChanged(object sender, EventArgs e)
|
||||
private void CboCode_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
string code = (string)cboCode.SelectedItem;
|
||||
_coder = TextCoderFactory.CreateFromName(code);
|
||||
|
||||
4
VAR.Toolbox/UI/Tools/FrmIPScan.Designer.cs
generated
4
VAR.Toolbox/UI/Tools/FrmIPScan.Designer.cs
generated
@@ -55,7 +55,7 @@
|
||||
this.btnScan.TabIndex = 1;
|
||||
this.btnScan.Text = "Scan";
|
||||
this.btnScan.UseVisualStyleBackColor = true;
|
||||
this.btnScan.Click += new System.EventHandler(this.btnScan_Click);
|
||||
this.btnScan.Click += new System.EventHandler(this.BtnScan_Click);
|
||||
//
|
||||
// lblStatus
|
||||
//
|
||||
@@ -76,7 +76,7 @@
|
||||
this.btnStop.TabIndex = 3;
|
||||
this.btnStop.Text = "Stop";
|
||||
this.btnStop.UseVisualStyleBackColor = true;
|
||||
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
|
||||
this.btnStop.Click += new System.EventHandler(this.BtnStop_Click);
|
||||
//
|
||||
// txtSubnet
|
||||
//
|
||||
|
||||
@@ -54,13 +54,13 @@ namespace VAR.Toolbox.UI
|
||||
}
|
||||
}
|
||||
|
||||
private void btnScan_Click(object sender, EventArgs e)
|
||||
private void BtnScan_Click(object sender, EventArgs e)
|
||||
{
|
||||
Thread thread = new Thread(() => { IPScan(txtSubnet.Text); });
|
||||
thread.Start();
|
||||
}
|
||||
|
||||
private void btnStop_Click(object sender, EventArgs e)
|
||||
private void BtnStop_Click(object sender, EventArgs e)
|
||||
{
|
||||
running = false;
|
||||
}
|
||||
|
||||
4
VAR.Toolbox/UI/Tools/FrmNetworkInfo.Designer.cs
generated
4
VAR.Toolbox/UI/Tools/FrmNetworkInfo.Designer.cs
generated
@@ -59,7 +59,7 @@
|
||||
this.ddlNetworkInterfaces.Name = "ddlNetworkInterfaces";
|
||||
this.ddlNetworkInterfaces.Size = new System.Drawing.Size(510, 21);
|
||||
this.ddlNetworkInterfaces.TabIndex = 0;
|
||||
this.ddlNetworkInterfaces.SelectedIndexChanged += new System.EventHandler(this.ddlNetworkInterfaces_SelectedIndexChanged);
|
||||
this.ddlNetworkInterfaces.SelectedIndexChanged += new System.EventHandler(this.DdlNetworkInterfaces_SelectedIndexChanged);
|
||||
//
|
||||
// lblID
|
||||
//
|
||||
@@ -226,7 +226,7 @@
|
||||
// timRefresh
|
||||
//
|
||||
this.timRefresh.Interval = 500;
|
||||
this.timRefresh.Tick += new System.EventHandler(this.timRefresh_Tick);
|
||||
this.timRefresh.Tick += new System.EventHandler(this.TimRefresh_Tick);
|
||||
//
|
||||
// FrmNetworkInfo
|
||||
//
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
#pragma warning disable IDE0019
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text;
|
||||
@@ -32,14 +34,14 @@ namespace VAR.Toolbox.UI
|
||||
timRefresh.Stop();
|
||||
}
|
||||
|
||||
private void ddlNetworkInterfaces_SelectedIndexChanged(object sender, EventArgs e)
|
||||
private void DdlNetworkInterfaces_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ListItem listItem = ddlNetworkInterfaces.SelectedItem as ListItem;
|
||||
var listItem = ddlNetworkInterfaces.SelectedItem as ListItem;
|
||||
if (listItem == null) { return; }
|
||||
RefreshInterface(listItem.ID);
|
||||
}
|
||||
|
||||
private void timRefresh_Tick(object sender, EventArgs e)
|
||||
private void TimRefresh_Tick(object sender, EventArgs e)
|
||||
{
|
||||
RefreshInterfaces();
|
||||
RefreshInterface();
|
||||
@@ -135,17 +137,17 @@ namespace VAR.Toolbox.UI
|
||||
{
|
||||
return string.Format("{0}kbps", Math.Round(dSpeed, 2));
|
||||
}
|
||||
dSpeed = dSpeed / 1000;
|
||||
dSpeed /= 1000;
|
||||
if (dSpeed < 1000)
|
||||
{
|
||||
return string.Format("{0}mbps", Math.Round(dSpeed, 2));
|
||||
}
|
||||
dSpeed = dSpeed / 1000;
|
||||
dSpeed /= 1000;
|
||||
if (dSpeed < 1000)
|
||||
{
|
||||
return string.Format("{0}gbps", Math.Round(dSpeed, 2));
|
||||
}
|
||||
dSpeed = dSpeed / 1000;
|
||||
dSpeed /= 1000;
|
||||
return string.Format("{0}tbps", Math.Round(dSpeed, 2));
|
||||
}
|
||||
|
||||
|
||||
6
VAR.Toolbox/UI/Tools/FrmProxyCmd.Designer.cs
generated
6
VAR.Toolbox/UI/Tools/FrmProxyCmd.Designer.cs
generated
@@ -89,7 +89,7 @@
|
||||
this.txtInput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.txtInput.Size = new System.Drawing.Size(413, 55);
|
||||
this.txtInput.TabIndex = 0;
|
||||
this.txtInput.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtInput_KeyDown);
|
||||
this.txtInput.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtInput_KeyDown);
|
||||
//
|
||||
// ddlCurrentConfig
|
||||
//
|
||||
@@ -101,7 +101,7 @@
|
||||
this.ddlCurrentConfig.Name = "ddlCurrentConfig";
|
||||
this.ddlCurrentConfig.Size = new System.Drawing.Size(342, 21);
|
||||
this.ddlCurrentConfig.TabIndex = 4;
|
||||
this.ddlCurrentConfig.SelectedIndexChanged += new System.EventHandler(this.ddlCurrentConfig_SelectedIndexChanged);
|
||||
this.ddlCurrentConfig.SelectedIndexChanged += new System.EventHandler(this.DdlCurrentConfig_SelectedIndexChanged);
|
||||
//
|
||||
// btnConfig
|
||||
//
|
||||
@@ -112,7 +112,7 @@
|
||||
this.btnConfig.TabIndex = 5;
|
||||
this.btnConfig.Text = "Config";
|
||||
this.btnConfig.UseVisualStyleBackColor = true;
|
||||
this.btnConfig.Click += new System.EventHandler(this.btnConfig_Click);
|
||||
this.btnConfig.Click += new System.EventHandler(this.BtnConfig_Click);
|
||||
//
|
||||
// FrmProxyCmd
|
||||
//
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
#pragma warning disable IDE0019
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
@@ -14,9 +16,9 @@ namespace VAR.Toolbox.UI
|
||||
|
||||
#region Declarations
|
||||
|
||||
private object _executionLock = new object();
|
||||
private readonly object _executionLock = new object();
|
||||
|
||||
private List<string> _cmdHistory = new List<string>();
|
||||
private readonly List<string> _cmdHistory = new List<string>();
|
||||
private int _currentHistoryIndex = -1;
|
||||
|
||||
#endregion Declarations
|
||||
@@ -33,7 +35,7 @@ namespace VAR.Toolbox.UI
|
||||
|
||||
#region UI events
|
||||
|
||||
private void txtInput_KeyDown(object sender, KeyEventArgs e)
|
||||
private void TxtInput_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (Monitor.IsEntered(_executionLock))
|
||||
{
|
||||
@@ -105,12 +107,12 @@ namespace VAR.Toolbox.UI
|
||||
}
|
||||
}
|
||||
|
||||
private void ddlCurrentConfig_SelectedIndexChanged(object sender, EventArgs e)
|
||||
private void DdlCurrentConfig_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CleanProxyCmdExecutor();
|
||||
}
|
||||
|
||||
private void btnConfig_Click(object sender, EventArgs e)
|
||||
private void BtnConfig_Click(object sender, EventArgs e)
|
||||
{
|
||||
FrmToolbox.StaticCreateWindow(typeof(FrmProxyCmdConfig));
|
||||
}
|
||||
@@ -130,8 +132,7 @@ namespace VAR.Toolbox.UI
|
||||
}
|
||||
private void CleanProxyCmdExecutor()
|
||||
{
|
||||
IDisposable disposableProxyCmdExecutor = _proxyCmdExecutor as IDisposable;
|
||||
if (disposableProxyCmdExecutor != null)
|
||||
if (_proxyCmdExecutor is IDisposable disposableProxyCmdExecutor)
|
||||
{
|
||||
disposableProxyCmdExecutor.Dispose();
|
||||
}
|
||||
@@ -180,8 +181,10 @@ namespace VAR.Toolbox.UI
|
||||
List<ProxyCmdConfigItem> configItems = FrmProxyCmdConfig.GetConfigurationItems();
|
||||
|
||||
string previousSelectedName = null;
|
||||
ProxyCmdConfigItem selectedConfig = ddlCurrentConfig.SelectedItem as ProxyCmdConfigItem;
|
||||
if (selectedConfig != null) { previousSelectedName = selectedConfig.Name; }
|
||||
if (ddlCurrentConfig.SelectedItem is ProxyCmdConfigItem selectedConfig)
|
||||
{
|
||||
previousSelectedName = selectedConfig.Name;
|
||||
}
|
||||
ddlCurrentConfig.Items.Clear();
|
||||
ddlCurrentConfig.Items.AddRange(configItems.ToArray());
|
||||
ddlCurrentConfig.SelectedIndex = 0;
|
||||
@@ -200,7 +203,7 @@ namespace VAR.Toolbox.UI
|
||||
|
||||
private string GetCurrentConfig()
|
||||
{
|
||||
ProxyCmdConfigItem selectedConfig = ddlCurrentConfig.SelectedItem as ProxyCmdConfigItem;
|
||||
var selectedConfig = ddlCurrentConfig.SelectedItem as ProxyCmdConfigItem;
|
||||
if (selectedConfig == null) { return null; }
|
||||
return selectedConfig.Config;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
this.btnScreenshoot.TabIndex = 1;
|
||||
this.btnScreenshoot.Text = "Screenshoot";
|
||||
this.btnScreenshoot.UseVisualStyleBackColor = true;
|
||||
this.btnScreenshoot.Click += new System.EventHandler(this.btnScreenshoot_Click);
|
||||
this.btnScreenshoot.Click += new System.EventHandler(this.BtnScreenshoot_Click);
|
||||
//
|
||||
// picViewer
|
||||
//
|
||||
@@ -67,7 +67,7 @@
|
||||
this.btnStartStop.TabIndex = 2;
|
||||
this.btnStartStop.Text = "Start";
|
||||
this.btnStartStop.UseVisualStyleBackColor = true;
|
||||
this.btnStartStop.Click += new System.EventHandler(this.btnStartStop_Click);
|
||||
this.btnStartStop.Click += new System.EventHandler(this.BtnStartStop_Click);
|
||||
//
|
||||
// FrmScreenshooter
|
||||
//
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace VAR.Toolbox.UI
|
||||
public bool HasIcon { get { return false; } }
|
||||
|
||||
private bool _repetitiveScreenshots = false;
|
||||
private Timer timTicker;
|
||||
private readonly Timer timTicker;
|
||||
private Bitmap bmpScreen = null;
|
||||
|
||||
public FrmScreenshooter()
|
||||
@@ -21,13 +21,15 @@ namespace VAR.Toolbox.UI
|
||||
InitializeComponent();
|
||||
|
||||
if (components == null) { components = new Container(); }
|
||||
timTicker = new Timer(components);
|
||||
timTicker.Interval = 16;
|
||||
timTicker.Enabled = false;
|
||||
timTicker = new Timer(components)
|
||||
{
|
||||
Interval = 16,
|
||||
Enabled = false
|
||||
};
|
||||
timTicker.Tick += TimTicker_Tick;
|
||||
}
|
||||
|
||||
private void btnScreenshoot_Click(object sender, EventArgs e)
|
||||
private void BtnScreenshoot_Click(object sender, EventArgs e)
|
||||
{
|
||||
bmpScreen = Screenshooter.CaptureScreen(bmpScreen);
|
||||
picViewer.ImageShow = bmpScreen;
|
||||
@@ -41,7 +43,7 @@ namespace VAR.Toolbox.UI
|
||||
timTicker.Start();
|
||||
}
|
||||
|
||||
private void btnStartStop_Click(object sender, EventArgs e)
|
||||
private void BtnStartStop_Click(object sender, EventArgs e)
|
||||
{
|
||||
GC.Collect();
|
||||
if (_repetitiveScreenshots)
|
||||
|
||||
4
VAR.Toolbox/UI/Tools/FrmTunnelTCP.Designer.cs
generated
4
VAR.Toolbox/UI/Tools/FrmTunnelTCP.Designer.cs
generated
@@ -48,7 +48,7 @@
|
||||
this.btnRun.TabIndex = 0;
|
||||
this.btnRun.Text = "Run";
|
||||
this.btnRun.UseVisualStyleBackColor = true;
|
||||
this.btnRun.Click += new System.EventHandler(this.btnRun_Click);
|
||||
this.btnRun.Click += new System.EventHandler(this.BtnRun_Click);
|
||||
//
|
||||
// btnStop
|
||||
//
|
||||
@@ -59,7 +59,7 @@
|
||||
this.btnStop.TabIndex = 1;
|
||||
this.btnStop.Text = "Stop";
|
||||
this.btnStop.UseVisualStyleBackColor = true;
|
||||
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
|
||||
this.btnStop.Click += new System.EventHandler(this.BtnStop_Click);
|
||||
//
|
||||
// lblRemoteHost
|
||||
//
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace VAR.Toolbox.UI
|
||||
btnRun.Enabled = true;
|
||||
}
|
||||
|
||||
private void btnStop_Click(object sender, EventArgs e)
|
||||
private void BtnStop_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_running == false) { return; }
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace VAR.Toolbox.UI
|
||||
btnRun.Enabled = true;
|
||||
}
|
||||
|
||||
private void btnRun_Click(object sender, EventArgs e)
|
||||
private void BtnRun_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_running == true) { return; }
|
||||
|
||||
|
||||
2
VAR.Toolbox/UI/Tools/FrmWebcam.Designer.cs
generated
2
VAR.Toolbox/UI/Tools/FrmWebcam.Designer.cs
generated
@@ -44,7 +44,7 @@
|
||||
this.btnStartStop.TabIndex = 4;
|
||||
this.btnStartStop.Text = "Start";
|
||||
this.btnStartStop.UseVisualStyleBackColor = true;
|
||||
this.btnStartStop.Click += new System.EventHandler(this.btnStartStop_Click);
|
||||
this.btnStartStop.Click += new System.EventHandler(this.BtnStartStop_Click);
|
||||
//
|
||||
// cboWebcams
|
||||
//
|
||||
|
||||
@@ -21,10 +21,10 @@ namespace VAR.Toolbox.UI
|
||||
|
||||
private void FrmWebcam_Load(object sender, EventArgs e)
|
||||
{
|
||||
cboWebcams_LoadData();
|
||||
CboWebcams_LoadData();
|
||||
}
|
||||
|
||||
private void webcam_NewFrame(object sender, Bitmap frame)
|
||||
private void Webcam_NewFrame(object sender, Bitmap frame)
|
||||
{
|
||||
picWebcam.ImageShow = frame;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ namespace VAR.Toolbox.UI
|
||||
}
|
||||
}
|
||||
|
||||
private void btnStartStop_Click(object sender, EventArgs e)
|
||||
private void BtnStartStop_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (webcam == null)
|
||||
{
|
||||
@@ -65,7 +65,7 @@ namespace VAR.Toolbox.UI
|
||||
if (cboWebcams.SelectedIndex < 0) { return; }
|
||||
WebcamObject webcamObject = (WebcamObject)cboWebcams.SelectedItem;
|
||||
webcam = new Webcam(webcamObject.Moniker);
|
||||
webcam.NewFrame += webcam_NewFrame;
|
||||
webcam.NewFrame += Webcam_NewFrame;
|
||||
}
|
||||
|
||||
private class WebcamObject
|
||||
@@ -79,7 +79,7 @@ namespace VAR.Toolbox.UI
|
||||
}
|
||||
};
|
||||
|
||||
private void cboWebcams_LoadData()
|
||||
private void CboWebcams_LoadData()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user