NYAN CAT 9eb913b528 Update
added mutex
added notification
minor bugs fixed
2019-05-04 22:26:16 -07:00

49 lines
1.4 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 = "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);
}
}
}