示例#1
0
        //private string resultFile;
        #endregion Properties

        #region Events
        private void Form1_Load(object sender, EventArgs e)
        {
            //RegisterHotKey(this.Handle, 0, 0, startKey.GetHashCode());
            //RegisterHotKey(this.Handle, 1, 0, Keys.F2.GetHashCode());
            //RegisterHotKey(this.Handle, 2, (int)KeyModifier.Control, Keys.Space.GetHashCode());
            //RegisterHotKey(this.Handle, 3, 0, recordKey.GetHashCode());
            RegisterHotKey(this.Handle, 4, 0, imgKey.GetHashCode());

            isStopClick           = true;
            currentImgIndex       = 0;
            repeatCycleIndex      = 0;
            loopIndex             = 0;
            detectIgnoreImgCount  = 0;
            timeoutClickCount     = FileInfoConst.timeoutClickCount;
            dragCount             = 0;
            isRepeatImgClicked    = false;
            isMouseDownIndex      = false;
            isMouseWheelDownIndex = false;
            posList = new List <Point>();
            //resultFile = "result.txt";
            FileInfoConst.ReadConfigFileForImg();
            FileInfoConst.initImgSubScreenList();
            aTimer          = new System.Timers.Timer();
            aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
        }
示例#2
0
 public void GetNextGmail(string username, string password)
 {
     if (!File.Exists(FileInfoConst.mailListFile))
     {
         return;
     }
     try
     {
         string       line;
         StreamReader sr = new StreamReader(FileInfoConst.mailListFile);
         while ((line = sr.ReadLine()) != null)
         {
             if (line.Contains(username))
             {
                 line = sr.ReadLine();
                 line = sr.ReadLine();
                 if (line.Trim() == "" || line == null)
                 {
                     return;
                 }
                 string userNew        = line;
                 int    afterIndexUser = FileInfoConst.textAfterIndexList.FirstOrDefault(x => x.Value == username).Key;
                 FileInfoConst.textAfterIndexList[afterIndexUser] = userNew;
                 FileInfoConst.usernameDefault = userNew;
                 line = sr.ReadLine();
                 string passNew        = line;
                 int    afterIndexPass = FileInfoConst.textAfterIndexList.FirstOrDefault(x => x.Value == password).Key;
                 FileInfoConst.textAfterIndexList[afterIndexPass] = passNew;
                 FileInfoConst.passwordDefault = passNew;
                 FileInfoConst.WriteConfigFileForImg();
                 break;
             }
         }
         sr.Close();
     }
     catch
     {
     }
 }