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); } }
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); } }
public abstract bool SaveCameraSetInfo(CameraSetInfo cameraSetInfo);