コード例 #1
0
ファイル: DataCenter.cs プロジェクト: zhimakaimen225/Login
        public bool SaveCameraSetting(string timeStr,
                                      int zoom,
                                      int orgWidth,
                                      int orgHeight,
                                      int finderFrameX,
                                      int finderFrameY,
                                      bool hMirror,
                                      bool vMirror,
                                      bool light)
        {
            CameraSetInfo info = new CameraSetInfo();

            info.timeStr      = timeStr;
            info.zoom         = zoom;
            info.orgWidth     = orgWidth;
            info.orgHeight    = orgHeight;
            info.finderFrameX = finderFrameX;
            info.finderFrameY = finderFrameY;
            info.hMirror      = hMirror;
            info.vMirror      = vMirror;
            info.light        = light;

            if (dbClient != null)
            {
                return(dbClient.SaveCameraSetInfo(info));
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
        public override bool SaveCameraSetInfo(CameraSetInfo cameraSetInfo)
        {
            try
            {
                string sql = string.Format("insert into CameraSetTable (CameraSetTime, CameraSetZoom, CameraSetOrgWidth, CameraSetOrgHeight, CameraSetHorizontalLocation, CameraSetVerticalLocation, CameraSetHorizontalMirror, CameraSetVerticalMirror, CameraSetLight) values('{0}', {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8})",
                                           cameraSetInfo.timeStr, cameraSetInfo.zoom, cameraSetInfo.orgWidth, cameraSetInfo.orgHeight, cameraSetInfo.finderFrameX, cameraSetInfo.finderFrameY, cameraSetInfo.hMirror, cameraSetInfo.vMirror, cameraSetInfo.light);
                MySqlCommand cmd = new MySqlCommand(sql, connection);
                cmd.ExecuteNonQuery();

                return(true);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return(false);
            }
        }
コード例 #3
0
ファイル: DBClient.cs プロジェクト: zhimakaimen225/Login
 public abstract bool SaveCameraSetInfo(CameraSetInfo cameraSetInfo);