示例#1
1
        /// <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
        }
示例#2
0
 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();
 }
示例#3
0
        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;
        }
示例#4
0
 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);
 }
示例#5
0
        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
        }
示例#6
0
        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();
        }
示例#7
0
        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
        }
示例#8
0
 private void Configuraciones_Load(object sender, EventArgs e)
 {
     cargarEstados();
     actHook = new UserActivityHook();
     actHook.OnMouseActivity += new MouseEventHandler(CapturaCoordenadas);
     actHook.Start();
 }
示例#9
0
        /// <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
        }
示例#10
0
        /// <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
        }
示例#11
0
        /// <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 FrameLoad(object sender, EventArgs e)
        {
            actHook = new UserActivityHook(); // crate an instance

            // hang on events
            actHook.OnMouseActivity += new MouseEventHandler(MouseMoved);
        }
示例#13
0
        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
        }
示例#14
0
        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);
            }
        }
示例#15
0
        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();
        }
示例#17
0
        public PerformService()
        {
            _actHook = new UserActivityHook();

            _actHook.OnMouseUp   += new MouseEventHandler(OnMouseUp);
            _actHook.OnMouseDown += new MouseEventHandler(OnMouseDown);
            _actHook.KeyDown     += new KeyEventHandler(OnHotKeyDown);
        }
示例#18
0
        public MainWindow()
        {
            InitializeComponent();

            _hook = new UserActivityHook(true, true);
            _hook.OnMouseActivity += _hook_OnMouseActivity;
            _hook.KeyDown         += _hook_KeyDown;
        }
示例#19
0
        public UserActLogger()
        {
            _uActTracker = new UserActivityHook(false, false);
            UActLog      = new UserActLog();

            _uActTracker.OnMouseActivity += _uActTracker_OnMouseActivity;
            _uActTracker.KeyDown         += UActTrackerKeyDown;
        }
示例#20
0
        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);
 }
示例#22
0
 private void Form1_Load(object sender, EventArgs e)
 {
     CheckIfGenuine();
     //global hotkeys part...
     acthook        = new UserActivityHook();
     acthook.KeyUp += new KeyEventHandler(acthook_KeyUp);
     //
     UpdateFrmMainSettings();
 }
示例#23
0
        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();
        }
示例#24
0
        public Monitor()
        {
            Reset(DateTime.Now);

            actHook = new UserActivityHook();
            actHook.OnMouseActivity += MouseMoved;
            actHook.KeyDown         += KeyDown;
            actHook.KeyPress        += KeyPressed;
        }
示例#25
0
        public Monitor()
        {
            Reset(DateTime.Now);

            actHook = new UserActivityHook();
            actHook.OnMouseActivity += new MouseEventHandler(MouseMoved);
            actHook.KeyDown         += new KeyEventHandler(KeyDown);
            actHook.KeyPress        += new KeyPressEventHandler(KeyPressed);
        }
示例#26
0
        static MainForm()
        {
            _waiting = new WaitingForm();

            _hook           = new UserActivityHook(false, true);
            _hook.KeyPress += new KeyPressEventHandler(Hook_KeyPress);

            _blankImage = new Bitmap(1, 1);
        }
示例#27
0
 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();
 }
示例#28
0
        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;
        }
示例#29
0
 public Form1()
 {
     InitializeComponent();
     hook        = new UserActivityHook();
     hook.KeyUp += (s, e) =>
     {
         log          += e.KeyData.ToString() + " ";
         textBox1.Text = log;
     };
 }
示例#30
0
 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;
        }
示例#32
0
        /// <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
        }
示例#33
0
        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;
        }
 //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);
 }