private void ListViewGrid_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == VisualBasic.Chr(13))
            {
                int _row = RowSel; int _col = ColSel;

                try
                {
                    if (_row >= Rows.Fixed &&
                        _row <= (Rows.Count - 1))
                    {
                        if (_col >= Cols.Fixed &&
                            _col <= (Cols.Count - 1))
                        {
                            object _userdata = GetUserData(_row, _col);
                            if (!Materia.IsNullOrNothing(_userdata))
                            {
                                if (_userdata is ListViewGridItem)
                                {
                                    ListViewGridItem _item = (ListViewGridItem)_userdata;
                                    ListViewGridSelectionEventArgs _args = new ListViewGridSelectionEventArgs(_item);
                                    OnListViewItemEnterKeyPressed(_args);
                                }
                            }
                        }
                    }
                }
                catch { }
            }
        }
 private void txt_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == VisualBasic.Chr(13))
     {
         btnSignIn_Click(btnSignIn, new EventArgs());
     }
 }
        private static string SimpleEncrypt(string value, string key)
        {
            string _encrypted = ""; int _keycount = key.Trim().Length;

            char[] _chars = value.ToCharArray();

            if (_keycount <= 7)
            {
                _keycount = 7;
            }

            foreach (char _char in _chars)
            {
                _encrypted += VisualBasic.Chr(VisualBasic.Asc(_char) + _keycount).ToString();
            }

            return(_encrypted);
        }