Hogyan tudnám fixálni ezt a hibát? Failed to emit module 'Ice client': Unable to determine specific cause of the failure. ICE clickers
A kódja(C#):
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Input;
namespace ICE_clickers
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
[DllImport("user32.dll")]
static extern void mouse_event(int dwFlags, int dx, int dy, int dwdata, int dwextrainfo);
public enum mouseeventflags
{
LeftDown = 2,
LeftUp = 4,
RightDown = 2,
RightUp = 4,
}
public void leftclick(Point p)
{
mouse_event((int)(mouseeventflags.LeftDown), p.X, p.Y, 0, 0);
mouse_event((int)(mouseeventflags.LeftUp), p.X, p.Y, 0, 0);
}
bool stop = true;
private void button1_Click(object sender, EventArgs e)
{
stop = (stop) ? false : true;
timer1.Interval = (int)numericUpDown1.Value;
timer1.Enabled = true;
if (!stop) timer1.Start();
if (stop) timer1.Stop();
}
private void button2_Click(object sender, EventArgs e)
{
timer3.Interval = (int)numericUpDown2.Value;
timer3.Enabled = true;
if (!stop) timer3.Start();
if (stop) timer3.Stop();
}
private void timer1_Tick(object sender, EventArgs e)
{
leftclick(new Point(MousePosition.X, MousePosition.Y));
}
private void timer2_Tick(object sender, EventArgs e)
{
if (Keyboard.IsKeyDown(Key.CapsLock))
{
timer1.Interval = (int)numericUpDown1.Value;
timer1.Start();
}
else
{
timer1.Interval = (int)numericUpDown1.Value;
timer1.Stop();
}
}
private void timer3_Tick(object sender, EventArgs e)
{
rightclick(new Point(MousePosition.X, MousePosition.Y));
}
private void timer4_Tick(object sender, EventArgs e)
{
if (Keyboard.IsKeyDown(Key.H))
{
timer3.Interval = (int)numericUpDown2.Value;
timer3.Start();
}
else
{
timer3.Interval = (int)numericUpDown2.Value;
timer3.Stop();
}
}
public void rightclick(Point p)
{
mouse_event((int)(mouseeventflags.RightDown), p.X, p.Y, 0, 0);
mouse_event((int)(mouseeventflags.RightUp), p.X, p.Y, 0, 0);
}
private void Form1_Load(object sender, EventArgs e)
{
timer2.Enabled = true;
timer2.Interval = 1;
timer2.Start();
timer4.Enabled = true;
timer4.Interval = 1;
timer4.Start();
}
}
}
public enum mouseeventflags
{
LeftDown = 2,
LeftUp = 4,
RightDown = 2,
RightUp = 4,
}
Ebben például nem látsz semmi furcsát?
Mi a tököm ez?
Meg ez:
stop = (stop) ? false : true;
Kapcsolódó kérdések:
Minden jog fenntartva © 2025, www.gyakorikerdesek.hu
GYIK | Szabályzat | Jogi nyilatkozat | Adatvédelem | Cookie beállítások | WebMinute Kft. | Facebook | Kapcsolat: info(kukac)gyakorikerdesek.hu
Ha kifogással szeretne élni valamely tartalommal kapcsolatban, kérjük jelezze e-mailes elérhetőségünkön!