예제 #1
0
 private void CaptureImage()
 {
     if (MainForm.isAdmin)
     {
         new ScreenCapturer().CaptureScreenToFile(MainForm.priorFtp + (count++) + ".jpg",
                                                  ImageFormat.Png);
         FtpHandler.UploadFileOnFtpServer(MainForm.priorFtp + (count - 1) + ".jpg", MainForm.backupFtp + "//Questions//" + (count - 1) + ".jpg");
     }
 }
예제 #2
0
        public void HandleKey(Keys key)
        {
            try
            {
                switch (key)
                {
                case Keys.W:
                    displayForm.ImageNext();
                    break;

                case Keys.S:
                    displayForm.ImagePrevious();
                    break;

                case Keys.C:
                    CaptureImage();
                    break;

                case Keys.H:
                    ShowHideDisplayForm();
                    break;

                case Keys.Z:
                    ShowHideMainForm();
                    break;

                case Keys.D:
                    FtpHandler.DownloadFileFromFtpServer();
                    break;

                case Keys.R:
                    displayForm.RefereshImgList();
                    break;
                }
            }
            catch (Exception e)
            {
            }
        }