NYAN CAT 9f269b053d Update
fixed remote desktop
fixed server and client stabilty
minor bugs fixes
2019-04-29 19:35:44 -07:00

51 lines
1.5 KiB
C#

using System;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
namespace AsyncRAT_Sharp.Forms
{
public partial class FormPorts : Form
{
private static bool isOK = false;
public FormPorts()
{
InitializeComponent();
this.Opacity = 0;
}
private void PortsFrm_Load(object sender, EventArgs e)
{
Methods.FadeIn(this, 5);
textPorts.Text = Settings.Port;
textPorts.Text = "6606, 7707, 8808";
if (Properties.Settings.Default.Ports.Length > 0)
textPorts.Text = Properties.Settings.Default.Ports;
if (Properties.Settings.Default.Password.Length > 0)
textPassword.Text = Properties.Settings.Default.Password;
this.Text = $"{Settings.Version} | Welcome {Environment.UserName}";
}
private void button1_Click(object sender, EventArgs e)
{
if (textPorts.Text.Length > 0 && textPassword.Text.Length > 0)
{
Properties.Settings.Default.Ports = textPorts.Text;
Properties.Settings.Default.Password = textPassword.Text;
Properties.Settings.Default.Save();
isOK = true;
this.Close();
}
}
private void PortsFrm_FormClosed(object sender, FormClosedEventArgs e)
{
if (!isOK)
Environment.Exit(0);
}
}
}