Beispiel #1
0
 public static int getshowedID()
 {
     --MySQLHandle.lastseenID;
     if (MySQLHandle.firsttimeGetShowedID)
     {
         MySQLHandle.lastseenID           = MySQLHandle.getimgID() - 1;
         MySQLHandle.firsttimeGetShowedID = false;
     }
     return(MySQLHandle.lastseenID);
 }
Beispiel #2
0
        public static void FTPUploadImage(Bitmap img)
        {
            string str = Application.StartupPath + "\\tmpimg.bmp";

            img.Save(str);
            new WebClient()
            {
                Credentials = ((ICredentials) new NetworkCredential("momoos", "kakavko1"))
            }.UploadFile("ftp://*****:*****@ftp.drivehq.com/" + MySQLHandle.getimgID().ToString() + ".bmp", str);
            System.IO.File.Delete(str);
        }