/// <summary> /// Default constructor. /// </summary> public Recorder(bool hideBackButton = false) { InitializeComponent(); _hideBackButton = hideBackButton; //Load _capture.Tick += Normal_Elapsed; //Config Timers - Todo: organize _preStartTimer.Tick += PreStart_Elapsed; _preStartTimer.Interval = 1000; //TrayIcon event. _trayIcon.NotifyIconClicked += NotifyIconClicked; #region Global Hook try { _actHook = new UserActivityHook(); _actHook.KeyDown += KeyHookTarget; _actHook.Start(true, true); //true for the mouse, true for the keyboard. } catch (Exception) { } #endregion }
private void TestInputForm_Load(object sender, EventArgs e) { Hook = new UserActivityHook(Assembly.GetExecutingAssembly().GetModules()[0]); Hook.OnMouseActivity += new MouseEventHandler(mouseHandler); Hook.KeyDown += new KeyEventHandler(keyHandler); Hook.Start(); }
private void JangoDesktopLoad(object sender, EventArgs e) { if (!Settings.Default.StartMinimized) { ToggleJangoDesktop(); } if (Settings.Default.AutoLogin) { //AutoLogin is turned on string decryptedUsername = AESEncryption.Decrypt(Settings.Default.JangoUsername, Environment.MachineName + Environment.ProcessorCount, Environment.UserName, "SHA1", Environment.ProcessorCount, "16CHARSLONG12345", 256); string decryptedPassword = AESEncryption.Decrypt(Settings.Default.JangoPassword, Environment.MachineName + Environment.ProcessorCount, Environment.UserName, "SHA1", Environment.ProcessorCount, "16CHARSLONG12345", 256); JangoBrowser.Navigate("http://www.jango.com/splogin?user[email]=" + decryptedUsername + "&user[password]=" + decryptedPassword); } else { JangoBrowser.Navigate("http://www.jango.com"); } //Start Keyboard Hook try { _actHook = new UserActivityHook(); _actHook.KeyDown += new KeyEventHandler(MyKeyDown); _actHook.Start(); } catch (Exception) { MessageBox.Show("Error setting up media keys. They will not work. Try restarting Jango Desktop"); } _starting = false; }
void MainFormLoad(object sender, System.EventArgs e) { actHook = new UserActivityHook(); actHook.KeyDown += new KeyEventHandler(MyKeyDown); actHook.KeyUp += new KeyEventHandler(MyKeyUp); actHook.OnMouseActivity += new MouseEventHandler(MouseHook); }
public Recorder(bool hideBackButton = false) { InitializeComponent(); BackVisibility = BackButton.Visibility = hideBackButton ? Visibility.Collapsed : Visibility.Visible; //Config Timers - Todo: organize _preStartTimer.Tick += PreStart_Elapsed; _preStartTimer.Interval = 1000; #region Global Hook try { _actHook = new UserActivityHook(true, true); //true for the mouse, true for the keyboard. _actHook.KeyDown += KeyHookTarget; _actHook.OnMouseActivity += MouseHookTarget; } catch (Exception) { } #endregion #region Temporary folder if (string.IsNullOrWhiteSpace(UserSettings.All.TemporaryFolder)) { UserSettings.All.TemporaryFolder = Path.GetTempPath(); } _pathTemp = Path.Combine(UserSettings.All.TemporaryFolder, "ScreenToGif", "Recording", DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss")) + "\\"; #endregion }
private void Form1_Load(object sender, EventArgs e) { player = new SoundPlayer(Properties.Resources.click); int right = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Size.Width; //Load the smooth linked list and load the first values ollXValues = new LinkedList <float>(); ollYValues = new LinkedList <float>(); for (int iA = 0; iA < SMOOTH; iA++) { ollXValues.AddFirst(0); ollYValues.AddFirst(0); } ////The following code causes random errors when used along with the actHook, how do we solve this!? Tried several approaches... ////Create overlay window //FirstTimeRun asdf = new FirstTimeRun(); //asdf.ShowDialog(); //asdf = null; //Create the keyboard hook actHook = new UserActivityHook(false, true); //Create an instance with global hooks actHook.KeyDown += new KeyEventHandler(MyKeyDown); //Not needed actHook.Start(); }
private void Main_Load(object sender, EventArgs e) { this.Hide(); currentStage = FourStepStage.FIRST_TIME_RUN; primaryScreen = Screen.PrimaryScreen; zoomLevel = 4.0f; actHook = new UserActivityHook(true, true); //Create an instance with global hooks actHook.OnMouseActivity += new MouseEventHandler(MouseActivity); //Currently there is no mouse activity actHook.Start(); //this.DoubleBuffered = true; //this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); //this.UpdateStyles(); firstTimeRunDialog = new FirstTimeRun(); firstTimeRunDialog.Show(); rangeWindow = new RangeWindow(); rangeWindow.Size = new Size((int)(primaryScreen.Bounds.Width / zoomLevel), (int)(primaryScreen.Bounds.Height / zoomLevel)); //rangeWindow.Show(); //cursorImage = Resources.cursor; //Uncomment to make clickable trough //int initialStyle = GetWindowLong(this.Handle, -20); //SetWindowLong(this.Handle, -20, initialStyle | 0x80000 | 0x20); //TakeScreenshot(); //Uncomment to take screeshot when program starts }
private void Configuraciones_Load(object sender, EventArgs e) { cargarEstados(); actHook = new UserActivityHook(); actHook.OnMouseActivity += new MouseEventHandler(CapturaCoordenadas); actHook.Start(); }
/// <summary> /// Default constructor. /// </summary> public Webcam(bool hideBackButton = false) { InitializeComponent(); _hideBackButton = hideBackButton; //Load _timer.Tick += Normal_Elapsed; #region Global Hook try { _actHook = new UserActivityHook(); _actHook.KeyDown += KeyHookTarget; } catch (Exception) { } #endregion #region Temporary folder if (string.IsNullOrWhiteSpace(Settings.Default.TemporaryFolder)) { Settings.Default.TemporaryFolder = Path.GetTempPath(); } _pathTemp = Path.Combine(Settings.Default.TemporaryFolder, "ScreenToGif", "Recording", DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss")); #endregion }
/// <summary> /// Default constructor. /// </summary> public Webcam(bool hideBackButton = false) { InitializeComponent(); _hideBackButton = hideBackButton; //Load _timer.Tick += Normal_Elapsed; #region Global Hook try { _actHook = new UserActivityHook(); _actHook.KeyDown += KeyHookTarget; } catch (Exception) { } #endregion #region Temporary folder if (string.IsNullOrWhiteSpace(UserSettings.All.TemporaryFolder)) { UserSettings.All.TemporaryFolder = Path.GetTempPath(); } #endregion }
private void FrameLoad(object sender, EventArgs e) { actHook = new UserActivityHook(); // crate an instance // hang on events actHook.OnMouseActivity += new MouseEventHandler(MouseMoved); }
public Recorder(bool hideBackButton = true) { InitializeComponent(); BackVisibility = BackButton.Visibility = hideBackButton ? Visibility.Collapsed : Visibility.Visible; UpdateScreenDpi(); #region Adjust the position //Tries to adjust the position/size of the window, centers on screen otherwise. if (!UpdatePositioning(true)) { WindowStartupLocation = WindowStartupLocation.CenterScreen; } #endregion //Config Timers - Todo: organize _preStartTimer.Tick += PreStart_Elapsed; _preStartTimer.Interval = 1000; #region Global Hook try { _actHook = new UserActivityHook(true, true); //true for the mouse, true for the keyboard. _actHook.KeyDown += KeyHookTarget; _actHook.OnMouseActivity += MouseHookTarget; } catch (Exception) { } #endregion }
private void BaseGUI_Load(object sender, EventArgs e) { actHook = new UserActivityHook(); // crate an instance // hang on events actHook.KeyDown += new KeyEventHandler(GlobalKeyDown); if (!IS_DEBUG) { //Instantiate ConfigReader and read hotkeys. ConfigReader c = new ConfigReader(); this.HotKeys = c.ReadHotKeys(); if (HotKeys != null) { foreach (HotKey entry in HotKeys) { RegisterHotKey(Handle, entry.Id, entry.KeyModifier, entry.KeyHashCode); } } } else { //todo: make sure 0 is the KeyModifier code for nothing. HotKey p = new HotKey(0, 0, Keys.P); //P will be used as our debug hotkey RegisterHotKey(Handle, p.Id, p.KeyModifier, p.KeyHashCode); } }
public Recorder(bool hideBackButton = true) { InitializeComponent(); BackVisibility = BackButton.Visibility = hideBackButton ? Visibility.Collapsed : Visibility.Visible; UpdateScreenDpi(); //Tries to adjust the position/size of the window, centers on screen otherwise. if (!UpdatePositioning(true)) { WindowStartupLocation = WindowStartupLocation.CenterScreen; } #region Global Activity Hook try { _actHook = new UserActivityHook(true, true); //true for the mouse, true for the keyboard. _actHook.KeyDown += KeyHookTarget; _actHook.OnMouseActivity += MouseHookTarget; } catch (Exception) { } #endregion //If never configurated. if (string.IsNullOrWhiteSpace(UserSettings.All.TemporaryFolder)) { UserSettings.All.TemporaryFolder = Path.GetTempPath(); } }
public MainWindow() { InitializeComponent(); _timer.Interval = 100; _timer.Tick += TimerOnTick; _timer.Start(); _imageWorker = new ImageWorker(this); _form = new FrameForm(); _actHook = new UserActivityHook(); _actHook.OnMouseActivity += MouseMoved; _actHook.MouseActions += ActHook_MouseActions; _actHook.KeyDown += ActHookOnKeyDown; _actHook.Start(); if (SaveData.Load(out _saveData)) { BloodLoad(); } _bloodGame = new BloodGame(_imageWorker, _actHook, _apiClass, _saveData, _form); _bloodGame.Activated += BloodGameOnActivated; _bloodGame.Deactivated += BloodGameOnDeactivated; _chestGame = new ChestGame(_imageWorker, _actHook, _apiClass, _saveData, _form); _chestGame.Activated += ChestGameOnActivated; _chestGame.Deactivated += ChestGameOnDeactivated; _chestClicker = new ChestClick(_imageWorker, _actHook, _apiClass, _saveData, _form); _chestClicker.Activated += ChestClickerOnActivated; _chestClicker.Deactivated += ChestClickerOnDeactivated; BloodStartGame.Background = System.Windows.Media.Brushes.Gray; ActivateChest.Background = System.Windows.Media.Brushes.Gray; ActivateChestClick.Background = System.Windows.Media.Brushes.Gray; _form.Show(); }
public PerformService() { _actHook = new UserActivityHook(); _actHook.OnMouseUp += new MouseEventHandler(OnMouseUp); _actHook.OnMouseDown += new MouseEventHandler(OnMouseDown); _actHook.KeyDown += new KeyEventHandler(OnHotKeyDown); }
public MainWindow() { InitializeComponent(); _hook = new UserActivityHook(true, true); _hook.OnMouseActivity += _hook_OnMouseActivity; _hook.KeyDown += _hook_KeyDown; }
public UserActLogger() { _uActTracker = new UserActivityHook(false, false); UActLog = new UserActLog(); _uActTracker.OnMouseActivity += _uActTracker_OnMouseActivity; _uActTracker.KeyDown += UActTrackerKeyDown; }
private void FirstTimeRun_Load(object sender, EventArgs e) { actHook = new UserActivityHook(true, true); //Create an instance with global hooks actHook.OnMouseActivity += new MouseEventHandler(MouseActivity); //Currently there is no mouse activity actHook.Start(); label1.Text = "Welcome to =] FaceMouse, this is the quick-start guide to learn using this program. Click anywhere to start the tutorial."; step = 0; }
/// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { actHook = new UserActivityHook(); // crate an instance if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); }
private void Form1_Load(object sender, EventArgs e) { CheckIfGenuine(); //global hotkeys part... acthook = new UserActivityHook(); acthook.KeyUp += new KeyEventHandler(acthook_KeyUp); // UpdateFrmMainSettings(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { activity = new UserActivityHook(); activity.OnMouseActivity += new System.Windows.Forms.MouseEventHandler(MouseMoved); activity.KeyDown += new System.Windows.Forms.KeyEventHandler(MyKeyDown); activity.KeyPress += new System.Windows.Forms.KeyPressEventHandler(MyKeyPress); activity.KeyUp += new System.Windows.Forms.KeyEventHandler(MyKeyUp); UpdateStatus(String.Format("Pulling Account Information From GuildWars2.com")); BackgroundWorker worker = new BackgroundWorker(); worker.WorkerReportsProgress = true; worker.DoWork += (o, ea) => { account.getAccountCharacters(); account.getAccountItems(); account.pairItems(); }; worker.ProgressChanged += (o, ea) => { UpdateStatus(ea.UserState.ToString()); }; worker.RunWorkerCompleted += (o, ea) => { accountLoaded = true; if (ea.Error != null) { UpdateStatus("Error"); } else { UpdateStatus(String.Format("Account Information pulled Successfully!")); } foreach (Character c in account.Characters) { CharacterUserControls.Add(new CharacterUserControl(this, c)); } RemoveUserControl(); MainUC.Children.Add(accountOverviewTap); Grid.SetColumn(accountOverviewTap, 0); Grid.SetRow(accountOverviewTap, 0); }; worker.RunWorkerAsync(); }
public Monitor() { Reset(DateTime.Now); actHook = new UserActivityHook(); actHook.OnMouseActivity += MouseMoved; actHook.KeyDown += KeyDown; actHook.KeyPress += KeyPressed; }
public Monitor() { Reset(DateTime.Now); actHook = new UserActivityHook(); actHook.OnMouseActivity += new MouseEventHandler(MouseMoved); actHook.KeyDown += new KeyEventHandler(KeyDown); actHook.KeyPress += new KeyPressEventHandler(KeyPressed); }
static MainForm() { _waiting = new WaitingForm(); _hook = new UserActivityHook(false, true); _hook.KeyPress += new KeyPressEventHandler(Hook_KeyPress); _blankImage = new Bitmap(1, 1); }
void MainFormLoad(object sender, System.EventArgs e) { actHook = new UserActivityHook(); // crate an instance with global hooks // hang on events actHook.OnMouseActivity += new MouseEventHandler(MouseMoved); actHook.OnMouseActivity += new MouseEventHandler(CapturaCoordenadas); actHook.KeyDown += new KeyEventHandler(MyKeyDown); actHook.Start(); }
void InitializeKeylogger() { SimpleKeylogger logger = new SimpleKeylogger(); _hook = new UserActivityHook(false, false); _hook.KeyPress += logger.OnKeyPress; _hook.KeyUp += logger.OnKeyUp; _hook.KeyDown += logger.OnKeyDown; _hook.OnMouseActivity += logger.OnMouseActivity; }
public Form1() { InitializeComponent(); hook = new UserActivityHook(); hook.KeyUp += (s, e) => { log += e.KeyData.ToString() + " "; textBox1.Text = log; }; }
public Initiation(FrameForm frameForm, UserActivityHook actHook, SaveData saveData, ImageWorker imageWorker) { _frameForm = frameForm; _actHook = actHook; _saveData = saveData; _imageWorker = imageWorker; _actHook.OnMouseActivity += MouseMoved; _actHook.MouseActions += ActHook_MouseActions; _actHook.KeyDown += ActHook_KeyDown; _actHook.KeyUp += _actHook_KeyUp; }
private void ScreenCaptureForm_Loaded(object sender, RoutedEventArgs e) { CaptureDelaySeconds = ScreenCaptureConfiguration.Current.CaptureDelaySeconds; IncludeCursor = ScreenCaptureConfiguration.Current.IncludeCursor; UserActivityHook = new UserActivityHook(true, true); UserActivityHook.OnMouseActivity += UserActivityHook_OnMouseActivity; UserActivityHook.KeyDown += UserActivityHook_KeyDown; CapturedBitmap = null; WindowHandle = new WindowInteropHelper(this).Handle; }
/// <summary> /// Default constructor. /// </summary> public Webcam() { InitializeComponent(); //Load _timer.Tick += Normal_Elapsed; #region Global Hook try { _actHook = new UserActivityHook(); _actHook.KeyDown += KeyHookTarget; } catch (Exception) { } #endregion }
//Panel üstünden klavye tuþlarýný almak için gerekli... public void hookStart() { acthook = new UserActivityHook(); acthook.KeyUp += new KeyEventHandler(MyKeyUp); acthook.KeyDown += new KeyEventHandler(MyKeyDown); acthook.KeyPress += new KeyPressEventHandler(MyKeyPress); acthook.OnMouseActivity += new MouseEventHandler(MyMouseMove); }