This repository has been archived on 2022-08-05. You can view files and clone it, but cannot push or open issues or pull requests.
CC-Clicker/CC-Clicker 2.0/LocForm.cs

26 lines
732 B
C#
Raw Normal View History

2019-11-10 00:28:55 +01:00
using System;
using System.Windows.Forms;
2020-03-11 18:53:32 +01:00
using CC_Functions.W32;
2019-11-10 00:28:55 +01:00
namespace CC_Clicker_2._0
{
public partial class LocForm : Form
{
2020-03-11 18:53:32 +01:00
private bool _close;
2019-11-10 00:28:55 +01:00
public int X;
public int Y;
public LocForm() => InitializeComponent();
2020-03-11 18:53:32 +01:00
private void LocForm_FormClosing(object sender, FormClosingEventArgs e) => e.Cancel = !_close;
2019-11-10 00:28:55 +01:00
private void LocForm_MouseClick(object sender, MouseEventArgs e)
{
X = Cursor.Position.X;
Y = Cursor.Position.Y;
2020-03-11 18:53:32 +01:00
_close = true;
2019-11-10 00:28:55 +01:00
DialogResult = DialogResult.OK;
Close();
}
2020-03-11 18:53:32 +01:00
private void LocForm_Load(object sender, EventArgs e) => this.GetWnd32().Overlay = true;
2019-11-10 00:28:55 +01:00
}
2020-03-11 18:53:32 +01:00
}