Пример #1
0
 private void DAB_Click(object sender, EventArgs e)
 {
     if (account.Length > 0)
     {
         LoginTableAdapter LTA = new LoginTableAdapter();
         LTA.DeleteByDesc(account);
     }
     UCL.ReturnUC(UCAL.UCID);
     FL.UCAL.Instance.DrawAccs();
 }
Пример #2
0
 private void DAB_Click(object sender, EventArgs e)
 {
     if (account.Length > 0)
     {
         LoginTableAdapter LTA = new LoginTableAdapter();
         LTA.DeleteByDesc(account);
     }
     ((PwBot)Owner).DrawAccs();
     this.Close();
 }
Пример #3
0
        public static Dictionary <int, String> GetAccs()
        {
            Dictionary <int, String> O   = new Dictionary <int, String>();
            LoginTableAdapter        LTA = new LoginTableAdapter();

            foreach (LoginRow r in LTA.GetData())
            {
                O.Add(r.id, r.description);
            }
            return(O);
        }
Пример #4
0
 private void AddButton_Click(object sender, EventArgs e)
 {
     try
     {
         LoginTableAdapter LTA   = new LoginTableAdapter();
         String            LGN_R = LGN.Text.Length == 0 ? LGN_DEF : LGN.Text;
         String            PSW_R = PSW.Text.Length == 0 ? PSW_DEF : PSW.Text;
         String            DES_R = DES.Text.Length == 0 ? DES_DEF : DES.Text;
         int PNU_R = PNU.Text.Length == 0 ? 1 : Int32.Parse(PNU.Text);
         LTA.AddLogin(LGN_R, PSW_R, DES_R, PNU_R);
     }
     catch { }
     ((PwBot)Owner).DrawAccs();
     this.Close();
 }
Пример #5
0
 public AutoLogin(int DB_ID)
 {
     this.DbId = DB_ID;
     LTA       = new LoginTableAdapter();
     foreach (LoginRow r in LTA.GetById(DB_ID))
     {
         this.Login            = r.login;
         this.Password         = r.password;
         this.refresh_token    = r.refresh_token;
         this.ACC_DESC         = r.description;
         this.character_number = r.pers_num;
         this.expire           = r.expire.Length > 0 ? DateTime.Parse(r.expire) : DateTime.Now.AddSeconds(-60);
     }
     AuthResult = Auth();
     UpdatePath();
 }
Пример #6
0
 private void AddButton_Click(object sender, EventArgs e)
 {
     if (LGN.Text.Length == 0 || PSW.Text.Length == 0 || DES.Text.Length == 0)
     {
         return;
     }
     try
     {
         LoginTableAdapter LTA = new LoginTableAdapter();
         int PNU_R             = PNU.Text.Length == 0 ? 1 : Int32.Parse(PNU.Text);
         LTA.UpdateLogin(LGN.Text, PSW.Text, DES.Text, PNU_R, ICON, ID);
     }
     catch { }
     UCL.ReturnUC(UCAL.UCID);
     FL.UCAL.Instance.DrawAccs();
 }
Пример #7
0
 private void AddButton_Click(object sender, EventArgs e)
 {
     if (LGN.Text.Length == 0 || PSW.Text.Length == 0 || DES.Text.Length == 0)
     {
         return;
     }
     try
     {
         LoginTableAdapter LTA = new LoginTableAdapter();
         int PNU_R             = PNU.Text.Length == 0 ? 1 : Int32.Parse(PNU.Text);
         LTA.UpdateLogin(LGN.Text, PSW.Text, DES.Text, PNU_R, ICON, ID);
     }
     catch { }
     ((PwBot)Owner).DrawAccs();
     this.Close();
 }
Пример #8
0
        public static List <GameAccount> GetAccs()
        {
            List <GameAccount> O   = new List <GameAccount>();
            LoginTableAdapter  LTA = new LoginTableAdapter();

            foreach (LoginRow r in LTA.GetData())
            {
                GameAccount a = new GameAccount();
                a.id       = r.id;
                a.icon     = r.icon;
                a.name     = r.description;
                a.Login    = r.login;
                a.Password = r.password;
                a.PERS_ID  = r.pers_num;
                O.Add(a);
            }
            O.Sort(delegate(GameAccount x, GameAccount y) { return(x.name.CompareTo(y.name)); });
            return(O);
        }
Пример #9
0
 private void AddButton_Click(object sender, EventArgs e)
 {
     try
     {
         LoginTableAdapter LTA   = new LoginTableAdapter();
         String            LGN_R = LGN.Text.Length == 0 ? LGN_DEF : LGN.Text;
         String            PSW_R = PSW.Text.Length == 0 ? PSW_DEF : PSW.Text;
         String            DES_R = DES.Text.Length == 0 ? DES_DEF : DES.Text;
         int PNU_R = PNU.Text.Length == 0 ? 1 : Int32.Parse(PNU.Text);
         foreach (GameAccount acc in AutoLogin.GetAccs())
         {
             if (acc.name.Equals(DES_R))
             {
                 return;
             }
         }
         LTA.AddLogin(LGN_R, PSW_R, DES_R, PNU_R, ICON);
     }
     catch { }
     ((PwBot)Owner).DrawAccs();
     this.Close();
 }
Пример #10
0
 public bool getLogin(string username, string password)
 {
     objLogin = new LoginTableAdapter();
     return(Convert.ToBoolean(objLogin.GetLogin(username, password)));
 }
Пример #11
0
 public int CheckLoginData(LoginDetail data)
 {
     int res = -1;
     Object obj;
     try
     {
         LoginTableAdapter loginAdapter = new LoginTableAdapter();
         obj = loginAdapter.CheckLoginData(data.email, data.password);
         if (obj != null)
         {
             res = Convert.ToInt32(obj);
         }
     }
     catch (Exception ex)
     {
         EventLog.WriteEntry("Yaniv program", ex.Message, EventLogEntryType.SuccessAudit, 1);
     }
     return res;
 }
Пример #12
0
 public int ActivateUserLoginByLoginID(int loginID, int userID)
 {
     LoginTableAdapter loginAdapter = new LoginTableAdapter();
     return loginAdapter.ActivateUserLoginByLoginID(loginID, userID);
 }