public void CloseView() { Log.Info("CloseView over."); if (m_bDraw) { //上传画过的图片 Image img = ScreenCapture.captureScreen(0, 0); string imgName = DateTime.Now.ToString("yyyyMMdd") + "-" + Global.getSchoolID() + "-" + Global.getClassID() + "-" + DateTime.Now.ToString("HHmmss") + ".jpg"; string imgDir = Application.StartupPath + "\\" + DateTime.Now.ToString("yyyyMMdd"); if (!Directory.Exists(imgDir)) { Directory.CreateDirectory(imgDir); } string imgPath = imgDir + "\\" + imgName; img.Save(imgPath); Common.uploadPicture(imgPath);//drawView Common.uploadDrawView(imgName); } m_bDraw = false; this.Close(); }