Camera.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.WindowsMobile.Forms;
using System.IO;
using System.Net;
namespace CameraNow
{
public partial class Camera : Form
{
public Camera()
{
InitializeComponent();
}
private void BtnCamera_Click(object sender, EventArgs e)
{
using (CameraCaptureDialog dlg = new CameraCaptureDialog())
{
if (dlg.ShowDialog() == DialogResult.OK)
pictureBox1.Image = new Bitmap(dlg.FileName);
}
}
private void save_button1_Click(object sender, EventArgs e)
{
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
if (pictureBox1.Image != null)
{
pictureBox1.Image.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg);
textBox_fileName.Text = saveFileDialog1.FileName;
}
}
}
public void UploadFileBinary(string localFile, string uploadUrl)
{
try
{
FileStream rdr = new FileStream(localFile, FileMode.Open);
byte[] inData = new byte[4096];
int totbytes = 0;
MemoryStream postData = new MemoryStream();
int bytesRead = rdr.Read(inData, 0, inData.Length);
while (bytesRead > 0)
{
后面还有 49 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。