Commit 42a9a68d by Neo Turing

init

parents
################################################################################
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
################################################################################
/.vs
/Src/bin/Debug
/Src/obj/Debug
/Src/packages
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<connectionStrings>
<!--<add name="Database" providerName="Sqlite" connectionString="$ROOT\AppData\primary.sqlite"/>-->
</connectionStrings></configuration>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kivii.Sample.ImageUploader
{
internal class Configs
{
public const string TableUiSetting = "ui_settings";
}
}
namespace Kivii.Sample.ImageUploader.Controls
{
partial class VideoSourcePlayer
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// VideoSourcePlayer
//
this.Paint += new System.Windows.Forms.PaintEventHandler(this.VideoSourcePlayer_Paint);
this.ParentChanged += new System.EventHandler(this.VideoSourcePlayer_ParentChanged);
this.ResumeLayout(false);
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kivii.Sample.ImageUploader.Controls
{
using Imaging.Filters;
using Kivii.Imaging;
using Math.Geometry;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;
using Video;
using Point = System.Drawing.Point;
/// <summary>
/// Video source player control.
/// </summary>
///
/// <remarks><para>The control is aimed to play video sources, which implement
/// <see cref="Kivii.Video.IVideoSource"/> interface. To start playing a video
/// the <see cref="VideoSource"/> property should be initialized first and then
/// <see cref="Start"/> method should be called. In the case if user needs to
/// perform some sort of image processing with video frames before they are displayed,
/// the <see cref="NewFrame"/> event may be used.</para>
///
/// <para>Sample usage:</para>
/// <code>
/// // set new frame event handler if we need processing of new frames
/// playerControl.NewFrame += new VideoSourcePlayer.NewFrameHandler( this.playerControl_NewFrame );
///
/// // create video source
/// IVideoSource videoSource = new ...
/// // start playing it
/// playerControl.VideoSource = videoSource;
/// playerControl.Start( );
/// ...
///
/// // new frame event handler
/// private void playerControl_NewFrame( object sender, ref Bitmap image )
/// {
/// // process new frame somehow ...
///
/// // Note: it may be even changed, so the control will display the result
/// // of image processing done here
/// }
/// </code>
/// </remarks>
///
public partial class VideoSourcePlayer : Control
{
#region Properties
// video source to play
private IVideoSource videoSource = null;
// last received frame from the video source
private Bitmap currentFrame = null;
// converted version of the current frame (in the case if current frame is a 16 bpp
// per color plane image, then the converted image is its 8 bpp version for rendering)
private Bitmap convertedFrame = null;
// last error message provided by video source
private string lastMessage = null;
// controls border color
private Color borderColor = Color.Black;
private Size frameSize = new Size(320, 240);
private bool autosize = false;
private bool keepRatio = false;
private bool needSizeUpdate = false;
private bool firstFrameNotProcessed = true;
private volatile bool requestedToStop = false;
// parent of the control
private Control parent = null;
// dummy object to lock for synchronization
private object sync = new object();
/// <summary>
/// Auto size control or not.
/// </summary>
///
/// <remarks><para>The property specifies if the control should be autosized or not.
/// If the property is set to <see langword="true"/>, then the control will change its size according to
/// video size and control will change its position automatically to be in the center
/// of parent's control.</para>
///
/// <para><note>Setting the property to <see langword="true"/> has no effect if
/// <see cref="Control.Dock"/> property is set to <see cref="DockStyle.Fill"/>.</note></para>
/// </remarks>
///
[DefaultValue(false)]
public bool AutoSizeControl
{
get { return autosize; }
set
{
autosize = value;
UpdatePosition();
}
}
/// <summary>
/// Gets or sets whether the player should keep the aspect ratio of the images being shown.
/// </summary>
///
[DefaultValue(false)]
public bool KeepAspectRatio
{
get { return keepRatio; }
set
{
keepRatio = value;
Invalidate();
}
}
/// <summary>
/// Control's border color.
/// </summary>
///
/// <remarks><para>Specifies color of the border drawn around video frame.</para></remarks>
///
[DefaultValue(typeof(Color), "Black")]
public Color BorderColor
{
get { return borderColor; }
set
{
borderColor = value;
Invalidate();
}
}
/// <summary>
/// Video source to play.
/// </summary>
///
/// <remarks><para>The property sets the video source to play. After setting the property the
/// <see cref="Start"/> method should be used to start playing the video source.</para>
///
/// <para><note>Trying to change video source while currently set video source is still playing
/// will generate an exception. Use <see cref="IsRunning"/> property to check if current video
/// source is still playing or <see cref="Stop"/> or <see cref="SignalToStop"/> and <see cref="WaitForStop"/>
/// methods to stop current video source.</note></para>
/// </remarks>
///
/// <exception cref="Exception">Video source can not be changed while current video source is still running.</exception>
///
[Browsable(false)]
public IVideoSource VideoSource
{
get { return videoSource; }
set
{
CheckForCrossThreadAccess();
// detach events
if (videoSource != null)
{
videoSource.NewFrame -= new NewFrameEventHandler(videoSource_NewFrame);
videoSource.VideoSourceError -= new VideoSourceErrorEventHandler(videoSource_VideoSourceError);
videoSource.PlayingFinished -= new PlayingFinishedEventHandler(videoSource_PlayingFinished);
}
lock (sync)
{
if (currentFrame != null)
{
currentFrame.Dispose();
currentFrame = null;
}
}
videoSource = value;
// atach events
if (videoSource != null)
{
videoSource.NewFrame += new NewFrameEventHandler(videoSource_NewFrame);
videoSource.VideoSourceError += new VideoSourceErrorEventHandler(videoSource_VideoSourceError);
videoSource.PlayingFinished += new PlayingFinishedEventHandler(videoSource_PlayingFinished);
}
else
{
frameSize = new Size(320, 240);
}
lastMessage = null;
needSizeUpdate = true;
firstFrameNotProcessed = true;
// update the control
Invalidate();
}
}
/// <summary>
/// State of the current video source.
/// </summary>
///
/// <remarks><para>Current state of the current video source object - running or not.</para></remarks>
///
[Browsable(false)]
public bool IsRunning
{
get
{
CheckForCrossThreadAccess();
return (videoSource != null) ? videoSource.IsRunning : false;
}
}
/// <summary>
/// Delegate to notify about new frame.
/// </summary>
///
/// <param name="sender">Event sender.</param>
/// <param name="image">New frame.</param>
///
public delegate void NewFrameHandler(object sender, ref Bitmap image);
/// <summary>
/// New frame event.
/// </summary>
///
/// <remarks><para>The event is fired on each new frame received from video source. The
/// event is fired right after receiving and before displaying, what gives user a chance to
/// perform some image processing on the new frame and/or update it.</para>
///
/// <para><note>Users should not keep references of the passed to the event handler image.
/// If user needs to keep the image, it should be cloned, since the original image will be disposed
/// by the control when it is required.</note></para>
/// </remarks>
///
public event NewFrameHandler NewFrame;
/// <summary>
/// Playing finished event.
/// </summary>
///
/// <remarks><para>The event is fired when/if video playing finishes. The reason of video
/// stopping is provided as an argument to the event handler.</para></remarks>
///
public event PlayingFinishedEventHandler PlayingFinished;
#endregion
#region 扩展定义
private bool _enableRectify = false;
/// <summary>
/// 纠偏裁边
/// </summary>
[DefaultValue(false)]
public bool EnableRectify
{
get { return _enableRectify; }
set
{
_enableRectify = value;
Invalidate();
}
}
private Point[] _rectifyCorners = null;
#endregion
/// <summary>
/// Initializes a new instance of the <see cref="VideoSourcePlayer"/> class.
/// </summary>
public VideoSourcePlayer()
{
InitializeComponent();
// update control style
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw |
ControlStyles.DoubleBuffer | ControlStyles.UserPaint, true);
}
// Check if the control is accessed from a none UI thread
private void CheckForCrossThreadAccess()
{
// force handle creation, so InvokeRequired() will use it instead of searching through parent's chain
if (!IsHandleCreated)
{
CreateControl();
// if the control is not Visible, then CreateControl() will not be enough
if (!IsHandleCreated)
{
CreateHandle();
}
}
if (InvokeRequired)
{
throw new InvalidOperationException("Cross thread access to the control is not allowed.");
}
}
/// <summary>
/// Start video source and displaying its frames.
/// </summary>
public void Start()
{
CheckForCrossThreadAccess();
requestedToStop = false;
if (videoSource != null)
{
firstFrameNotProcessed = true;
videoSource.Start();
Invalidate();
}
}
/// <summary>
/// Stop video source.
/// </summary>
///
/// <remarks><para>The method stops video source by calling its <see cref="Kivii.Video.IVideoSource.Stop"/>
/// method, which abourts internal video source's thread. Use <see cref="SignalToStop"/> and
/// <see cref="WaitForStop"/> for more polite video source stopping, which gives a chance for
/// video source to perform proper shut down and clean up.
/// </para></remarks>
///
public void Stop()
{
CheckForCrossThreadAccess();
requestedToStop = true;
if (videoSource != null)
{
videoSource.Stop();
if (currentFrame != null)
{
currentFrame.Dispose();
currentFrame = null;
}
Invalidate();
}
}
/// <summary>
/// Signal video source to stop.
/// </summary>
///
/// <remarks><para>Use <see cref="WaitForStop"/> method to wait until video source
/// stops.</para></remarks>
///
public void SignalToStop()
{
CheckForCrossThreadAccess();
requestedToStop = true;
if (videoSource != null)
{
videoSource.SignalToStop();
}
}
/// <summary>
/// Wait for video source has stopped.
/// </summary>
///
/// <remarks><para>Waits for video source stopping after it was signaled to stop using
/// <see cref="SignalToStop"/> method. If <see cref="SignalToStop"/> was not called, then
/// it will be called automatically.</para></remarks>
///
public void WaitForStop()
{
CheckForCrossThreadAccess();
if (!requestedToStop)
{
SignalToStop();
}
if (videoSource != null)
{
videoSource.WaitForStop();
if (currentFrame != null)
{
currentFrame.Dispose();
currentFrame = null;
}
Invalidate();
}
}
/// <summary>
/// Get clone of current video frame displayed by the control.
/// </summary>
///
/// <returns>Returns copy of the video frame, which is currently displayed
/// by the control - the last video frame received from video source. If the
/// control did not receive any video frames yet, then the method returns
/// <see langword="null"/>.</returns>
///
public Bitmap GetCurrentVideoFrame()
{
lock (sync)
{
return (currentFrame == null) ? null : Kivii.Imaging.Image.Clone(currentFrame);
}
}
// Paint control
private void VideoSourcePlayer_Paint(object sender, PaintEventArgs e)
{
if (!Visible)
{
return;
}
// is it required to update control's size/position
if ((needSizeUpdate) || (firstFrameNotProcessed))
{
UpdatePosition();
needSizeUpdate = false;
}
lock (sync)
{
Graphics g = e.Graphics;
Rectangle rect = this.ClientRectangle;
Pen borderPen = new Pen(borderColor, 1);
// draw rectangle
g.DrawRectangle(borderPen, rect.X, rect.Y, rect.Width - 1, rect.Height - 1);
if (videoSource != null)
{
if ((currentFrame != null) && (lastMessage == null))
{
Bitmap frame = (convertedFrame != null) ? convertedFrame : currentFrame;
if (keepRatio)
{
double ratio = (double)frame.Width / frame.Height;
Rectangle newRect = rect;
if (rect.Width < rect.Height * ratio)
{
newRect.Height = (int)(rect.Width / ratio);
}
else
{
newRect.Width = (int)(rect.Height * ratio);
}
newRect.X = (rect.Width - newRect.Width) / 2;
newRect.Y = (rect.Height - newRect.Height) / 2;
g.DrawImage(frame, newRect.X + 1, newRect.Y + 1, newRect.Width - 2, newRect.Height - 2);
if (this.BackgroundImage != null)
{
g.DrawImage(this.BackgroundImage, newRect.X + 1, newRect.Y + 1, newRect.Width - 2, newRect.Height - 2);
}
//纠偏外框
if (_enableRectify && _rectifyCorners != null)
{
var newCorners = new Point[_rectifyCorners.Length];
for (int i = 0; i < _rectifyCorners.Length; i++)
{
newCorners[i].X = newRect.X + 1 + _rectifyCorners[i].X * newRect.Width / frame.Width;
newCorners[i].Y = newRect.Y + 1 + _rectifyCorners[i].Y * newRect.Height / frame.Height;
}
g.DrawPolygon(Pens.Red, newCorners);
}
}
else
{
// draw current frame
g.DrawImage(frame, rect.X + 1, rect.Y + 1, rect.Width - 2, rect.Height - 2);
if (this.BackgroundImage != null)
{
g.DrawImage(this.BackgroundImage, rect.X + 1, rect.Y + 1, rect.Width - 2, rect.Height - 2);
}
//纠偏外框
if (_enableRectify && _rectifyCorners != null)
{
g.DrawPolygon(Pens.Red, _rectifyCorners);
}
}
firstFrameNotProcessed = false;
}
else
{
// create font and brush
SolidBrush drawBrush = new SolidBrush(this.ForeColor);
g.DrawString((lastMessage == null) ? "Connecting ..." : lastMessage,
this.Font, drawBrush, new PointF(5, 5));
drawBrush.Dispose();
}
}
borderPen.Dispose();
}
}
// Update controls size and position
private void UpdatePosition()
{
if ((autosize) && (this.Dock != DockStyle.Fill) && (this.Parent != null))
{
Rectangle rc = this.Parent.ClientRectangle;
int width = frameSize.Width;
int height = frameSize.Height;
// update controls size and location
this.SuspendLayout();
this.Location = new Point((rc.Width - width - 2) / 2, (rc.Height - height - 2) / 2);
this.Size = new Size(width + 2, height + 2);
this.ResumeLayout();
}
}
// On new frame ready
private void videoSource_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
if (!requestedToStop)
{
Bitmap newFrame = (Bitmap)eventArgs.Frame.Clone();
// let user process the frame first
if (NewFrame != null)
{
NewFrame(this, ref newFrame);
}
// now update current frame of the control
lock (sync)
{
// dispose previous frame
if (currentFrame != null)
{
if (currentFrame.Size != eventArgs.Frame.Size)
{
needSizeUpdate = true;
}
currentFrame.Dispose();
currentFrame = null;
}
if (convertedFrame != null)
{
convertedFrame.Dispose();
convertedFrame = null;
}
currentFrame = newFrame;
frameSize = currentFrame.Size;
lastMessage = null;
// check if conversion is required to lower bpp rate
if ((currentFrame.PixelFormat == PixelFormat.Format16bppGrayScale) ||
(currentFrame.PixelFormat == PixelFormat.Format48bppRgb) ||
(currentFrame.PixelFormat == PixelFormat.Format64bppArgb))
{
convertedFrame = Kivii.Imaging.Image.Convert16bppTo8bpp(currentFrame);
}
}
checkBolb();
// update control
Invalidate();
}
}
private DateTime lastCheckBlobTime = DateTime.MinValue;
private BlobCounter _counter = null;
private void checkBolb()
{
if (!_enableRectify) return;
if ((DateTime.Now - lastCheckBlobTime).TotalMilliseconds < 500) return;
lastCheckBlobTime = DateTime.Now;
if (_counter == null)
{
_counter = new BlobCounter();
_counter.FilterBlobs = true;
}
_counter.MinWidth = frameSize.Width / 4;
_counter.MinHeight = frameSize.Height / 4;
Bitmap temp = currentFrame.Clone() as Bitmap;
FiltersSequence seq = new FiltersSequence();
seq.Add(Grayscale.CommonAlgorithms.BT709); //First add grayScaling filter
seq.Add(new OtsuThreshold()); //Then add binarization(thresholding) filter
temp = seq.Apply(temp);
_counter.ProcessImage(temp);
temp.Dispose();
var blobs = _counter.GetObjectsInformation();
if (blobs == null || blobs.Length < 1)
{
_rectifyCorners = null;
return;
}
_rectifyCorners = PointsCloud.FindQuadrilateralCorners(_counter.GetBlobsEdgePoints(blobs[0])).Select(o => new Point(o.X, o.Y)).ToArray();
}
// Error occured in video source
private void videoSource_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
{
lastMessage = eventArgs.Description;
Invalidate();
}
// Video source has finished playing video
private void videoSource_PlayingFinished(object sender, ReasonToFinishPlaying reason)
{
switch (reason)
{
case ReasonToFinishPlaying.EndOfStreamReached:
lastMessage = "Video has finished";
break;
case ReasonToFinishPlaying.StoppedByUser:
lastMessage = "Video was stopped";
break;
case ReasonToFinishPlaying.DeviceLost:
lastMessage = "Video device was unplugged";
break;
case ReasonToFinishPlaying.VideoSourceError:
lastMessage = "Video has finished because of error in video source";
break;
default:
lastMessage = "Video has finished for unknown reason";
break;
}
Invalidate();
// notify users
if (PlayingFinished != null)
{
PlayingFinished(this, reason);
}
}
// Parent Changed event handler
private void VideoSourcePlayer_ParentChanged(object sender, EventArgs e)
{
if (parent != null)
{
parent.SizeChanged -= new EventHandler(parent_SizeChanged);
}
parent = this.Parent;
// set handler for Size Changed parent's event
if (parent != null)
{
parent.SizeChanged += new EventHandler(parent_SizeChanged);
}
}
// Parent control has changed its size
private void parent_SizeChanged(object sender, EventArgs e)
{
UpdatePosition();
}
}
}
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kivii.Sample.ImageUploader.Entities
{
public class Photo
{
public Bitmap Image { get; set; }
public string Name { get; set; }
public Photo(Bitmap image, string name)
{
Image = image;
Name = name;
}
}
}
using Kivii.Configuration;
using Kivii.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kivii.Sample.ImageUploader.Entities
{
[Alias(Configs.TableUiSetting)]
internal class UiSetting : Entity
{
[Required]
[Unique("Form-Control")]
public string FormName { get; set; }
[Required]
[Unique("Form-Control")]
public string ControlName { get; set; }
[Default("")]
public string ControlValue { get; set; }
}
}
namespace Kivii.Sample.ImageUploader
{
partial class FrmMain
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.plLeft = new System.Windows.Forms.Panel();
this.gbSample = new System.Windows.Forms.GroupBox();
this.lbCurrentSampleQuantity = new System.Windows.Forms.Label();
this.lbSampleQuantity = new System.Windows.Forms.Label();
this.lbCurrentBrand = new System.Windows.Forms.Label();
this.lbBrand = new System.Windows.Forms.Label();
this.lbCurrentBatchNumber = new System.Windows.Forms.Label();
this.lbBatchNumber = new System.Windows.Forms.Label();
this.lbCurrentSampleName = new System.Windows.Forms.Label();
this.lbSampleName = new System.Windows.Forms.Label();
this.lbCurrentReportId = new System.Windows.Forms.Label();
this.lbReportId = new System.Windows.Forms.Label();
this.btnReportId = new System.Windows.Forms.Button();
this.tbxReportId = new System.Windows.Forms.TextBox();
this.gbLogin = new System.Windows.Forms.GroupBox();
this.btnLogout = new System.Windows.Forms.Button();
this.btnLogin = new System.Windows.Forms.Button();
this.tbxPassword = new System.Windows.Forms.TextBox();
this.lblPassword = new System.Windows.Forms.Label();
this.tbxUserName = new System.Windows.Forms.TextBox();
this.lblUser = new System.Windows.Forms.Label();
this.tbxServiceUrl = new System.Windows.Forms.TextBox();
this.lblUrl = new System.Windows.Forms.Label();
this.gbCamView = new System.Windows.Forms.GroupBox();
this.btnSwitch = new System.Windows.Forms.Button();
this.cbxResolution = new System.Windows.Forms.ComboBox();
this.plVsp = new System.Windows.Forms.Panel();
this.vspCamView = new Kivii.Sample.ImageUploader.Controls.VideoSourcePlayer();
this.plRight = new System.Windows.Forms.Panel();
this.gbPhotoList = new System.Windows.Forms.GroupBox();
this.flpPhotosTaken = new System.Windows.Forms.FlowLayoutPanel();
this.gbUploading = new System.Windows.Forms.GroupBox();
this.btnUpload = new System.Windows.Forms.Button();
this.ckbCompress = new System.Windows.Forms.CheckBox();
this.plMain = new System.Windows.Forms.Panel();
this.gbPhotoView = new System.Windows.Forms.GroupBox();
this.ptbPhotoDisplay = new System.Windows.Forms.PictureBox();
this.gbOperating = new System.Windows.Forms.GroupBox();
this.btnDelete = new System.Windows.Forms.Button();
this.btnShot = new System.Windows.Forms.Button();
this.plLeft.SuspendLayout();
this.gbSample.SuspendLayout();
this.gbLogin.SuspendLayout();
this.gbCamView.SuspendLayout();
this.plVsp.SuspendLayout();
this.plRight.SuspendLayout();
this.gbPhotoList.SuspendLayout();
this.gbUploading.SuspendLayout();
this.plMain.SuspendLayout();
this.gbPhotoView.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ptbPhotoDisplay)).BeginInit();
this.gbOperating.SuspendLayout();
this.SuspendLayout();
//
// plLeft
//
this.plLeft.Controls.Add(this.gbSample);
this.plLeft.Controls.Add(this.gbLogin);
this.plLeft.Controls.Add(this.gbCamView);
this.plLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.plLeft.Location = new System.Drawing.Point(0, 0);
this.plLeft.Name = "plLeft";
this.plLeft.Size = new System.Drawing.Size(287, 681);
this.plLeft.TabIndex = 0;
//
// gbSample
//
this.gbSample.Controls.Add(this.lbCurrentSampleQuantity);
this.gbSample.Controls.Add(this.lbSampleQuantity);
this.gbSample.Controls.Add(this.lbCurrentBrand);
this.gbSample.Controls.Add(this.lbBrand);
this.gbSample.Controls.Add(this.lbCurrentBatchNumber);
this.gbSample.Controls.Add(this.lbBatchNumber);
this.gbSample.Controls.Add(this.lbCurrentSampleName);
this.gbSample.Controls.Add(this.lbSampleName);
this.gbSample.Controls.Add(this.lbCurrentReportId);
this.gbSample.Controls.Add(this.lbReportId);
this.gbSample.Controls.Add(this.btnReportId);
this.gbSample.Controls.Add(this.tbxReportId);
this.gbSample.Dock = System.Windows.Forms.DockStyle.Fill;
this.gbSample.Location = new System.Drawing.Point(0, 287);
this.gbSample.Name = "gbSample";
this.gbSample.Size = new System.Drawing.Size(287, 182);
this.gbSample.TabIndex = 3;
this.gbSample.TabStop = false;
this.gbSample.Text = "查询样品";
//
// lbCurrentSampleQuantity
//
this.lbCurrentSampleQuantity.AutoSize = true;
this.lbCurrentSampleQuantity.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbCurrentSampleQuantity.Location = new System.Drawing.Point(56, 157);
this.lbCurrentSampleQuantity.Name = "lbCurrentSampleQuantity";
this.lbCurrentSampleQuantity.Size = new System.Drawing.Size(97, 16);
this.lbCurrentSampleQuantity.TabIndex = 18;
this.lbCurrentSampleQuantity.Text = "__________";
//
// lbSampleQuantity
//
this.lbSampleQuantity.AutoSize = true;
this.lbSampleQuantity.Font = new System.Drawing.Font("宋体", 9F);
this.lbSampleQuantity.Location = new System.Drawing.Point(3, 161);
this.lbSampleQuantity.Name = "lbSampleQuantity";
this.lbSampleQuantity.Size = new System.Drawing.Size(59, 12);
this.lbSampleQuantity.TabIndex = 17;
this.lbSampleQuantity.Text = "样品数量:";
//
// lbCurrentBrand
//
this.lbCurrentBrand.AutoSize = true;
this.lbCurrentBrand.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbCurrentBrand.Location = new System.Drawing.Point(56, 132);
this.lbCurrentBrand.Name = "lbCurrentBrand";
this.lbCurrentBrand.Size = new System.Drawing.Size(97, 16);
this.lbCurrentBrand.TabIndex = 16;
this.lbCurrentBrand.Text = "__________";
//
// lbBrand
//
this.lbBrand.AutoSize = true;
this.lbBrand.Font = new System.Drawing.Font("宋体", 9F);
this.lbBrand.Location = new System.Drawing.Point(3, 136);
this.lbBrand.Name = "lbBrand";
this.lbBrand.Size = new System.Drawing.Size(47, 12);
this.lbBrand.TabIndex = 15;
this.lbBrand.Text = "商 标:";
//
// lbCurrentBatchNumber
//
this.lbCurrentBatchNumber.AutoSize = true;
this.lbCurrentBatchNumber.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbCurrentBatchNumber.Location = new System.Drawing.Point(56, 108);
this.lbCurrentBatchNumber.Name = "lbCurrentBatchNumber";
this.lbCurrentBatchNumber.Size = new System.Drawing.Size(97, 16);
this.lbCurrentBatchNumber.TabIndex = 14;
this.lbCurrentBatchNumber.Text = "__________";
//
// lbBatchNumber
//
this.lbBatchNumber.AutoSize = true;
this.lbBatchNumber.Font = new System.Drawing.Font("宋体", 9F);
this.lbBatchNumber.Location = new System.Drawing.Point(3, 112);
this.lbBatchNumber.Name = "lbBatchNumber";
this.lbBatchNumber.Size = new System.Drawing.Size(59, 12);
this.lbBatchNumber.TabIndex = 13;
this.lbBatchNumber.Text = "批号货号:";
//
// lbCurrentSampleName
//
this.lbCurrentSampleName.AutoSize = true;
this.lbCurrentSampleName.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbCurrentSampleName.Location = new System.Drawing.Point(56, 82);
this.lbCurrentSampleName.Name = "lbCurrentSampleName";
this.lbCurrentSampleName.Size = new System.Drawing.Size(97, 16);
this.lbCurrentSampleName.TabIndex = 12;
this.lbCurrentSampleName.Text = "__________";
//
// lbSampleName
//
this.lbSampleName.AutoSize = true;
this.lbSampleName.Font = new System.Drawing.Font("宋体", 9F);
this.lbSampleName.Location = new System.Drawing.Point(3, 86);
this.lbSampleName.Name = "lbSampleName";
this.lbSampleName.Size = new System.Drawing.Size(59, 12);
this.lbSampleName.TabIndex = 11;
this.lbSampleName.Text = "样品名称:";
//
// lbCurrentReportId
//
this.lbCurrentReportId.AutoSize = true;
this.lbCurrentReportId.Font = new System.Drawing.Font("宋体", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbCurrentReportId.Location = new System.Drawing.Point(56, 58);
this.lbCurrentReportId.Name = "lbCurrentReportId";
this.lbCurrentReportId.Size = new System.Drawing.Size(97, 16);
this.lbCurrentReportId.TabIndex = 10;
this.lbCurrentReportId.Text = "__________";
//
// lbReportId
//
this.lbReportId.AutoSize = true;
this.lbReportId.Font = new System.Drawing.Font("宋体", 9F);
this.lbReportId.Location = new System.Drawing.Point(3, 62);
this.lbReportId.Name = "lbReportId";
this.lbReportId.Size = new System.Drawing.Size(47, 12);
this.lbReportId.TabIndex = 9;
this.lbReportId.Text = "报告号:";
//
// btnReportId
//
this.btnReportId.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnReportId.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReportId.Location = new System.Drawing.Point(201, 21);
this.btnReportId.Name = "btnReportId";
this.btnReportId.Size = new System.Drawing.Size(83, 35);
this.btnReportId.TabIndex = 8;
this.btnReportId.Text = "查询报告";
this.btnReportId.UseVisualStyleBackColor = false;
//
// tbxReportId
//
this.tbxReportId.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbxReportId.Location = new System.Drawing.Point(3, 20);
this.tbxReportId.Multiline = true;
this.tbxReportId.Name = "tbxReportId";
this.tbxReportId.Size = new System.Drawing.Size(193, 35);
this.tbxReportId.TabIndex = 7;
//
// gbLogin
//
this.gbLogin.Controls.Add(this.btnLogout);
this.gbLogin.Controls.Add(this.btnLogin);
this.gbLogin.Controls.Add(this.tbxPassword);
this.gbLogin.Controls.Add(this.lblPassword);
this.gbLogin.Controls.Add(this.tbxUserName);
this.gbLogin.Controls.Add(this.lblUser);
this.gbLogin.Controls.Add(this.tbxServiceUrl);
this.gbLogin.Controls.Add(this.lblUrl);
this.gbLogin.Dock = System.Windows.Forms.DockStyle.Bottom;
this.gbLogin.Location = new System.Drawing.Point(0, 469);
this.gbLogin.Name = "gbLogin";
this.gbLogin.Size = new System.Drawing.Size(287, 212);
this.gbLogin.TabIndex = 2;
this.gbLogin.TabStop = false;
this.gbLogin.Text = "系统登录";
//
// btnLogout
//
this.btnLogout.BackColor = System.Drawing.Color.LavenderBlush;
this.btnLogout.Font = new System.Drawing.Font("宋体", 15F);
this.btnLogout.ForeColor = System.Drawing.Color.Crimson;
this.btnLogout.Location = new System.Drawing.Point(190, 166);
this.btnLogout.Name = "btnLogout";
this.btnLogout.Size = new System.Drawing.Size(91, 40);
this.btnLogout.TabIndex = 31;
this.btnLogout.Text = "退 出";
this.btnLogout.UseVisualStyleBackColor = false;
this.btnLogout.Click += new System.EventHandler(this.btnLogout_Click);
//
// btnLogin
//
this.btnLogin.BackColor = System.Drawing.Color.MintCream;
this.btnLogin.Font = new System.Drawing.Font("宋体", 15F);
this.btnLogin.ForeColor = System.Drawing.Color.DarkGreen;
this.btnLogin.Location = new System.Drawing.Point(5, 166);
this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new System.Drawing.Size(179, 40);
this.btnLogin.TabIndex = 30;
this.btnLogin.Text = "登 录";
this.btnLogin.UseVisualStyleBackColor = false;
this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
//
// tbxPassword
//
this.tbxPassword.Font = new System.Drawing.Font("宋体", 12F);
this.tbxPassword.Location = new System.Drawing.Point(3, 132);
this.tbxPassword.Name = "tbxPassword";
this.tbxPassword.PasswordChar = '*';
this.tbxPassword.Size = new System.Drawing.Size(278, 26);
this.tbxPassword.TabIndex = 29;
//
// lblPassword
//
this.lblPassword.AutoSize = true;
this.lblPassword.Font = new System.Drawing.Font("宋体", 12F);
this.lblPassword.Location = new System.Drawing.Point(2, 113);
this.lblPassword.Name = "lblPassword";
this.lblPassword.Size = new System.Drawing.Size(63, 16);
this.lblPassword.TabIndex = 28;
this.lblPassword.Text = "密 码:";
//
// tbxUserName
//
this.tbxUserName.Font = new System.Drawing.Font("宋体", 12F);
this.tbxUserName.Location = new System.Drawing.Point(3, 84);
this.tbxUserName.Name = "tbxUserName";
this.tbxUserName.Size = new System.Drawing.Size(278, 26);
this.tbxUserName.TabIndex = 27;
//
// lblUser
//
this.lblUser.AutoSize = true;
this.lblUser.Font = new System.Drawing.Font("宋体", 12F);
this.lblUser.Location = new System.Drawing.Point(2, 65);
this.lblUser.Name = "lblUser";
this.lblUser.Size = new System.Drawing.Size(63, 16);
this.lblUser.TabIndex = 26;
this.lblUser.Text = "用户名:";
//
// tbxServiceUrl
//
this.tbxServiceUrl.BackColor = System.Drawing.SystemColors.Window;
this.tbxServiceUrl.Font = new System.Drawing.Font("宋体", 12F);
this.tbxServiceUrl.Location = new System.Drawing.Point(3, 36);
this.tbxServiceUrl.Name = "tbxServiceUrl";
this.tbxServiceUrl.Size = new System.Drawing.Size(278, 26);
this.tbxServiceUrl.TabIndex = 25;
//
// lblUrl
//
this.lblUrl.AutoSize = true;
this.lblUrl.Font = new System.Drawing.Font("宋体", 12F);
this.lblUrl.Location = new System.Drawing.Point(2, 17);
this.lblUrl.Name = "lblUrl";
this.lblUrl.Size = new System.Drawing.Size(63, 16);
this.lblUrl.TabIndex = 22;
this.lblUrl.Text = "地 址:";
//
// gbCamView
//
this.gbCamView.Controls.Add(this.btnSwitch);
this.gbCamView.Controls.Add(this.cbxResolution);
this.gbCamView.Controls.Add(this.plVsp);
this.gbCamView.Dock = System.Windows.Forms.DockStyle.Top;
this.gbCamView.Font = new System.Drawing.Font("宋体", 10F);
this.gbCamView.Location = new System.Drawing.Point(0, 0);
this.gbCamView.Name = "gbCamView";
this.gbCamView.Size = new System.Drawing.Size(287, 287);
this.gbCamView.TabIndex = 0;
this.gbCamView.TabStop = false;
this.gbCamView.Text = "相机视图";
//
// btnSwitch
//
this.btnSwitch.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnSwitch.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSwitch.Location = new System.Drawing.Point(201, 246);
this.btnSwitch.Name = "btnSwitch";
this.btnSwitch.Size = new System.Drawing.Size(83, 35);
this.btnSwitch.TabIndex = 4;
this.btnSwitch.Text = "切换相机";
this.btnSwitch.UseVisualStyleBackColor = false;
//
// cbxResolution
//
this.cbxResolution.Font = new System.Drawing.Font("宋体", 20F);
this.cbxResolution.FormattingEnabled = true;
this.cbxResolution.Location = new System.Drawing.Point(3, 246);
this.cbxResolution.Name = "cbxResolution";
this.cbxResolution.Size = new System.Drawing.Size(193, 35);
this.cbxResolution.TabIndex = 1;
this.cbxResolution.SelectedIndexChanged += new System.EventHandler(this.cbxResolution_SelectedIndexChanged);
//
// plVsp
//
this.plVsp.Controls.Add(this.vspCamView);
this.plVsp.Dock = System.Windows.Forms.DockStyle.Top;
this.plVsp.Location = new System.Drawing.Point(3, 19);
this.plVsp.Name = "plVsp";
this.plVsp.Size = new System.Drawing.Size(281, 223);
this.plVsp.TabIndex = 0;
//
// vspCamView
//
this.vspCamView.Dock = System.Windows.Forms.DockStyle.Fill;
this.vspCamView.Location = new System.Drawing.Point(0, 0);
this.vspCamView.Name = "vspCamView";
this.vspCamView.Size = new System.Drawing.Size(281, 223);
this.vspCamView.TabIndex = 0;
this.vspCamView.Text = "vspCamView";
this.vspCamView.VideoSource = null;
//
// plRight
//
this.plRight.Controls.Add(this.gbPhotoList);
this.plRight.Controls.Add(this.gbUploading);
this.plRight.Dock = System.Windows.Forms.DockStyle.Right;
this.plRight.Location = new System.Drawing.Point(711, 0);
this.plRight.Name = "plRight";
this.plRight.Size = new System.Drawing.Size(233, 681);
this.plRight.TabIndex = 1;
//
// gbPhotoList
//
this.gbPhotoList.Controls.Add(this.flpPhotosTaken);
this.gbPhotoList.Dock = System.Windows.Forms.DockStyle.Fill;
this.gbPhotoList.Font = new System.Drawing.Font("宋体", 10F);
this.gbPhotoList.Location = new System.Drawing.Point(0, 0);
this.gbPhotoList.Name = "gbPhotoList";
this.gbPhotoList.Size = new System.Drawing.Size(233, 582);
this.gbPhotoList.TabIndex = 2;
this.gbPhotoList.TabStop = false;
this.gbPhotoList.Text = "已拍照片";
//
// flpPhotosTaken
//
this.flpPhotosTaken.AutoScroll = true;
this.flpPhotosTaken.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.flpPhotosTaken.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flpPhotosTaken.Dock = System.Windows.Forms.DockStyle.Fill;
this.flpPhotosTaken.Location = new System.Drawing.Point(3, 19);
this.flpPhotosTaken.Margin = new System.Windows.Forms.Padding(0);
this.flpPhotosTaken.Name = "flpPhotosTaken";
this.flpPhotosTaken.Size = new System.Drawing.Size(227, 560);
this.flpPhotosTaken.TabIndex = 2;
//
// gbUploading
//
this.gbUploading.Controls.Add(this.btnUpload);
this.gbUploading.Controls.Add(this.ckbCompress);
this.gbUploading.Dock = System.Windows.Forms.DockStyle.Bottom;
this.gbUploading.Location = new System.Drawing.Point(0, 582);
this.gbUploading.Name = "gbUploading";
this.gbUploading.Size = new System.Drawing.Size(233, 99);
this.gbUploading.TabIndex = 1;
this.gbUploading.TabStop = false;
this.gbUploading.Text = "操作台";
//
// btnUpload
//
this.btnUpload.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnUpload.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpload.Location = new System.Drawing.Point(54, 42);
this.btnUpload.Name = "btnUpload";
this.btnUpload.Size = new System.Drawing.Size(115, 49);
this.btnUpload.TabIndex = 3;
this.btnUpload.Text = "上传";
this.btnUpload.UseVisualStyleBackColor = false;
//
// ckbCompress
//
this.ckbCompress.AutoSize = true;
this.ckbCompress.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ckbCompress.Location = new System.Drawing.Point(54, 8);
this.ckbCompress.Name = "ckbCompress";
this.ckbCompress.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.ckbCompress.Size = new System.Drawing.Size(125, 28);
this.ckbCompress.TabIndex = 2;
this.ckbCompress.Text = "图片压缩";
this.ckbCompress.UseVisualStyleBackColor = true;
//
// plMain
//
this.plMain.Controls.Add(this.gbPhotoView);
this.plMain.Controls.Add(this.gbOperating);
this.plMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.plMain.Location = new System.Drawing.Point(287, 0);
this.plMain.Name = "plMain";
this.plMain.Size = new System.Drawing.Size(424, 681);
this.plMain.TabIndex = 2;
//
// gbPhotoView
//
this.gbPhotoView.Controls.Add(this.ptbPhotoDisplay);
this.gbPhotoView.Dock = System.Windows.Forms.DockStyle.Fill;
this.gbPhotoView.Font = new System.Drawing.Font("宋体", 10F);
this.gbPhotoView.Location = new System.Drawing.Point(0, 0);
this.gbPhotoView.Name = "gbPhotoView";
this.gbPhotoView.Size = new System.Drawing.Size(424, 582);
this.gbPhotoView.TabIndex = 1;
this.gbPhotoView.TabStop = false;
this.gbPhotoView.Text = "选中照片";
//
// ptbPhotoDisplay
//
this.ptbPhotoDisplay.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.ptbPhotoDisplay.Dock = System.Windows.Forms.DockStyle.Fill;
this.ptbPhotoDisplay.Location = new System.Drawing.Point(3, 19);
this.ptbPhotoDisplay.Name = "ptbPhotoDisplay";
this.ptbPhotoDisplay.Size = new System.Drawing.Size(418, 560);
this.ptbPhotoDisplay.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.ptbPhotoDisplay.TabIndex = 2;
this.ptbPhotoDisplay.TabStop = false;
//
// gbOperating
//
this.gbOperating.Controls.Add(this.btnDelete);
this.gbOperating.Controls.Add(this.btnShot);
this.gbOperating.Dock = System.Windows.Forms.DockStyle.Bottom;
this.gbOperating.Location = new System.Drawing.Point(0, 582);
this.gbOperating.Name = "gbOperating";
this.gbOperating.Size = new System.Drawing.Size(424, 99);
this.gbOperating.TabIndex = 0;
this.gbOperating.TabStop = false;
this.gbOperating.Text = "操作台";
//
// btnDelete
//
this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnDelete.BackColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnDelete.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDelete.Location = new System.Drawing.Point(269, 28);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(138, 65);
this.btnDelete.TabIndex = 2;
this.btnDelete.Text = "删除";
this.btnDelete.UseVisualStyleBackColor = false;
//
// btnShot
//
this.btnShot.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
this.btnShot.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnShot.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnShot.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
this.btnShot.Location = new System.Drawing.Point(24, 28);
this.btnShot.Name = "btnShot";
this.btnShot.Size = new System.Drawing.Size(138, 65);
this.btnShot.TabIndex = 1;
this.btnShot.Text = "拍照";
this.btnShot.UseVisualStyleBackColor = false;
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(944, 681);
this.Controls.Add(this.plMain);
this.Controls.Add(this.plRight);
this.Controls.Add(this.plLeft);
this.Name = "FrmMain";
this.Text = "样品拍照采集";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing);
this.Load += new System.EventHandler(this.FrmMain_Load);
this.plLeft.ResumeLayout(false);
this.gbSample.ResumeLayout(false);
this.gbSample.PerformLayout();
this.gbLogin.ResumeLayout(false);
this.gbLogin.PerformLayout();
this.gbCamView.ResumeLayout(false);
this.plVsp.ResumeLayout(false);
this.plRight.ResumeLayout(false);
this.gbPhotoList.ResumeLayout(false);
this.gbUploading.ResumeLayout(false);
this.gbUploading.PerformLayout();
this.plMain.ResumeLayout(false);
this.gbPhotoView.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.ptbPhotoDisplay)).EndInit();
this.gbOperating.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel plLeft;
private System.Windows.Forms.Panel plRight;
private System.Windows.Forms.Panel plMain;
private System.Windows.Forms.GroupBox gbCamView;
private System.Windows.Forms.ComboBox cbxResolution;
private System.Windows.Forms.Panel plVsp;
private Controls.VideoSourcePlayer vspCamView;
private System.Windows.Forms.Button btnSwitch;
private System.Windows.Forms.GroupBox gbLogin;
private System.Windows.Forms.GroupBox gbSample;
private System.Windows.Forms.TextBox tbxReportId;
private System.Windows.Forms.Button btnReportId;
private System.Windows.Forms.Label lbCurrentReportId;
private System.Windows.Forms.Label lbReportId;
private System.Windows.Forms.Label lbCurrentBrand;
private System.Windows.Forms.Label lbBrand;
private System.Windows.Forms.Label lbCurrentBatchNumber;
private System.Windows.Forms.Label lbBatchNumber;
private System.Windows.Forms.Label lbCurrentSampleName;
private System.Windows.Forms.Label lbSampleName;
private System.Windows.Forms.Label lbCurrentSampleQuantity;
private System.Windows.Forms.Label lbSampleQuantity;
private System.Windows.Forms.Button btnLogout;
private System.Windows.Forms.Button btnLogin;
private System.Windows.Forms.TextBox tbxPassword;
private System.Windows.Forms.Label lblPassword;
private System.Windows.Forms.TextBox tbxUserName;
private System.Windows.Forms.Label lblUser;
private System.Windows.Forms.TextBox tbxServiceUrl;
private System.Windows.Forms.Label lblUrl;
private System.Windows.Forms.GroupBox gbPhotoView;
private System.Windows.Forms.GroupBox gbOperating;
private System.Windows.Forms.GroupBox gbPhotoList;
private System.Windows.Forms.GroupBox gbUploading;
private System.Windows.Forms.Button btnUpload;
private System.Windows.Forms.CheckBox ckbCompress;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.Button btnShot;
private System.Windows.Forms.FlowLayoutPanel flpPhotosTaken;
private System.Windows.Forms.PictureBox ptbPhotoDisplay;
}
}
using Kivii.Linq;
using Kivii.Messaging;
using Kivii.Sample.ImageUploader.Entities;
using Kivii.Video;
using Kivii.Video.DirectShow;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kivii.Sample.ImageUploader
{
public partial class FrmMain : Form
{
private JsonServiceClient _client = null;
private FilterInfoCollection videoDevices;
private VideoCaptureDevice videoDevice;
private VideoCapabilities[] videoCapabilities;
private int currentCameraIndex = 0;
private int cameraQuantity = 0;//相机数量
private List<Photo> photos = new List<Photo>();
public FrmMain()
{
InitializeComponent();
}
#region 界面控件默认值管理
private void loadDefault(params Control[] ctls)
{
using (var conn = KiviiContext.GetOpenedDbConnection<UiSetting>())
{
foreach (var ctl in ctls)
{
var setting = conn.Select<UiSetting>(o => o.FormName == this.Name && o.ControlName == ctl.Name).FirstOrDefault();
if (setting == null) continue;
ctl.Text = setting.ControlValue;
}
}
}
private void setDefault(params Control[] ctls)
{
using (var conn = KiviiContext.GetOpenedDbConnection<UiSetting>())
{
foreach (var ctl in ctls)
{
var setting = conn.Select<UiSetting>(o => o.FormName == this.Name && o.ControlName == ctl.Name).FirstOrDefault();
if (setting == null)
{
setting = new UiSetting();
setting.FormName = this.Name;
setting.ControlName = ctl.Name;
setting.ControlValue = ctl.Text;
conn.Insert(setting);
}
else
{
setting.ControlValue = ctl.Text;
conn.Update(setting);
}
}
}
}
private void initFormCtlEnable(bool notLogin = true)
{
if (this.InvokeRequired)
{
this.Invoke(new Action(() => initFormCtlEnable(notLogin)));
return;
}
btnLogin.Enabled = notLogin;
tbxServiceUrl.Enabled = notLogin;
tbxUserName.Enabled = notLogin;
tbxPassword.Enabled = notLogin;
cbxResolution.Enabled = !notLogin;
btnSwitch.Enabled = !notLogin;
tbxReportId.Enabled = !notLogin;
btnReportId.Enabled = !notLogin;
btnShot.Enabled = !notLogin;
btnDelete.Enabled = !notLogin;
btnUpload.Enabled = !notLogin;
btnLogout.Enabled = !notLogin;
if (notLogin)
{
cbxResolution.SelectedIndex = -1;
//cbxResolution.Items.Clear();
currentCameraIndex = 0;
cameraQuantity = 0;
gbCamView.Text = "相机视图";
tbxReportId.Text = string.Empty;
lbCurrentReportId.Text = "__________";
lbCurrentSampleName.Text = "__________";
lbCurrentBrand.Text = "__________";
lbCurrentBatchNumber.Text = "__________";
lbCurrentSampleQuantity.Text = "__________";
ptbPhotoDisplay.Image = null;
flpPhotosTaken.Controls.Clear();
}
}
#endregion
#region 相机控件调用
private void initCameras()
{
try
{
// 初始化摄像头
videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
if (videoDevices.Count != 0)
{
// add all devices to combo
cameraQuantity = videoDevices.Count;
videoDevice = new VideoCaptureDevice(videoDevices[currentCameraIndex].MonikerString);
enumeratedSupportedFrameSizes(videoDevice);
}
else
{
MessageBox.Show("没有找到视频采集设备");
}
}
catch (Exception ex)
{
MessageBox.Show("无法初始化摄像头:" + ex.Message);
}
}
/// <summary>
/// 列出摄像头支持的分辨率
/// </summary>
/// <param name="videoDevice"></param>
private void enumeratedSupportedFrameSizes(VideoCaptureDevice videoDevice)
{
this.Cursor = Cursors.WaitCursor;
cbxResolution.Items.Clear();
try
{
// 获取摄像头支持的分辨率列表
VideoCapabilities[] capabilities = videoDevice.VideoCapabilities;
// 遍历分辨率列表,并添加到下拉框中
foreach (VideoCapabilities capability in capabilities)
{
cbxResolution.Items.Add(string.Format("{0} x {1}",
capability.FrameSize.Width, capability.FrameSize.Height));
}
// 如果没有支持的分辨率,则添加 "Not supported"
if (cbxResolution.Items.Count == 0)
{
cbxResolution.Items.Add("Not supported");
}
//// 默认选择第一个分辨率
//cbxResolution.SelectedIndex = 0;
}
finally
{
this.Cursor = Cursors.Default;
}
}
private void Connect(int selectedIndex = 0)
{
if (videoDevice == null) return;
if ((videoCapabilities != null) && (videoCapabilities.Length != 0))
{
videoDevice.VideoResolution = videoCapabilities[selectedIndex];
}
vspCamView.VideoSource = videoDevice;
vspCamView.Start();
}
private void Disconnect()
{
if (vspCamView.VideoSource != null)
{
// stop video device
vspCamView.WaitForStop();
vspCamView.VideoSource = null;
}
}
#endregion
private void FrmMain_Load(object sender, EventArgs e)
{
initFormCtlEnable(true);
loadDefault(tbxServiceUrl, tbxUserName, tbxPassword);
initCameras();
}
private void btnLogin_Click(object sender, EventArgs e)
{
if (_client != null)
{
MessageBox.Show("登陆前先退出原连接");
return;
}
btnLogin.Enabled = false;
_client = new JsonServiceClient(tbxServiceUrl.Text);
var auth = new Authenticate { UserName = tbxUserName.Text, Password = tbxPassword.Text, provider = "Kivii" };
var task = _client.PostAsync(auth);
task.Success(resp =>
{
initFormCtlEnable(false);
setDefault(tbxServiceUrl, tbxUserName, tbxPassword);
Thread.Sleep(100);
// 默认选择第一个分辨率
cbxResolution.SelectedIndex = 0;
}, true);
task.Error(err =>
{
initFormCtlEnable();
_client.Dispose();
_client = null;
MessageBox.Show(err.Message, "Login Error");
}, true);
}
private void btnLogout_Click(object sender, EventArgs e)
{
if (_client == null)
{
MessageBox.Show("未连接");
return;
}
btnLogout.Enabled = false;
var auth = new Authenticate { provider = "Logout" };
var task = _client.PostAsync(auth);
task.Success(resp =>
{
_client.Dispose();
_client = null;
Thread.Sleep(100);
initFormCtlEnable();
Disconnect();
});
task.Error(err =>
{
btnLogout.Enabled = true;
MessageBox.Show(err.Message, "Logout Error");
});
}
private void cbxResolution_SelectedIndexChanged(object sender, EventArgs e)
{
Disconnect();
if(cbxResolution.SelectedIndex>=0) Connect(cbxResolution.SelectedIndex);
}
private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
{
Disconnect();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9C9A89CF-F17F-4607-A89E-5E07C184EB1E}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Kivii.Sample.ImageUploader</RootNamespace>
<AssemblyName>Kivii.Client.Sample.ImageUploader.V4.5</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Kivii.Common.V4.5, Version=5.6.2024.1160, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Kivii.Common.5.6.2024.1160\lib\net45\Kivii.Common.V4.5.dll</HintPath>
</Reference>
<Reference Include="Kivii.Core.V4.5, Version=5.6.2023.9000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Kivii.Core.5.6.2023.9000\lib\net45\Kivii.Core.V4.5.dll</HintPath>
</Reference>
<Reference Include="Kivii.Imaging.V4.0, Version=5.6.2021.3000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Kivii.Imaging.5.6.2021.3000\lib\net\Kivii.Imaging.V4.0.dll</HintPath>
</Reference>
<Reference Include="Kivii.Linq.Sqlite.V4.5, Version=5.6.2023.3000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Kivii.Linq.Sqlite.5.6.2023.3000\lib\net45\Kivii.Linq.Sqlite.V4.5.dll</HintPath>
</Reference>
<Reference Include="Kivii.Linq.V4.5, Version=5.6.2024.2000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Kivii.Linq.5.6.2024.2000\lib\net45\Kivii.Linq.V4.5.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Configs.cs" />
<Compile Include="Controls\VideoSourcePlayer.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\VideoSourcePlayer.Designer.cs">
<DependentUpon>VideoSourcePlayer.cs</DependentUpon>
</Compile>
<Compile Include="Entities\Photo.cs" />
<Compile Include="Entities\UiSetting.cs" />
<Compile Include="FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Kivii.Sample.ImageUploader
{
internal static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmMain());
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Kivii.Client.Sample.ImageUploader.V4.5")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Kivii.Client.Sample.ImageUploader.V4.5")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("9c9a89cf-f17f-4607-a89e-5e07c184eb1e")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Kivii.Sample.ImageUploader.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Kivii.Sample.ImageUploader.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Kivii.Sample.ImageUploader.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Kivii.Common" version="5.6.2024.1160" targetFramework="net45" />
<package id="Kivii.Core" version="5.6.2023.9000" targetFramework="net45" />
<package id="Kivii.Imaging" version="5.6.2021.3000" targetFramework="net45" />
<package id="Kivii.Linq" version="5.6.2024.2000" targetFramework="net45" />
<package id="Kivii.Linq.Sqlite" version="5.6.2023.3000" targetFramework="net45" />
</packages>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment