예제 #1
0
        private void accList_DoubleClick(object sender, EventArgs e)
        {
            // Window rect
            Rectangle rect = FormHelper.GetWindowRectangle(this, proc.MainWindowHandle);

            // Positional data
            PositionData posData = positionData[0];

            if (rect.Width == 1280)
            {
                posData = positionData[0];
            }
            if (rect.Width == 1024)
            {
                posData = positionData[1];
            }
            if (rect.Width == 1600)
            {
                posData = positionData[2];
            }

            // Account
            if (accList.LastHoveredItem != null)
            {
                Account acc           = accList.LastHoveredItem.Account;
                string  cleanPassword = Encoding.UTF8.GetString(AES.Decrypt(acc.Password, acc.Salt, GetPasskey(acc.Username)));

                // Execute macro
                LoginMacro.ExecuteMacro(posData, rect, acc.Username, cleanPassword);

                // Exit app
                Application.Exit();
            }
        }
예제 #2
0
        /// <summary>
        /// Runs the macro for the specific account selected.
        /// </summary>
        private void tvAccounts_DoubleClick(object sender, EventArgs e)
        {
            // Avoid possibility of user selecting region node
            if (tvAccounts.SelectedNode.Tag != null)
            {
                // Window rect
                Rectangle rect = FormHelper.GetWindowRectangle(this, proc.MainWindowHandle);

                // Positional data
                PositionData posData = positionData[0];
                if (rect.Width == 1280)
                {
                    posData = positionData[0];
                }
                if (rect.Width == 1024)
                {
                    posData = positionData[1];
                }
                if (rect.Width == 1600)
                {
                    posData = positionData[2];
                }

                // Account
                Account acc           = (Account)tvAccounts.SelectedNode.Tag;
                string  cleanPassword = Encoding.UTF8.GetString(AES.Decrypt(acc.Password, acc.Salt, GetPasskey(acc.Username)));

                // Execute macro
                LoginMacro.ExecuteMacro(posData, rect, acc.Username, cleanPassword);

                // Exit app
                Application.Exit();
            }
        }