2015-01-27 22:56:52 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Windows.Forms;
|
2015-06-25 20:22:45 +00:00
|
|
|
|
using xServer.Core.Helper;
|
2015-01-27 22:56:52 +00:00
|
|
|
|
|
|
|
|
|
namespace xServer.Forms
|
|
|
|
|
{
|
|
|
|
|
public partial class FrmUploadAndExecute : Form
|
|
|
|
|
{
|
|
|
|
|
private readonly int _selectedClients;
|
|
|
|
|
|
|
|
|
|
public FrmUploadAndExecute(int selected)
|
|
|
|
|
{
|
|
|
|
|
_selectedClients = selected;
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void FrmUploadAndExecute_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
2015-06-25 20:22:45 +00:00
|
|
|
|
this.Text = Helper.GetWindowTitle("Upload & Execute", _selectedClients);
|
2015-01-27 22:56:52 +00:00
|
|
|
|
chkRunHidden.Checked = Core.Misc.UploadAndExecute.RunHidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnBrowse_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
using (OpenFileDialog ofd = new OpenFileDialog())
|
|
|
|
|
{
|
|
|
|
|
ofd.Multiselect = false;
|
|
|
|
|
ofd.Filter = "Executable (*.exe)|*.exe";
|
|
|
|
|
if (ofd.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
2015-05-26 13:55:52 +00:00
|
|
|
|
txtPath.Text = ofd.FileName;
|
2015-01-27 22:56:52 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnUploadAndExecute_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2015-05-26 13:55:52 +00:00
|
|
|
|
Core.Misc.UploadAndExecute.FilePath = File.Exists(txtPath.Text) ? txtPath.Text : string.Empty;
|
|
|
|
|
Core.Misc.UploadAndExecute.RunHidden = chkRunHidden.Checked;
|
|
|
|
|
|
2015-01-27 22:56:52 +00:00
|
|
|
|
this.DialogResult = DialogResult.OK;
|
|
|
|
|
this.Close();
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-04-21 18:27:52 +00:00
|
|
|
|
}
|