I get error CS0116 and I don't know how to fix it apparently the error is here:
private Point lastPoint;
Could anyone help me fix this? thanks
FULL CODE:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
private Point lastPoint;
public partial class Form1 : Form
{
EasyExploits.Module module = new EasyExploits.Module();
public Form1()
{
InitializeComponent();
}
Point lastPoint;
private void panel1_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.X - lastPoint.X;
this.Top += e.Y - lastPoint.Y;
}
}
private void panel1_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
}
private void panel1_MouseDown_1(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
}
private void panel1_MouseMove_1(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.X - lastPoint.X;
this.Top += e.Y - lastPoint.Y;
}
}
private void button1_Click(object sender, EventArgs e)
{
module.ExecuteScript(fastColoredTextBox1.Text);
}
private void button5_Click(object sender, EventArgs e)
{
module.LaunchExploit();
}
private void button7_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog1 = new OpenFileDialog();
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
openFileDialog1.Title = "Open";
fastColoredTextBox1.Text = File.ReadAllText(openFileDialog1.FileName);
}
}
private void button3_Click(object sender, EventArgs e)
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
using (Stream s = File.Open(saveFileDialog1.FileName, FileMode.CreateNew))
using (StreamWriter sw = new StreamWriter(s))
{
sw.Write(fastColoredTextBox1.Text);
}
}
}
private void button4_Click(object sender, EventArgs e)
{
listBox1.Items.Clear();
Functions.PopulateListBox(listBox1, "./Scripts", "*.txt");
Functions.PopulateListBox(listBox1, "./Scripts", "*.lua");
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
fastColoredTextBox1.Text = File.ReadAllText($"./Scripts/{listBox1.SelectedItem}");
}
private void Form1_Load(object sender, EventArgs e)
{
listBox1.Items.Clear();
Functions.PopulateListBox(listBox1, "./Scripts", "*.txt");
Functions.PopulateListBox(listBox1, "./Scripts", "*.lua");
}
private void button8_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void button6_Click(object sender, EventArgs e)
{
WindowState = FormWindowState.Minimized;
}
}
}
What I have tried:
I tried many tutorials but none of them helped me so I need help from you guys